Integration by substitution $\int_{0}^{\pi/2}{\frac{dt}{1+\cos^{2}(t)}}=\int_{0}^{+\infty}{\frac{dv}{(1+v^2)(1+\frac{1}{1+v^2})}}$ Consider the integral $\int_{0}^{\pi/2}{\frac{dt}{1+\cos^{2}(t)}}$.
I want to prove it is equal to $\int_{0}^{+\infty}{\frac{dv}{(1+v^2)(1+\frac{1}{1+v^2})}}=\int_{0}^{+\infty}{\frac{dv}{2+v^{2}}}$
Do you see how to do that ? Is it by making the substitution $v=\tan{t}$ ? Can you help me to understand how it works by showing me each step ?
Edit : how would you calculate $\int_{0}^{\pi}{\frac{dt}{1+\cos^{2}(t)}}$ ?
 A: $$\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}$$
A: Putting $u=\tan t$ we have,
$\sec ^2tdt=du$
$\Rightarrow (1+u^2)dt=du$
$\Rightarrow dt=\frac{du}{(1+u^2)}$
$\cos^2 t=1/\sec^2 t=1/(1+u^2)$
Substituting the values in the original integral we have ,
$$\int_{0}^{\pi/2}{\frac{dt}{1+\cos^{2}(t)}}$$
$$=\int_{0}^{\infty}\frac{du}{(1+u^2)\times(1+\frac{1}{(1+u^2)})}$$
$$=\int_{0}^{\infty}\frac{du}{2+u^2}$$
A: You can also try the following
$$v=\tan\frac{t}{2}\Longrightarrow \cos t=\frac{1-v^2}{1+v^2}\;\;,\;\;dt=\frac{2}{1+v^2}dv$$
so
$$\int\limits_0^{\pi/2}\frac{dt}{1+\cos^2t}=\int\limits_0^1\frac{2\,dv}{1+v^2}\frac{1}{1+\left(\frac{1-v^2}{1+v^2}\right)^2}=\int\limits_0^1\frac{1+v^2}{1+v^4}dt$$
No need to work with an improper integral...
