1

In calculus class our teacher demonstrated us the evaluation of the definite integral $\int_0^\pi \dfrac{1}{a+b\cos(x)}dx=\dfrac{\pi}{\sqrt{a^2-b^2}}$, for $a\ne 0, b \ne 0, |\dfrac ba \lt 1|$, but there's a part I could not grasp.

Our teacher started out by setting up an equality: $bz^2+2az+b=b(z-\alpha)(z-\beta)$, where $\alpha, \beta$ are the roots of the expression on the LHS in $\Bbb C$, and $\alpha$ takes on the value with a negative sign before the radical, while $\beta$ is the other one. Letting $z=e^{ix}$, the integrand is transformed into the following form:

$\dfrac{1}{\sqrt{a^2-b^2}}\left(\dfrac{\alpha}{\alpha-e^{ix}}-\dfrac{\beta}{e^{ix}-\beta}\right)=\dfrac{1}{\sqrt{a^2-b^2}}\left(\dfrac{1}{\alpha e^{-ix}-1}+\dfrac{1}{1-\beta e^{-ix}}\right)$

$=\dfrac{1}{\sqrt{a^2-b^2}}\sum_{n=0}^{\infty}(\beta^n-\alpha^n)e^{-inx}=\dfrac{1}{\sqrt{a^2-b^2}}\sum_{n=1}^{\infty}(\beta^n-\alpha^n)(\cos(nx)-i\sin(nx))$

But then $\int_0^\pi \cos(nx)-i\sin(nx) dx=\dfrac 1n(\sin(nx)+i\cos(nx))|_0^\pi=\dfrac in(\cos(n\pi)-1)$ and I was completely lost on how the next part was carried out. For if we substitute that back into the infinite sum, we get that integrated version of that expression would be $\dfrac{1}{\sqrt{a^2-b^2}}\sum_{n=1}^{\infty}(\beta^n-\alpha^n)\dfrac in(\cos(n\pi)-1)$

$=\dfrac{1}{\sqrt{a^2-b^2}}\sum_{k=1}^{\infty}(\beta^{2k-1}-\alpha^{2k-1})\dfrac {i}{2k-1}(\cos((2k-1)\pi)-1)$

$=\dfrac{1}{\sqrt{a^2-b^2}}\sum_{k=1}^{\infty}(\beta^{2k-1}-\alpha^{2k-1})\dfrac {-2i}{2k-1}$

Yet I fail to see how this could lead to the supposed final result, especially with that $i$ there.

Divide1918
  • 2,093
  • 1
    Do you not have the residue theorem? This is such an inefficient calculation – Brevan Ellefsen Dec 09 '19 at 10:31
  • Are you sure that the condition is $|a/b|<1$? I would assume the relation is opposite (if you don't want to deal with divergent integral). – user Dec 09 '19 at 12:12
  • @user I might have copied it wrong when I was taking notes in class, I have messaged my classmate, waiting for him to respond right now. I'll make the edit and/or inform you as soon as he responds, thanks a lot! – Divide1918 Dec 09 '19 at 13:57
  • @user Yeah I did make a mistake, you were right. My bad. – Divide1918 Dec 09 '19 at 14:01
  • @user I've edited the error – Divide1918 Dec 09 '19 at 14:19
  • I learnt this with the substitution $t = \tan(x/2)$. It looks much easier. – Gribouillis Dec 09 '19 at 14:36
  • There are also errors in derivation. Already in the first line the terms have wrong signs. Also the use of the formula for geometric sum is wrong as $\alpha$ and $\beta$ cannot be simultaneously less than 1 by absolute value... – user Dec 09 '19 at 15:03
  • Thanks for all the feedback (comments and answers). I have discussed with my classmate and obtained a much more correct proof. I shall put it in an edit to my question or in a seperate answer, depending on what's desirable on this site; or perhaps neither. – Divide1918 Dec 09 '19 at 15:07
  • 1
    I think you should at least write the proof in the form it was given. – user Dec 09 '19 at 15:30

2 Answers2

3

In the given method, the fractions of the form $\dfrac1{1+z}$ are developed using Taylor, then integrated term-wise. Doing that, you retrieve the series for $\log(1+x)$, which are applied to $\alpha$ and $\beta$.

As the roots are complex, the computation of the logarithms is a little involved. In the end, only an imaginary number remains, which gets multiplied by $i$, resulting in a real.


A simpler way:

WLOG, $b=1$, and $|a|>1$. Let $z:=e^{ix}$ so that $\cos x=\dfrac{z+z^{-1}}2$ and $dz=iz\,dx$.

Then

$$\int_0^\pi\frac{dx}{a+\cos x}=-\int_1^{-1}\frac{2i\,dz}{2az+z^2+1}=-\int_1^{-1}\frac{2i\,dz}{(z+a)^2-(a^2-1)}.$$ (The complex integral is over a half circle.)

The antiderivative is readily found to be

$$-\frac ic(\log(z+a-c)-\log(z+a+c))$$ where $c=\sqrt{a^2-1}$. We have

$$\frac{(1+a-c)(-1+a+c)}{(1+a+c)(-1+a-c)}=\frac{a^2-(c-1)^2}{a^2-(c+1)^2}=-1.$$ so that the logarithm is just $i\pi$ and the integral is

$$\frac\pi c.$$

Now for general $b$ we divide by $b$ and get

$$\frac\pi{bc}=\frac\pi{\sqrt{a^2-b^2}}.$$

1

A simpler method:

Let us recall the fact that when $A, B, C\in{\mathbb R}$ and $\Delta=B^2-4 A C < 0$ then \begin{equation} \int \frac{d t}{A t^2 + B t + C} = \frac{2}{\sqrt{-\Delta}} \arctan\left(\frac{2 A t + B}{\sqrt{- \Delta}}\right) \end{equation}

The substitution $t = \tan(x/2)$ in the original integral gives \begin{equation} I = \int_0^\pi\frac{1}{a + b \cos(x)} d x= \int_0^{+\infty}\frac{1}{a + b\frac{1-t^2}{1+t^2}}\times \frac{2}{1 + t^2} dt =\int_0^{+\infty}\frac{2}{(a-b)t^2+(a+b)} d t \end{equation} Here $\Delta = -4 (a-b)(a+b) = -4(a^2-b^2)<0$, hence \begin{equation} I = \left[ \frac{2}{\sqrt{a^2-b^2}}\arctan\left(\frac{(a-b)t}{\sqrt{a^2-b^2}}\right)\right]_0^{+\infty} = \frac{\pi}{\sqrt{a^2-b^2}} \end{equation}

Gribouillis
  • 14,188