# $\Large \int\frac{x+\sin x}{1+\cos x}\normalsize dx$ is equal to\begin{array}{1 1}(A)\;\log\mid1+\cos x\mid+C & (B)\;\log\mid x+\sin x\mid+C\\(C)\;x-\tan\frac{x}{2}+C & (D)\;x\;\tan\frac{x}{2}+C \end{array}

Toolbox:
• $1+\cos x=2\cos^2\large\frac{x}{2}$
• $\sin x=2\sin\large\frac{x}{2}\normalsize \cos\large\frac{x}{2}$
• $\int udv=uv-\int v du$
• $\sec^2xdx=\tan x+c.$
Step 1:
Let $I=\Large \int\frac{x+\sin x}{1+\cos x}\normalsize dx$
$\sin x=2\sin \large\frac{x}{2}\normalsize \cos\large \frac{x}{2}$ and $1+\cos x=2\cos^2x$
$I=\Large \int\frac{x+2\sin \Large\frac{x}{2}\cos\Large\frac{x}{2}}{ 2\cos^2\Large\frac{x}{2}}\normalsize dx$
This can be splitted as
$\int\Large\frac{x}{2\cos^2\Large\frac{x}{2}}\normalsize dx+\int\Large\ \frac{2\sin\frac{x}{2}\cos\Large\frac{x}{2}}{\Large 2\cos^2\Large\frac{x}{2}}\normalsize dx$
But $\large\frac{1}{\cos^2\Large\frac{x}{2}}$$=\sec^2\Large\frac{x}{2} I=\large\frac{1}{2}$$\int x\sec^2\large\frac{x}{2}$$dx+\int \tan\large\frac{x}{2}$$dx$------(1)
Consider $\int x\sec^2\large\frac{x}{2}$$dx Clearly this is of the form u dv=uv-\int vdu. Step 2: Let u=x,on differentiating with respect to x du=dx and let dv=\sec^2xdx On integrating we get v=2\tan\large\frac{x}{2} Now substituting for u,v,du and dv we get, \int x\sec^2\large\frac{x}{2}$$dx=x(2\tan\large\frac{x}{2})$$-2\int \tan\frac{x}{2}$$dx$
$\quad\qquad\qquad=2x\tan\frac{x}{2}-2\int \tan\large\frac{x}{2}$
Now substituting in equ (1)
$\large\frac{1}{2}$$[2x\tan\large\frac{x}{2}-$$2\int \tan\large\frac{x}{2}]$$+\int \tan\large\frac{x}{2}$$dx$
$\;\;=x\tan\large\frac{x}{2}$$-\int\tan\frac{x}{2}$$dx+\tan\large\frac{x}{2}$$dx$
$\quad=x\tan\large\frac{x}{2}+c.$
Hence the correct option is D.