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

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.
- Pick u. Look for the "inner" function — the expression inside sin(), cos(), e^(), a power, a radical, or the denominator of a fraction.
- Compute du. Differentiate u to get du = (something) dx.
- Solve for dx. Rearrange: dx = du / (that something).
- Rewrite entirely in u. Replace every x-expression. If any x-term survives, your choice of u was wrong.
- 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
- u = x² → du = 2x dx → x dx = du/2
- ∫cos(u)·(du/2) = (1/2)∫cos(u) du
- = (1/2)sin(u) + C
- = (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
- u = 3x → du = 3 dx → dx = du/3
- ∫e^u · (du/3) = (1/3)∫e^u du
- = (1/3)e^u + C
- = (1/3)e^(3x) + C
Example 3 — Definite: ∫₀¹ x/(x²+1) dx
- u = x²+1 → du = 2x dx → x dx = du/2
- Bounds: x=0 → u=1, x=1 → u=2
- (1/2)∫₁² (1/u) du = (1/2)[ln|u|]₁²
- = (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.
| Pattern | Example | u = | Answer form |
|---|---|---|---|
| Inner function + its derivative | x·sin(x²) | x² | −½cos(x²) |
| Linear inside anything | cos(3x) | 3x | ⅓sin(3x) |
| Derivative in numerator | x/(x²+1) | x²+1 | ½ln|x²+1| |
| Power of expression | (2x+1)³ | 2x+1 | (2x+1)⁴/8 |
| Function composed with itself | sin(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.



