Answer
$\frac{\pi^{2}}{2}$-2
Work Step by Step
Step 1: Split the integral $\int$(x+xcosx)dx=$\int$xdx+$\int$xcosxdx=$\frac{x^{2}}{2}$+$\int$xcosxdx
Step 2: We evaluate $\int$xcosxdx with integration by parts. Let u=x and dv=cosxdx, so v=$\int$cosxdx=sinx.
$\int$xcosxdx=xsinx-$\int$sinxdx And $\int$sinxdx=-cosx
So, the expression=xsinx-(-cosx)+C=xsinx+cosx+C
Step 3: Finally substitute $\int$xcosxdx in step 1 with (xsinx+cosx+C):
$\int$(x+xcosx)dx=$\frac{x^{2}}{2}$+xsinx+cosx+C
And $\int^{\pi}_{0}$(x+xcosx)dx=$\frac{\pi^{2}}{2}$+$\pi$sin$\pi$+cos$\pi$-($\frac{0^{2}}{2}$+0sin0+cos0)=$\frac{\pi^{2}}{2}$-2