Achievable logoAchievable logo
AP Calculus AB
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Limits
2. Derivative basics
3. Advanced differentiation
4. Contextual uses
5. Analytical uses
6. Integration
6.1 Accumulation of change
6.2 Riemann sums & area
6.3 Definite integrals
6.4 Accumulation functions
6.5 Behavior of accumulation functions
6.6 Fundamental theorem of calculus
6.7 Indefinite integrals
6.8 u-substitution
6.9 Long division & completing the square
7. Differential equations
8. Applications of integrals
9. Testing details tag
Wrapping up
Achievable logoAchievable logo
6.8 u-substitution
Achievable AP Calculus AB
6. Integration
Our AP Calculus AB course is currently in development and is a work-in-progress.

u-substitution

7 min read
Font
Discuss
Share
Feedback

What you’ll learn:

  • How to use u-substitution to simplify an integral
  • Using u-substitution on indefinite and definite integrals

u-substitution is essentially the reverse chain rule. You use it when one function is nested inside another, and the derivative of the inner function (or something close to it) also appears in the integrand. By temporarily switching to a new variable, you can simplify the integral and apply basic integration rules more directly.

Steps for u-substitution

  1. Choose u=g(x).

Pick the “inner” function. Look for something nested, or an expression whose derivative shows up elsewhere in the integrand. Avoid choosing u=x, since that doesn’t simplify anything.

  1. Differentiate u

Differentiate with respect to x:

dxdu​=g′(x)

Then rewrite it in differential form:

du=g′(x)dx

  1. Rewrite the integral

Substitute u and du into the integral. After this step, there should be no x left in the integrand.

  1. Integrate with respect to u.

Apply the usual integration rules, treating u as the variable.

  1. Plug g(x) back in.

For an indefinite integral, include the constant of integration +C.

Examples

∫2xcos(x2)dx

Solution

The expression x2 is inside the cosine, so choose

u=x2

Differentiate:

du=2xdx

That matches the 2xdx in the integral, so rewrite in terms of u:

∫cos(u)du

=sin(u)

=sin(x2)+C​

AP tip:

Even if the derivative of your chosen u isn’t a perfect match, you can often fix it by multiplying or dividing by a constant.

∫xex2dx

Solution

(spoiler)

Again, x2 is nested, so let

u=x2

Then

du=2xdx

But the integrand has only xdx. Divide by 2:

21​du=xdx

Now rewrite the integral:

∫eu⋅21​du

=21​∫eudu

=21​eu

=21​ex2+C​

AP tip:

For quotients, a common strategy is to choose u as the denominator (or a nested part of it). That often produces a g′(x) factor that can cancel with what’s in the numerator.

∫x2−2x+3x−1​dx

Solution

(spoiler)

Let

u=x2−2x+3

Differentiate:

du=(2x−2)dx

Factor out 2:

du=2(x−1)dx

Solve for (x−1)dx:

21​du=(x−1)dx

Rewrite the integral:

∫u1​⋅21​du

=21​∫u1​du

=21​ln(u)

=21​ln(x2−2x+3)+C​

∫x2−3+ln(4x)​​dx

Solution

(spoiler)

This is a quotient, but choosing u=x won’t help. Instead, notice that dxd​[ln(4x)]=x1​, which appears in the integrand. Choose the nested expression:

u=−3+ln(4x)

Then

du=x1​dx

Rewrite the integral:

2∫u​du

=2∫u1/2du

=3/22u3/2​

=34​u3/2

=34​(−3+ln(4x))3/2+C​

∫tan(2x)sec2(2x)dx

Solution

(spoiler)

The integrand contains a function and its derivative pattern: the derivative of tan(x) is sec2(x). Because the angle is 2x, choose

u=tan(2x)

Differentiate:

du=2sec2(2x)dx

Solve for sec2(2x)dx:

21​du=sec2(2x)dx

Rewrite and integrate:

∫u⋅21​du

=21​⋅2u2​

=41​tan2(2x)+C​

Alternatively, this substitution also works:

u=sec(2x)

Then

du=2sec(2x)tan(2x)dx

21​du=sec(2x)tan(2x)

And the integral rewritten is again

∫u⋅21​du

But the final answer when replacing u with sec(2x) is

=41​sec2(2x)+C​

