Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Integrate by u-Substitution

Substitution reverses the chain rule. Find an inner function whose derivative is also in the integrand, call it uu, and the integral turns into a simpler one in uu.

Recognize the task

The integrand contains a function and a multiple of its derivative: 2xcos⁡(x2)2x\cos(x^2), ln⁡xx\frac{\ln x}{x}, xx2+1x\sqrt{x^2+1}, e3xe^{3x}, 12x+5\frac{1}{2x+5}. The signal is something inside brackets, a root or a power, with the derivative of that inside sitting outside. Test: call the inside uu; if dudu absorbs everything else except a constant, substitution works.
The rule itself is the substitution rule; it is the chain rule read backwards. The lesson introduces it under Integration Techniques.

Two ways to do it

Substitute u = g(x)usual choice
∫f(g(x)) g′(x) dx=∫f(u) du\int f(g(x))\,g'(x)\,dx = \int f(u)\,du
The substitution rule: the whole integrand and the dxdx are rewritten in terms of uu.
Adjust by a constantwhen du is off by a factor
∫e3x dx=13∫eu du\int e^{3x}\,dx = \tfrac{1}{3}\int e^{u}\,du
When dudu differs from what is in the integrand by a constant factor, multiply inside and divide outside. Only constants may move through the integral sign.

Steps

StepOn ∫2xcos⁡(x2) dx\int 2x\cos(x^2)\,dx
1Choose u: the inside function. The expression inside a bracket, a power, a root, an exponent or a denominator.u=x2u = x^2
2Differentiate u and solve for the leftover piece. du=u′(x) dxdu = u'(x)\,dx. Compare with what is in the integrand; if a constant is missing, adjust for it.du=2x dxdu = 2x\,dx
3Rewrite the integral entirely in u. No xx and no dxdx may remain. If an xx cannot be converted, the substitution is wrong.∫cos⁡u du\int \cos u\,du
4Integrate in u. Here a standard trig antiderivative.Standard trig antiderivatives ↗sin⁡u+C\sin u + C
5Substitute back and check. Replace uu by its expression in xx. Differentiate the result; the chain rule should reproduce the integrand.sin⁡(x2)+C\sin(x^2) + C

Worked examples

Example 1 · derivative sitting right there

basic
∫2xcos⁡(x2) dx\int 2x\cos(x^2)\,dx
u=x2u = x^2, du=2x dxdu = 2x\,dx
=∫cos⁡u du=sin⁡u+C= \int \cos u\,du = \sin u + C
integrate in uu
=sin⁡(x2)+C= \sin(x^2) + C
back to xx

Example 2 · adjusting a constant

du off by 2
∫xx2+1 dx\int x\sqrt{x^2 + 1}\,dx
u=x2+1u = x^2 + 1, du=2x dxdu = 2x\,dx, so x dx=12dux\,dx = \tfrac{1}{2}du
=12∫u1/2 du=12⋅23u3/2+C= \tfrac{1}{2}\int u^{1/2}\,du = \tfrac{1}{2}\cdot\tfrac{2}{3}u^{3/2} + C
power rule in uu
=13(x2+1)3/2+C= \tfrac{1}{3}(x^2 + 1)^{3/2} + C
back to xx

Example 3 · logarithm over x

u = ln x
∫ln⁡xx dx\int \frac{\ln x}{x}\,dx
u=ln⁡xu = \ln x, du=dxxdu = \frac{dx}{x}
=∫u du=u22+C= \int u\,du = \frac{u^2}{2} + C
the 1x\frac{1}{x} was the derivative of ln⁡x\ln x
=(ln⁡x)22+C= \frac{(\ln x)^2}{2} + C
back to xx

See it happen

Substitution is the chain rule read backwards. Differentiating sin⁡(x2)\sin(x^2) produces the factor 2x2x; integrating 2xcos⁡(x2)2x\cos(x^2) has to absorb that same factor into dudu. If the factor is not there and cannot be fixed with a constant, substitution is the wrong tool.

Common mistakes

Leaving an x behind

✗ ∫cos⁡u dx\int \cos u\,dx
✓ convert dxdx too; an integral with two variables is meaningless

Pulling a variable outside

✗ ∫xcos⁡(x2) dx=x∫cos⁡(x2) dx\int x\cos(x^2)\,dx = x\int \cos(x^2)\,dx
✓ only constants move through the integral sign

Forgetting the constant adjustment

✗ ∫e3x dx=e3x+C\int e^{3x}\,dx = e^{3x} + C
✓ ∫e3x dx=13e3x+C\int e^{3x}\,dx = \tfrac{1}{3}e^{3x} + C

Stopping in u

✗ sin⁡u+C\sin u + C as the final answer
✓ sin⁡(x2)+C\sin(x^2) + C; the answer must be in the original variable