Verifying Trigonometric Identities: $2\cos^2x-1 = \frac{1-\tan^2x}{1+\tan^2x}$ Verify that $$ 2\cos^2x-1 = \frac{1-\tan^2x}{1+\tan^2x}$$

$$ \begin{align*}
2 \cos^2(x)-1&=2 \cos^2(x)-\sin^2(x)-\cos^2(x)\\
&= \cos^2(x)-\sin^2(x)\\
&=(\cos(x)-\sin(x))\cdot (\cos(x)+\sin(x))\\
&= \cos^2(x) (1-\tan(x)) \cdot(1+\tan(x))\\
&=\cos^2(x) (1-\tan^2(x))\\
&=\frac{\cos^2(x)}{\sin^2(x)+\cos^2(x)} \cdot (1-\tan^2(x))\\
&=\frac{1-\tan^2(x)}{1+\tan^2(x)}
\end{align*}
$$
