Integration

U-Substitution

∫f(g(x))g'(x)dx = ∫f(u)du — the chain rule, integrated

U-substitution is the integration counterpart to the chain rule. When the integrand contains an inner function g(x) and its derivative g'(x) as factors, set u = g(x) and the integral collapses into the new variable. The first technique past the power rule.

  • Formula∫f(g(x))g'(x)dx = ∫f(u)du, u = g(x)
  • SourceChain rule (F(g(x)))' = F'(g(x))·g'(x) integrated
  • Pattern to spotInner function + its derivative as factors
  • Definite versionChange limits: ∫_{g(a)}^{g(b)} f(u)du
  • SolvesAll polynomial × derivative-form integrands
  • Order to tryFirst — before integration by parts, trig sub, partial fractions

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The formula and its origin

The substitution rule:

∫ f(g(x)) · g'(x) dx  =  ∫ f(u) du,   where u = g(x), du = g'(x) dx.

It's the chain rule with the equality run backwards. If F is an antiderivative of f, then by the chain rule:

d/dx [ F(g(x)) ]  =  F'(g(x)) · g'(x)  =  f(g(x)) · g'(x).

Integrating both sides gives ∫f(g(x))·g'(x)dx = F(g(x)) + C — and the right-hand side is exactly what you'd get by writing F(u) + C and then substituting u = g(x). The substitution rule is the chain rule, rewritten in integral notation.

How to apply it

The mechanical recipe:

  1. Scan the integrand for a composition f(g(x)) and a factor close to g'(x).
  2. Set u = g(x).
  3. Compute du = g'(x) dx.
  4. Rewrite the integral entirely in u — substitute g(x) → u and g'(x) dx → du.
  5. Integrate ∫f(u)du.
  6. Substitute back u = g(x) to express the answer in x.
  7. For definite integrals — either change the limits to u(a), u(b) OR substitute back to x before evaluating. Pick one, stay consistent.

The hard step is step 1. The rest is bookkeeping.

Worked example — ∫ 2x · sin(x²) dx

The inner function is x²; its derivative is 2x, which appears as a factor. Perfect candidate.

u  = x²
du = 2x dx

∫ 2x · sin(x²) dx  =  ∫ sin(u) du  =  −cos(u) + C
                                    =  −cos(x²) + C.

Verify by differentiating — d/dx[−cos(x²) + C] = sin(x²)·2x. Matches the integrand exactly. The composition disappeared; we integrated a flat ∫sin(u)du and put the layers back at the end.

Worked example — ∫ sin(3x) dx (constant rescale)

The inner function is 3x; its derivative is 3, which doesn't appear in the integrand. Set u = 3x anyway; rescale du to fit.

u  = 3x
du = 3 dx   ⟹  dx = du/3

∫ sin(3x) dx  =  ∫ sin(u) · (du/3)
              =  (1/3) · ∫ sin(u) du
              =  −(1/3) cos(u) + C
              =  −(1/3) cos(3x) + C.

The factor of 3 was missing, but constants flow naturally — divide by 3 outside the integral. This works any time the missing factor is a constant.

Worked example — ∫₀¹ x · e^(x²) dx (definite, change limits)

u  = x²
du = 2x dx  ⟹  x dx = du/2

When x = 0,  u = 0.
When x = 1,  u = 1.

∫₀¹ x · e^(x²) dx  =  ∫₀¹ e^u · (du/2)
                    =  (1/2) [e^u]₀¹
                    =  (1/2) (e − 1).

Notice the limits changed from x = 0, 1 to u = 0, 1 (coincidentally the same here, but in general u(a) ≠ a). The cleaner alternative is to leave the limits in x and substitute back to x at the very end — both are correct, but mixing them is a common error.

Worked example — ∫ tan(x) dx

Rewrite tan(x) = sin(x)/cos(x). Spot the structure — cos(x) inside, and sin(x) is (up to a sign) the derivative of cos(x).

u  = cos(x)
du = −sin(x) dx   ⟹  sin(x) dx = −du

∫ tan(x) dx  =  ∫ sin(x)/cos(x) dx
             =  ∫ (−du)/u
             =  −∫ (1/u) du
             =  −ln|u| + C
             =  −ln|cos(x)| + C
             =  ln|sec(x)| + C.

The negative sign comes from the −sin in du. Many tan-integration mistakes drop this sign. Verify — d/dx[ln|sec(x)|] = (sec(x)·tan(x))/sec(x) = tan(x). Matches.

U-substitution vs other techniques

U-substitutionIntegration by partsTrig substitutionPartial fractions
Best whenInner function + its derivative presentProduct of dissimilar functions (no derivative chain)√(a²±x²) or √(x²−a²) in integrandRational function P(x)/Q(x)
Underlying ruleChain rule (reverse)Product rule (reverse)Pythagorean identityAlgebraic decomposition
Order to tryFirst — fastestSecond — when u-sub failsWhen square roots resist u-subFor rational functions specifically
Mechanical?Very — once pattern is spottedLess so — LIATE helpsMechanical with the three triangle templatesMechanical with Heaviside cover-up
SpeedFastMediumSlow (triangle setup)Slow (algebra-heavy)
Hardest partSpotting the compositionChoosing u and dvPicking the right trig subFactoring Q(x)

