AP Calculus BC
Integral of x sin x: Answer, Parts, Mistakes
The integral of x sin x with respect to x is sin x - x cos x + C. Integration by parts with u = x and dv = sin x dx gives -x cos x plus the integral of cos x, so the answer is -x cos x + sin x + C. Differentiating it with the product rule returns x sin x.
How to integrate x sin x by parts
The integrand is an algebraic factor times a trig factor, and neither is the derivative of the other, so substitution has nothing to grab. That is the signal for integration by parts, which reverses the product rule.
Choose to be the factor that simplifies when differentiated. Here differentiates to , while only cycles, so let and .
Substitute into the formula. The term is , and the new integral is , which is elementary.
Check it by differentiating
Differentiate , using the product rule on the second term: . The cosine terms cancel and you recover the integrand.
Why u = x and not u = sin x
Parts only helps if is easier than the integral you started with. Taking and is legal but pushes the power up: , and the new integral is harder than the original.
The LIATE ordering encodes the right choice: pick as the first type present, going Logarithmic, Inverse trig, Algebraic, Trig, Exponential. In the algebraic outranks the trig , so .
Integration by parts is Topic 6.11 inside Unit 6, which weights 15 to 20 percent of the exam. The definite form above is the common way this integrand appears, and the antiderivative keeps the endpoint arithmetic short.
Common mistakes with the integral of x sin x
- Multiplying antiderivatives. There is no product rule for integrals, so is not the answer.
- Getting the sign of wrong. Antidifferentiating gives , not .
- Dropping the minus in front of and writing . One differentiation catches it.
- Choosing . It is legal but makes the remaining integral harder, because raises the power.
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
What is the integral of x sin x?
It is . Integration by parts with and gives .
Why can't I use u-substitution for x sin x?
Substitution needs an inner function whose derivative is already in the integrand. In , neither nor is the derivative of the other up to a constant, so there is nothing to substitute. A product of two unrelated factors calls for integration by parts.
What is the definite integral of x sin x from 0 to pi?
It equals . Evaluate at the endpoints: at it is , and at it is , so the difference is .