# Math Help - Integral of (x + sin(x))/(1 + cos(x))

1. ## Integral of (x + sin(x))/(1 + cos(x))

$\int{\frac{x+sin(x)}{1+cos(x)}}dx$

My attempt so far

$\int{\frac{(x+sin(x))(1-cos(x))}{(1+cos(x))(1-cos(x))}}dx$ =

$\int{\frac{x-x*cos(x)+sin(x)-cos(x)sin(x)}{sin^2(x)}}dx$ =

$-x*cotan(x)+ln(sin(x))-x*cosec(x)-\frac{cos(x)}{sin^2(x)} + \int{\frac{1}{sin(x)}}dx-ln(sin(x))$ =

$-x*cotan(x)-x*cosec(x)-\frac{cos(x)}{sin^2(x)} + \int{\frac{1}{sin(x)}}dx$

I should get $\frac{x(1-cos(x))}{sin(x)} = \frac{x}{sin(x)}-x*cotan(x)$ pretending that I don't know how to solve $\int\frac{1}{sin(x)}dx$ so apparantly somehow I should be able to paritally integrate $\int\frac{x*cos(x)}{sin^2(x)}dx$ in such a way that I get $\int\frac{-1}{sin(x)}dx$ and so get rid of that integral.

2. = $\int{\frac{x}{1+cosx}}dx + \int{\frac{sinx}{1+cosx}}dx$

= $\int{\frac{x}{2cos^2{x/2}}}dx + \int{\frac{2sin(x/2)cos(x/2)}{2cos^2(x/2)}}dx$

= $\int{\frac{(x)(sec^2(x/2)}{2}}dx + \int{\tan(x/2)}dx$

Now try to integrate.

3. Try to only integrate the first one , there is a trick : we don't need to integrate the second one , it will be deleted finally !!

$\frac{1}{2} \int x \sec^2(\frac{x}{2})~dx + \int \tan(\frac{x}{2})~dx$

Using integration by parts ,

$= x\tan(\frac{x}{2}) - \int \tan(\frac{x}{2})~dx + \int \tan(\frac{x}{2})~dx$

we can see the second integral can be deleted but note that before writing this

$= x\tan(\frac{x}{2}) + C$

we should add one more line , it is

$= x\tan(\frac{x}{2}) + \int 0~dx$

so followed by

$= x\tan(\frac{x}{2}) + C$