Evaluate $\int \frac{\mathrm dx}{1+\cos^2 x}$
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$$
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$$