\(x \sin x\)
Show solutionHide solution
We want to evaluate \(\displaystyle\int x\sin x\,dx\). Use integration by parts, taking \(u=x\) and \(dv=\sin x\,dx\). Then \(du=dx\) and \(v=-\cos x\). Hence
\[\int x\sin x\,dx=x(-\cos x)-\int(-\cos x)\,dx=-x\cos x+\int\cos x\,dx.\]
Since \(\int\cos x\,dx=\sin x\), we get
\[\int x\sin x\,dx=-x\cos x+\sin x+C.\]
Check: Differentiate the answer: \(\frac{d}{dx}(-x\cos x+\sin x+C)=-\cos x+x\sin x+\cos x=x\sin x\), which matches the integrand.
Therefore, \(\boxed{\int x\sin x\,dx=-x\cos x+\sin x+C}\).