Integration by substitution and by parts

Mathematics · First-year university mathematics · about 11 min

Many integrals cannot be evaluated by applying a basic antiderivative rule straight away. Substitution handles a function nested inside another function, while integration by parts handles certain products. Learning to recognise the structure is usually more important than memorising extra formulas.

The key idea

These two methods reverse familiar differentiation rules:

∫f(g(x))g′(x) dx=∫f(u) du,u=g(x)\boxed{\int f(g(x))g'(x)\,dx=\int f(u)\,du,\quad u=g(x)} ∫u dv=uv−∫v du\boxed{\int u\,dv=uv-\int v\,du}

Substitution reverses the chain rule. Integration by parts reverses the product rule.

Draw a left-to-right flow diagram. At the far left show the integral ∫3x²cos(x³)dx in a rectangle. Split into two short right-pointing arrows: the upper arrow leads to a rectangle marked u=x³ and the lower arrow leads to a rectangle marked du=3x²dx. From those two rectangles, arrows merge to a single rectangle on the right marked ∫cos(u)du. Arrange the upper and lower rectangles directly above one another with no overlaps. Each arrow points to the next stage and no return arrows appear.
A substitution replaces the inner expression and its derivative together.

Substitution

Look for an inner expression whose derivative also appears as a factor. Set u=g(x)u=g(x) and replace all parts of the integral, including dxdx, using du=g′(x) dxdu=g'(x)\,dx. For example, in ∫3x2cos⁡(x3) dx\int 3x^2\cos(x^3)\,dx, choose u=x3u=x^3 to obtain ∫cos⁡u du=sin⁡u+C\int\cos u\,du=\sin u+C. Then substitute x3x^3 back. For definite integrals, either change the bounds to uu values immediately or return to xx before inserting the original bounds. Never mix xx bounds with a uu antiderivative.

Integration by parts

Use integration by parts when multiplying two functions makes direct integration difficult. Choose uu as the factor that becomes simpler when differentiated, and dvdv as the part you can integrate. Compute dudu and vv, then apply ∫u dv=uv−∫v du\int u\,dv=uv-\int v\,du. A common choice in ∫xcos⁡x dx\int x\cos x\,dx is u=xu=x and dv=cos⁡x dxdv=\cos x\,dx, giving xsin⁡x−∫sin⁡x dxx\sin x-\int\sin x\,dx. The result is xsin⁡x+cos⁡x+Cx\sin x+\cos x+C. With definite integrals, evaluate the boundary term [uv]ab[uv]_a^b and the remaining definite integral.

Draw one centred box containing ∫u dv. Directly below it place two side-by-side boxes, left one containing u=x and du=dx, right one containing dv=eˣdx and v=eˣ. Draw a short arrow down from the central integral box to each lower box. Beneath the two boxes draw a wide final box reading uv − ∫v du. Draw an arrow from each lower box pointing diagonally towards that final box. Keep both branches symmetric; no numerical answers or definite-integration bounds appear.
Integration by parts trades a difficult product for a simpler integral.

Choosing and checking

First look for a derivative of an inner expression: that suggests substitution. If you see a product such as a polynomial times an exponential or trigonometric function, try parts. Neither technique replaces basic rules, and some integrals require repeating or combining methods. Check an indefinite result by differentiating it to recover the original integrand. Check a definite result by differentiating the antiderivative and evaluating both bounds. Always add CC to an indefinite integral, but not to a definite integral, which gives a number.

Worked example: Two similar integrals, two different methods

Evaluate both definite integrals exactly:

A=∫012xex2 dx,B=∫01xex dx.A=\int_0^1 2x e^{x^2}\,dx,\qquad B=\int_0^1 x e^x\,dx.

Explain why a different technique is natural for each.

Show the solution

Step 1: Use substitution for AA. The derivative of x2x^2 is 2x2x, already present. Set u=x2u=x^2, so du=2x dxdu=2x\,dx. The new bounds are u(0)=0u(0)=0 and u(1)=1u(1)=1.

A=∫01eu du=[eu]01=e1−e0=e−1.A=\int_0^1 e^u\,du=[e^u]_0^1=e^1-e^0=e-1.

Step 2: Use integration by parts for BB. Choose u=xu=x and dv=ex dxdv=e^x\,dx, giving du=dxdu=dx and v=exv=e^x.

B=[xex]01−∫01ex dx=(e−0)−(e−1)=1.\begin{aligned}B&=[xe^x]_0^1-\int_0^1 e^x\,dx\\&=(e-0)-(e-1)=1.\end{aligned}

Step 3: Check the structure. In AA, the inner x2x^2 and its derivative form a chain-rule pattern. In BB, differentiating the factor xx simplifies the product.

Answers: A=e−1\boldsymbol{A=e-1} and B=1\boldsymbol{B=1}.

Common mistakes

Changing the integrand but not the differential.

After choosing uu, substitute dudu and eliminate all remaining xx terms.

Keeping old bounds after a substitution.

Convert both bounds to uu values, or substitute back before evaluating.

Dropping the minus sign in integration by parts.

Write uv−∫v duuv-\int v\,du before substituting the chosen functions.

Including CC in the result of a definite integral.

Use +C+C only for indefinite integrals.

Check your understanding

1. Which is an antiderivative of 6x(3x2+2)46x(3x^2+2)^4?

2. Evaluate ∫xcos⁡x dx\int x\cos x\,dx.

3. Evaluate ∫023x2 dx\int_0^2 3x^2\,dx.

Still not sure? Talk it through.

Waypoint Mentor's tutor explains this out loud, works through your own problems on a whiteboard, and checks you've got it. Free to start.

Explain this to me

Related topics