$$\displaystyle \int_{0}^{\pi/2}{\frac{dt}{1+\cos^{2}(t)}}\tag{1}$$
Indeed, let $v = \tan t,\quad\text{ then}\; dv = \sec ^2t\,dt\;\implies\; (1+v^2)dt=dv\;\implies\; dt=\dfrac{dv}{(1+v^2)}$
$\cos^2 t=\dfrac{1}{\sec^2 t}\;=\;\dfrac{1}{1+v^2}$
Substituting, temporarily working with an indefinite integral:
$$\int{\frac{dt}{1+\cos^{2}(t)}}\;=\;\int\frac{dv}{(1+v^2)\cdot(1+\large\frac{1}{(1+v^2)})}\;$$
$$=\;\int\frac{dv}{2+v^2} \; = \;\frac 12 \int \frac{dv}{1 + \large\frac{v^2}{2}} \;=\;\frac 12 \int \frac{dv}{1 + \left(\large\frac{v}{\sqrt{2}}\right)^2}\tag{2}$$
Now, let $\;u= \dfrac{v}{\sqrt{2}}.\;\;$ Then $du = \dfrac{1}{\sqrt{2}}\,dv \implies dv = \sqrt{2}\,du.\;\;$ Then $(2)$ becomes:
$$\frac{\sqrt{2}}{2}\int \frac{du}{1 + u^2} = \frac{\sqrt 2}{2}\tan^{-1}u + C = \frac{1}{\sqrt 2} \tan^{-1}u + C$$
Now we simply back substitute: $u = \dfrac{v}{\sqrt 2}$, so our integral in terms of $v$ is $$\frac 1{\sqrt 2}\tan^{-1}\left(\frac v{\sqrt 2}\right) + C$$ and $v = \tan x$, so evaluating the integral in terms of $x$ with the original bounds of integration gives us:
$$\frac1{\sqrt 2}\tan^{-1}\left(\frac{\tan x}{\sqrt 2}\right) + C\;\;= \;\;\frac1{\sqrt 2}\frac x{\tan^{-1}(\sqrt 2)}\,\Big|_0^{\pi/2}$$