<s>[INST] Evaluating the definite integral $\int^{\pi/2}_0 \frac{x+\sin x}{1+\cos x}\,\mathrm dx$ Problem : 
$$\int^{\pi/2}_0 \frac{x+\sin x}{1+\cos x}\,\mathrm dx \tag{i}$$
My approach : 
$$\frac{x+\sin x}{1+\cos x}\,\mathrm dx= \left ( \frac{x}{2\cos^2(x/2)} + \tan(x/2) \right )\,\mathrm dx$$
Therefore, (i) will become : 
$$\int^{\pi/2}_0\left (\frac{x }{2\cos^2(x/2)} + \frac{1}{2}\tan(x/2) \right )\,\mathrm dx = \int^{\pi/2}_0 \frac{1}{2}x \sec^2(x/2)\,\mathrm dx + \int^{\pi/2}_0 \frac{1}{2}\tan(x/2)\,\mathrm dx$$
Please guide how to proceed. Thanks.
 [/INST] Since $\displaystyle\int\dfrac{x+\sin x}{1+\cos x}dx$ has close-form, I don't think this question is really difficult.
Since
$$
\begin{align}
\int\dfrac{x+\sin x}{1+\cos x}\text{d}x & = \int\dfrac{x}{1+\cos x}dx+\int\dfrac{\sin x}{1+\cos x}dx \\
& = \int\dfrac{x}{2\cos^2\dfrac{x}{2}}dx+\int\tan\dfrac{x}{2}dx \\
& = \int\dfrac{x}{2}\sec^2\dfrac{x}{2}dx+\int\tan\dfrac{x}{2}dx \\
& = \int x~d\left(\tan\dfrac{x}{2}\right)+\int\tan\dfrac{x}{2}dx \\
& = x\tan\dfrac{x}{2}-\int\tan\dfrac{x}{2}dx+\int\tan\dfrac{x}{2}dx \\
& =x\tan\dfrac{x}{2}+C
\end{align}
$$
we have that
$$
\int_0^{\frac{\pi}{2}}\dfrac{x+\sin x}{1+\cos x}dx=\left[x\tan\dfrac{x}{2}\right]_0^{\frac{\pi}{2}}=\dfrac{\pi}{2}
$$
</s>