# Evaluate using contour integration $\int_0^{\pi}\frac{\sin(2\theta)}{5-3\cos(\theta)}d\theta$

I had been given in my complex analysis examination the following problem.

Evaluate the following integral by using contour integration:

$$\int_0^{\pi}\dfrac{\sin(2\theta)}{5-3\cos(\theta)}d\theta$$

The answer to which is: $$\dfrac{2}{9}(log_e(1024)-6).$$

I tried to get this answer trying different ways but I just could not find a way to do it.

A thing to notice is that there is no $\pi$ term occurring in the final answer which means whatever the contour is which will give the answer easily is such that by integrating along that contour the value which we will get will be proportional to $\dfrac{1}{i\pi }$. This is because the $2\pi i$ term multiplying the residue should be canceled out as the actual answer does not have $\pi$ dependence. The $pi$ in the denominator gives a hint to me that this going to be complicated as in complex analysis at least in introductory courses nowhere $\pi$ comes in the denominator unless the problem is intentionally set up that way.

Another thing to notice is that if we have to use a contour that covers the angle from $0$ to $\pi$. Usually, the limits given in such problems is $0$ to $2\pi$ which is easy to do just by replacing $sine$ and $cosine$ term as follows: $$sin(\theta) \rightarrow \dfrac{1}{2i}(z-\dfrac{1}{z})$$ $$cos(\theta) \rightarrow \dfrac{1}{2}(z+\dfrac{1}{z})$$ $$d\theta \rightarrow \dfrac{dz}{iz}$$ and then carrying out the contour integral along $|z|=1$ contour. The limits of the integral could be converted to $0$ to $2\pi$ by proper substitution and then the contour integral by above procedure could be carried out but that would not help as it will bring in fractional order poles (as $cos\dfrac{\theta}{2}$ term will appear) which residue theory can't deal with.

So, what I need is a hint on how to do it.

Your question is basically whether $$\int_0^{\pi}\frac{\sin 2\theta \,\mathrm{d}\theta}{5-3\cos\theta}=\int_{-1}^1\frac{2x\,\mathrm{d}x}{5-3x}= \tfrac{4}{9}(5\,\ln 2-3)$$ can be written as an integral about a closed curve of some algebraic function over the rationals. This statement is believed to be false; it is in fact an open problem to demonstrate as much (Kontsevich and Zagier, Problem 5).
The usual method (substituting $x=\cos\theta$) will have to do.