1

Let's say we want to evaluate $$ \int_0^{2\pi} \frac{1}{a^2\cos^2x+b^2\sin^2x}dx$$

With substitution, one obtains $$ \frac{1}{ab} \arctan\left(\frac ba \tan x\right) $$

as antiderivate. For more details on how to do this, see this question.

Now my question is, why do I receive $0$ if I insert $0$ and $2\pi$ as integration bounds ? This obviously can't be true since the integrand is always positive.

What do I oversee ?

Christian
  • 1,781
  • 1
    The formula for your anitderivative is not correct. It is only valid on a small interval, not over all of $[0,2\pi]$. It's the choice of the "branch" of $\arctan$ that makes the difference. – MPW Nov 05 '15 at 20:38
  • By the way, if you want, write \mathrm dx to generate $\mathrm dx$ as opposed to $dx$. – Mr Pie Apr 25 '18 at 04:56

3 Answers3

4

A substitution in a integral is allowed as soon as the substitution is given by a bijective and differentiable function. In our case, if the integration range is $(0,2\pi)$ we cannot simply replace $x$ by $\arctan t$ and $dx$ by $\frac{dt}{1+t^2}$, but we have to split the integration range, then apply such substitution on the integrals we get that way:

$$ \int_{0}^{2\pi}\frac{dx}{a^2\cos^2(x)+b^2\sin^2(x)}\\=2\int_{0}^{\pi/2}\frac{dx}{a^2\cos^2(x)+b^2\sin^2(x)}+2\int_{0}^{\pi/2}\frac{dx}{a^2\sin^2(x)+b^2\cos^2(x)}\\=2\int_{0}^{+\infty}\left(\frac{1}{a^2 t^2+b^2}+\frac{1}{a^2+b^2 t^2}\right)\,dt=\color{red}{\frac{2\pi}{ab}}. $$

Jack D'Aurizio
  • 353,855
  • Okay, I got 2 questions:
    1. Why is it only $\pi$ according to WA ?

    http://www.wolframalpha.com/input/?i=integral+1%2F%281%2Bsin%5E2%28x%29%2Fcos%5E2%28x%29%29+from+0+to+2pi 2) I have understood that the integration range needs to be split up, but what are your thoughts behind splitting it up exactly this way?

    – Christian Nov 05 '15 at 20:37
  • 1
    @Christian: You gave to WA a different integral, where are $a$ and $b$ in the WA input? About the second point, the fundamental domain of the tangent function is $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$, hence if we split the integration range into four chunks of length $\frac{\pi}{2}$, we are allowed to perform the obvious substitution in every chunk. – Jack D'Aurizio Nov 05 '15 at 20:41
  • In WA I wanted to use $a=b=1$, but I forgot the $1/\cos^2$, this is the correct link now: http://www.wolframalpha.com/input/?i=integral+1%2F%28cos%5E2%28x%29+%2B+sin%5E2%28x%29%29+from+0+to+2pi – Christian Nov 05 '15 at 20:43
  • If $a=b=1$, $$\int_{0}^{2\pi}\frac{dx}{1^2\sin^2(x)+1^2\cos^2(x)} = \frac{2\pi}{1\cdot 1}$$ as expected. – Jack D'Aurizio Nov 05 '15 at 20:45
0

Arctan is only true from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$ (I.e the domain of arctan)

BLAZE
  • 8,458
El Spiffy
  • 720
  • 1
  • 8
  • 18
0

Notice, the property of the definite integral $\int_{0}^{2a}f(x)\ dx=2\int_{0}^{a}f(x)\ dx\ \ \ \ \ \ \forall \ \ \ f(2a-x)=f(x)$

$$\int_{0}^{2\pi} \frac{1}{a^2\cos^2 x+b^2\sin^2 x}\ dx$$$$=2\int_{0}^{\pi} \frac{1}{a^2\cos^2 x+b^2\sin^2 x}\ dx$$ $$=4\int_{0}^{\pi/2} \frac{1}{a^2\cos^2 x+b^2\sin^2 x}\ dx$$ $$=\frac{4}{b^2}\int_{0}^{\pi/2} \frac{\sec^2 x}{\left(\frac{a}{b}\right)^2+\tan^2 x}\ dx$$$$=\frac{4}{b^2}\int_{0}^{\pi/2} \frac{d(\tan x)}{\left(\frac{a}{b}\right)^2+\tan^2 x}$$ $$=\frac{4}{b^2}\frac{b}{a}\left(\tan^{-1}\left(\frac{bx}{a}\right)\right)_{0}^{\pi/2}=\frac{4}{ab}\tan^{-1}\left(\frac{\pi b}{2a}\right)$$