<s>[INST] Evaluation of the integral $\int{\frac{x+\sin{x}}{1+\cos{x}}\mathrm{d}x}$ by parts I have to evaluate the following integral by parts: $$\int {\dfrac{x+\sin{x}}{1+\cos{x}}}\mathrm{d}x $$
So I tried to put:
$ u = x + \sin{x}$ $~\qquad\rightarrow \quad$ $\mathrm{d}u=\left(1+\cos{x}\right) \mathrm{d}x$
$\mathrm{d}v = \dfrac{\mathrm{d}x}{1+\cos(x)}$ $\quad \rightarrow \quad$ $v = \int{\dfrac{\mathrm{d}x}{1+\cos{x}}}$
But there is an extra integral to do ( the $v$ function) I evaluated it by sibstitution, and I get $v = \tan{\dfrac{x}{2}}$, Now
$$\int {\dfrac{x+\sin(x)}{1+\cos(x)}}\mathrm{d}x  = (x+\sin{x})\, \tan{\dfrac{x}{2}}-x +C$$
My question: is it possible to evaluate this integral entirely by parts (without using any substitution) ? 
I appreciate any ideas
 [/INST] $\int \dfrac{x + \sin x}{1+\cos x}dx\\
\int \dfrac{x + 2 \sin \frac{x}{2} \cos \frac{x}{2}}{2\cos^2 \frac{x}{2}} dx\\
\int \frac{1}{2}x\sec^2\frac{x}{2} + \tan \frac{x}{2} dx\\
\int \frac{1}{2}x\sec^2\frac{x}{2}dx + \int\tan \frac{x}{2} dx$
Now we do integration by parts on the $1^{st}$ integral.  we won't evaluate the $2^{nd}$ one quite yet.
$u = x, dv = \sec^2 \frac{x}{2} dx\\ du = dx, v = 2 \tan \frac{x}{2}$
$x\tan\frac{x}{2} - \int \tan\frac{x}{2}+\int\tan\frac{x}{2} \\x\tan\frac{x}{2} + C$
</s>