Problem 158
Evaluate the integral: I = integral x sin x dx
Evaluate the integral: $$ I = \int x\sin x\,dx. $$
Explanation of Method
Integration by parts with $u=x$, $dv=\sin x\,dx$ leaves a leftover integral of $\cos x$ alone, which is elementary.
- Choose $u=x$, $dv=\sin x\,dx$.
- Differentiate $u$ and integrate $dv$.
- Apply the integration by parts formula and integrate the remainder.
Step 1 · Set up integration by parts
Let:
$$ u = x \quad \Rightarrow \quad du = dx, \qquad dv = \sin x\,dx \quad \Rightarrow \quad v = -\cos x. $$
Step 2 · Apply the formula
$$ I = -x\cos x - \int (-\cos x)\,dx = -x\cos x + \int \cos x\,dx. $$
Step 3 · Integrate
Since $\int \cos x\,dx = \sin x$:
$$ I = -x\cos x + \sin x + C. $$
Summary Table
| Quantity | Value |
|---|---|
| $u$ | $x$ |
| $dv$ | $\sin x\,dx$ |
| Antiderivative | $-x\cos x+\sin x$ |
Additional Notes
- The integrand is defined for all real $x$.
- Choosing $u=x$ (whose derivative simplifies to $1$) rather than $u=\sin x$ is the key decision here; the reverse choice would leave a leftover integral of the same complexity instead of a simpler one.
- The result can be checked by differentiating $-x\cos x+\sin x$ and confirming it returns $x\sin x$.
Result
The solution to the integral is:
$$
I = -x\cos x + \sin x + C.
$$