$$\int \frac{1}{1+\cos ^2x} \,\mathrm dx$$
I have to integrate the expression above: I tried with substitutions $\cos x=t$ and $1+(\cos x)^2=t$, but those didn't work, and I couldn't find any useful way to use bisection and duplication formulas.
Any ideas?
Hint:
$$\int\frac{\mathrm dx}{1+\cos ^2x}=\int\frac{\sec^2x\,\mathrm dx}{\sec^2x+1}=\int\frac{\sec^2x\,\mathrm dx}{2+\tan^2x}$$
And then $$\tan x=t\iff \sec^2x\,\mathrm dx=\mathrm dt$$