Finding $\int_{0}^{\pi/2} \frac{\tan x}{1+m^2\tan^2{x}} \mathrm{d}x$ How do we prove that $$I(m)=\int_{0}^{\pi/2} \frac{\tan x}{1+m^2\tan^2{x}} \mathrm{d}x=\frac{\log{m}}{m^2-1}$$
I see that $$I(m)=\frac{\partial}{\partial m} \int_{0}^{\pi/2} \arctan({m\tan x}) \ \mathrm{d}x$$
But I don't see how to use this fact. Can we? Please help me out, and if possible please post a solution using differentiation under the integral sign.

$\def\artanh{{\rm{artanh}}\;}$Denote the evaluated integral as $I$ and rewrite it as follows
\begin{align}
I&=\frac{1}{2}\int_0^{\Large\frac{\pi}{2}}\frac{\sin2x}{\cos^2x+m^2\sin^2x}\,dx\\
&=\int_0^{\Large\frac{\pi}{2}}\frac{\sin2x}{m^2+1-(m^2-1)\cos2x}\,dx\\
&=\frac{1}{2}\int_0^{\large\pi}\frac{\sin x}{m^2+1-(m^2-1)\cos x}\,dx\\
\end{align}
where we use trigonometric identity $\sin^2\theta=\dfrac{1-\cos2\theta}{2}$ and $\cos^2\theta=\dfrac{1+\cos2\theta}{2}$ and map $2x\mapsto x$. Now, using identity (proof can be seen here)
\begin{equation}
1+2\sum_{n=1}^\infty \left(\frac{b}{a}\right)^n\cos(n x)=\frac{a^2-b^2}{a^2+b^2-2ab\cos x}\qquad,\qquad\mbox{for}\, |b|<a
\end{equation}
and the correspondence values $a=\dfrac{m+1}{\sqrt{2}}$ and $b=\dfrac{m-1}{\sqrt{2}}$, one may find
\begin{align}
I&=\frac{1}{4m}\int_0^{\large\pi}\left[\sin x+2\sum_{n=1}^\infty \left(\frac{m-1}{m+1}\right)^n\cos(nx)\sin x\right]\,dx\\
&=\frac{1}{2m}+\frac{1}{2m}\sum_{n=2}^\infty \left(\frac{m-1}{m+1}\right)^n\int_0^{\large\pi}\cos(nx)\sin x\,dx\\
&=\frac{1}{2m}-\frac{1}{2m}\sum_{n=2}^\infty \left(\frac{m-1}{m+1}\right)^n\frac{\cos(n\pi)+1}{n^2-1}\\
&=\frac{1}{2m}-\frac{1}{m}\sum_{n=1}^\infty \left(\frac{m-1}{m+1}\right)^{2n}\frac{1}{4n^2-1}\\
&=\frac{1}{2m}-\frac{1}{2m}\left[1+\left(\frac{m-1}{m+1}\right)\artanh\left(\frac{m-1}{m+1}\right)-\left(\frac{m+1}{m-1}\right)\artanh\left(\frac{m-1}{m+1}\right)\right]\\
&=\frac{2}{m^2-1}\artanh\left(\frac{m-1}{m+1}\right)\\
&=\frac{\ln m}{m^2-1}\qquad\qquad\square
\end{align}
For the last step evaluation, we use Taylor series for $\artanh$function
\begin{equation}
\artanh x=\sum_{n=0}\frac{x^{2n+1}}{2n+1}\qquad,\qquad\mbox{for}\,\, |x|<1
\end{equation}
and identity
\begin{equation}
\artanh x=\frac{1}{2}\ln\left(\frac{1+x}{1-x}\right)\qquad,\qquad\mbox{for}\,\, |x|<1
\end{equation}
