Need some help in taking integral with parameter $$I(a) = \int_0^{\pi/4} \arctan\left( a\sqrt{1-\tan^2(x)}\right)dx$$
I really have no idea how to solve this problem.
 A: Outline:


*

*Substitute $\tan{x}=(1+v^2)^{-1/2}$, so
$$dx=-\frac{v \, dv}{(2+v^2)\sqrt{1+v^2}}$$,
and the limits change to $\infty$ and $0$. The integral becomes
$$ I(a) = \int_0^{\infty} \frac{v}{(2+v^2)\sqrt{1+v^2}} \arctan{\left( \frac{av}{\sqrt{1+v^2}} \right)} \, dv $$

*Feel quite appalled by this expression.

*Differentiate with respect to $a$ and simplify:
$$ I'(a) = \int_0^{\infty} \frac{v}{(2+v^2)\sqrt{1+v^2}} \frac{v}{\sqrt{1+v^2}(1+a^2v^2/(1+v^2))} \, dv \\
= \int_0^{\infty} \frac{v^2}{(2+v^2)(1+(1+a^2)v^2)} \, dv $$

*Partial fractions this and integrate to get
$$ I'(a) = \frac{\pi}{2(1+2a^2)}\left( \sqrt{2}-\frac{1}{\sqrt{1+a^2}} \right) .$$

*Integrate this from $0$ to $a$. (The substitution $A=\tan{\theta}/\sqrt{1+\tan^2{\theta}}$ is a good start.) One finds
$$ I(a) = \frac{\pi}{2}\left( \arctan{\sqrt{2}a} - \arctan{\left( \frac{a}{\sqrt{1+a^2}} \right)} \right). $$
A: Take the derivative with respect to $a$: you get
$$I'(a) =  \int_0^{\pi/4} \frac{\sqrt{1-\tan^2(x)}}{a^2 (1 - \tan^2(x))+1}\; dx  $$
which according to Maple is
$$ {\frac {\pi\, \left( \sqrt {2}\sqrt {{a}^{2}+1}-1 \right) }{\sqrt {{a}
^{2}+1} \left( 4\,{a}^{2}+2 \right) }}
$$
Of course $I(0) = 0$.
Thus $$ I(a) = \int_0^a {\frac {\pi\, \left( \sqrt {2}\sqrt {{t}^{2}+1}-1 \right) }{\sqrt {{t}
^{2}+1} \left( 4\,{t}^{2}+2 \right) }}
\; dt = \frac{\pi}{2} \left(\arctan(\sqrt{2}a) - \arctan\left(\frac{a}{\sqrt{a^2+1}}\right)\right)$$
