myLearning

Topic 1 of 7

Step 16: Calculus 2

Substitution and integration by parts

Step 16 · Calculus 2 topics

Undo the chain rule with substitution and the product rule with integration by parts, and learn to spot which one an integral needs.

Substitution

Substitution undoes the chain rule. If the integrand contains a function g(x) and also its derivative g′(x), set u = g(x). Then du = g′(x) dx, and the integral becomes simpler in u.

∫f(g(x)) g′(x) dx=∫f(u) du\int f(g(x))\,g'(x)\,dx = \int f(u)\,du

Example: A power

Find ∫2x(x2+1)5 dx\int 2x(x^{2} + 1)^{5}\,dx.

  1. Let u = x² + 1, so du = 2x dx.
  2. The integral becomes ∫u5 du=u66+C\int u^{5}\,du = \frac{u^{6}}{6} + C.

Answer(x2+1)66+C\frac{(x^{2} + 1)^{6}}{6} + C

Example: Fixing a constant

Find ∫x ex2 dx\int x\,e^{x^{2}}\,dx.

  1. Let u = x², so du = 2x dx and x dx is 12\frac{1}{2} du.
  2. 12∫eu du=12eu+C\frac{1}{2}\int e^{u}\,du = \frac{1}{2}e^{u} + C.

Answer12ex2+C\frac{1}{2}e^{x^{2}} + C

Example: A definite integral

Find ∫022xx2+1 dx\int_{0}^{2} \frac{2x}{x^{2} + 1}\,dx.

  1. Let u = x² + 1. When x = 0, u = 1; when x = 2, u = 5.
  2. ∫15duu=ln⁡5−ln⁡1\int_{1}^{5} \frac{du}{u} = \ln 5 - \ln 1.

Answerln 5, about 1.61

Integration by parts

Integration by parts undoes the product rule. Choose u to be a factor that gets simpler when you differentiate it, and dv to be the rest.

∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du

Example: x times eˣ

Find ∫xex dx\int x e^{x}\,dx.

  1. Take u = x and dv = eˣ dx, so du = dx and v = eˣ.
  2. xex−∫ex dxxe^{x} - \int e^{x}\,dx.

Answerxex−ex+Cxe^{x} - e^{x} + C

Example: A logarithm

Find ∫ln⁡x dx\int \ln x\,dx.

  1. Take u = ln x and dv = dx, so du = dx ÷ x and v = x.
  2. xln⁡x−∫x⋅1x dxx\ln x - \int x \cdot \frac{1}{x}\,dx.

Answerxln⁡x−x+Cx\ln x - x + C

Example: Twice

Find ∫x2sin⁡x dx\int x^{2}\sin x\,dx.

  1. Take u = x² and dv = sin x dx: −x2cos⁡x+∫2xcos⁡x dx-x^{2}\cos x + \int 2x\cos x\,dx.
  2. Parts again, with u = 2x: ∫2xcos⁡x dx=2xsin⁡x+2cos⁡x\int 2x\cos x\,dx = 2x\sin x + 2\cos x.

Answer−x2cos⁡x+2xsin⁡x+2cos⁡x+C-x^{2}\cos x + 2x\sin x + 2\cos x + C

Choosing a method

Before integrating, look at the shape of the integrand.

You seeTry
A function and its derivativeSubstitution
A power of x times eˣ, sin x or cos xParts, with u the power
ln x or an inverse trig function aloneParts, with dv = dx
A form from the basic tableIntegrate directly

Example: Spot the derivative

Which method suits ∫ln⁡xx dx\int \frac{\ln x}{x}\,dx?

  1. 1x\frac{1}{x} is the derivative of ln x.
  2. So u = ln x gives ∫u du=u22\int u\,du = \frac{u^{2}}{2}.

Answer(ln⁡x)22+C\frac{(\ln x)^{2}}{2} + C

Example: Check by differentiating

Check that xex−exxe^{x} - e^{x} is an antiderivative of xexxe^{x}.

  1. By the product rule its derivative is eˣ + xeˣ − eˣ.
  2. That leaves xeˣ.

AnswerIt checks

Try it yourself

Work each one on paper first, then open the answer to check.

  1. Find ∫3x2(x3−4)4 dx\int 3x^{2}(x^{3} - 4)^{4}\,dx.

    Show answer

    (x3−4)55+C\frac{(x^{3} - 4)^{5}}{5} + C

  2. Find ∫cos⁡(5x) dx\int \cos(5x)\,dx.

    Show answer

    15sin⁡(5x)+C\frac{1}{5}\sin(5x) + C

  3. Find ∫012x ex2 dx\int_{0}^{1} 2x\,e^{x^{2}}\,dx.

    Show answer

    e − 1, about 1.72

  4. Find ∫xcos⁡x dx\int x\cos x\,dx.

    Show answer

    xsin⁡x+cos⁡x+Cx\sin x + \cos x + C

  5. Find ∫1eln⁡x dx\int_{1}^{e} \ln x\,dx.

    Show answer

    1

  6. Which method suits ∫x3ex dx\int x^{3}e^{x}\,dx?

    Show answer

    Integration by parts, three times, with u the power of x

What next?