1. ## Int. prob

Hello, need some help on this integral!

$\displaystyle \int{\frac{1+sinx}{1+cosx}e^{x}dx}$

Thanks

2. Originally Posted by javax
Hello, need some help on this integral!

$\displaystyle \int{\frac{1+sinx}{1+cosx}e^{x}dx}$

Thanks
Half-angle identities are key in many trig problems. Namely:

$\displaystyle \sin{x}=2\sin{\frac{x}{2}}\cos{\frac{x}{2}}$

$\displaystyle \cos{x}=2\cos^2{\frac{x}{2}}-1$

Back to our integral:

$\displaystyle \int\frac{1+sinx}{1+cosx}e^{x}dx$

Substituting:

$\displaystyle \int\frac{1+2\sin{\frac{x}{2}}\cos{\frac{x}{2}}}{1 +2\cos^2{\frac{x}{2}}-1}e^{x}dx$

Simplifying:

$\displaystyle \int\frac{1+2\sin{\frac{x}{2}}\cos{\frac{x}{2}}}{2 \cos^2{\frac{x}{2}}}e^{x}dx$

$\displaystyle \frac{1}{2}\int(\cos^{-2}{\frac{x}{2}})e^xdx+ \int(\tan{\frac{x}{2}})e^{x}dx$

$\displaystyle \int(\tan{\frac{x}{2}})e^{x}dx+\int(\frac{1}{2}\se c^{2}{\frac{x}{2}})e^xdx$

Let's part out the second integral:

$\displaystyle \int u\,dv=uv-\int v\,du$

Let $\displaystyle u=e^x$ and $\displaystyle dv=\frac{1}{2}\sec^2\frac{x}{2}dx$

Then:

$\displaystyle du=e^xdx$

$\displaystyle v=\tan{\frac{x}{2}}$

Plugging all this in, we get:

$\displaystyle \int(\tan{\frac{x}{2}})e^{x}dx+\int(\frac{1}{2}\se c^{2}{\frac{x}{2}})e^xdx=\int(\tan{\frac{x}{2}})e^ {x}dx+e^x\tan{\frac{x}{2}}-\int(\tan{\frac{x}{2}})e^xdx$

So:

$\displaystyle \int{\frac{1+sinx}{1+cosx}e^{x}dx}=e^x\tan{\frac{x }{2}}$

3. $\displaystyle = \int \left(\frac{e^x \sin x}{1 + \cos x} + \frac{e^{x}}{1+ \cos x} \ \right)dx$

Three things we'll use:
$\displaystyle \frac{\sin x}{1+\cos x} = \tan \left(\frac{x}{2}\right)$
$\displaystyle \frac{1}{1 + \cos x} = \frac{1}{2} \frac{2}{1 + \cos x} = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

And finally: $\displaystyle \frac{d}{dx} \tan \left(\frac{x}{2}\right) = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

So, in an unconventional way:
$\displaystyle = \int \left( e^x\frac{\sin x}{1+ \cos x} + \frac{1}{2} e^x \frac{2}{1 + \cos x} \right)\ dx$

$\displaystyle = \int \left( e^x \tan \left(\frac{x}{2}\right) + \frac{1}{2} e^x \sec^2 \left(\frac{x}{2}\right) \right) \ dx$

$\displaystyle = \int \left[ f'(x)g(x) + f(x)g'(x)\right] dx = f(x)g(x) = e^x \tan \left(\frac{x}{2}\right)$

4. Indeed, It seems I cannot integrate by parts this one
$\displaystyle \frac{1}{2}\int(\cos^{-2}{\frac{x}{2}})e^xdx$

It's just getting longer...or I'm missing something!

5. Originally Posted by o_O
$\displaystyle = \int \left(\frac{e^x \sin x}{1 + \cos x} + \frac{e^{x}}{1+ \cos x} \ \right)dx$

Three things we'll use:
$\displaystyle \frac{\sin x}{1+\cos x} = \tan \left(\frac{x}{2}\right)$
$\displaystyle \frac{1}{1 + \cos x} = \frac{1}{2} \frac{2}{1 + \cos x} = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

And finally: $\displaystyle \frac{d}{dx} \tan \left(\frac{x}{2}\right) = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

So, in an unconventional way:
$\displaystyle = \int \left( e^x\frac{\sin x}{1+ \cos x} + \frac{1}{2} e^x \frac{2}{1 + \cos x} \right)\ dx$

$\displaystyle = \int \left( e^x \tan \left(\frac{x}{2}\right) + \frac{1}{2} e^x \sec^2 \left(\frac{x}{2}\right) \right) \ dx$

$\displaystyle = \int \left[ f'(x)g(x) + f(x)g'(x)\right] dx = f(x)g(x) = e^x \tan \left(\frac{x}{2}\right)$
Cool, I remember this from the course now...! I have to float on my notebook a bit more

Thanks