1

I was trying to do the integration $$I=\frac{\pi}{2}\int_0^\pi \frac{dx}{a^2\cos^2x + b^2\sin^2x}$$
If I divide throughout by $\cos^2x$ and use substitution ($t=\tan x$),
I obtain$$I=\frac{\pi}{2}\int_0^0\frac{dt}{a^2+(bt)^2} $$ This would be evaluated to be $0$.
But however its actual answer is $$\frac{\pi^2}{2ab}$$ which can be obtained by using properties of definite integrals to change the limit to $0$ to $\frac{\pi}{2}$ and then splitting it from $0$ to $\frac{\pi}{4}$ and $\frac{\pi}{4}$ to $\frac{\pi}{2}$ ,dividing throughout by $\cos^2x$ and $\sin^2x$ respectively and then substituting ($t=\tan x$) and ($t=\cot x$) respectively.
Can anyone please tell me what is wrong in the first approach.

Cubehacks
  • 145
  • I think this could help: https://math.stackexchange.com/questions/340180/change-of-variables-formula-for-riemann-and-lebesgue-integration?rq=1 – Math-fun Jan 04 '19 at 12:34
  • The substitution $t=\tan, x$ is not permitted. $\tan$ is not nice enough for this (not even defined at $x=\pi /2$). – Kavi Rama Murthy Jan 04 '19 at 12:41
  • Related (duplicates?): https://math.stackexchange.com/questions/829939/why-does-this-u-substitution-zero-out-my-integral, https://math.stackexchange.com/questions/2380669/proof-all-integrals-are-0, and many others. – Hans Lundmark Jan 04 '19 at 12:42

2 Answers2

6

The main problem is that is that $\tan t$ has a singularity at $\pi/2$. In $u$-substitution, the function $u$ is required to be differentiable on the interval and it's not even continuous here.

See the Wiki article on $u$-substitution:

https://en.wikipedia.org/wiki/Integration_by_substitution

3

The reason why your substitution doesn't work is due to the singularity at $\frac {\pi}2$. Indeed, $\tan\left(\frac {\pi}2\right)$ isn't defined. However, you can remedy this by splitting up the integral along the singularity$$\begin{align*}\int\limits_0^{\pi}\frac {\mathrm dx}{a^2\cos^2x+b^2\sin^2x} & =\int\limits_0^{\pi/2}\frac {\mathrm dx}{a^2\cos^2x+b^2\sin^2x}+\int\limits_{\pi/2}^{\pi}\frac {\mathrm dx}{a^2\cos^2x+b^2\sin^2x}\\ & =\int\limits_0^{\pi/2}\frac {\mathrm dx}{a^2\cos^2x+b^2\sin^2x}+\int\limits_0^{\pi/2}\frac {\mathrm dx}{a^2\sin^2x+b^2\cos^2x}\\ & =\int\limits_0^{\infty}\frac {\mathrm dx}{a^2+b^2x^2}+\int\limits_0^{\infty}\frac {\mathrm dx}{b^2+a^2x^2}\\ & =\frac 1{ab}\left[\arctan\left(\frac {bx}a\right)+\arctan\left(\frac {ax}b\right)\right]\,\Biggr\rvert_0^{\infty}\end{align*}$$So now, we get that$$\frac {\pi}2\int\limits_0^{\infty}\frac {\mathrm dx}{a^2\cos^2x+b^2\sin^2x}\color{blue}{=\frac {\pi^2}{2ab}}$$

Frank W
  • 5,897