Proof that a Limit equals a Function Let f(x) = $\frac{x}{|x|}$ if x $\neq$ 0, and define f(0)=0. Show that
f(x) = $\lim_{n \rightarrow \infty} \frac{2}{\pi} \tan^{-1}(nx)$



My work: 
$\frac{x}{|x|}$ = $\lim_{n \rightarrow \infty} \frac{2}{\pi} \tan^{-1}(nx)$ 
$\frac{x}{|x|}$ = $\lim_{n \rightarrow \infty} \frac{2}{\pi} \frac{cos(nx)}{sin(nx)}$ 
$\lim_{n \rightarrow \infty} cos(n)$ = -1 and 1, likewise $\lim_{n \rightarrow \infty} sin(n)$ = -1 and 1. 
So when $\frac{-1}{-1}$ and $\frac{1}{1}$ then the limit is equal to 1. Likewise when $\frac{-1}{1}$ and $\frac{1}{-1}$ then the limit is equal to -1. 
f(x) always equals either 1 or -1 so they can be confirmed to be equivalent. However, I'm having problems with the $\frac{2}{\pi}$ and the effects of x in the limit. 

Hints please! Thanks!

If $x = 0$, $\frac{2}{\pi} \tan^{-1}(nx) = 0$ for all $n$, and thus $\lim_{n\to \infty} \frac{2}{\pi}\tan^{-1}(nx) = 0$ when $x = 0$. If $x > 0$, then $$\lim_{n\to \infty} \frac{2}{\pi} \tan^{-1}(nx) = \frac{2}{\pi}\lim_{u\to +\infty} \tan^{-1}(u) = \frac{2}{\pi}\cdot\frac{\pi}{2} = 1 = \frac{x}{|x|}.$$ If $x < 0$, then $$\lim_{n\to \infty} \frac{2}{\pi}\tan^{-1}(nx) = \frac{2}{\pi} \lim_{u\to -\infty} \tan^{-1}(u) = -1 = \frac{x}{|x|}.$$ Hence, for all $x\neq 0$, $\lim_{n\to \infty} \frac{2}{\pi}\tan^{-1}(nx) = \frac{x}{|x|}$.
