# Evaluating $\int_{0}^{\pi/2}\frac{x\sin x\cos x\;dx}{(a^{2}\cos^{2}x+b^{2}\sin^{2}x)^{2}}$

How to evaluate the following integral $$\int_{0}^{\pi/2}\frac{x\sin x\cos x}{(a^{2}\cos^{2}x+b^{2}\sin^{2}x)^{2}}dx$$

For integrating I took $\cos^{2}x$ outside and applied integration by parts.

Given answer is $\dfrac{\pi}{4ab^{2}(a+b)}$. But I am not getting the answer.

• There are a lot of simplifications you can make on this integral to ease your workload a little bit. For instance, $\sin x\cos x = \frac12\sin(2x)$, and you should be able to rewrite your demoninator as $(m+n\cos(2x))^2$ for suitable $m$ and $n$. Once you have that, take $y=2x$. After that, you can integrate by parts pulling out your $y$ term; the integral in just $\sin y$ and $\cos y$ can be done easily with another substitution (if $z=\cos y$, $dz=\sin y dy$). – Steven Stadnicki Dec 15 '14 at 3:55
• Try D.U.I.S. Seems work. – Venus Dec 15 '14 at 3:59

The case $a^2=b^2$ being simple, let's just consider, by symmetry, the case $a>b>0$.

