Topic 6.11 · BC

Evaluate the resulting integral

Builds on applying integration by parts. 8 minutes.

One pass is not always enough

The top curve is \(x^2\sin x\). The lower curve is a candidate for its antiderivative, and the short dashes show the slope that the top curve asks for. A dash is orange where the candidate follows that slope and red where it does not. The red dashed curve on top is the candidate's own slope, drawn where it differs from the top curve.

Parts with \(u = x^2\) and \(dv = \sin x\,dx\) gives the first term, \(-x^2\cos x\). Most dashes are red, because one term is not the whole answer.

The first pass leaves a new integral, \(\int 2x\cos x\,dx\), simpler than the original but still a product. Press Do the second pass. Parts on this integral adds \(2x\sin x\). The dashes on the left stay red, because a leftover remains.

The second pass leaves a basic integral, \(-\int 2\sin x\,dx = 2\cos x\). Press Finish the last integral. Every dash turns orange.

Three forms of leftover

After one pass of parts, you have the product term \(uv\) minus a leftover integral, \(\int v\,du\). The leftover has three possible forms.

The leftover can be a basic integral. Then you integrate it with a standard rule, and the work ends.

The leftover can be another product. Then you apply parts to the leftover, and it becomes simpler each time.

The leftover can be a multiple of the original integral. Then you treat the original integral as an unknown and solve for it.

Notation

  1. If the leftover is a basic integral, integrate it with a standard rule. Then subtract the result from \(uv\).

  2. If the leftover is another product, apply parts to the leftover. Choose \(u\) in the same way as in the first pass, because the other choice undoes the first pass.

  3. If the original integral \(I\) returns on the right side, treat \(I\) as an unknown. Move the copy to the left side, and divide by the coefficient that results.

    \[I = A - cI \quad\Longrightarrow\quad I = \frac{A}{1 + c}\]

    Here \(A\) stands for all the other terms, and \(c\) is a number with \(1 + c \ne 0\).

  4. For an indefinite integral, write one constant \(C\) at the end. A number times \(C\) is still an arbitrary constant.

  5. For a definite integral, evaluate each product term between the limits. Integrate each leftover between the same limits.

When it fails

Let \(I = \int e^x\cos 2x\,dx\). The first pass with \(u = e^x\) gives \(I = \tfrac12 e^x\sin 2x - \tfrac12\int e^x\sin 2x\,dx\).

Suppose the second pass takes \(u = \sin 2x\) instead. It gives \(\int e^x\sin 2x\,dx = e^x\sin 2x - 2I\). Substitute this result, and every term cancels, so the equation becomes \(I = I\): the second pass undid the first.

Example 1: The leftover is basic

Find \(\displaystyle\int_1^e x^2\ln x\,dx\).

  1. Take \(u = \ln x\), because differentiating it removes the logarithm.

    \[\begin{gathered}u = \ln x, \ \ du = \frac{dx}{x} \\ dv = x^2\,dx, \ \ v = \frac{x^3}{3}\end{gathered}\]
  2. Evaluate the product term at both limits. The orange rectangle is its value at \(x = e\). At \(x = 1\), \(\ln 1 = 0\), so the lower value is 0.

    \[\Big[\frac{x^3}{3}\ln x\Big]_1^e = \frac{e^3}{3}\]
  3. The leftover is \(v\,du = \tfrac{x^3}{3}\cdot\tfrac{dx}{x} = \tfrac{x^2}{3}\,dx\), the teal region. This is a basic power, so integrate it between the same limits.

    \[\int_1^e \frac{x^2}{3}\,dx = \Big[\frac{x^3}{9}\Big]_1^e = \frac{e^3 - 1}{9}\]
  4. The green region is the orange rectangle minus the teal region, so subtract the leftover from the product term. As a check, the decimal value is about 4.57.

    \[\frac{e^3}{3} - \frac{e^3 - 1}{9} = \frac{2e^3 + 1}{9}\]

Example 2: The original integral returns

