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$$
 A: 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.
A: We will use Fourier transformation and Parseval's identity.
Say that
\begin{equation*}
\hat{g}(\xi) = \int_{-\infty}^{\infty}e^{-i\xi x}g(x)\, dx .
\end{equation*}
Then the Fourier transform of $g(x) = \arctan\dfrac{2}{x^2}$ will be 
\begin{equation*}
\hat{g}(\xi) = 2\pi\dfrac{\sin \xi}{\xi}e^{-|\xi|}\tag{1}
\end{equation*}
(integration by parts followed by residue calculus).
We are now prepared for the given integral. We start with the substituition $y=\tan x$.
\begin{equation*}
f(a,b,c) = \int_{0}^{\infty}\dfrac{\arctan(ay^2)}{by^2+c}\, dy =\left[y =\dfrac{\sqrt{2}}{z\sqrt{a}}\right] = \dfrac{1}{c\sqrt{2a}} \int_{-\infty}^{\infty}\dfrac{1}{z^2+d^2}\arctan\dfrac{2}{z^2}\, dz \tag {2}
\end{equation*}
where $d=\sqrt{\dfrac{2b}{ac}}$. But Parseval's identity combined with (1) give
\begin{gather*}
\int_{-\infty}^{\infty}\dfrac{1}{z^2+d^2}\arctan\dfrac{2}{z^2}\, dz =[\text{ Parseval ]} = \dfrac{1}{2\pi}\int_{-\infty}^{\infty}\dfrac{\pi}{d}e^{-d|\xi|}\, 2\pi\dfrac{\sin \xi}{\xi}e^{-|\xi|}\, d\xi = \\[2ex] \dfrac{2\pi}{d}\dfrac{1}{2\pi}\int_{-\infty}^{\infty}\pi e^{-(1+d)|\xi|}\, \dfrac{\sin \xi}{\xi}\, d\xi = [\text{ Parseval, H = Heaviside ]} = \\[2ex]\dfrac{2\pi}{d}\int_{-\infty}^{\infty}\dfrac{1+d}{x^2+(1+d)^2}\dfrac{1}{2}({\rm H}(\xi+1)-{\rm H}(\xi-1))\, d\xi = \dfrac{\pi}{d}\int_{-1}^{1}\dfrac{1+d}{x^2+(1+d)^2} = \\[2ex]\dfrac{2\pi}{d}\arctan\dfrac{1}{1+d}.
\end{gather*}
Finally this and (2) give
\begin{equation*}
f(a,b,c) = \dfrac{\pi}{\sqrt{bc}}\arctan\left(\dfrac{\sqrt{ac}}{\sqrt{ac}+\sqrt{2b}}\right).
\end{equation*}
