## Calculus: Early Transcendentals 8th Edition

$I=\displaystyle \frac{1}{3}x^{3}+\frac{1}{2}x-\frac{1}{4}\sin 2x+2\sin x-2x\cos x+C$
Expand the square binomial $I=\displaystyle \int(x+\sin x)^{2}dx=\int(x^{2}+2x\sin x+\sin^{2}x)dx$ $I=I_{1}+I_{2}+I_{3}$ $I_{1}=\displaystyle \int x^{2}dx = \frac{1}{3}x^{3}+C_{1}$ $I_{2}= \displaystyle \int 2x\sin xdx=2\int udv,\quad$...by parts, $\left[\begin{array}{ll} u=x & dv=\sin x\\ du=dx & v=-\cos x \end{array}\right]$ $I_{2}=2[uv-\displaystyle \int vdu]=-2x\cos x-2\int-\cos xdx$ $I_{2}=-2x\cos x+2\sin x+C_{2}$ $I_{3}=\displaystyle \int\sin^{2}xdx=$ (double angle identity...) $I_{3}=\displaystyle \int\frac{1}{2}(1-\cos 2x)=\frac{1}{2}(x-\frac{\sin 2x}{2})+C_{3}$ $I=\displaystyle \frac{1}{3}x^{3}+\frac{1}{2}x-\frac{1}{4}\sin 2x+2\sin x-2x\cos x+C$