By writing $x=a\tan\theta$, show that, for $a\ne0$,
$$
\int\frac{1}{a^2+x^2}\,\mathrm dx
=\frac1a\arctan\frac xa+\text{constant}.
$$
(i) Let
$$
I=\int_0^{\pi/2}\frac{\cos x}{1+\sin^2x}\,\mathrm dx.
$$
(a) Evaluate $I$.
(b) Use the substitution $t=\tan\frac12x$ to show that
$$
\int_0^1\frac{1-t^2}{1+6t^2+t^4}\,\mathrm dt=\frac12I.
$$
(ii) Evaluate
$$
\int_0^1\frac{1-t^2}{1+14t^2+t^4}\,\mathrm dt.
$$