Evaluate the closed form of $\int_{0}^{\pi/2}{\arctan(a\tan^2x)\over b\sin^2x+c\cos^2x}\mathrm dx=f(a,b,c)$ Last question of this form
I am very curious to what is the closed form of:
Assume where $a,b,c > 0$ 

$$\int_{0}^{\pi/2}{\arctan(a\tan^2x)\over b\sin^2x+c\cos^2x}\mathrm dx=f(a,b,c)\tag1$$

$$b\sin^2x+c\cos^2x$$
$$=b(1-\cos^2 x)+c\cos^2 x$$
$$=b-(b-c)\cos^2 x$$
$$\int_{0}^{\pi/2}{\arctan(a\tan^2x)\over b-(b-c)\cos^2x}\mathrm dx\tag2$$
$u=a\tan^2x\implies du=2a\tan x\sec^2 x dx$
${u-a\over a}=\sec^2 x$
$${\sqrt{a}\over 2}\int_{0}^{\infty}{\arctan(u)\over \sqrt{u}(bu+ac-2ab)}\mathrm du\tag3$$
$u=y^2\implies du=2ydy$
$$\sqrt{a}\int_{0}^{\infty}{\arctan(y^2)\over by^2+ac-2ab}\mathrm dy\tag4$$
$b=P$ and $ac-2ab=Q$
Take the form of: $$\int_{0}^{\infty}{\arctan(y^2)\over Py^2+Q}\mathrm dy\tag5$$
Apply $arctan(y)$ series
$$\sum_{n=0}^{\infty}{(-1)^n\over 2n+1}\int_{0}^{\infty}{y^{4n+2}\over Py^2+Q}\mathrm dy\tag6$$

We have

$$ f(a,b,c) = \int_{0}^{\frac{\pi}{2}} \frac{\arctan(a \tan^2\theta)}{b \sin^2\theta + c\cos\theta^2} \, d\theta = \frac{\pi}{\sqrt{bc}} \left( \arctan\left(1 + \sqrt{\frac{2ac}{b}}\right) - \frac{\pi}{4} \right). $$

Here is a sketch of computation. 
Step 1. Reduction of the problem (not essential)
Consider the curve $\gamma(\theta) = (\sqrt{c}\cos\theta, \sqrt{b}\sin\theta)$ for $\theta \in [0,\pi/2]$. This is part of an ellipse in the first quadrant. By noting that $ \sqrt{bc} d\theta = x dy - y dx$, it follows that
$$ f(a,b,c) = \int_{\gamma} \omega, \quad \text{where} \quad \omega = \frac{1}{\sqrt{bc}} \arctan\left(\frac{ac}{b}\cdot\frac{y^2}{x^2}\right) \frac{x dy - y dx}{x^2 + y^2}. $$
Write $g = ac/b$ for simplicity. Then the crucial observation is that
$$ d\omega = \frac{1}{\sqrt{bc}} \left( \frac{\partial}{\partial x} \frac{x \arctan(gy^2/x^2)}{x^2 + y^2} + \frac{\partial}{\partial y} \frac{y \arctan(gy^2/x^2)}{x^2 + y^2} \right) dx \wedge dy = 0 $$
in the first quadrant. So by the Green's theorem, we can replace $\gamma$ by any piecewise $C^1$-curve in the first quadrant that joins from $P = (\sqrt{c}, 0)$ to $Q = (0, \sqrt{b})$. Since the integral of $\omega$ along any line segment on each axis is zero, we can also replace $P$ by any point on the positive $x$-axis and likewise for $Q$. Putting altogether, we can replace $\gamma$ by the circular arc $(x,y) = (\cos\theta, \sin\theta)$ to obtain
$$ f(a,b,c)
= \frac{1}{\sqrt{bc}} \int_{0}^{\frac{\pi}{2}} \arctan(g\tan^2\theta) \, d\theta
= \frac{1}{2\sqrt{bc}} \int_{0}^{\infty} \frac{\arctan(g u)}{\sqrt{u}(1+u)} \, du. $$
Step 2. Calculus
Now the rest of computation can be done with the aid of residue computation. Indeed, consider the last integral as a function of $g$. Then the residue computation shows that
$$ \frac{\partial f}{\partial g}
= \frac{1}{2\sqrt{bc}} \int_{0}^{\infty} \frac{\sqrt{u}}{(1+u)(1+ g^2 u^2)} \, du
= \frac{\pi}{2\sqrt{bc}} \cdot \frac{1}{\sqrt{2g}(1 + \sqrt{2g} + g)}.  $$
Integrating both sides and using the initial value $f|_{g=0} = 0$ gives the desired answer.

Remark. I realized that we can skip Step 1 and apply techniques in Step 2 directly to
$$ f(a,b,c) = \frac{1}{2} \int_{0}^{\infty} \frac{\arctan (a u)}{\sqrt{u}(c + bu)} \, du. $$
Still, Step 1 looks pleasing to me as it sanitizes parameters and demonstrates some unusual technique.