When u-substitution is the right tool

  • Polynomial × derivative. ∫xⁿ·polynomial(x^(n+1))dx is always u-sub. Any time a polynomial-degree-n factor multiplies a function of polynomial-degree-(n+1) inside.
  • Exponentials with linear arguments. ∫e^(ax+b)dx, ∫a^x dx, ∫sin(kx)dx — all reduce by u = (linear).
  • Trig and inverse trig. ∫tan(x)dx, ∫cot(x)dx, ∫sec(x)tan(x)dx, ∫(1/√(1−x²))dx — all yield to u-sub on the appropriate inner.
  • Square roots with their derivatives. ∫x·√(x²+1)dx = u = x²+1.
  • Logarithm and derivative paired. ∫(ln x)ⁿ/x dx with u = ln x.
  • Probability density transforms. Change-of-variable formula for probability density functions is the multivariable form of u-substitution.

Common mistakes

  • Forgetting du. Rewriting the integrand without converting g'(x)dx to du gives garbage. Every dx must become du (or du/constant).
  • Mixing limits and variables. If you change limits to u-values, your integrand must be in u when you evaluate. Don't substitute back to x and then plug in u-limits.
  • Dropping the constant rescale. ∫sin(3x)dx with u = 3x gives dx = du/3 — that 1/3 must appear. Skipping it is the most common arithmetic error.
  • Sign errors from negative du. u = cos(x) gives du = −sin(x)dx. The negative sign carries through.
  • Substituting incomplete expressions. If only part of the integrand is in terms of g(x), the substitution is incomplete — you can't replace everything with u, du.
  • Forgetting + C. Indefinite integrals always need the constant of integration. Standard convention; lose it and lose the point on a graded answer.

Connections to other techniques

Chain rule. U-substitution is the chain rule, literally. If you can read d/dx[F(g(x))] = F'(g(x))·g'(x) right-to-left, you can do u-sub. The mental motion is identical.

Integration by parts. When u-sub fails because there's no inner-with-its-derivative pairing, parts is the next tool. ∫x·sin(x)dx isn't u-sub (sin(x) has no x as derivative), it's parts.

Trig substitution. A specialized u-sub where u is a trig function chosen to exploit Pythagorean identities. Same idea, different recognition pattern.

Change of variable in multivariable integrals. The Jacobian-determinant change-of-variable formula ∫∫_R f(x,y) dA = ∫∫_S f(x(u,v), y(u,v))|J|du dv is the multivariable generalization. Same theorem, more bookkeeping.

Numerical integration. When a closed-form antiderivative exists via u-sub, the resulting symbolic answer is more accurate than any numerical quadrature. U-sub is also a preprocessing step for adaptive quadrature on integrands with sharp inner-function features.

Frequently asked questions

How do I know when to use u-substitution?

Look for a composition f(g(x)) inside the integrand AND the derivative g'(x) appearing as another factor — possibly up to a constant. ∫2x·sin(x²)dx has the composition sin(x²) and the factor 2x = derivative of x². ∫tan(x)dx = ∫sin(x)/cos(x)dx has cos(x) inside and sin(x) (close to −d/dx cos(x)) outside. Once you spot the inner function and its derivative paired together, set u equal to the inner function and the technique unfolds mechanically.

Why does ∫f(g(x))g'(x)dx equal ∫f(u)du?

It's the chain rule run in reverse. If F is an antiderivative of f, then d/dx[F(g(x))] = F'(g(x))·g'(x) = f(g(x))·g'(x). Integrating both sides recovers F(g(x)) + C. The substitution u = g(x), du = g'(x)dx is just notation that lets you compute F first (in terms of u) and then plug u = g(x) back at the end.

Do I have to change the limits on a definite integral?

Yes, if you don't substitute back to x. There are two clean approaches. Method one — change limits — when u = g(x), the new limits are u(a) = g(a) and u(b) = g(b). Method two — keep the original limits but substitute back to x at the end. Either works; mixing them — using new limits with old variable — gives wrong answers. Almost all errors here are bookkeeping.

What if the integrand has a constant factor I need but it's not quite g'(x)?

Rescale du. If you have ∫sin(3x)dx and set u = 3x, then du = 3dx, so dx = du/3. The integral becomes ∫sin(u)·(du/3) = (1/3)∫sin(u)du = −(1/3)cos(u) + C = −(1/3)cos(3x) + C. The constant flows naturally — multiply or divide as needed when relating du to dx.

When does u-substitution fail and I need integration by parts instead?

When the integrand has a product structure but no inner function appears with its derivative. ∫x·e^x dx has two factors but x isn't the derivative of e^x, and e^x isn't an inner function paired with its derivative. That's an integration-by-parts problem. The rule of thumb — if you can identify a composition with its derivative, try u-sub; otherwise consider parts. Skilled integrators try u-sub first because it's faster and rarely makes things worse.

Why is u-substitution the 'first' technique past the power rule?

Because it solves every polynomial integral times a polynomial derivative, and it's purely mechanical — no creativity required once the pattern is spotted. The power rule handles ∫xⁿdx; u-sub handles every integrand of the form polynomial(g(x))·g'(x), which covers most of the integrals you'll meet in introductory calculus. Integration by parts, trig sub, and partial fractions come after because they require more pattern recognition or more algebra.

Can I use multiple substitutions in sequence?

Yes. ∫sin(√x)/√x dx wants u = √x first (du = dx/(2√x)), giving ∫2·sin(u)du = −2cos(u) + C = −2cos(√x) + C. Sometimes a second substitution simplifies further. The technique chains — each substitution simplifies the integrand by one composition layer.