Homeomorphism between compactification of real line and unit circle. I'm currently working on a topology assignment which is, unfortunately, due today.
As part of that, I need to show that one-point compactification of the real line, $\mathbb{R}\cup\infty$ is homeomorphic to the unit circle.
I've come so far to have defined a function $f$ with
$(x,y)=(\cos(2\arctan(t)),\sin(2\arctan(t)))$, which should map the reals onto the unit circle and be bijective and continuous. Now since my domain is compact, if I can show that the unit circle is Hausdorff, I can conclude that my function is a homeomorphism, correct?
However, which topology would I use for that?
Also, I am having a hard time trying to prove that f is surjective. Thought about dividing it up into two functions, from reals to $(-\pi,\pi)$ and then to the unit circle, but that doesn't really seem to work either.
Any thoughts?
Topology is confusing...
(Intuitively, I absolutely see why all this should be the case, however I am struggling with the formal stuff.)
Edit:
Okay I have tried the approach of defining an inverse function, suggested and then proving that it is continuous.
So far I've got:
$$g=\tan\left(\frac{1}{2}\arctan\left(\frac{y}{x}\right)\right)$$
Problem is, that this function is not bijective, so there is something missing (case distinction?) but I can't figure out what...
At least within $\left(\frac{-\pi}{2},\frac{\pi}{2}\right)$ it seems to work, and it's easy to show that combining f and g gives the identity.
Any tips maybe?
Cheers
Tom
 A: It is also useful to know that if X and Y are locally compact Hausdorff spaces and are homeomorphic, then so are their one point compactifications. Another way of looking at the problem would be by considering the steoreographic projection which  extends to a map from $\mathbb{R}\cup \{\infty\}$ to   $\displaystyle S^1$.
A: PS: I've written a third answer that shows the really simple way to do this, without trigonometric functions.
Since you're making a lot of the problem of proving surjectivity, I'm adding a new answer dealing with trigonometry and geometry rather than with point-set topology.  You have
\begin{align}
x & = \cos(2\arctan(t)), \\
y & = \sin(2\arctan(t)).
\end{align}
Two standard double-angle formulas say $\cos(2u) = \cos^2u-\sin^2 u$ and $\sin(2u)=2\sin u\cos u$.  That gives us
\begin{align}
x & = \cos^2\arctan t - \sin^2\arctan t \\
y & = 2\sin(\arctan t)\cos(\arctan t).
\end{align}
If you draw a right triangle with "adjacent" side $1$ and "opposite" side $t$ then the angle to which those are "adjacent" and "opposite" is $\arctan t$ and the hypotenuse, by the Pythagorean theorem, is $\sqrt{1+t^2}$.  Therefore
\begin{align}
\cos (\arctan(t)) & = \frac{\text{adjacent}}{\text{hypotenuse}} = \frac{1}{\sqrt{1+t^2}}, \\[10pt]
\sin (\arctan(t)) & = \frac{\text{opposite}}{\text{hypotenuse}} = \frac{t}{\sqrt{1+t^2}}.
\end{align}
Hence
\begin{align}
x & = \frac{1-t^2}{1+t^2}, \tag 1 \\[10pt]
y & = \frac{2t}{1+t^2}. \tag 2
\end{align}
From this you can get
$$
\frac{y}{x+1} = t, \tag 3
$$
so you have your inverse function.
You can show that the line passing through the two points $(0,t)$ and $(-1,0)$ intersects the circle at $(x,y)$.  From that you can demonstrate the equality in $(3)$ just by finding the $y$-intercept of the line passing through $(x,y)$ and $(-1,0)$.
This gives you surjectivity, except that you also have to check that the image of $\infty$ is $(-1,0)$.
PS: Here's another way to view it.  Identify the point $(x,y)$ on the circle with the complex number $x+iy$.  Then instead of writing $(1)$ and $(2)$ above one can write
$$
x+iy = \frac{1+it}{1-it}.
$$
This can be solved for $t$, but maybe simplifying the answer is messier than I'd hoped.
A: I don't know why I didn't say the following at the outset.  I guess I was just going along with your method.
Rid your proof of trigonometric functions and instead do the following:
$$
t\mapsto (x,y) = \begin{cases} \phantom{\lim\limits_{t\to\infty}} \left( \dfrac{1-t^2}{1+t^2}, \dfrac{2t}{1+t^2} \right) & \text{if }t\ne\infty, \\[10pt]
\lim\limits_{t\to\infty} \left( \dfrac{1-t^2}{1+t^2}, \dfrac{2t}{1+t^2} \right) & \text{if }t=\infty.
\end{cases}
$$
That's a homeomorphism from $\mathbb R\cup\{\infty\}$ to $\{(x,y)\in\mathbb R^2:x^2+y^2=1\}$.
To show that it's surjective, show that $t=\dfrac{y}{x+1}$ (and notice that $\dfrac{y}{x+1}\to\infty$ as $(x,y)\to(-1,0)$ along the curve $x^2+y^2=1$).
A: PS: I've written a third answer that shows the really simple way to do this, without trigonometric functions.
The usual topology on the circle $\{(x,y) : x^2+y^2=1\}$ can be characterized in at least the following two ways, and I think it's fairly easy to show the two ways yield the same topology:


*

*A subset of $\{(x,y) : x^2+y^2=1\}$ is open iff its inverse-image under the mapping $\theta\mapsto(\cos\theta,\sin\theta)$ is an open subset of the quotient space $\mathbb R/2\pi\mathbb Z$.

*A subset of $\{(x,y) : x^2+y^2=1\}$ is open iff it is the intersection of that set with an open subset of $\mathbb R^2$ with the usual topology.  In other words, it is the subspace topology.


A subset of $\mathbb R/2\pi\mathbb Z$ is open iff it is the union of a set of disjoint open intervals.
With that much, I suspect you could show that $\mathbb R\cup\{\infty\}$ is homeomorphic to $\{(x,y) : x^2+y^2=1\}$ without mentioning compactness or the Hausdorff property.
Can you show that if a space $U$ is a subspace of $V$, with the subspace topology, and $V$ is a Hausdorff space, then $U$ is a Hausdorff space?
PS: In a comment you ask about surjectivity.  If you mean surjectivity of the mapping $t\mapsto(\cos(2\arctan t),\sin(2\arctan t))$, then that can be shown something like this:  Suppose $x,y$ are real and $x^2+y^2=1$.  Draw the line through the two points $(-1,0)$ and $(x,y)$, and look at that line's intersection with the set $\{(0,y): y\in\mathbb R\}$.  Call that intersection point $(0,t)$, i.e. let $t$ be the second component of the pair.  That they do intersect if $(x,y)\ne(-1,0)$ is easy to prove.  In case $(x,y)=(-1,0)$, then let $t=\infty$.
To show that that value of $t$ will serve may require you to recall some secondary-school geometry: Let $O=(0,0)$, $A=(1,0)$, $B=(-1,0)$, $C=(x,y)$, with $x^2+y^2=1$.  Then $\angle AOC= 2\angle ABC$.
A: The unit circle is a subspace of the plane; thus if you already know the plane is Hausdorff, that carries over to the circle too.
Showing that
$$ \mathrm{R} \to (-\pi, \pi) \to \text{everything but $(-1,0)$} $$
is surjective and $f(\infty) = (-1,0)$ would be enough to show $f$ is surjective.
Sometimes, though, it's easier to just find the inverse of your function.
