Finding General Formulas for $\int_0^{2\pi} \frac{1}{a+b\cos(x)}$ and $\int_0^{2\pi} \frac{1}{a+b\sin(x)}$

177 Views Asked by At

Hello Math Stack Exchange Community,

I have a quick question:

How would I find the general formulas for $\int_0^{2\pi} \frac{1}{a+b\cos(x)}\, dx$ and $\int_0^{2\pi} \frac{1}{a+b\sin(x)} \, dx$ using complex analysis?

I know I would need to use that $\cos(x)=\frac{1}{2}(e^{ix}+e^{-ix})$ and that $\sin(x)=\frac{1}{2i}(e^{ix}-e^{-ix})$, but that's where I get lost. I don't understand quite how to do this. Please help me if you can, Math Stack Exchange Community. I have been trying to understand this concept for a good amount of time.

3

There are 3 best solutions below

7
On BEST ANSWER

We assume that $a>b>0$ and enforce the substitution $z=e^{ix}$ and proceed using contour integration. Thus, we have

$$\begin{align} \int_0^{2\pi}\frac1{a+b\cos(x)}\,dx&=\oint_{|z|=1}\frac{1}{a+b\left(\frac{z+z^{-1}}{2}\right)}\,\frac{1}{iz}\,dz\\\\ &=\frac1i\oint_{|z|=1}\frac{1}{az+bz^2/2+b/2}\,dz\\\\ &=\frac2{ib}\oint_{|z|=1} \frac{1}{z^2+2(a/b)z+1}\\\\ &=\frac2{ib}\oint_{|z|=1} \frac{1}{\left(z+(a/b)+\sqrt{(a/b)^2-1}\right)\left(z+(a/b)-\sqrt{(a/b)^2-1}\right)}\,dz\tag1 \\\\ &=2\pi i (2i/b) /\left(2\sqrt{(a/b)^2-1}\right)\tag 2\\\\ &=2\pi/\sqrt{a^2-b^2} \end{align}$$

where we applied the residue theorem in going from $(1)$ to $(2)$. Note that the only pole inside $|z|=1$ is at $z=-(a/b)+\sqrt{(a/b)^2-1}$

1
On

HINT

Here is an alternative approach to compare with.

I would recommend you to notice that:

\begin{align*} \cos(2x) = \frac{\cos^{2}(x) - \sin^{2}(x)}{\cos^{2}(x) + \sin^{2}(x)} = \frac{1 - \tan^{2}(x)}{1 + \tan^{2}(x)} \end{align*}

Hence you can obtain the first primitive by making the change of variable $x = 2\arctan(t)$.

Similarly, one has that: \begin{align*} \sin(2x) = \frac{2\sin(x)\cos(x)}{\cos^{2}(x) + \sin^{2}(x)} = \frac{2\tan(x)}{1 + \tan^{2}(x)} \end{align*}

From now on, I think you can handle the proposed exercise.

2
On

Hint: Let $t=\tan(\tfrac x2)$. Then $$4\int_0^\infty \frac{dt}{t^2+\sqrt{\frac{a+b}{a-b}}}=\frac{2\pi}{\sqrt{a^2-b^2}}$$