Relation between $\int_0^{\frac{\pi}4}(1+\tan x)^2dx$ and $\int_0^1\frac1{(1+x)^2(1+x^2)}dx$.

definite integralsintegration

Let
$$ \displaystyle I_1=\int_0^{\frac{\pi}{4}}(1+\tan x)^2dx, \>\>\>\>\>
\displaystyle I_2=\int_0^{1}\frac{1}{(1+x)^2(1+x^2)}dx$$

then find $\displaystyle\frac{I_1}{I_2}$

My method-

I was able to solve $I_1$ using standard formulae and got $I_1=1+\ln2$. Similarly, I solved for $I_2$ using partial fraction decomposition and got $I_2=0.25 (1+\ln 2)$. Therefore, the required ratio is $4$.

Is there some other way to solve this question?

Best Answer

Note \begin{align} I_1=\int_0^{\frac{\pi}{4}}(1+\tan x)^2dx \overset{t=\tan x}= \int_0^{1}\frac{(1+t)^2}{1+t^2}dt \overset{t\to \frac{1-t}{1+t}}=4I_2 \end{align}