AP Calculus AB

Lesson 16: U-SubstitutionAP

🎧 Listen to this lesson

Many integrands are compositions — a function of a function — and plain antidifferentiation stalls on them. U-substitution (CED topic 6.9) is the chain rule run in reverse: spot the inner function u = g(x), rewrite the integral entirely in u (including dx, via du = g'(x) dx), integrate the simpler result, and substitute back. It is the only integration *technique* in AP Calculus AB, and it unlocks most of the exam's indefinite and definite integrals.

The method, and how to choose u

  • Choose u as the "inside" of a composition — the argument of a power, root, exponential, log, or trig function — especially when its derivative also appears in the integrand (up to a constant factor).
  • Compute du = u' dx and rewrite *everything* in u. No x's may remain.
  • Integrate in u.
  • Indefinite: substitute back to x and add C. Definite: either substitute back before evaluating, or convert the limits to u-limits (x = a → u = g(a)) and evaluate entirely in u. Choose one path — mixing them is the classic blunder.

Worked Example 1: the indefinite template

Problem. Find ∫ 2x cos(x^2) dx.

Let u = x^2, so du = 2x dx — the factor 2x is sitting in the integrand.
Integral becomes ∫ cos u du = sin u + C.
Substitute back: sin(x^2) + C.

Answer: sin(x^2) + C. Check by differentiating: cos(x^2)·2x ✓. When the derivative of u appears *exactly*, the substitution is invisible-clean; when it appears up to a constant multiple (∫ x cos(x^2) dx), just adjust by the constant: (1/2) sin(x^2) + C.

Worked Example 2: a definite integral with changed limits

Problem. Evaluate ∫ from 0 to 1 of 3x^2 (x^3 + 1)^4 dx.

Let u = x^3 + 1, du = 3x^2 dx.
Convert the limits: x = 0 → u = 1;  x = 1 → u = 2.
∫ from 1 to 2 of u^4 du = [u^5/5] from 1 to 2 = 32/5 − 1/5 = 31/5

Answer: 31/5. The changed limits mean there is nothing to substitute back — the computation lives entirely in u-world from the moment the limits are converted. Writing u-limits on the integral sign the moment you convert them prevents the most expensive slip in this topic.

Worked Example 3: a log result, verified numerically (graphical/numerical check)

Problem. Evaluate ∫ from 0 to ln 2 of e^x/(1 + e^x) dx, and verify with a trapezoidal estimate.

Let u = 1 + e^x, du = e^x dx.
Limits: x = 0 → u = 2;  x = ln 2 → u = 3.
∫ from 2 to 3 of (1/u) du = ln 3 − ln 2 = ln(3/2) ≈ 0.4055

Numerical check — integrand values: at x = 0: 1/2 = 0.500; at x = 0.35: ≈ 0.587; at x = ln 2: 2/3 ≈ 0.667.
Trapezoid with h ≈ 0.3466 (two subintervals of [0, 0.693]):
  0.3466 × (0.500/2 + 0.587 + 0.667/2) = 0.3466 × 1.170 ≈ 0.4055 ✓

Answer: ln(3/2) ≈ 0.4055, confirmed numerically. Agreement between an exact answer and a crude trapezoidal estimate is the kind of self-audit that catches substitution errors on the calculator section, where both tools are available.

A second pattern: u is the whole radicand or exponent's base

Problem (brief). ∫ x sqrt(x + 1) dx. With u = x + 1, we have x = u − 1 and dx = du, giving ∫ (u − 1) u^(1/2) du = ∫ (u^(3/2) − u^(1/2)) du = (2/5) u^(5/2) − (2/3) u^(3/2) + C = (2/5)(x + 1)^(5/2) − (2/3)(x + 1)^(3/2) + C. When the leftover x is not u's derivative, *solve for x in terms of u* — the other standard move.

Real-world application: accumulating a composite rate

A drug is infused so that the rate entering the bloodstream is R(t) = 40t·e^(−0.1t^2) mg per hour (rising as the IV line primes, then fading as the reservoir empties). The total dose in the first 2 hours is ∫ from 0 to 2 of 40t e^(−0.1t^2) dt. With u = −0.1t^2, du = −0.2t dt, so t dt = −du/0.2 = −5 du; the integral becomes 40 × ∫ e^u (−5) du... carefully: ∫ from 0 to 2 of 40t e^(−0.1t^2) dt = −200 ∫ from 0 to −0.4 of e^u du = −200 (e^(−0.4) − 1) = 200(1 − e^(−0.4)) ≈ 200 × 0.3297 ≈ 65.9 mg. Composite rates like this — a polynomial times a decaying exponential of a square — are exactly the integrands substitution was built for, and they model everything from infusion dosing to cooling fin efficiency.

Common mistakes

  • Changing limits and substituting back (or neither). Pick the u-limits path *or* the back-substitution path. Evaluating F(u(b)) − F(u(a)) and then re-expressing in x double-transforms the answer.
  • Losing a constant factor: ∫ cos(3x) dx = (1/3) sin(3x) + C, not sin(3x) + C. Differentiate your answer to check — the chain rule will expose a missing factor instantly.
  • Choosing u badly: if after substitution any x survives (besides inside u), the choice was wrong. u = the inner function; if that fails, u = the awkward factor (root, denominator) and solve for x.
  • Forgetting that du must account for the *whole* dx factor, e.g. treating ∫ x^2 e^(x^3) dx as if du = 3x^2 dx were already present — it is, up to the constant 3: the answer is (1/3) e^(x^3) + C.
Try it. Evaluate ∫ x e^(x^2) dx, ∫ from 0 to 4 of (x/sqrt(1 + 2x))... use instead ∫ from 0 to 3 of (2x)/(x^2 + 1) dx (expect a log), and ∫ from 0 to π/4 of tan x... (hint: tan x = sin x/cos x, u = cos x; expect (1/2) ln 2). Show the u, du, and converted limits for each.

AP Exam Experience

1. (No calculator.) ∫ 4x (x^2 + 5)^3 dx =

  • (A) (x^2 + 5)^4/2 + C
  • (B) 2(x^2 + 5)^4 + C
  • (C) (x^2 + 5)^4/8 + C
  • (D) 4(x^2 + 5)^4 + C

Answer: (A). With u = x^2 + 5, du = 2x dx, so 4x dx = 2 du and the integral is ∫ 2u^3 du = u^4/2 + C = (x^2 + 5)^4/2 + C. Check by differentiating: (4(x^2+5)^3 · 2x)/2 = 4x(x^2 + 5)^3 ✓.

2. (No calculator.) ∫ from 0 to 2 of x e^(x^2) dx =

  • (A) (e^4 − 1)/2
  • (B) e^4 − 1
  • (C) e^4/2
  • (D) 2e^4 − 1

Answer: (A). u = x^2, du = 2x dx, so the integral is (1/2) ∫ from 0 to 4 of e^u du = (e^4 − 1)/2. (B) is the forgotten-(1/2) error, the most common mark lost in this topic.

3. ∫ sin(5x) dx =

  • (A) −cos(5x) + C
  • (B) −(1/5) cos(5x) + C
  • (C) 5 cos(5x) + C
  • (D) (1/5) cos(5x) + C

Answer: (B). u = 5x contributes the factor 1/5 (the reciprocal of the inner derivative). Sign check: differentiating −(1/5) cos(5x) gives −(1/5)(−sin(5x))(5) = sin(5x) ✓.

Free-response question. (a) Evaluate ∫ from 0 to 3 of x sqrt(x^2 + 1) dx. (b) Evaluate ∫ from 0 to π/2 of cos^3 x sin x dx. (c) Explain why the methods of this lesson cannot evaluate ∫ from 0 to 1 of e^(x^2) dx exactly.

Scoring guideline.

  • (a) 2 points. 1 point for the substitution u = x^2 + 1, du = 2x dx, with limits converted (x = 0 → u = 1; x = 3 → u = 10) or back-substitution done consistently. 1 point for the value: (1/2) ∫ from 1 to 10 of u^(1/2) du = (1/3)(10^(3/2) − 1) = (10 sqrt(10) − 1)/3 ≈ 10.21.
  • (b) 2 points. 1 point for u = cos x, du = −sin x dx with limits x = 0 → u = 1, x = π/2 → u = 0, turning the integral into ∫ from 1 to 0 of −u^3 du = ∫ from 0 to 1 of u^3 du. 1 point for the value 1/4.
  • (c) 1 point. e^(x^2) has no elementary antiderivative: the integrand contains no factor of 2x for du to absorb, and no substitution reduces it to a standard form, so FTC Part 2 has no antiderivative to evaluate — the integral can only be approximated numerically (e.g., by the Riemann sums of Lesson 14). Naming the missing 2x factor is the substance of the point.

Additional worked practice

Problem. Evaluate ∫ from 1 to e of (ln x)/x dx.

Let u = ln x, du = dx/x — the remaining factor dx/x is exactly du.
Convert limits: x = 1 → u = 0;  x = e → u = 1.
∫ from 0 to 1 of u du = [u^2/2] from 0 to 1 = 1/2

Answer: 1/2. This is Pattern 2 of the extension (u is the transcendental piece already present) in its purest form, and it doubles as a warning about a look-alike: ∫ (ln x)/x dx is *not* done "by parts" on the AB course, and it is not ln(x)·ln(x) guessed blindly — the substitution works because dx/x is precisely the derivative of ln x. When the integrand is (some function of ln x) × (1/x), the substitution is automatic.

Extension: three more substitution patterns to own

Pattern 1 — the integrand is a derivative over its function. ∫ tan x dx: write tan x = sin x/cos x and set u = cos x, du = −sin x dx: the integral becomes −∫ du/u = −ln|cos x| + C. Generally, ∫ f'(x)/f(x) dx = ln|f(x)| + C — loans, populations and decay problems generate this shape constantly.

Pattern 2 — u is a log or an exponent already present. ∫ (ln x)^2/x dx: u = ln x, du = dx/x, giving ∫ u^2 du = (ln x)^3/3 + C.

Pattern 3 — root of a quadratic-free expression. ∫ from 0 to 1 of x sqrt(1 − x^2) dx: u = 1 − x^2, du = −2x dx, limits u: 1 → 0, so the integral is (1/2) ∫ from 0 to 1 of sqrt(u) du = (1/2)(2/3) = 1/3.

Choosing u — a field guide. First look for a *composition* whose inner derivative is visibly present (Patterns of Examples 1–2). Failing that, set u to the *complicated lump*: the radicand, the denominator, the exponent (Pattern 3 and the x sqrt(x + 1) example). Failing that, set u to a transcendental piece (ln x, e^x) and see if the rest collapses (Pattern 2). If none of these simplifies matters, the integral probably needs a different tool entirely — and on the AB exam, that usually means it was designed for the FTC or for geometry instead.

📊 Interactive

Interactive — hover or explore the chart above.

Keep reading to complete this lesson