College practice · Worked answers
Integration by parts practice
Integration by parts trades one integral for another. Your choice of u and dv should make the new integral easier to finish. These college calculus problems focus on that choice, the minus sign, repeated applications, and checking an antiderivative by differentiation.
Start from the product rule
∫u dv = uv − ∫v du
Choose u so its derivative is simpler, and choose dv so you can find v. Write all four pieces before substituting: u, du, dv, and v. The formula comes from integrating d(uv) = u dv + v du, so the subtraction is essential.
For a polynomial times an exponential or sine/cosine, choosing the polynomial as u often reduces its degree. For ln(x), choosing u = ln(x) and dv = dx can help even though the integrand initially looks like only one function. These are useful choices, not a rule that every product requires integration by parts.
Choose the method before doing algebra
| Integral | Useful first move | Why |
|---|---|---|
| ∫x eˣ dx | u = x; dv = eˣ dx | Differentiating x leaves a constant. |
| ∫ln(x) dx, x > 0 | u = ln(x); dv = dx | x from v cancels 1/x in du. |
| ∫2x cos(x²) dx | Substitute w = x² | The derivative 2x is already present. |
A mnemonic for choosing u can suggest a start, but it cannot guarantee an easier integral. If the new integral is harder, reconsider the split. The w = x² row is the chain rule run backwards; review it with these chain rule practice problems and these u-substitution practice problems. Studying for the final? The Calculus 2 final exam review mixes parts with the other techniques.
Definite integrals keep their bounds
∫ₐᵇ u dv = [uv]ₐᵇ − ∫ₐᵇ v du
Evaluate the boundary product at both endpoints and retain the same bounds on the remaining integral. An indefinite answer needs a single + C at the end; a completed definite integral is a number and does not need + C.
Work through two examples
A polynomial times an exponential
- Find ∫x eˣ dx. Choose u = x and dv = eˣ dx, so du = dx and v = eˣ.
- Substitute: ∫x eˣ dx = x eˣ − ∫eˣ dx = x eˣ − eˣ + C.
- Check by differentiating: d[(x − 1)eˣ]/dx = eˣ + (x − 1)eˣ = x eˣ.
A definite logarithm example
- Find ∫ from 1 to e of ln(x) dx. Choose u = ln(x), dv = dx, du = dx/x, and v = x.
- Integration by parts gives [x ln(x)] from 1 to e minus ∫ from 1 to e of 1 dx.
- The first term is e and the second is e − 1. The result is 1, with no arbitrary constant.
Try it yourself
Choose an answer, then check your reasoning. You can retry any question or open its solution.
Show solution 1
u = x, dv = cos(x) dx. Taking u = x gives du = dx and v = sin(x), leaving the simpler integral ∫sin(x) dx.
Why the other choices are wrong:
- u = cos(x), dv = x dx: Then v = x²/2, and the new integral ∫(x²/2) sin(x) dx is harder than the original.
- u = 1, dv = x cos(x) dx: Then du = 0, and finding v means doing the original integral. You get nowhere.
- u = x cos(x), dv = dx: Then du = (cos x − x sin x) dx and v = x, which leaves a messier integral.
Show solution 2
x sin(x) + cos(x) + C. Parts gives x sin(x) − ∫sin(x) dx. Since ∫sin(x) dx = −cos(x), the result has +cos(x).
Why the other choices are wrong:
- x sin(x) − cos(x) + C: Sign error. ∫sin(x) dx = −cos(x), and subtracting it gives +cos(x).
- x cos(x) + sin(x) + C: That puts cos in the uv term. With dv = cos(x) dx, v = sin(x), so uv = x sin(x).
- x sin(x) + C: That is only uv. You still need to subtract ∫v du = ∫sin(x) dx.
Show solution 3
du = dx/x, v = x. The derivative of ln(x) is 1/x and the antiderivative of 1 is x.
Why the other choices are wrong:
- du = x dx, v = 1: Both steps are backward. Differentiate u, and integrate dv.
- du = dx, v = x: v is right, but the derivative of ln(x) is 1/x, so du = dx/x.
- du = dx/x, v = 1: du is right, but v has to be an antiderivative of dv = dx, which is x.
Show solution 4
1. An antiderivative is (x − 1)eˣ. At 1 it is 0; at 0 it is −1. Subtracting gives 1.
Why the other choices are wrong:
- e − 1: e − 1 is ∫₀¹ eˣ dx, just the leftover integral. You still need the boundary term [x eˣ]₀¹ = e.
- e: That is only the boundary term [x eˣ]₀¹. Subtract ∫₀¹ eˣ dx = e − 1.
- 0: (x − 1)eˣ is 0 at x = 1, but at x = 0 it is −1, not 0. So the answer is 0 − (−1).
Show solution 5
eˣ(x² − 2x + 2) + C. Two rounds of parts give x²eˣ − 2∫xeˣ dx = eˣ(x² − 2x + 2) + C. Differentiating cancels the extra terms.
Why the other choices are wrong:
- eˣ(x² + 2x + 2) + C: Sign slip in the second round. Its derivative is eˣ(x² + 4x + 4), not x² eˣ.
- x² eˣ + C: Its derivative is (x² + 2x)eˣ. You can’t treat x² like a constant.
- eˣ(x² − 2x) + C: That stops one round early and drops the +2. Its derivative is eˣ(x² − 2).
Show solution 6
x ln(x) − x + C. With u = ln(x) and dv = dx: x ln(x) − ∫x · (1/x) dx = x ln(x) − x + C. Check: the derivative is ln(x) + 1 − 1 = ln(x).
Why the other choices are wrong:
- 1/x + C: 1/x is the derivative of ln(x), not its antiderivative.
- x ln(x) + C: That is only uv. Subtract ∫x · (1/x) dx = x.
- (ln x)²/2 + C: That is the answer to ∫ln(x)/x dx, which is a substitution problem.
Show solution 7
∫2x cos(x²) dx. The inside function x² has derivative 2x, which is already there. Let w = x²: the integral becomes ∫cos(w) dw = sin(x²) + C.
Why the other choices are wrong:
- ∫x eˣ dx: There is no inside function with its derivative present. Parts with u = x is the usual route.
- ∫ln(x) dx: This is a classic parts problem with u = ln(x) and dv = dx.
- ∫x sin(x) dx: A polynomial times sine is a standard parts setup with u = x.
Show solution 8
−x cos(x) + sin(x) + C. u = x, v = −cos(x): −x cos(x) + ∫cos(x) dx = −x cos(x) + sin(x) + C. Check: the derivative is −cos x + x sin x + cos x = x sin x.
Why the other choices are wrong:
- x cos(x) − sin(x) + C: Every sign is flipped. With dv = sin(x) dx, v = −cos(x). Differentiate this answer and you get −x sin(x).
- −x cos(x) − sin(x) + C: The uv term is right, but −∫v du = −∫(−cos x) dx = +sin(x).
- x cos(x) + sin(x) + C: That flips the sign of the uv term. With dv = sin(x) dx, v = −cos(x), so uv = −x cos(x).
Answer key
Open all answers
- u = x, dv = cos(x) dx. Taking u = x gives du = dx and v = sin(x), leaving the simpler integral ∫sin(x) dx.
- x sin(x) + cos(x) + C. Parts gives x sin(x) − ∫sin(x) dx. Since ∫sin(x) dx = −cos(x), the result has +cos(x).
- du = dx/x, v = x. The derivative of ln(x) is 1/x and the antiderivative of 1 is x.
- 1. An antiderivative is (x − 1)eˣ. At 1 it is 0; at 0 it is −1. Subtracting gives 1.
- eˣ(x² − 2x + 2) + C. Two rounds of parts give x²eˣ − 2∫xeˣ dx = eˣ(x² − 2x + 2) + C. Differentiating cancels the extra terms.
- x ln(x) − x + C. With u = ln(x) and dv = dx: x ln(x) − ∫x · (1/x) dx = x ln(x) − x + C. Check: the derivative is ln(x) + 1 − 1 = ln(x).
- ∫2x cos(x²) dx. The inside function x² has derivative 2x, which is already there. Let w = x²: the integral becomes ∫cos(w) dw = sin(x²) + C.
- −x cos(x) + sin(x) + C. u = x, v = −cos(x): −x cos(x) + ∫cos(x) dx = −x cos(x) + sin(x) + C. Check: the derivative is −cos x + x sin x + cos x = x sin x.
Common questions
Do I need integration by parts for every product?
No. Some products simplify algebraically or fit substitution. Look for an inside function and its derivative first.
What if the original integral appears again?
Name it I, collect all I terms on one side, and solve algebraically. This occurs in some exponential-trigonometric integrals.
How do I check my answer?
Differentiate an indefinite result and compare with the original integrand. For a definite integral, also check endpoint subtraction.
Keep practicing
Try 3 days free3-day free trial, no card needed.
Sources and fact checks
Definitions and methods checked against these textbook references. Practice scenarios and worked numbers were written for this guide.