Converting $\cos\phi$ into $\frac{1−t^2}{1+t^2}$, given that $t = \tan\frac{\phi}{2}$ 
I have to figure out the working to convert $\cos\phi$ into $\dfrac{1−t^2}{1+t^2}$, given that $t = \tan\dfrac{\phi}{2}$.

It would be amazing if someone could help I've been trying to do it for hours.
 A: Hint. One may write
$$
\cos \phi =\cos (\phi/2+\phi/2)=\cos^2( \phi/2)-\sin^2 (\phi/2)=\cos^2( \phi/2)(1-\tan^2(\phi/2))=\frac{1-\tan^2(\phi/2)}{1+\tan^2(\phi/2)}
$$ where we have used the standard identity
$$
\cos (a+b)=\cos a \cos b-\sin a \sin b.
$$
A: The tangent of the half-angle can be expressed as a rational function of sine and cosine:
$$
\tan\frac{\phi}{2}=\frac{\sin\phi}{1+\cos\phi}=\frac{1-\cos\phi}{\sin\phi}
$$
These relations can be obtained from
$$
\left|\tan\frac{\phi}{2}\right|=\sqrt{\frac{1-\cos\phi}{1+\cos\phi}}
$$
by multiplying numerator and denominator by $1+\cos\phi$ for the first expression and by $1-\cos\phi$ for the second expression and noting that $\tan(\phi/2)$ has the same sign as $\sin\phi$, so the absolute value can be safely removed.
If you set $t=\tan(\phi/2)$, you get the linear system
$$
\begin{cases}
\sin\phi-t\cos\phi=t \\[4px]
t\sin\phi+\cos\phi=1
\end{cases}
$$
and a standard method provides
$$
\sin\phi=\frac{2t}{1+t^2}\qquad \cos\phi=\frac{1-t^2}{1+t^2}
$$
The “standard method” (the unknowns are $\sin\phi$ and $\cos\phi$):


*

*Multiply the first equation by $t$ and subtract the first equation from the second, getting
$$
(1+t^2)\cos\phi=1-t^2
$$

*Multiply the second equation by $t$ and sum the two equations, getting
$$
(t^2+1)\sin\phi=2t
$$
Or, directly with Cramer’s rule,
$$
\sin\phi=\frac
  {\det\begin{bmatrix}t & -t\\1 & 1\end{bmatrix}}
  {\det\begin{bmatrix}1 & -t\\t & 1\end{bmatrix}}
\qquad
\cos\phi=\frac
  {\det\begin{bmatrix}1 & t\\t & 1\end{bmatrix}}
  {\det\begin{bmatrix}1 & -t\\t & 1\end{bmatrix}}
$$
A: Hint:
Use one of the duplication formulae for $\cos\phi$ and the relation between $\cos^2$  and $\tan^2$ deduced from Pythagoras' identity.
A: If $t = \tan \frac \phi 2$, then by drawing a right triangle, one can see that $$\sin \frac \phi 2 = \frac{t}{\sqrt{t^2+1}} \quad \text{ and } \quad \cos \frac \phi 2 = \frac{1}{\sqrt{t^2+1}}$$
So, by using $\cos (2x) = 1 - 2 \sin^2x$ and letting $x = \frac \phi 2$, we get
$$\cos \phi = 1 - 2 \cdot \left(\frac{t}{\sqrt{t^2+1}}\right)^2 = 1-\frac{2t^2}{t^2+1} = \frac{1-t^2}{1+t^2}$$
