Integration by Substitution

Reversing the chain rule

If FF is an antiderivative of ff, the chain rule gives
ddx F(g(x))=F′(g(x)) g′(x)=f(g(x)) g′(x).\begin{aligned} &\frac{d}{dx}\,F\bigl(g(x)\bigr) \\[4pt] &\qquad = F'\bigl(g(x)\bigr)\,g'(x) \\[4pt] &\qquad = f\bigl(g(x)\bigr)\,g'(x). \end{aligned}
Read backward, an integrand of the form f(g(x)) g′(x)f\bigl(g(x)\bigr)\,g'(x) has the antiderivative F(g(x))F\bigl(g(x)\bigr). Naming the inside function u=g(x)u = g(x) turns it into an integral the table of basic integrals covers.
In practice, choose uu to be an inside function whose derivative is also a factor of the integrand. Write dudu, rewrite the whole integral in terms of uu, integrate, and substitute g(x)g(x) back for uu.

Adjusting a constant

Often dudu matches the rest of the integrand except for a constant factor. Since a constant factor can be taken outside an integral, multiply and divide by it. Only a constant can be adjusted this way. In ∫cos⁡(x2) dx\int \cos(x^2)\,dx, the choice u=x2u = x^2 needs du=2x dxdu = 2x\,dx, and the integrand has no factor of xx to supply it.

A leftover x

Sometimes, after g(x)g(x) and dxdx are replaced, a factor of xx is left over. Solve u=g(x)u = g(x) for xx and replace that too.

Definite integrals

The limits change with the variable: when xx runs from aa to bb, uu starts at g(a)g(a) and ends at g(b)g(b). If FF is an antiderivative of ff, both sides equal F(g(b))−F(g(a))F\bigl(g(b)\bigr) - F\bigl(g(a)\bigr), so there's no need to substitute back.

Logarithms from substitution

When the integrand is a fraction whose numerator is the derivative of its denominator, the substitution u=g(x)u = g(x) leaves ∫1u du\int \frac{1}{u}\,du:

From a table

Long division and completing the square

Some fractions need rewriting before a substitution fits. When the degree of the numerator is at least the degree of the denominator, divide first. The quotient is a polynomial, and the remainder over the divisor is a proper fraction, often one that a substitution finishes.
When a quadratic in a denominator doesn't factor, or sits under a square root, complete the square. A substitution then turns it into one of two inverse trigonometric forms.