Showing one point compactification is unique up to homeomorphism
Solution 1
You get the uniqueness result if the space is Hausdorff.
Let $\langle X,\tau\rangle$ be a compact space. Suppose that $p\in X$ is in the closure of $Y=X\setminus\{p\}$, and let $\tau_Y$ be the associated subspace topology on $Y$; $\langle X,\tau\rangle$ is then a compactification of $\langle Y,\tau_Y\rangle$.
Suppose that $p\in U\in\tau$, and let $V=U\cap Y$. Then $\varnothing\ne V\in\tau_Y$, so $Y\setminus V$ is closed in $Y$. Moreover, $Y\setminus V=X\setminus U$ is also closed in $X$, which is compact, so $Y\setminus V$ is compact. That is, every open nbhd of $p$ in $X$ is the complement of a compact, closed subset of $Y$. Thus, if $\tau'$ is the topology on $X$ that makes it a copy of the Alexandroff compactification of $Y$, then $\tau\subseteq\tau'$.
Now let $K\subseteq Y$ be compact and closed in $Y$, and let $V=Y\setminus K\in\tau_Y$. If $X\setminus K=V\cup\{p\}\notin\tau$, then $p\in\operatorname{cl}_XK$. If $X$ is Hausdorff, this is impossible: in that case $K$ is a compact subset of the Hausdorff space $X$ and is therefore closed in $X$. Thus, if $X$ is Hausdorff we must have $\tau=\tau'$, and $X$ is (homeomorphic to) the Alexandroff compactification of $Y$.
If $X$ is not Hausdorff, however, we can have $\tau\subsetneqq\tau'$. A simple example is the sequence with two limits. Let $D$ be a countably infinite set, let $p$ and $q$ be distinct points not in $D$, and let $X=D\cup\{p,q\}$. Points of $D$ are isolated. Basic open nbhds of $p$ are the sets of the form $\{p\}\cup(D\setminus F)$ for finite $F\subseteq D$, and basic open nbhds of $q$ are the sets of the form $\{q\}\cup(D\setminus F)$ for finite $F\subseteq D$. Let $Y=D\cup\{q\}$. Then $Y$ is dense in $X$, and $X$ is compact, and $Y$ itself is a closed, compact subset of $Y$ whose complement is not open in $X$.
Improved example (1 June 2015): Let $D$ and $E$ be disjoint countably infinite sets, let $p$ and $q$ be distinct points not in $D\cup E$, let $X=D\cup E\cup\{p,q\}$, and let $Y=D\cup E\cup\{q\}$. Points of $D\cup E$ are isolated. Basic open nbhds of $q$ are the sets of the form $\{q\}\cup (E\setminus F)$ for finite $F\subseteq E$, and basic open nbhds of $p$ are the sets of the form $\{p\}\cup\big((D\cup E)\setminus F\big)$ for finite $F\subseteq D\cup E$. Then $Y$ is a noncompact dense subspace of the compact space $X$, so $X$ is a (nonHausdorff) compactification of $Y$. Let $K=\{q\}\cup E$. Then $K$ is a compact closed subset of $Y$, but $X\setminus K=\{p\}\cup D$ is not open in $X$.
(This avoids the question of whether it’s legitimate to look at the Alexandrov compactification of a compact space.)
Solution 2
Brian has already shown the uniqueness of onepoint compactifications in the Hausdorff case. Here is a simple example of nonuniqueness in the nonHausdorff case.
Let $X$ be a noncompact topological space. Take a point $\infty$ not in $X$ and form the (nonHausdorff) topological space $Y=X\cup\{\infty\}$ where open sets in $X$ remain open in $Y$ and the only nbhd of $\infty$ is all of $Y$.
$X$ is embedded in $Y$ and is dense in $Y$. And $Y$ is compact because any open set containing $\infty$ is all of $Y$. So $Y$ is a compactification of $X$ in the OP's sense. But in general it will be a strictly weaker topology than the Alexandroff compactification. For example if $X$ is $T_1$, the Alexandroff compactification would also contain all cofinite sets containing $\infty$ as nbhds of $\infty$.
One can cook up similar examples by restricting the nbhds of $\infty$ to only a subset of the complements of closed compact subsets of $X$. It is also the case that if $X$ is not compact, every onepoint compactification of $X$ is an open embedding. This is shown here. So the topology on $Y=X\cup\{\infty\}$ constructed above is the smallest topology that is a onepoint compactification of $X$. The Alexandroff compactification is the largest topology on $Y$ that is a onepoint compactification of $X$. And any onepoint compactification of $X$ will have a topology intermediate between these two.
Related videos on Youtube
Serpahimz
Updated on August 01, 2022Comments

