AP Calculus AB · Topic 6.9 · Reading guide, about 5 min

Reversing the chain rule with u-substitution

U-substitution for indefinite and definite integrals: choosing u, rewriting in du, changing bounds, and spotting the logarithm pattern.

In one minute

The chain rule differentiates a function inside a function. U-substitution is the reverse: it undoes the chain rule by renaming the inner function uu, so that a complicated integral becomes a basic one. It is the most common integration technique in the course.

Success depends on seeing a pair in the integrand: an inner function and, nearby, its derivative (up to a constant). If you find that pair, the rest is a routine rewrite.

Key terms

u-substitution
A method that sets uu equal to an inner expression in xx, rewrites the integral in terms of uu and dudu, integrates, then returns to xx.
Inner function
The expression inside a power, root, trig function, exponential or logarithm, such as x2+1x^2+1 in (x2+1)5(x^2+1)^5. It is the usual choice for uu.
Differential du
If u=g(x)u=g(x), then du=g′(x) dxdu=g'(x)\,dx. The dxdx must be replaced along with everything else.
Change of bounds
In a definite integral, replace x=ax=a and x=bx=b with u=g(a)u=g(a) and u=g(b)u=g(b), then evaluate in uu with no return to xx.
Constant adjustment
When dudu differs from what is present by a constant factor, solve for the part you have. For du=2x dxdu=2x\,dx, write x dx=12 dux\,dx=\frac12\,du.
Logarithm pattern
When the numerator is the derivative of the denominator, ∫g′(x)g(x) dx=ln⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx=\ln|g(x)|+C.
Back-substitution
Replacing uu by its formula in xx at the end of an indefinite integral so that the answer is in the original variable.

The procedure

Step 1: choose uu, usually the inner function whose derivative also appears. Step 2: compute du=u′(x) dxdu=u'(x)\,dx. Step 3: rewrite the whole integral in uu, including dxdx. If any xx remains after the rewrite, either the choice was wrong or an algebra step is needed. Step 4: integrate with a basic rule. Step 5: replace uu with its expression in xx, and include +C+C.

Why it works: if F′=fF'=f, the chain rule gives ddxF(g(x))=f(g(x))g′(x)\frac{d}{dx}F(g(x))=f(g(x))g'(x). So ∫f(g(x))g′(x) dx=F(g(x))+C\int f(g(x))g'(x)\,dx=F(g(x))+C. Substitution just labels g(x)g(x) as uu so you can see f(u) duf(u)\,du.

Not every integral yields. If no inner function has its derivative nearby, substitution is not the tool, and you should reconsider with the checklist in 6.14.

Recognizing u-substitution patterns
Integrand patternChoice of uResult
xcos⁡(x2)x\cos(x^2)u=x2u=x^2, so x dx=12dux\,dx=\frac12du12sin⁡(x2)+C\frac12\sin(x^2)+C
e3xe^{3x}u=3xu=3x, so dx=13dudx=\frac13du13e3x+C\frac13e^{3x}+C
2xx2+1\frac{2x}{x^2+1}u=x2+1u=x^2+1, so du=2x dxdu=2x\,dxln⁡(x2+1)+C\ln(x^2+1)+C
sin⁡xcos⁡3x\sin x\cos^3xu=cos⁡xu=\cos x, so du=−sin⁡x dxdu=-\sin x\,dx−cos⁡4x4+C-\frac{\cos^4x}{4}+C
tan⁡x\tan xu=cos⁡xu=\cos x after writing sin⁡xcos⁡x\frac{\sin x}{\cos x}−ln⁡∣cos⁡x∣+C-\ln|\cos x|+C

Worked examples with bounds

Compute ∫01x2(x3+1)4 dx\int_0^1 x^2(x^3+1)^4\,dx. The inner function is x3+1x^3+1 and its derivative 3x23x^2 is nearby, so let u=x3+1u=x^3+1 and du=3x2 dxdu=3x^2\,dx. Then x2 dx=13 dux^2\,dx=\frac13\,du.

Change the bounds. When x=0x=0, u=0+1=1u=0+1=1. When x=1x=1, u=1+1=2u=1+1=2. The integral becomes 13∫12u4 du=13[u55]12=13⋅32−15=3115\frac13\int_1^2 u^4\,du=\frac13\left[\frac{u^5}{5}\right]_1^2=\frac13\cdot\frac{32-1}{5}=\frac{31}{15}. You never go back to xx, because the bounds are already in uu.