Observe that $$\partial _x \left(\frac{1}{a^2 \cos^2x+b^2 \sin^2 x}\right)=2(a^2-b^2)\frac{\cos x\sin x}{(a^2 \cos^2x+b^2 \sin^2 x)^2}$$ then, integrating by parts, you may write \begin{align} I(a,b)&=\int_0^{\pi/2}\frac{x\cos x\sin x}{(a^2 \cos^2x+b^2 \sin^2 x)^2} dx\\\\ &=\frac{x}{2(a^2-b^2)}\left.\frac{1}{a^2 \cos^2x+b^2 \sin^2 x}\right|_{0}^{\pi/2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{dx}{a^2 \cos^2x+b^2 \sin^2 x}\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{1}{\left(a^2 +b^2 \large{\frac{\sin^2 x}{\cos^2x}}\right)}\frac{1}{\cos^2 x}dx\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\int_0^{\pi/2}\frac{1}{\left(a^2 +b^2 \tan ^2x\right)}(\tan x)'dx\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{1}{2(a^2-b^2)}\frac{1}{ab}\left.\arctan \left(\frac ba \tan x \right)\right|_{0}^{\pi/2}\\\\ &= \frac{\pi}{4(a^2-b^2)b^2}-\frac{\pi}{4(a^2-b^2)}\frac{1}{ab}\\\\ &= \frac{\pi}{4(a+b)ab^2}. \end{align}

• The solution must be $\displaystyle{\pi\over 4\left(\,\left\vert\, a\,\right\vert + \left\vert\, b\,\right\vert\,\right)\left\vert\, a\,\right\vert b^{2}}$. – Felix Marin Dec 15 '14 at 17:52
• @FelixMarin Thank you for your expression, it reduces to the answer I've given when $a>b>0$, which is the case I've explicitly considered. – Olivier Oloa Dec 15 '14 at 19:03
• You are welcome. Thanks. – Felix Marin Dec 15 '14 at 19:05

Integrating by parts,

$$\int\frac{x\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx$$

$$=x\int\frac{\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx-\int\left[\frac{dx}{dx}\int\frac{\sin x\cos x}{(a^2\cos^2x+b^2\sin^2x)^2}dx\right]dx$$

Now $a^2\cos^2x+b^2\sin^2x=u\implies2(b^2-a^2)\sin x\cos x\ dx=du$

For $\displaystyle\int\frac{dx}{a^2\cos^2x+b^2\sin^2x}=\int\frac{\sec^2x\ dx}{a^2+b^2\tan^2x},$

set $b\tan x=a\tan y$

let $x=\dfrac{t}{2}$, we have $$I=\dfrac{1}{2}\int_{0}^{\pi}\dfrac{\dfrac{t}{2}\sin{\dfrac{t}{2}}\cos{\dfrac{t}{2}}}{\left(a^2\sin^2{\dfrac{t}{2}}+b^2\cos^2{\dfrac{t}{2}}\right)^2}dt=\dfrac{1}{2}\int_{0}^{\pi}\dfrac{t\sin{t}}{[(a^2+b^2)+(a^2-b^2)\cos{t}]^2}dt$$ So \begin{align*}I&=-\dfrac{1}{2(a^2-b^2)}\int_{0}^{\pi}t\;d\left(\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}\right)\\ &=-\dfrac{1}{2(a^2-b^2)}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}\Bigg|_{0}^{\pi}+\int_{0}^{\pi}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}dt\\ &=-\dfrac{\pi}{4b^2(a^2-b^2)}+\int_{0}^{\pi}\dfrac{1}{(a^2+b^2)+(a^2-b^2)\cos{t}}dt \end{align*}

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,{\rm Li}_{#1}} \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ \begin{align}&\color{#66f}{\large% \int_{0}^{\pi/2}{x\sin\pars{x}\cos\pars{x}\over \bracks{a^{2}\cos^{2}\pars{x} + b^{2}\sin^{2}\pars{x}}^{2}}\,\dd x} \\[5mm]&=\ \overbrace{\int_{0}^{\pi/2}{x\sin\pars{2x}/2\over\braces{% a^{2}\bracks{1 + \cos\pars{2x}}/2 + b^{2}\bracks{1 - \cos\pars{2x}}/2}^{2}}\,\dd x} ^{\dsc{2x}\ \ds{\mapsto}\ \dsc{x}} \\[5mm]&=\half\int_{0}^{\pi}{x\sin\pars{x}\over\bracks{% a^{2} + b^{2} + \pars{a^{2} - b^{2}}\cos\pars{x}}^{2}}\,\dd x \\[5mm]&={1 \over 2\pars{a^{2} - b^{2}}}\int_{x\ =\ 0}^{x\ =\ \pi}x\, \dd\bracks{1 \over a^{2} + b^{2} + \pars{a^{2} - b^{2}}\cos\pars{x}} \\[1cm]&={1 \over 2\pars{a^{2} - b^{2}}}\,\left. {x \over a^{2} + b^{2} + \pars{a^{2} - b^{2}}\cos\pars{x}} \right\vert_{x\ =\ 0}^{x\ =\ \pi} \\[5mm]&-{1 \over 2\pars{a^{2} - b^{2}}}\ \underbrace{\int_{0}^{\pi} {\dd x \over a^{2} + b^{2} + \pars{a^{2} - b^{2}}\cos\pars{x}}} _{\dsc{t}\ \ds{=}\ \dsc{\tan\pars{x \over 2}}} \\[1cm]&={\pi \over 4b^{2}\pars{a^{2} - b^{2}}} -{1 \over 2\pars{a^{2} - b^{2}}}\ \overbrace{\int_{0}^{\infty} {\dd x \over b^{2}t^{2} + a^{2}}}^{\ds{=}\ \dsc{\pi \over 2\verts{ab}}} ={\pi \over 4\verts{b}\pars{a^{2} - b^{2}}} \pars{{1 \over \verts{b}} - {1 \over \verts{a}}} \\[5mm]&=\color{#66f}{\large% {\pi \over 4\verts{a}b^{2}\pars{\verts{a} + \verts{b}}}} \end{align}

You can use this property : $$\int_a^b f(x)\hspace{1mm}dx = \int_a^b f(a+b-x)\hspace{1mm}dx$$

To prove this property : Substitute $a+b-x = u$

Let us have $$I = \int_0^{\pi/2}\dfrac{x\sin x\cos x}{(a^2\cos^2 x+b^2\sin^2 x)^2}\hspace{1mm}dx\rightarrow (1)$$

After applying the property, you will get

$$I = \int_0^{\pi/2}\dfrac{(\pi/2-x)\sin x\cos x}{(a^2\cos^2 x+b^2\sin^2 x)^2}\hspace{1mm}dx\rightarrow (2)$$

After adding the two equation, you get

$$I =\dfrac{\pi}{4} \int_0^{\pi/2}\dfrac{\sin x\cos x}{(a^2\cos^2 x+b^2\sin^2 x)^2}\hspace{1mm}dx$$

Now you will substitute $a^2\cos^2x+b^2\sin^2x = u$

To get $$I = \dfrac{\pi}{8(b^2-a^2)}\int_{a^2}^{b^2} \dfrac{1}{u^2}\hspace{1mm}du$$

I hope you can Integrate from here

• But $\cos\left(\frac{\pi}{2}-x\right)=\sin x$, so the denominator ... – Venus Dec 31 '14 at 12:29
• I made a mistake, my method won't work – stoic Jan 1 '15 at 17:40