Solution (source code)

= Solution

A <Hausdorff compactification> of $X$ is an <topological embedding>[embedding] $h:X\to Y$ into a <compact Hausdorff space> with <dense> image. The complement $Y\setminus h[X]$ is the remainder; a one-point or two-point compactification has a remainder of that <cardinality>.

For one point, take the <unit circle> and
$$
h_1(x)=(\cos(2\arctan x),\sin(2\arctan x)).
$$
The angle runs over $(-\pi,\pi)$, so this is a <homeomorphism> onto the <circle> with $(-1,0)$ removed. That image is <dense>, and the <circle> is <compact> Hausdorff. For two points, take $Y=[-\pi/2,\pi/2]$ and $h_2(x)=\arctan x$. This is a <homeomorphism> onto its <dense> open interval, leaving exactly the two endpoints. Therefore \b[both required compactifications exist]; in the first the positive and negative ends meet, whereas in the second they remain distinct.