Complex number problem $i \tan (\theta)$ proof. 
Given $z = \cos (\theta) + i \sin (\theta)$, 
  prove $\dfrac{z^{2}-1}{z^{2}+1} = i \tan(\theta)$

I know $|z|=1$ so its locus is a circle of radius $1$; and so $z^{2}$ is also on the circle but with argument $2\theta$; and $z^{2}+1$ has argument $\theta$ (isosceles triangle) so it lies on a line through the origin and $z$.
$z^{2}-1$, $z^{2}$, and $z^{2}-1$ all lie on a horizontal line $i \sin (\theta)$.
On the Argand diagram I can show $z^{2}+1$ and $z^{2}-1$ are perpendicular so the result follows.
Can anyone give an algebraic proof?
 A: As $z\ne0,$ with $|z|=1$
$$\dfrac{z^2-1}{z^2+1}=\dfrac{z-\dfrac1z}{z+\dfrac1z}$$
Now $\dfrac1z=\dfrac1{\cos\theta+i\sin\theta}=\cos\theta-i\sin\theta$
A: For $z = \cos \theta + i \sin \theta$ you have
$$
 \frac{z^2-1}{z^2+1} = \frac{ \cos^2 \theta - \sin^2 \theta + 2i \cos\theta \sin \theta -1}{\cos^2 \theta - \sin^2 \theta + 2i \cos\theta \sin \theta +1 } \, .
$$
Now substitute $1 = \cos^2 \theta + \sin^2 \theta $ in both numerator and denominator, and collect terms:
$$
\frac{-2 \sin^2 \theta + 2 i \cos\theta \sin\theta}{2 \cos^2\theta + 2 i \cos\theta \sin\theta} = 
\frac{- \sin\theta + i \cos \theta}{\cos \theta + i \sin\theta} \cdot \frac{\sin\theta }{\cos\theta}  \, .
$$
Finally convince yourself that the first factor is equal to $i$, and
you are done.
A: $$
\tan\theta=\frac{\sin\theta}{\cos\theta}
=\frac{\dfrac{z-\bar{z}}{2i}}{\dfrac{z+\bar{z}}{2}}=
\frac{1}{i}\frac{z-\bar{z}}{z+\bar{z}}=\frac{1}{i}\frac{z-z^{-1}}{z+z^{-1}}=
\frac{1}{i}\frac{z^2-1}{z^2+1}
$$
A: $\dfrac{z^2-1}{z^2+1}$ reminds me of Componendo and Dividendo?
$\dfrac{z^2}1=(\cos\theta+i\sin\theta)^2=\dfrac{\cos\theta+i\sin\theta}{\cos\theta-i\sin\theta}$ as $\dfrac1{\cos\theta-i\sin\theta}=\cos\theta+i\sin\theta$
Now apply Componendo and Dividendo
