<s>[INST] How do I show this $\cos^2(\arctan(x))=\frac{1}{1+x^2}$ How do I show this?
$$\cos^2(\arctan(x))=\frac{1}{1+x^2}$$
I have absolutely no idea. Thank you.
 [/INST] Let's recall the following identities;
\begin{align}
\cos\theta &= \frac{e^{i\theta}+e^{-i\theta}}{2}\ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)\\
\arctan\theta &= \frac{i}{2}\ln\left(\frac{i+\theta}{i-\theta}\right) \ \ \ \ \ \ \ \ \ \ (2)\\
\end{align}
where $i^2 = -1$. Now it's just a case of "plug-and-play". Firstly, we square $(1);$
\begin{align}
\cos^2{\theta} &= \frac{1}{4}(e^{i\theta}+e^{-i\theta})^2\\
               &= \frac{e^{2i\theta} + 2 + e^{-2i\theta}}{4}.
\end{align}
Now, we let $\theta = \arctan{\varphi} = \frac{1}{2}\ln\left(\frac{i+\varphi}{i-\varphi}\right)$, and simplify;
\begin{align}
\cos^2{(\arctan{\varphi})} &= \frac{e^{2i\left[\frac{i}{2}\ln\left(\frac{i+\varphi}{i-\varphi}\right)\right]} + 2 + e^{-2i\left[\frac{i}{2}\ln\left(\frac{i+\varphi}{i-\varphi}\right)\right]}}{4}\\
&= \frac{1}{4}\left(\frac{i-\varphi}{i+\varphi} + 2 + \frac{i+\varphi}{i-\varphi}\right)\\
&= \frac{1}{4}\left(\frac{(i-\varphi)^2 + (i+\varphi)^2}{i^2 - \varphi^2} + 2\right)\\
&= \frac{1}{2}\left(\frac{1 - \varphi^2}{1 + \varphi^2} + 1\right)\\
&= \frac{1}{2}\left(\frac{1-\varphi^2 + 1 + \varphi^2}{1+\varphi^2}\right)\\
&= \frac{1}{1+\varphi^2}
\end{align}
as desired.
Throughout, we note that $\varphi \neq \pm i$. A fun algebraic exercise!
</s>