Serpahimz over 1 year
First for clarity I'll define things as I'm familiar with them:
A compactification of a noncompact topological space $X$ is a compact topological space $Y$ such that $X$ can be densley embedded in $Y$ .
In particular a compacitifaction is said to be a onepoint compactification if $\leftY\backslash X\right=1$
The Alexandroff onepoint compactification of a a topological space $\left(X,\mathcal{T}_{X}\right)$ is the set $X^{*}=X\cup\left\{ \infty\right\}$ for some element $\infty\notin X$ given the topology $$\mathcal{T}^{*}:=\mathcal{T}_{X}\cup\left\{ U\subseteq X^{*}\,\,\infty\in U\,\wedge\, X\backslash U\,\mbox{is compact and closed in }\left(X,\mathcal{T}_{X}\right)\right\}$$ If $\left(X,\mathcal{T}_{X}\right)$ is a Hausdorff space one can omit the requirement that $X\backslash U$ is closed.
It is easy to show that given two choices of elements $\infty_{1},\infty_{2}\notin X$ the onepoint compactifications $X\cup\left\{ \infty_{1}\right\}$ and $X\cup\left\{ \infty_{2}\right\}$ with the topology defined as that of the Alexandroff onepoint compactification are homeomorphic. What I'm wondering is why isn't there another possible way to define the topology on $X^{*}$ that would also yield a compactification (which is in particular not homeomorphic to the Alexandroff onepoint topology)
As far as I see it there are two approaches to answering this question:
Show that any topology on $X^{*}$ that yields a compact space in which $X$ is dense is homeomorphic to $\mathcal{T}^{*}$.
Show it's not possible to consturct any other topology on $X^{*}$ that results in a compactification.
I'm quite interested in seeing the reasoning to both approaches if possible. Thanks in advance!

Dan Rust over 10 yearsNote that for any finite topological space $X$, the space $X\cup\{\ast\}$ with any topology extending the topology on $X$ will be a compact space. For instance, take $X$ to be a twoelement set with a nontrivial topology. The discrete extension of $X$ by one element is not homeomorphic to the disjoint union $X\sqcup\{\ast\}$. Does this example not count however because $X$ is compact?

Brian M. Scott over 10 years@Daniel: It’s not a compactification: $X$ isn’t a dense subset of it.

Serpahimz over 10 years@BrianM.Scott I was hoping to see a response from you, I've come to think of you as a topological guru. Hoping you might have the time to answer the original question :)

Dan Rust over 10 years@BrianM.Scott very true. Thanks for pointing that out.

Jakub Konieczny over 10 yearsDon't you want to assume that $X$ is locally compact at some point? Without this, the "compactification" does not come out as a compact space...

Brian M. Scott over 10 years@Feanor: Not necessary: Serpahimz is starting with the assumption that $Y$ is a compactification of $X$ constructed in a particular way. Local compactness then follows (in the Hausdorff case).

Brian M. Scott over 10 years@Serpahimz: I had to think about it a little, but I did get there.

Serpahimz over 10 yearsI think you might have a small typo, at the end of the first line of the third paragraph I believe it should say $X\backslash K=V\cup\left\{ p\right\}$?

Brian M. Scott over 10 years@Serpahimz: Yep; good catch. Thanks.

Serpahimz over 10 yearsExcellent answer, simple and elegant, thanks as ever Brian.

Brian M. Scott over 10 years@Serpahimz: You’re welcome, and thank you.

Serpahimz over 10 yearsThere's one small detail I thought I understood and after thinking it over I'm not sure I understand. Why does $X\backslash K=V\cup\left\{ p\right\} \notin\tau$ mean that $p\in\mbox{Cl}_{X}K$ ?

Brian M. Scott over 10 years@Serpahimz: It means that $K$ is closed in $Y$ but not in $X$. That’s possible iff $p$ is a limit point of $K$ in $X$. $V\in\tau_Y$, so there is a $W\in\tau$ such that $V=W\cap Y$. $W$ must be either $V$ or $V\cup\{p\}$, and the latter isn’t in $\tau$, so $V\in\tau$. Thus, each $y\in Y\setminus K$ has $V$ as a $\tau$open nbhd disjoint from $K$. If $K$ is not $\tau$closed, that leaves $p$ as the only possible member of the nonempty set $(\operatorname{cl}_XK)\setminus K$.

Quique Ruiz over 8 yearsWith respecto to the counterexample, a point is added to a space which is already compact. Should it have been non compact? Am I getting the question wrong?

Brian M. Scott over 8 years@QuiqueRuiz: It was intended only as an example of adding a point to get a space $Y$ to get a compact space in which $Y$ is dense, yet not getting the onepoint compactification, without regard to whether $Y$ was compact to begin with. I think that I can improve it so that $Y$ is not compact; if so, I’ll make the change and leave a note for you.

Brian M. Scott over 8 years@QuiqueRuiz: Yes, there was an easy fix.

Quique Ruiz over 8 years@BrianM.Scott, great! Very nice of you, by the way.

PatrickR about 3 yearsI think something is mixed up in the additional example. It is claimed that $Y$ is not compact, but it is compact since every nbhd of $q$ is cofinite.

Brian M. Scott about 3 years@PatrickR: Yes, I seem accidentally to have included $D$ in the nbhds of $q$; it should be okay now. Thanks for catching it. I also fixed a typo in the description of $X\setminus K$.