Prove that the one point compactification of $X$ \ $E$ is homeomorphic to $X/ \sim$ 
Let $E$ be a closed subset of a compact Hausdorff space $X$. Prove that the quotient space obtained from $X$ by identifying $E$ to a point is homeomorphic to the one point compactification of $X $ \ $E$.

An one point compactification of a locally compact set $Y$ is $Z := Y \cup \{\infty\}$ (with the element $\infty \notin Y$) with the topology that $K \subset Z$ is open if and only if either ($\infty \notin K$ and $K$ is open in $Y$), or ($\infty \in K$ and $Z - K$ is a compact subset of $Y$). We may verify from definitions that $Z$ is compact. The topology on a quotient space $X / \sim$ is the set of all $U \subset X / \sim$ such  that $\pi^{-1}(U)$ is open, where $\pi: X \to X / \sim$ is the projection map.
I know that $E$ is a closed subset of a compact set and hence itself compact, and that $X$ being Hausdorff implies that $X$ is normal. Also, I know that $X$ is compact implies $X / \sim$ is compact.
We shall write $x$ for any element in $X / \sim$ that is identified with $x \notin E$, and similarly we shall write $E$ as the element of $X / \sim$ corresponding to $E \subset X$.
It's obvious the homeomorphism must be $f: X - E \cup \{\infty\} \to X / \sim $ with $f(x)  = x$ if $x \not = \infty$ and $f(\infty) = E$. This map can be verified to be bijective. However, I am having hard time verifying that $f$ is a homeomorphism. Given $U \subset X / \sim$ with $U$ open, either $E \in U$ or $E \notin U$; in the latter case, I see that $f^{-1}(U) = U$ is open. However, I am lost on what to do when $E \in U$. The solution reads: "the open subsets of the quotient space that contain the equivalence class $E$ are exactly the complements of the compact subsets of $X $ \ $E$, and these correspond to the open subsets of the one-ppont compactification that contain $\infty$." However, I don't understand this statement, particularly the first part. Can anyone explain?
 A: 
Theorem: If $X$ is locally compact Hausdorff and $Y$ is compact Hausdorff and $p \in Y$ is such that $Y\setminus \{p\}$ is homeomorphic to $X$, then $Y$ is homeomorphic to the one-point compactification $\alpha X$ of $X$.

Your question is a consequence of this:
Let the quotient by identifying $E$ to a point be called $X/{E}$.
If $X$ is compact Hausdorff (hence regular), it's a standard fact that for a closed set $E$, $X/{E}$ is Hausdorff, and it is certainly compact (as the continuous image of $X$ under the standard quotient map.
Also, $X\setminus E$ is locally compact as an open subset of $X$. The quotient map $q: X \to X/{E}$ is 1-1 and open when restricted to $X\setminus E$ in the domain and $X/{E}\setminus \{q[E]\}$ in the codomain. So these spaces are homeomorphic. 
So we apply the theorem from the start to $X=X\setminus E$, $Y=X/{E}$ and $\{p\}=\{q[E]\}$, the class of $E$ in that quotient.
A: $U$ is open iff $\pi^{-1}(U)$ is open (definition of quotient topology). If $\pi(E)\in U$, then $E\subset \pi^{-1}(U)$. Hence $X-\pi^{-1}(U)\subset X-E$. Since $\pi^{-1}(U)$ is open, $X-\pi^{-1}(U)$ is closed, hence compact in $X$. It follows that $X-\pi^{-1}(U)$ is compact in $X-E$. Notice the above argument is revertible. Thus the open subsets of the quotient space that contain the equivalence class $E$ are exactly the complements of the compact subsets of $X-E$. 
