Math Help - Integral with trigonometric functions

1. Integral with trigonometric functions

Hello!

How would someone go about solving something like this?

$\int e^{\frac{x}{2}}\left( \frac{2-\sin x}{1- \cos x} \right) \rm{d}x$

My curriculum does not teach this, so I'm just curious as to how it has to be done.

If you are up to the challenge of outlining which rules you use and how to solve it, I'd appreciate it. :]

2. Put $z=e^{x/2}\cot\frac x2.$

3. Originally Posted by MatteNoob
Hello!

How would someone go about solving something like this?

$\int e^{\frac{x}{2}}\left( \frac{2-\sin x}{1- \cos x} \right) \rm{d}x$

My curriculum does not teach this, so I'm just curious as to how it has to be done.

If you are up to the challenge of outlining which rules you use and how to solve it, I'd appreciate it. :]
Note that

$\frac{2 - \sin x}{1 - \cos x} = \frac{2 - 2 \sin \frac{x}{2} \cos \frac{x}{2}}{1 - [\cos^2 \frac{x}{2} - \sin^2 \frac{x}{2}]}$ $= \frac{1 - \sin \frac{x}{2} \cos \frac{x}{2}}{\sin^2 \frac{x}{2}} = cosec^2 \left( \frac{x}{2} \right) + cot \, \left( \frac{x}{2} \right)$.

Then the integrand is

$e^{x/2} \left [cosec^2 \frac{x}{2} + cot \frac{x}{2}\right] = e^{x/2} cosec^2 \left( \frac{x}{2} \right) + e^{x/2} cot \left( \frac{x}{2} \right)$.

Now consider the derivative of $e^{x/2} cot \left( \frac{x}{2} \right) \, ....$