5
$\begingroup$

I wanted to calculate $$\int\limits_{0}^{2\pi} \frac{d \theta}{a^2 \sin^2\theta+b^2 \cos^2\theta}$$

So I solved the indefinite integral first (by substitution): $$\int\frac{d \theta}{a^2 \sin^2\theta+b^2 \cos^2\theta}=\frac{1}{b^2}\int\frac{d \theta}{\cos^2\theta \left(\frac{a^2}{b^2} \tan^2\theta+1 \right)} =\left[u=\frac{a}{b}\tan\theta, du=\frac{a}{b\cos^2\theta} d\theta \right ]\\=\frac{1}{b^2}\int\frac{b}{a\left(u^2+1 \right)}du=\frac{1}{ab}\int\frac{du}{u^2+1}=\frac{1}{ab} \arctan \left(\frac{a}{b}\tan\theta \right )+C$$

Then:

$$\int\limits_{0}^{2\pi} \frac{d \theta}{a^2 \sin^2\theta+b^2 \cos^2\theta}=\frac{1}{ab} \arctan \left(\frac{a}{b}\tan (2\pi) \right )-\frac{1}{ab} \arctan \left(\frac{a}{b}\tan 0 \right )=0$$

Which is incorrect (the answer should be $2\pi/ab$ for $a>0,b>0$).

On the one hand, the substitution is correct, as well as the indefinite integral itself (according to Wolfram it is indeed $\frac{1}{ab} \arctan \left(\frac{a}{b}\tan\theta \right )$ ), but on the other hand I can see that had I put the limits during the substitution I'd get $\int\limits_{0}^{0} \dots = 0$ because for $\theta = 0 \to u=0$ and for $\theta = 2\pi \to u=0$.

Why is there a problem and how can I get the correct answer?

Edit: Here is Wolfram's answer: enter image description here

Wolfram is correct because $$\frac{a^2 b^2}{2}\int\limits_{0}^{2\pi} \frac{d \theta}{a^2 \sin^2\theta+b^2 \cos^2\theta}$$ is the area of an ellipse (defined by $x=a\cos t , y=b\sin t$), that is $$\frac{a^2 b^2}{2}\int\limits_{0}^{2\pi} \frac{d \theta}{a^2 \sin^2\theta+b^2 \cos^2\theta}=\pi ab$$

$\endgroup$
  • $\begingroup$ Hint: use $\sin^2 \theta + \cos^2 \theta = 1$ to simplify the formula. $\endgroup$ – ToucanNapoleon Oct 12 '16 at 12:33
  • $\begingroup$ Hint: $\frac{1}{ab}\arctan(\frac{a\tan(x)}{{b}})|_0^{2\pi}$ $\endgroup$ – user90369 Oct 12 '16 at 12:50
  • $\begingroup$ Isn't the answer $0$? $\endgroup$ – StubbornAtom Oct 12 '16 at 12:54
  • 2
    $\begingroup$ @user90369 - did you read my question? $\endgroup$ – user265336 Oct 12 '16 at 13:09
  • 1
    $\begingroup$ @StubbornAtom - no. As I already said it should be $2\pi / ab$ - according to Wolfram and also because that integral times $a^2 b^2 / 2$ should give the area of an ellipse. $\endgroup$ – user265336 Oct 12 '16 at 13:10
8
$\begingroup$

The substitution is incorrect : the tangent is not bijective on the interval $[0,2\pi]$. First, you need to restrict yourself to an interval on which the tangent behaves better. Using the $\pi$-periodicity of the function you want to integrate, you can show that:

$$\int_0^{2 \pi} \frac{1}{a \sin^2 (\theta)+b \cos^2 (\theta)} d \theta = 2 \int_{-\pi/2}^{\pi/2} \frac{1}{a \sin^2 (\theta)+b \cos^2 (\theta)} d \theta,$$

and go from there.

Note that this is a good warning about using Wolfram (or any formal computation system) : the formula for the indefinite integral is good, but it holds only on each interval $(k\pi -\pi/2, k\pi+\pi/2)$, which the program does not tell you.

$\endgroup$
-1
$\begingroup$

You have everything right up to $$ \frac{1}{ab}\arctan(\frac{a}{b}\tan(2\pi))-\frac{1}{ab}\arctan(\frac{a}{b}\tan(0)) $$ Now $\frac{1}{ab}\arctan(\frac{a}{b}\tan(2\pi))$ is $2\pi$ because the $\arctan$ and the $\tan$ are inverse functions.

So we get
$$ \frac{1}{ab}\arctan(\frac{a}{b}\tan(2\pi))-\frac{1}{ab}\arctan(\frac{a}{b}\tan(0))=\frac{1}{ab}2\pi-0 $$ or $$ \frac{2\pi}{ab} $$

$\endgroup$
  • 2
    $\begingroup$ There's $a/b$ inside $\arctan$. If it was $\arctan (\tan 2\pi)$ I could understand. $\endgroup$ – user265336 Oct 12 '16 at 13:11
  • 2
    $\begingroup$ $\tan (2\pi)=0$ $\endgroup$ – StubbornAtom Oct 12 '16 at 13:12
  • $\begingroup$ yes you are right I'm sorry $\endgroup$ – Riemann-bitcoin. Oct 12 '16 at 15:30
  • 1
    $\begingroup$ You should delete this answer or else you might get downvoted. $\endgroup$ – StubbornAtom Oct 13 '16 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.