Both answers are correct because of the Pythagorean identity tan2(x)+1=sec2(x). The two antiderivatives differ only by a constant.

As a bonus problem, turn the integrand into a function involving only sin(2x) and cos(2x) before making an appropriate u-substitution.

Extra technique

Here’s a useful variation: sometimes you’ll do a small algebra step after choosing u so you can rewrite everything in terms of u.

∫xx−1​dx

Solution

(spoiler)

The nested expression is x−1, so let

u=x−1

Then

du=dx

The remaining issue is the x outside the square root. Rewrite x in terms of u by solving for x:

u+1=x

Now rewrite the integral:

∫((u+1)⋅u​)du

Distribute u​:

∫(uu​+u​)du

=∫(u3/2+u1/2)du

Integrate term-by-term:

52​u5/2+32​u3/2+C

=52​(x−1)5/2+32​(x−1)3/2+C​

∫x2+1x3​dx

Solution

(spoiler)

Let

u=x2+1

du=2xdx

The numerator x3 can be split as x2⋅x. Rewrite each part in terms of u.

From u=x2+1:

x2=u−1

From du=2xdx:

xdx=21​du

So

x3dx=x2⋅xdx=(u−1)⋅21​du

Now rewrite and simplify:

∫x2+1x3​dx

=∫u1​⋅(u−1)21​⋅du

=21​∫uu−1​du

=21​(∫1du−∫u1​du)

=21​(u−ln(u))

=21​(x2+1−ln(x2+1))+C​

Definite integrals and changing bounds

When you use u-substitution on a definite integral, you have two standard ways to finish the problem.

Option 1: Change the bounds

Convert the limits from x-values to u-values. Then you can evaluate the antiderivative in terms of u without converting back to x.

Option 2: Don’t change the bounds.

Convert back to x after integrating, and then evaluate using the original x-bounds.

Examples

∫02​(x2+1)23x​dx

(spoiler)

Calculations are often simpler if you factor out constants first:

3∫02​(x2+1)2x​dx

The denominator is (x2+1)2. If you choose u=(x2+1)2, then du becomes more complicated than what appears in the numerator. Instead, choose the inner expression:

u=x2+1

Then

du=2xdx

Solve for xdx:

21​du=xdx

At this point, you can finish in either of two ways.

Option 1: Change the bounds

When x=0 (the lower bound),

u=02+1=1

When x=2 (the upper bound),

u=22+1=5

Rewrite the integral with u-bounds:

3∫15​u21​⋅21​du

=23​∫15​u−2du

=23​⋅−2+1u−2+1​

=23​(−u1​)​15​

=23​[−51​−(−11​)]

=56​

Option 2: Don’t change the bounds

Rewrite in terms of u, but keep the original x-bounds:

3∫02​u21​⋅21​du

Integrate, then substitute u=x2+1 back in before evaluating from 0 to 2:

=23​(−u1​)

=23​(−x2+11​)​02​

=23​(−22+11​−(−02+11​))

=56​

u-substitution overview

  • Reverse chain rule technique for integration
  • Used when integrand has a nested function and its derivative (or close)
  • Simplifies integrals by changing variables

Steps for u-substitution

  • Choose u=g(x) (inner function)
  • Differentiate: du=g′(x)dx
  • Rewrite integral in terms of u and du (no x left)
  • Integrate with respect to u
  • Substitute g(x) back in (add +C for indefinite integrals)

Key substitution strategies

  • If du differs by a constant, adjust by multiplying/dividing
  • For quotients, often choose denominator or nested part as u
  • For products, look for a factor whose derivative appears elsewhere

Example highlights

  • ∫2xcos(x2)dx: u=x2, du=2xdx
  • ∫xex2dx: u=x2, du=2xdx, adjust by 1/2
  • ∫x2−2x+3x−1​dx: u=x2−2x+3, du=2(x−1)dx
  • ∫x2−3+ln(4x)​​dx: u=−3+ln(4x), du=x1​dx
  • ∫tan(2x)sec2(2x)dx: u=tan(2x) or u=sec(2x) both work

Extra techniques

  • If x remains after substitution, express x in terms of u
    • Example: u=x−1, so x=u+1
  • For ∫x2+1x3​dx, split x3 as x2⋅x and rewrite both in terms of u

