Question on the proof of the theorem 29.2 in Munkres' topology textbook The Theorem 29.2 in Munkres' Topology textbook states as follows:

Theorem 29.2. Let $X$ be a Hausdorff space. Then $X$ is locally compact if and only if given $x \in X$, and given a neighborhood $U$ of $x$,there is a neighborhood $V$ of $x$ such that $\overline{V}$ is compact and $\overline{V} \subseteq U$.
Proof: Clearly this new formulation implies local compactness; the set $C = \overline{V}$ is the desired compact set containing a neighborhood of $x$. To prove the converse, suppose $X$ is locally compact, let $x$ be a point of $X$ and let $U$ be a neighborhood of $x$. Take the one-point compactification $Y$ of $X$, and let $C$ be the set $Y - U$. Then $C$ is closed in $Y$, so that $C$ is a compact subspace of $Y$. Apply Lemma 26.4 to choose disjoint open sets $V$ and $W$ containing $x$ and $C$, respectively. Then the closure $\overline{V}$ of $V$ in $Y$ is compact, furthermore, $\overline{V}$ is disjoint from $C$, so that $\overline{V} \subset U$, as desired.

I am curious about the sentence "Take the one-point compactification Y of X," since the one-point compactification of X exists if and only if X is locally compact and not itself compact.
Should it not be replaced by "Let $Y = X\cup \{ \infty \}$" where $\{ \infty \}$ is the point which makes Y compact Hausdorff with the topology inherited by the union of the topology of X and the co-set of the collection of the closed set of X or is there something I am missing?
Thank you very much in advance.
 A: A direct proof without use of one point compactification is not difficult to obtain.
Suppose $(X,\tau)$ is locally compact Hausdorff, and fix $x\in X$. Let $W$ be an open neighborhood of $x$ with compact closure. Since $W\cap U$
also has compact closure and contains $x$, we can assume without loss
of generality  that $W\subset U$.  If $\overline{W}=W$, there is
nothing else to prove; otherwise,   $\{x\}$ and
$\partial W=\overline{W}\setminus W$ are disjoint nonempty compact sets.  For any $y\in\partial W$, there are
disjoint  open
sets $V_y$ and $H_y$ such that $x\in V_y$ and $y\in H_y$.  By compactness, there are finite $H_{y_1},\ldots, H_{y_n}$ such that $\partial W\subset\bigcup^n_{j=1}H_{y_j}=:H$. Define  $V:=W\cap\bigcap^n_{j=1}V_{y_j}$. Clearly $x\in V$, $V\cap H=\emptyset$, $\overline{V}\subset\overline{W}$, and $V\subset X\setminus H$. Hence,  $\overline{V}$ is compact and
\begin{align*}
x\in V\subset  \overline{V}&\subset \overline{W}\cap (X\setminus H)\subset \overline{W}\cap\big(W\cup (X\setminus\overline{W})\big)=W\subset U
\end{align*}
A: What Munkres calls one-point compactification here is the Alexandrov extension $Y$ of $X.$ It is exactly the topological space you described.
A: You are right, Munkres himself states

We have shown that $X$ has a one-point compactification $Y$ if and only if $X$ is a locally compact Hausdorff space that is not itself compact.

Therefore Munkres' proof of the converse only works if $X$ is not compact.
What can be done to repair the proof? There are various approaches.

*

*Avoid the use of the one-point compactification and proceed as in Oliver Díaz' answer.


*First treat the case that $X$ is compact; then Munkres' proof works if we take $Y = X$. Next treat the case that $X$ is not compact.


*Proceed as you suggested by always taking $Y \supset X$ to be the essentially unique compact Hausdorff space such that $Y \setminus X$ consists of a single point (see Theorem 29.1). Note that if $X$ is not compact, then $Y$ is one-point compactification of $X$; if $X$ is compact, then $Y$ is the disjoint union of $X$ and a one-point space.
As Anne Bauval writes, this space $Y$ is known as the Alexandroff extension  (or Alexandroff compactification) of $X$. This is defined for all topological spaces $X$ and is always compact though in general not Hausdorff (it is Hausdorff if and only of $X$ is locally compact Hausdorff). See Confusion about Alexandroff Extension.
