Trigonometric function integration: $\int_0^{\pi/2}\frac{dx}{(a^2\cos^2x+b^2 \sin^2x)^2}$ How to integrate $$\int_0^{\pi/2}\dfrac{dx}{(a^2\cos^2x+b^2 \sin^2x)^2}$$
What's  the approach to it?
Being a high school student , I don't know things like counter integration.(Atleast not taught in India in high school education ).I just know simple elementary results of definite and indefinite integration. Substitutions and all those works good. :)
 A: In this case, the following trick also works: Dividing both the numerator and the denominator by $\cos^4 x$, we can use the substitution $ t = \tan x$ to obtain
\begin{align*}
\int_{0}^{\frac{\pi}{2}} \frac{dx}{(a^2 \cos^2 x + b^2 \sin^2 x)^2}
&= \int_{0}^{\frac{\pi}{2}} \frac{1 + \tan^2 x}{(a^2 + b^2 \tan^2 x)^2} \sec^2 x \, dx \\
&= \int_{0}^{\infty} \frac{1 + t^2}{(a^2 + b^2 t^2)^2} \, dt \\
&= \frac{1}{a^2}\int_{0}^{\infty} \left( \frac{1}{a^2 + b^2 t^2} + \frac{(a^2 - b^2) t^2}{(a^2 + b^2 t^2)^2} \right) \, dt.
\end{align*}
The first one can be evaluated as follows: Let $bt = a \tan\varphi$. Then
$$ \int_{0}^{\infty} \frac{dt}{a^2 + b^2 t^2} = \frac{1}{ab} \int_{0}^{\frac{\pi}{2}} d\varphi = \frac{\pi}{2ab}. $$
For the second one, we perform the integration by parts:
\begin{align*}
\int_{0}^{\infty} \frac{t^2}{(a^2 + b^2 t^2)^2} \, dt
&= \left[ - \frac{1}{b^2}\frac{1}{a^2 + b^2 t^2} \cdot \frac{t}{2} \right]_{0}^{\infty} + \int_{0}^{\infty} \frac{1}{2b^2}\frac{dt}{a^2 + b^2 t^2} \\
&= \frac{1}{2b^2} \int_{0}^{\infty} \frac{dt}{a^2 + b^2 t^2} \\
&= \frac{\pi}{4ab^3}.
\end{align*}
Putting together, the answer is
$$ \frac{(a^2 + b^2)\pi}{4(ab)^3}. $$
A: You want to integrate
$$J = \int_0^{\pi/2} \dfrac{dx}{\left(a^2 +(b^2-a^2) \sin^2(x) \right)^2} = \dfrac1{a^4}\int_0^{\pi/2} \dfrac{dx}{\left(1 +c \sin^2(x) \right)^2}$$
where $c = \dfrac{b^2-a^2}{a^2}$.
We now want to integrate $I = \displaystyle \int_0^{\pi/2} \dfrac{dx}{\left(1 +c \sin^2(x) \right)^2}$. From Taylor series, we have
$$\dfrac1{(1+cy^2)^2} = \sum_{k=0}^{\infty}(-1)^k (k+1)c^k y^{2k}$$
Hence (swapping integral and infinite summation), we get that
$$\int_0^{\pi/2}\dfrac{dx}{(1+c\sin^2(x))^2} = \sum_{k=0}^{\infty}(-1)^k (k+1)c^k \int_0^{\pi/2}\sin^{2k}(x)dx$$
From here, we have
$$\int_0^{\pi/2} \sin^{2k}(x) dx = \dbinom{2k}k \dfrac{\pi}{2^{2k+1}}$$
Hence,
$$I = \sum_{k=0}^{\infty}(-1)^k (k+1)c^k \dbinom{2k}k \dfrac{\pi}{2^{2k+1}} = \dfrac{\pi}2 \sum_{k=0}^{\infty} (k+1) \dbinom{2k}k \left(-\dfrac{c}4\right)^k$$
Now from Taylor series, we have
$$\sum_{k=0}^{\infty} (k+1) \dbinom{2k}k x^k = \dfrac{1+4x\sqrt{1-4x}-2x-\sqrt{1-4x}}{(1-4x)^{3/2}}$$
Hence,
$$J = \dfrac{\pi}2 \left(\dfrac{1-c\sqrt{1+c}+c/2-\sqrt{1+c}}{a^4(1+c)^{3/2}} \right)$$
Now plug in the value of $c$ and get the value of the original integral $J$.
A: Put $t=\tan x\implies dt=\sec^2x.dx$
$$
\begin{align}
&\int_0^{\pi/2}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^2}=\int_0^{\pi/2}\frac{\sec^4x.dx}{(a^2+b^2\tan^2x)^2}\\
&=\int_0^\infty\frac{1+t^2}{(a^2+b^2t^2)^2}dt=\frac{1}{b^2}\int_0^\infty\frac{dt}{a^2+b^2t^2}+\frac{b^2-a^2}{b^2}\int^\infty_0\frac{dt}{(a^2+b^2t^2)^2}=I_1+I_2
\end{align}
$$
$$
I_1=\frac{1}{b^2}\int_0^\infty\frac{dt}{a^2+b^2t^2}=\bigg[\frac{1}{b^2}.\frac{1}{ab}.\tan^{-1}\frac{bt}{a}\bigg]_0^\infty=\frac{\pi}{2ab^3}
$$
Put $t=\frac{a}{b}\tan\theta\implies dt=\frac{a}{b}\sec^2\theta.d\theta$
$$
\begin{align}
I_2&=\frac{b^2-a^2}{b^2}\int^\infty_0\frac{dt}{(a^2+b^2t^2)^2}=\frac{b^2-a^2}{b^2}\int_0^{\pi/2}\frac{\frac{a}{b}\sec^2\theta.d\theta}{(a^2+a^2\tan^2\theta)^2}\\
&=\frac{b^2-a^2}{b^2}\frac{a}{b.a^4}\int_0^{\pi/2}\frac{\sec^2\theta}{\sec^4\theta}d\theta=\frac{b^2-a^2}{a^3b^3}\int_0^{\pi/2}\cos^2\theta.d\theta\\
&=\frac{b^2-a^2}{a^3b^3}\int_0^{\pi/2}\bigg(\frac{1+\cos2\theta}{2}\bigg)d\theta=\frac{b^2-a^2}{2a^3b^3}\bigg[\theta+\frac{\sin2\theta}{2}\bigg]_0^{\pi/2}=\frac{\pi}{4}\frac{b^2-a^2}{a^3b^3}
\end{align}
$$
$$
\begin{align}
\int_0^{\pi/2}\frac{dx}{(a^2\cos^2x+b^2\sin^2x)^2}&=I_1+I_2=\frac{\pi}{2ab^3}+\frac{\pi}{4}\frac{(b^2-a^2)}{a^3b^3}\\
&=\frac{2\pi.a^2+\pi.b^2-\pi.a^2}{4a^3b^3}=\frac{\pi}{4}.\frac{a^2+b^2}{a^3b^3}
\end{align}
$$
A: Consider
$$
I(c)=\int_{0}^{\frac{\pi}{2}} \ln \left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right) d x, \textrm{ where } c\geq 0.
$$
Using my post, we have
$$
I(c)=\pi \ln \left(\frac{\sqrt{a^{2}+c}+\sqrt{b^{2}+c}}{2}\right)
$$
Differentiating $I(c)$ w.r.t. $c$ yields
$$
I^{\prime}(c)=\frac{\pi}{2 \sqrt{\left(a^{2}+c\right)\left(b^{2}+c\right)}}
$$
Once more gives
$$
I^{\prime \prime}(c)=-\frac{\pi}{4\left[\left(a^{2}+c\right)\left(b^{2}+c\right)\right]^{\frac{3}{2}}\left(2 c+a^{2}+b^{2}\right)}
$$
Hence
$$
\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{2}}= \frac{\pi\left(2 c+a^{2}+b^{2}\right)}{4\left[\left(a^{2}+c\right)\left(b^{2}+c\right)\right]^{\frac{1}{2}}}}
$$
Putting $c=0$ yields the result
$$\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{2}}= \frac{\pi\left(a^{2}+b^{2}\right)}{4 a^{3} b^{3}} }$$
Furthermore, in general,
$$
\boxed{\int_{0}^{\frac{\pi}{2}} \frac{d x}{\left(a^{2} \cos ^{2} x+b^{2} \sin ^{2} x+c\right)^{n}}=\frac{(-1)^{n} \pi}{2(n-1) !} \frac{d^{n-1}}{d c^{n-1}}\left[\left(a^{2}+c\right)\left(b^{2}+c\right) \right] ^{-\frac{1}{2}}}
$$
