<s>[INST] Prove that $\cos \arctan 1/2 = 2/\sqrt{5}$ How can we prove the following? $$\cos \left( \arctan \left( \frac{1}{2}\right) \right) =\frac{2}{\sqrt{5}}$$
 [/INST] We know that $\tan (θ)=\frac{y}{x}$. 
Thus, for $\tan^{-1}(1/2)$, we have a right triangle whose $x$ and $y$ values are $2$ and $1$, respectively. 
Pythagorean theorem in terms of $x$, $y$, and $r$ is written as $x^2+y^2=r^2$. Simply plug in the values $x=1$ and $y=2$ from earlier to get the following:
$$1^2+2^2=r^2$$
$$r^2=5$$
$$r=\sqrt5$$ 
Now, we know that $\cos(θ)=\frac{x}{r}$. Plugging in $x=2$ and $r=\sqrt5$ from earlier, we obtain the following:
$$\cos(θ)=\frac{2}{\sqrt5}$$
Which matches your answer.
</s>