Find \(\displaystyle\int e^x\cos 2x\,dx\).

  1. For the first pass, take \(u = e^x\) and \(dv = \cos 2x\,dx\), so \(v = \tfrac12\sin 2x\). Call the integral \(I\).

    \[\begin{aligned}I &= \frac12 e^x\sin 2x \\ &\quad - \frac12\int e^x\sin 2x\,dx\end{aligned}\]
  2. The leftover is another product. Apply parts again with the same \(u = e^x\), so that the second pass does not undo the first. Then \(dv = \sin 2x\,dx\) and \(v = -\tfrac12\cos 2x\).

    \[\begin{aligned}\int e^x\sin 2x\,dx &= -\frac12 e^x\cos 2x \\ &\quad + \frac12 I\end{aligned}\]
  3. The original integral \(I\) appears again. Substitute this result into the first equation.

    \[\begin{aligned}I &= \frac12 e^x\sin 2x + \frac14 e^x\cos 2x \\ &\quad - \frac14 I\end{aligned}\]
  4. A tempting wrong move: Add \(\tfrac14 I\) to both sides. Take the right side as the answer.

    \[\begin{aligned}\tfrac54 I &= \tfrac14 e^x(2\sin 2x + \cos 2x) \\ I &= \tfrac14 e^x(2\sin 2x + \cos 2x)\end{aligned}\]

    The red dashed curve on top is the slope of this candidate. It is \(\tfrac54\) of the slope that the top curve asks for, so the candidate is too steep.

  5. Divide both sides by the coefficient \(\tfrac54\), which means multiply by \(\tfrac45\). Add the constant at the end.

    \[\begin{aligned}I &= \frac45\cdot\frac14 \\ &\quad\cdot e^x(2\sin 2x + \cos 2x) \\ &= \frac{e^x(2\sin 2x + \cos 2x)}{5} + C\end{aligned}\]

Practice

Find \(\displaystyle\int_0^1 x^2 e^x\,dx\).

Each pass lowers the power of \(x\) by one, until the leftover is a basic integral. Move the edge to 1 to see the value to reach.

Solution
  1. For the first pass, take \(u = x^2\) and \(dv = e^x\,dx\). The leftover is still a product.

    \[\begin{aligned}\int_0^1 x^2e^x\,dx &= \Big[x^2e^x\Big]_0^1 \\ &\quad - \int_0^1 2xe^x\,dx \\ &= e - \int_0^1 2xe^x\,dx\end{aligned}\]
  2. For the second pass on the leftover, take \(u = 2x\) and \(dv = e^x\,dx\). The new leftover is basic.

    \[\begin{aligned}\int_0^1 2xe^x\,dx &= \Big[2xe^x\Big]_0^1 \\ &\quad - \int_0^1 2e^x\,dx \\ &= 2e - 2(e - 1) = 2\end{aligned}\]
  3. Subtract the leftover from the product term. As a check, the decimal value is about 0.72, the area readout when the edge is at 1.

    \[e - 2\]

Questions

The top curve is \(e^{-x}\cos x\). The lower curve is its antiderivative \(F(x) = \tfrac12 e^{-x}(\sin x - \cos x)\), which two passes of parts give.

  1. At which \(x\) in the figure does \(F\) have a local maximum?

    • \(x = \pi/2\)
    • \(x = 0\)
    • \(x = \pi\)
    • \(x = 3\pi/2\)
    Answer

    \(x = \pi/2\)

  2. On which interval is \(F\) decreasing?

    • \(\pi/2 < x < 3\pi/2\)
    • \(0 < x < \pi/2\)
    • \(3\pi/2 < x < 2\pi\)
    Answer

    \(\pi/2 < x < 3\pi/2\)

  3. Two passes on \(I = \int e^{2x}\cos x\,dx\) give \(I = \tfrac14 e^{2x}(2\cos x + \sin x) - \tfrac14 I\). What is \(I\)?

    • \(\dfrac{e^{2x}(2\cos x + \sin x)}{5} + C\)
    • \(\dfrac{e^{2x}(2\cos x + \sin x)}{4} + C\)
    • \(\dfrac{e^{2x}(2\cos x + \sin x)}{3} + C\)
    • \(\dfrac{5e^{2x}(2\cos x + \sin x)}{16} + C\)
    Answer

    \(\dfrac{e^{2x}(2\cos x + \sin x)}{5} + C\)

Summary

You finish the leftover integral by a basic rule, by parts again, or by solving for the original integral when it returns.

This works because each pass makes the leftover simpler, or gives an equation that you can solve for \(I\) when \(1 + c \ne 0\).

Use it when one pass of parts leaves a product, or leaves the original integral on the right side.

This is one of four skills in topic 6.11 of Which & Why: AP Calculus.