Now ∫02xx2+1 dx\int_0^2\frac{x}{x^2+1}\,dx. Let u=x2+1u=x^2+1, so du=2x dxdu=2x\,dx and x dx=12dux\,dx=\frac12du. The bounds become u=1u=1 at x=0x=0 and u=5u=5 at x=2x=2. The integral is 12∫151u du=12[ln⁡∣u∣]15=12(ln⁡5−ln⁡1)=12ln⁡5\frac12\int_1^5\frac1u\,du=\frac12\left[\ln|u|\right]_1^5=\frac12(\ln5-\ln1)=\frac12\ln5.

Sometimes an extra xx remains. For ∫03xx+1 dx\int_0^3 x\sqrt{x+1}\,dx, let u=x+1u=x+1, so x=u−1x=u-1 and dx=dudx=du. The bounds become 11 and 44, and the integral is ∫14(u−1)u1/2 du=∫14(u3/2−u1/2)du=[25u5/2−23u3/2]14\int_1^4(u-1)u^{1/2}\,du=\int_1^4\left(u^{3/2}-u^{1/2}\right)du=\left[\frac25u^{5/2}-\frac23u^{3/2}\right]_1^4. At u=4u=4: 25(32)−23(8)=645−163=11215\frac25(32)-\frac23(8)=\frac{64}{5}-\frac{16}{3}=\frac{112}{15}. At u=1u=1: 25−23=−415\frac25-\frac23=-\frac4{15}. The difference is 11215+415=11615\frac{112}{15}+\frac{4}{15}=\frac{116}{15}.

Alternatively, for a definite integral you may find the antiderivative in xx first, substitute back, and then use the original xx bounds. Pick one plan and stay with it. Mixing xx bounds with a uu expression is the classic error.

Choosing u and handling constants

Look for the expression that is "inside" something: under a root, in a denominator, raised to a power, or the argument of a trig, exponential or log function. Then ask whether its derivative, up to a constant, shows up as another factor. In x2(x3+1)4x^2(x^3+1)^4, the inner function is x3+1x^3+1 and its derivative is 3x23x^2, so the extra factor x2x^2 is present except for a constant of 3. That constant is fine. Constants can be adjusted, but a missing variable factor cannot.

A quick test: ∫x2cos⁡(x3) dx\int x^2\cos(x^3)\,dx works with u=x3u=x^3, because x2x^2 matches du=3x2 dxdu=3x^2\,dx. But ∫xcos⁡(x3) dx\int x\cos(x^3)\,dx does not work with that choice, since there is an xx where an x2x^2 would be needed. Adjusting by a constant never fixes a missing power of xx. For simple linear inner functions like e3xe^{3x} or sin⁡(5x)\sin(5x), substitution is routine: divide by the coefficient of xx, since the derivative of the inner function is a constant.

After substituting, check that the new integral is simpler than the old one. If it is not, try a different uu or a different method.

How it connects

  • Back to 3.1: the chain rule is exactly what substitution reverses, so practicing derivatives of composite functions makes the pattern easy to spot.
  • Back to 6.8: after substituting, the integral has to match one of the basic antiderivatives.
  • Back to 6.7: definite integrals still use F(upper)−F(lower)F(\text{upper})-F(\text{lower}), now in the variable uu.
  • Forward to 7.6: separating variables often produces integrals that need u-substitution on one side.

Common mistakes

  • **Forgetting dudu or its constant.** For ∫xcos⁡(x2) dx\int x\cos(x^2)\,dx, the answer carries a factor of 12\frac12 because du=2x dxdu=2x\,dx.
  • **Leaving some xx in an integral that is now in uu.** The whole integrand must be written in uu, and extra factors of xx should be solved for.
  • Mixing bounds. If you use uu in the integral, use uu-values for the bounds. Do not evaluate uu at xx-bounds.
  • Dropping the absolute value in the logarithm. For g′g\frac{g'}{g}, the antiderivative is ln⁡∣g∣\ln|g| unless gg is clearly positive, like x2+1x^2+1.

How it shows up on the exam

  • Indefinite integrals of composites, such as powers of a function times its derivative, exponentials with inner linear functions, and trig functions with inner functions.
  • Definite integrals that need new bounds and an exact answer, often combined with a context such as total accumulated change.
  • Multiple-choice items where you test a candidate antiderivative by differentiating it with the chain rule.

Check yourself

  1. How would you choose uu in ∫x2ex3 dx\int x^2e^{x^3}\,dx, and what is dudu?
  2. What are the new bounds if you substitute u=2x+1u=2x+1 in ∫03f(2x+1) dx\int_0^3 f(2x+1)\,dx?
  3. Why is ∫2x+3x2+3x dx\int\frac{2x+3}{x^2+3x}\,dx a logarithm, and what is the answer?
  4. What goes wrong if you integrate ∫xx+1 dx\int x\sqrt{x+1}\,dx with u=x+1u=x+1 but leave an xx in the integrand?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.