Definite integrals with u-substitution

  • Option 1: Change bounds to u-values, evaluate antiderivative in u
  • Option 2: Keep x-bounds, substitute back to x before evaluating
  • Both methods yield the same final answer

General tips

  • Always check that all x are replaced by u before integrating
  • Adjust du as needed to match the integrand
  • For definite integrals, either change bounds or substitute back before evaluating

Sign up for free to take 10 quiz questions on this topic

All rights reserved ©2016 - 2026 Achievable, Inc.

u-substitution

What you’ll learn:

  • How to use u-substitution to simplify an integral
  • Using u-substitution on indefinite and definite integrals

u-substitution is essentially the reverse chain rule. You use it when one function is nested inside another, and the derivative of the inner function (or something close to it) also appears in the integrand. By temporarily switching to a new variable, you can simplify the integral and apply basic integration rules more directly.

Steps for u-substitution

  1. Choose u=g(x).

Pick the “inner” function. Look for something nested, or an expression whose derivative shows up elsewhere in the integrand. Avoid choosing u=x, since that doesn’t simplify anything.

  1. Differentiate u

Differentiate with respect to x:

dxdu​=g′(x)

Then rewrite it in differential form:

du=g′(x)dx

  1. Rewrite the integral

Substitute u and du into the integral. After this step, there should be no x left in the integrand.

  1. Integrate with respect to u.

Apply the usual integration rules, treating u as the variable.

  1. Plug g(x) back in.

For an indefinite integral, include the constant of integration +C.

Examples

∫2xcos(x2)dx

Solution

The expression x2 is inside the cosine, so choose

u=x2

Differentiate:

du=2xdx

That matches the 2xdx in the integral, so rewrite in terms of u:

∫cos(u)du

=sin(u)

=sin(x2)+C​

AP tip:

Even if the derivative of your chosen u isn’t a perfect match, you can often fix it by multiplying or dividing by a constant.

∫xex2dx

Solution

(spoiler)

Again, x2 is nested, so let

u=x2

Then

du=2xdx

But the integrand has only xdx. Divide by 2:

21​du=xdx

Now rewrite the integral:

∫eu⋅21​du

=21​∫eudu

=21​eu

=21​ex2+C​

AP tip:

For quotients, a common strategy is to choose u as the denominator (or a nested part of it). That often produces a g′(x) factor that can cancel with what’s in the numerator.

∫x2−2x+3x−1​dx

Solution

(spoiler)

Let

u=x2−2x+3

Differentiate:

du=(2x−2)dx

Factor out 2:

du=2(x−1)dx

Solve for (x−1)dx:

21​du=(x−1)dx

Rewrite the integral:

∫u1​⋅21​du

=21​∫u1​du

=21​ln(u)

=21​ln(x2−2x+3)+C​

∫x2−3+ln(4x)​​dx

Solution

(spoiler)

This is a quotient, but choosing u=x won’t help. Instead, notice that dxd​[ln(4x)]=x1​, which appears in the integrand. Choose the nested expression:

u=−3+ln(4x)

Then

du=x1​dx

Rewrite the integral:

2∫u​du

=2∫u1/2du

=3/22u3/2​

=34​u3/2

=34​(−3+ln(4x))3/2+C​

∫tan(2x)sec2(2x)dx

Solution

(spoiler)

The integrand contains a function and its derivative pattern: the derivative of tan(x) is sec2(x). Because the angle is 2x, choose

u=tan(2x)

Differentiate:

du=2sec2(2x)dx

Solve for sec2(2x)dx:

21​du=sec2(2x)dx

Rewrite and integrate:

∫u⋅21​du

=21​⋅2u2​

=41​tan2(2x)+C​

Alternatively, this substitution also works:

u=sec(2x)

Then

du=2sec(2x)tan(2x)dx

21​du=sec(2x)tan(2x)

And the integral rewritten is again

∫u⋅21​du

But the final answer when replacing u with sec(2x) is

=41​sec2(2x)+C​

Both answers are correct because of the Pythagorean identity tan2(x)+1=sec2(x). The two antiderivatives differ only by a constant.

As a bonus problem, turn the integrand into a function involving only sin(2x) and cos(2x) before making an appropriate u-substitution.

Extra technique

Here’s a useful variation: sometimes you’ll do a small algebra step after choosing u so you can rewrite everything in terms of u.

