1. Int. prob

Hello, need some help on this integral!

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

Thanks

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

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

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

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

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

Back to our integral:

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

Substituting:

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

Simplifying:

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

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

$\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:

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

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

Then:

$du=e^xdx$

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

Plugging all this in, we get:

$\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:

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

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

Three things we'll use:
$\frac{\sin x}{1+\cos x} = \tan \left(\frac{x}{2}\right)$
$\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: $\frac{d}{dx} \tan \left(\frac{x}{2}\right) = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

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

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

$= \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
$\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
$= \int \left(\frac{e^x \sin x}{1 + \cos x} + \frac{e^{x}}{1+ \cos x} \ \right)dx$

Three things we'll use:
$\frac{\sin x}{1+\cos x} = \tan \left(\frac{x}{2}\right)$
$\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: $\frac{d}{dx} \tan \left(\frac{x}{2}\right) = \frac{1}{2} \sec^2 \left(\frac{x}{2}\right)$

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

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

$= \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