Integration by Substitution Calculator - U-Sub with Steps

Integration by Substitution

Enter an integral and get the full u-sub solution with steps

Use * for multiplication, ^ for powers. Example: x^2, sin(x), e^(3x), ln(x)

Substitution
Integral Type

Quick Pattern Guide

You SeeLet u =Result
f'(x)·[f(x)]ⁿf(x)uⁿ⁺¹/(n+1)
f'(x)/f(x)f(x)ln|u|
f'(x)·eᶠ⁽ˣ⁾f(x)eᵘ
f'(x)·sin(f(x))f(x)-cos(u)
f'(x)·cos(f(x))f(x)sin(u)

How to Use This Calculator

  1. Type your integrand in the "Integrand f(x)" field (e.g., x*sin(x^2))
  2. Choose Auto Detect to let the calculator pick u, or Manual to enter your own substitution
  3. For definite integrals, switch to Definite and enter the lower and upper bounds
  4. Click Solve to see the full step-by-step solution
  5. Review the pattern classification and verification hint to strengthen your understanding

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Integration by Substitution Calculator: Solve Any U-Sub Integral Step by Step

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Integration by substitution calculator showing u-substitution steps with pattern detection, transformed integral, and back-substitution for calculus students.

An integration by substitution calculator takes the guesswork out of u-sub by identifying the right substitution and walking you through every step. You type ∫x·sin(x²) dx, the tool spots u = x², computes du = 2x dx, transforms the integral into ∫(1/2)sin(u) du, integrates to get −(1/2)cos(u), and replaces u back to give you −(1/2)cos(x²) + C. No manual algebra, no missed constants, no sign errors.

But a calculator alone won't get you through an exam. Below, we break down exactly how substitution works, when it applies, and — just as important — when it doesn't. If you've used our u-substitution calculator and want a deeper understanding of the method, you're in the right place.

Why Substitution Exists — the Chain Rule in Reverse

Differentiation has the chain rule: d/dx[f(g(x))] = f'(g(x))·g'(x). Integration by substitution reverses that process. When you see an integrand shaped like f'(g(x))·g'(x), you can collapse it back into f(g(x)) + C by letting u = g(x).

The entire method boils down to three questions: (1) Is there a composite function? (2) Does the derivative of the inner piece show up as a factor? (3) Can I account for any leftover constants? If all three answers are yes, substitution works. If not, you'll need a different technique — integration by parts, trig substitution, or partial fractions.

The Five-Step Substitution Method

Here's the procedure this calculator follows internally — and the one you should practice by hand.

  1. Pick u. Look for the "inner" function — the expression inside sin(), cos(), e^(), a power, a radical, or the denominator of a fraction.
  2. Compute du. Differentiate u to get du = (something) dx.
  3. Solve for dx. Rearrange: dx = du / (that something).
  4. Rewrite entirely in u. Replace every x-expression. If any x-term survives, your choice of u was wrong.
  5. Integrate, then substitute back. Solve ∫(expression in u) du, then replace u with g(x).

For definite integrals, there's a shortcut: convert the x-bounds to u-bounds at step 4 and skip the back-substitution entirely. That's actually cleaner and less error-prone.

Worked Examples With Numbers

Example 1 — Power inside trig: ∫x·cos(x²) dx

  1. u = x² → du = 2x dx → x dx = du/2
  2. ∫cos(u)·(du/2) = (1/2)∫cos(u) du
  3. = (1/2)sin(u) + C
  4. = (1/2)sin(x²) + C

Verify: d/dx[(1/2)sin(x²)] = (1/2)·cos(x²)·2x = x·cos(x²) ✓

Example 2 — Exponential: ∫e^(3x) dx

  1. u = 3x → du = 3 dx → dx = du/3
  2. ∫e^u · (du/3) = (1/3)∫e^u du
  3. = (1/3)e^u + C
  4. = (1/3)e^(3x) + C

Example 3 — Definite: ∫₀¹ x/(x²+1) dx

  1. u = x²+1 → du = 2x dx → x dx = du/2
  2. Bounds: x=0 → u=1, x=1 → u=2
  3. (1/2)∫₁² (1/u) du = (1/2)[ln|u|]₁²
  4. = (1/2)(ln 2 − ln 1) = (1/2)ln 2 ≈ 0.3466

Pattern Recognition: How to Spot a Substitution Integral

Speed on exams comes from recognizing patterns instantly. Here are the five most common — memorize these and you'll handle 80%+ of substitution problems without hesitation.

PatternExampleu =Answer form
Inner function + its derivativex·sin(x²)−½cos(x²)
Linear inside anythingcos(3x)3x⅓sin(3x)
Derivative in numeratorx/(x²+1)x²+1½ln|x²+1|
Power of expression(2x+1)³2x+1(2x+1)⁴/8
Function composed with itselfsin(x)·cos(x)sin(x)sin²(x)/2

When Substitution Fails — and What to Do Instead

Substitution only works when the derivative of u (or a constant multiple of it) appears in the integrand. If it doesn't, no amount of cleverness with u will help. The telltale sign: after substituting, you still have an x-term you can't eliminate.

Take ∫x·eˣ dx. Setting u = x gives du = dx, but that leaves ∫u·eᵘ du — no simpler than the original. Setting u = eˣ gives du = eˣ dx, but x remains. Neither works, because this integral needs integration by parts (the LIATE rule), not substitution.

Similarly, integrals like ∫√(a²−x²) dx require trigonometric substitution, and rational functions like ∫1/((x+1)(x−2)) dx call for partial fractions. Our antiderivative calculator can help determine which method fits when substitution doesn't.

The Definite Integral Shortcut Most Students Miss

When evaluating a definite integral ∫ₐᵇ f(g(x))·g'(x) dx with substitution, you don't have to back-substitute. Convert the limits instead: compute u(a) and u(b), then evaluate F(u) from u(a) to u(b) directly.

This skips an entire step, eliminates one source of errors, and produces a numeric answer faster. For ∫₀^π sin(x)·cos(x) dx with u = sin(x): u(0) = 0, u(π) = 0, so the integral is [u²/2]₀⁰ = 0. Done in one line — no back-substitution needed.

Three Mistakes That Cost Exam Points

  • Forgetting the constant factor. If du = 2x dx but you only have x dx, you need a factor of 1/2. Missing that multiplier gives an answer that's twice the correct value.
  • Not converting bounds for definite integrals. After substituting u into a definite integral, the limits must change from x-values to u-values. Leaving the original x-limits produces a completely wrong number.
  • Choosing u when its derivative is absent. If you pick u = x² for ∫sin(x²) dx (no x factor), there's no way to get du = 2x dx from the integrand. The integral ∫sin(x²) dx has no elementary closed form — it's the Fresnel integral.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.