∫xx−1​dx

Solution

(spoiler)

The nested expression is x−1, so let

u=x−1

Then

du=dx

The remaining issue is the x outside the square root. Rewrite x in terms of u by solving for x:

u+1=x

Now rewrite the integral:

∫((u+1)⋅u​)du

Distribute u​:

∫(uu​+u​)du

=∫(u3/2+u1/2)du

Integrate term-by-term:

52​u5/2+32​u3/2+C

=52​(x−1)5/2+32​(x−1)3/2+C​

∫x2+1x3​dx

Solution

(spoiler)

Let

u=x2+1

du=2xdx

The numerator x3 can be split as x2⋅x. Rewrite each part in terms of u.

From u=x2+1:

x2=u−1

From du=2xdx:

xdx=21​du

So

x3dx=x2⋅xdx=(u−1)⋅21​du

Now rewrite and simplify:

∫x2+1x3​dx

=∫u1​⋅(u−1)21​⋅du

=21​∫uu−1​du

=21​(∫1du−∫u1​du)

=21​(u−ln(u))

=21​(x2+1−ln(x2+1))+C​

Definite integrals and changing bounds

When you use u-substitution on a definite integral, you have two standard ways to finish the problem.

Option 1: Change the bounds

Convert the limits from x-values to u-values. Then you can evaluate the antiderivative in terms of u without converting back to x.

Option 2: Don’t change the bounds.

Convert back to x after integrating, and then evaluate using the original x-bounds.

Examples

∫02​(x2+1)23x​dx

(spoiler)

Calculations are often simpler if you factor out constants first:

3∫02​(x2+1)2x​dx

The denominator is (x2+1)2. If you choose u=(x2+1)2, then du becomes more complicated than what appears in the numerator. Instead, choose the inner expression:

u=x2+1

Then

du=2xdx

Solve for xdx:

21​du=xdx

At this point, you can finish in either of two ways.

Option 1: Change the bounds

When x=0 (the lower bound),

u=02+1=1

When x=2 (the upper bound),

u=22+1=5

Rewrite the integral with u-bounds:

3∫15​u21​⋅21​du

=23​∫15​u−2du

=23​⋅−2+1u−2+1​

=23​(−u1​)​15​

=23​[−51​−(−11​)]

=56​

Option 2: Don’t change the bounds

Rewrite in terms of u, but keep the original x-bounds:

3∫02​u21​⋅21​du

Integrate, then substitute u=x2+1 back in before evaluating from 0 to 2:

=23​(−u1​)

=23​(−x2+11​)​02​

=23​(−22+11​−(−02+11​))

=56​

Key points

u-substitution overview

  • Reverse chain rule technique for integration
  • Used when integrand has a nested function and its derivative (or close)
  • Simplifies integrals by changing variables

Steps for u-substitution

  • Choose u=g(x) (inner function)
  • Differentiate: du=g′(x)dx
  • Rewrite integral in terms of u and du (no x left)
  • Integrate with respect to u
  • Substitute g(x) back in (add +C for indefinite integrals)

Key substitution strategies

  • If du differs by a constant, adjust by multiplying/dividing
  • For quotients, often choose denominator or nested part as u
  • For products, look for a factor whose derivative appears elsewhere

Example highlights

  • ∫2xcos(x2)dx: u=x2, du=2xdx
  • ∫xex2dx: u=x2, du=2xdx, adjust by 1/2
  • ∫x2−2x+3x−1​dx: u=x2−2x+3, du=2(x−1)dx
  • ∫x2−3+ln(4x)​​dx: u=−3+ln(4x), du=x1​dx
  • ∫tan(2x)sec2(2x)dx: u=tan(2x) or u=sec(2x) both work

Extra techniques

  • If x remains after substitution, express x in terms of u
    • Example: u=x−1, so x=u+1
  • For ∫x2+1x3​dx, split x3 as x2⋅x and rewrite both in terms of u

Definite integrals with u-substitution

  • Option 1: Change bounds to u-values, evaluate antiderivative in u
  • Option 2: Keep x-bounds, substitute back to x before evaluating
  • Both methods yield the same final answer

General tips

  • Always check that all x are replaced by u before integrating
  • Adjust du as needed to match the integrand
  • For definite integrals, either change bounds or substitute back before evaluating