Evaluating a definite integral using complex integration

242 Views Asked by At

How would I solve (evaluate) an integral using methods of complex integration, in particular $\int_{0}^{\pi}\frac{\sin x}{2+\cos x}dx$ ? If the boundaries went from $0$ to $2\pi$, I could use the standard integration contour where $|z|=1$ (which would be possible to execute if it was an even function).

Edit: I'm aware using a different method would be much easier and the solution is obvious, but I'm particularly interested in using complex integration because I'm unsure how to approach it. The question is not this integral specifically, but integrals similar to this one which I used as an example (boundaries not forming a full unit circle). Point being not the solution part, but the thought process of it using said method.

1

There are 1 best solutions below

1
On

Observe that

$$\int_0^\pi\frac{\sin x}{2+\cos x}~dx=\left.-\int_0^\pi\frac{d(2+\cos x)}{2+\cos x}=-\log(2+\cos x)\right|_0^\pi=-(\log1-\log3)=\log3$$

Thus, why to use complex integration here? It surely won't be any faster or easier...and you'll have to integrate over the upper part of the unit circle...