\cos ^2 x=\frac{\cos ^2 x}{\sin ^2 x+\cos ^2 x}=\frac{1}{1+\tan ^2 x}