Integration by Parts

Substitution undoes the chain rule. Integration by parts undoes the product rule, and it handles many products that substitution can't, such as a polynomial times an exponential or a logarithm.

The formula

If uu and vv are differentiable functions of xx, the product rule says ddx(uv)=u v′+v u′\frac{d}{dx}(uv) = u\,v' + v\,u'. Integrate both sides and solve for one of the two integrals.
uv=∫u v′ dx+∫v u′ dx∫u v′ dx=uv−∫v u′ dx\begin{aligned} uv &= \int u\,v'\,dx + \int v\,u'\,dx \\[4pt] \int u\,v'\,dx &= uv - \int v\,u'\,dx \end{aligned}
The formula trades one integral for another. It pays off when dvdv can be integrated and ∫v du\int v\,du is simpler than the integral you started with.

Choosing u

Choose uu to be a factor that gets simpler when you differentiate it, and let dvdv be the rest, dxdx included. A common guide ranks the choices for uu in the order LIATE: logarithms, inverse trigonometric functions, algebraic functions (powers of xx), trigonometric functions, exponentials. Take uu from whichever type comes first. It's a guide only: the real test is whether ∫v du\int v\,du is easier.
A logarithm or an inverse trigonometric function on its own has no second factor. Take dv=dxdv = dx, so v=xv = x.

Definite integrals and tables

Parts also works when the functions are known only through a table. The product uvuv is evaluated from the table, and the leftover integral is often given.

Repeated parts and the tabular method

With u=x2u = x^2, one round of parts leaves an integral with xx in place of x2x^2. A second round finishes it.
The tabular method organizes the same work. List uu and its derivatives in one column until a derivative is 0, and dvdv and its antiderivatives in the next. Multiply along each diagonal and attach the signs +,−,+,…+, -, +, \dots in turn. It finishes the integral only when the uu column reaches 0.

An integral that comes back

For an exponential times a sine or cosine, neither factor ever differentiates to 0, so the tabular method never stops. Integrate by parts twice, choosing the same kind of uu both times. The original integral returns, and you solve for it.

Substituting first

Sometimes a substitution turns the integral into one that parts can handle.