U-Substitution: How to Do It, With 5 Patterns and Examples

Quick answer

U-substitution is the chain rule in reverse. Let \(u\) be the inside function, replace \(du = g'(x)\,dx\), integrate in \(u\), then put \(x\) back. Example: for \(\int 2x(x^2+1)^5\,dx\), let \(u = x^2+1\), so \(du = 2x\,dx\) and the answer is \(\frac{(x^2+1)^6}{6} + C\).

U-substitution is the most used integration technique in calculus. Most students learn the steps quickly. The hard part is seeing when to use it and what to call \(u\). So this guide is built around patterns. Once you can spot the five patterns below, choosing \(u\) becomes almost automatic.

How U-Substitution Works

When you differentiate a function inside another function, the chain rule multiplies by the derivative of the inside: \(\frac{d}{dx}F(g(x)) = F'(g(x))\,g'(x)\). U-substitution undoes that. If an integral looks like

The pattern\[\int f\big(g(x)\big)\,g'(x)\,dx = \int f(u)\,du, \qquad u = g(x)\]

then you can trade a messy \(x\)-integral for a simple \(u\)-integral.

How to Do U-Substitution in 4 Steps

  1. Choose u. Pick an “inside” expression whose derivative also appears in the integral (maybe off by a constant).
  2. Find du. Differentiate: \(du = u'(x)\,dx\). Solve for the part of the integral you need to replace.
  3. Rewrite and integrate. Every \(x\) must be gone. Then use the basic antiderivative rules.
  4. Substitute back. Replace \(u\) with the original expression and add \(+C\).

The 5 Patterns That Tell You to Use U-Substitution

PatternWhat it looks likeChoose \(u =\)
1. Power of an inside function\(x^2(x^3+4)^7\)the base, \(x^3+4\)
2. Function inside e, sin, cos…\(x\cos(x^2)\), \(e^{5x}\)the inside, \(x^2\) or \(5x\)
3. Derivative over the function\(\frac{2x+3}{x^2+3x}\)the denominator
4. Inside a square root\(x\sqrt{1-x^2}\)what is under the root
5. A function and its derivative\(\frac{\ln x}{x}\), \(\sin^3x\cos x\)\(\ln x\) or \(\sin x\)

Pattern 1: \(\int x^2(x^3+4)^7\,dx\)

Let \(u = x^3 + 4\). Then \(du = 3x^2\,dx\), so \(x^2\,dx = \frac13\,du\).

\[\int x^2(x^3+4)^7\,dx = \frac13\int u^7\,du = \frac{u^8}{24} + C = \frac{(x^3+4)^8}{24} + C.\]

Pattern 2: \(\int x\cos(x^2)\,dx\)

Let \(u = x^2\). Then \(du = 2x\,dx\), so \(x\,dx = \frac12\,du\).

\[\int x\cos(x^2)\,dx = \frac12\int \cos u\,du = \frac12\sin(x^2) + C.\]

A linear inside works the same way: \(\int e^{5x}\,dx = \frac15 e^{5x} + C\).

Pattern 3: \(\int \frac{2x+3}{x^2+3x}\,dx\)

The top is exactly the derivative of the bottom. Let \(u = x^2 + 3x\), so \(du = (2x+3)\,dx\).

\[\int \frac{du}{u} = \ln|u| + C = \ln\left|x^2+3x\right| + C.\]

This is why \(\int \frac{f'(x)}{f(x)}\,dx = \ln|f(x)| + C\) is worth memorizing. See also the antiderivative of 1/x.

Pattern 4: \(\int x\sqrt{1-x^2}\,dx\)

Let \(u = 1 – x^2\). Then \(du = -2x\,dx\), so \(x\,dx = -\frac12\,du\).

\[-\frac12\int u^{1/2}\,du = -\frac12\cdot\frac{2}{3}u^{3/2} + C = -\frac13\left(1-x^2\right)^{3/2} + C.\]

Pattern 5: \(\int \frac{\ln x}{x}\,dx\)

\(\frac1x\) is the derivative of \(\ln x\). Let \(u = \ln x\), \(du = \frac{1}{x}\,dx\).

\[\int u\,du = \frac{u^2}{2} + C = \frac{(\ln x)^2}{2} + C.\]

Same idea: \(\int \sin^3x\cos x\,dx = \frac{\sin^4x}{4} + C\) with \(u = \sin x\).

Harder Case: When x Is Left Over

Sometimes an extra \(x\) remains after you substitute. Solve the substitution for \(x\) and replace it too.

Example: \(\int x\sqrt{x+1}\,dx\). Let \(u = x + 1\), so \(x = u – 1\) and \(dx = du\).

\[\int (u-1)\sqrt{u}\,du = \int \left(u^{3/2} – u^{1/2}\right)du = \frac25u^{5/2} – \frac23u^{3/2} + C.\]

So \(\int x\sqrt{x+1}\,dx = \frac25(x+1)^{5/2} – \frac23(x+1)^{3/2} + C\).

U-Substitution With Definite Integrals

For a definite integral, change the limits to \(u\)-values. Then you never have to switch back to \(x\).

Example: \(\int_0^2 x e^{x^2}\,dx\). Let \(u = x^2\), \(du = 2x\,dx\). When \(x = 0\), \(u = 0\). When \(x = 2\), \(u = 4\).

\[\int_0^2 x e^{x^2}\,dx = \frac12\int_0^4 e^u\,du = \frac12\left(e^4 – 1\right) \approx 26.80.\]

The most common definite-integral mistake is changing to \(u\) but keeping the old \(x\)-limits. If you change the variable, change the limits too.

When U-Substitution Does Not Work

  • No derivative to match. \(\int e^{x^2}\,dx\) has no \(x\) outside to pair with \(du = 2x\,dx\). In fact it has no answer in elementary functions at all.
  • A product of unrelated functions. \(\int x e^x\,dx\) needs integration by parts, not substitution.
  • The leftover factor is a variable, not a constant. You can fix a missing constant like \(\frac13\), but you cannot pull a missing \(x\) out of the integral.

Practice Problems

Choose \(u\) first, then solve. Check your work in the u-substitution calculator.

1. \(\int 3x^2\left(x^3-1\right)^4\,dx\)

\(u = x^3 – 1\): \(\frac{(x^3-1)^5}{5} + C\)

2. \(\int \sin(4x)\,dx\)

\(u = 4x\): \(-\frac14\cos(4x) + C\)

3. \(\int \frac{x}{x^2+9}\,dx\)

\(u = x^2 + 9\): \(\frac12\ln\left(x^2+9\right) + C\)

4. \(\int e^{\sin x}\cos x\,dx\)

\(u = \sin x\): \(e^{\sin x} + C\)

5. \(\int_0^1 \frac{2x}{(x^2+1)^2}\,dx\)

\(u = x^2 + 1\), limits 1 to 2: \(\left[-\frac1u\right]_1^2 = \frac12\)

Calculators for This Topic

Practice what you just read. Each tool shows full steps and checks its own answer.

Frequently Asked Questions

How do I choose u in u-substitution?

Look for an inside function whose derivative also appears in the integral, up to a constant factor. Good choices are the base of a power, the inside of \(e\), \(\sin\) or \(\cos\), a denominator, or the expression under a square root.

Is u-substitution the same as the reverse chain rule?

Yes. The chain rule multiplies by the derivative of the inside function. U-substitution recognizes that extra factor and removes it, which is exactly the chain rule in reverse.

What if the derivative is off by a number?

That is fine. If \(du = 3x^2\,dx\) but you only have \(x^2\,dx\), multiply by \(\frac13\). Constants can always be moved in or out of an integral. Missing variables cannot.

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

Either change the limits to \(u\)-values, or switch back to \(x\) before you plug in the original limits. Changing the limits is usually faster and avoids mistakes.

When should I use integration by parts instead?

Use integration by parts when the integrand is a product of two different kinds of functions and neither is the derivative of the other’s inside, like \(x e^x\) or \(x\ln x\).

Keep Learning

Leave a Comment