Tutorials › AP Statistics › Tabular Integration by Parts for Repeated Derivatives

Numerical and BC Integration Methods · Tutorial 520 of 999

Tabular Integration by Parts for Repeated Derivatives

Use a derivative-integral table to evaluate polynomial products systematically, with alternating signs and a clear stopping rule.

Advanced 9 min read

What You'll Learn

  • Build a table by differentiating a polynomial and repeatedly integrating the other factor
  • Use alternating signs to form the diagonal products
  • Identify where the polynomial makes the tabular process terminate
  • Verify a tabular antiderivative by differentiation
  • Apply the table to a definite integral and evaluate its boundary terms

Why Use a Table?

Integration by parts is especially efficient when one factor is a polynomial. Differentiating a polynomial eventually produces zero, so repeated integration by parts can be organized into a finite process. A derivative-integral table records each step and makes the alternating signs visible.

The table is a bookkeeping method, not a new integration rule. Each diagonal product comes from one application of integration by parts, and the process stops when the polynomial derivative becomes zero.

Key idea: For an integral of a polynomial times a function whose successive antiderivatives are known, differentiate the polynomial down to zero, repeatedly integrate the other factor, and combine the diagonal products with alternating signs.

How to Build the Table

Let \(P(x)\) be a polynomial of degree \(n\), and let \(f(x)\) have \(n+1\) successive antiderivatives on the interval of interest. Write \(F_0=f\), and define \(F_1,F_2,\ldots,F_{n+1}\) so that \(F_{k+1}'=F_k\). In the left column, list \(P\) and its derivatives; in the right column, list \(F_1,F_2,\ldots,F_{n+1}\).

Start with a plus sign and alternate the signs down the table. Multiply entries along each diagonal: \(P\) with \(F_1\), \(P'\) with \(F_2\), and so on. Stop after the row containing the last nonzero derivative of \(P\). The result is an antiderivative.

$$ \int P(x)f(x)\,dx = P F_1-P'F_2+P''F_3-\cdots+(-1)^nP^{(n)}F_{n+1}+C. $$

The formula requires the listed antiderivatives to exist on the interval under consideration. For a definite integral over \([a,b]\), the corresponding formula is evaluated at both endpoints: the sum of diagonal products at \(b\) minus the sum at \(a\). All functions involved must be defined and sufficiently differentiable or integrable on that interval for the integrations by parts to apply.

Why the Alternating Signs Work

The signs follow directly from integration by parts. In the first application, choose \(u=P\) and \(dv=f(x)\,dx\), so that \(du=P'\,dx\) and \(v=F_1\). Then

$$ \int Pf\,dx=PF_1-\int P'F_1\,dx. $$

In the remaining integral, use \(u=P'\) and \(dv=F_1\,dx\), whose antiderivative is \(F_2\). Substituting this second integration-by-parts result gives

$$ \int Pf\,dx = PF_1-P'F_2+\int P''F_2\,dx. $$

Each new application introduces one minus sign, while the preceding remainder already has a minus sign. Thus the diagonal terms alternate in sign. The argument continues until the derivative of the polynomial is zero.

Derivation: Repeated integration by parts gives \(\int Pf\,dx=PF_1-\int P'F_1\,dx\). Applying integration by parts to the remaining integral gives \(\int P'F_1\,dx=P'F_2-\int P''F_2\,dx\). Therefore \(\int Pf\,dx=PF_1-P'F_2+\int P''F_2\,dx\). Repeating this substitution \(n\) times leaves the terms \( (-1)^kP^{(k)}F_{k+1}\) for \(k=0,\ldots,n\), followed by a remainder involving \(P^{(n+1)}\). Since \(P\) has degree \(n\), \(P^{(n+1)}=0\), so the remainder vanishes. This proves the displayed finite formula, up to the constant of integration.

Worked Example: A Cubic Polynomial Times an Exponential

Worked Example: \(\int x^3e^x\,dx\)

Differentiate \(x^3\) until it reaches zero. Since every antiderivative of \(e^x\) is \(e^x\), the integration column repeats that function.

SignDifferentiate \(x^3\)Integrate \(e^x\)
+\(x^3\)\(e^x\)
−\(3x^2\)\(e^x\)
+\(6x\)\(e^x\)
−\(6\)\(e^x\)
\(0\)

Multiply along the diagonals, using the sign shown in each row:

$$ \begin{aligned} \int x^3e^x\,dx &=x^3e^x-3x^2e^x+6xe^x-6e^x+C\\ &=e^x(x^3-3x^2+6x-6)+C. \end{aligned} $$

Check by differentiating. If \(Q(x)=x^3-3x^2+6x-6\), then \(Q'(x)=3x^2-6x+6\). Hence

$$ \begin{aligned} \frac{d}{dx}\bigl(e^xQ(x)\bigr) &=e^xQ(x)+e^xQ'(x)\\ &=e^x\bigl[(x^3-3x^2+6x-6)+(3x^2-6x+6)\bigr]\\ &=x^3e^x. \end{aligned} $$

The derivative matches the integrand, so the antiderivative is verified.

Worked Example: Repeated Antiderivatives That Change

Worked Example: \(\int x^2\sin x\,dx\)

Here the polynomial derivatives are \(x^2,2x,2,0\). The successive antiderivatives of \(\sin x\) are \(-\cos x,-\sin x,\cos x\). Record each one in order:

SignDifferentiate \(x^2\)Integrate \(\sin x\) repeatedly
+\(x^2\)\(-\cos x\)
−\(2x\)\(-\sin x\)
+\(2\)\(\cos x\)
\(0\)

The alternating signs apply to the diagonal products, including the negative values in the integration column:

$$ \begin{aligned} \int x^2\sin x\,dx &=x^2(-\cos x)-(2x)(-\sin x)+(2)(\cos x)+C\\ &=-x^2\cos x+2x\sin x+2\cos x+C. \end{aligned} $$

Differentiate the result term by term:

$$ \begin{aligned} \frac{d}{dx}\bigl(-x^2\cos x+2x\sin x+2\cos x\bigr) &=-2x\cos x+x^2\sin x+2\sin x+2x\cos x-2\sin x\\ &=x^2\sin x. \end{aligned} $$

All terms other than \(x^2\sin x\) cancel, confirming the answer.

Worked Example: Repeatedly Integrating a Logarithm

Worked Example: \(\int x^2\ln x\,dx\), for \(x>0\)

The logarithm is the repeatedly integrated factor, and the polynomial is differentiated. The domain condition \(x>0\) is required because \(\ln x\) is defined only for positive \(x\).

Integrate \(\ln x\) once by parts: \(\int\ln x\,dx=x\ln x-x\). Integrate that result to obtain the next entries:

$$ \begin{aligned} F_1&=x\ln x-x,\\ F_2&=\frac{x^2}{2}\ln x-\frac{3x^2}{4},\\ F_3&=\frac{x^3}{6}\ln x-\frac{11x^3}{36}. \end{aligned} $$

For example, differentiating \(F_2\) gives \(x\ln x+\frac{x}{2}-\frac{3x}{2}=x\ln x-x=F_1\); differentiating \(F_3\) gives \(\frac{x^2}{2}\ln x+\frac{x^2}{6}-\frac{11x^2}{12} =\frac{x^2}{2}\ln x-\frac{3x^2}{4}=F_2\).

The polynomial derivative column is \(x^2,2x,2,0\). The table formula gives

$$ \begin{aligned} \int x^2\ln x\,dx &=x^2F_1-2xF_2+2F_3+C\\ &=x^2(x\ln x-x) -2x\left(\frac{x^2}{2}\ln x-\frac{3x^2}{4}\right) +2\left(\frac{x^3}{6}\ln x-\frac{11x^3}{36}\right)+C\\ &=\left(1-1+\frac13\right)x^3\ln x +\left(-1+\frac32-\frac{11}{18}\right)x^3+C\\ &=\frac{x^3}{3}\ln x-\frac{x^3}{9}+C. \end{aligned} $$

To check, differentiate:

$$ \frac{d}{dx}\left(\frac{x^3}{3}\ln x-\frac{x^3}{9}\right) =x^2\ln x+\frac{x^2}{3}-\frac{x^2}{3} =x^2\ln x. $$

The logarithmic terms in the table require careful arithmetic; the derivative check confirms that the simplified expression is correct.

Definite Integrals and Boundary Terms

For a definite integral, use the same diagonal sum as for an antiderivative, then subtract its value at the lower endpoint from its value at the upper endpoint. This is the repeated-parts version of keeping track of boundary terms. It can be efficient when the resulting endpoint values are manageable.

Worked Example: \(\int_0^1 x^2e^{2x}\,dx\)

The polynomial derivatives are \(x^2,2x,2,0\). Successive antiderivatives of \(e^{2x}\) are \(\frac12e^{2x},\frac14e^{2x},\frac18e^{2x}\). Thus the diagonal sum is

$$ \begin{aligned} F(x) &=\frac{x^2}{2}e^{2x} -(2x)\frac{e^{2x}}{4} +2\frac{e^{2x}}{8}\\ &=e^{2x}\left(\frac{x^2}{2}-\frac{x}{2}+\frac14\right). \end{aligned} $$

Check the antiderivative. Let \(R(x)=\frac{x^2}{2}-\frac{x}{2}+\frac14\), so \(R'(x)=x-\frac12\). Then

$$ \begin{aligned} F'(x) &=e^{2x}\bigl(2R(x)+R'(x)\bigr)\\ &=e^{2x}\left(x^2-x+\frac12+x-\frac12\right)\\ &=x^2e^{2x}. \end{aligned} $$

Evaluate the endpoints: \(F(1)=\frac14e^2\), while \(F(0)=\frac14\). Therefore

$$ \int_0^1x^2e^{2x}\,dx =F(1)-F(0) =\frac{e^2-1}{4}. $$

The boundary subtraction is essential: the definite integral is not just the value of the antiderivative at the upper endpoint.

A Sign Pitfall

A common error is to add every diagonal product. For instance, that mistake would give the incorrect expression

$$ e^x(x^2+2x+2) $$

for \(\int x^2e^x\,dx\). Differentiating shows the error:

$$ \frac{d}{dx}\left(e^x(x^2+2x+2)\right) =e^x(x^2+4x+4)\ne x^2e^x. $$

The corrected table has signs \(+,-,+\), so the correct expression is \(e^x(x^2-2x+2)+C\). Its derivative is

$$ \frac{d}{dx}\left(e^x(x^2-2x+2)\right) =e^x\bigl[(x^2-2x+2)+(2x-2)\bigr] =x^2e^x. $$

Writing the alternating signs before multiplying the diagonals helps prevent this mistake. Also stop when the polynomial derivative becomes zero; continuing the polynomial column past that point adds no terms.

When the Method Is Useful

The table is most useful when one factor is a polynomial and the other factor can be integrated repeatedly without making the expressions impractical. Exponential and trigonometric functions often have short, repeating antiderivatives, while a polynomial supplies a definite stopping point. A table is less attractive if repeated integration makes the other factor increasingly complicated.

In every case, verify the result by differentiation for an indefinite integral, or by differentiating the antiderivative and checking the endpoint subtraction for a definite integral. Those checks catch sign errors, missed factors, and mistakes in the final evaluation.

Check Your Understanding

Use the table method and check each antiderivative by differentiation.

  1. Evaluate \(\int x^2e^x\,dx\). What are the three diagonal signs?
  2. Evaluate \(\int x\cos x\,dx\), listing the repeated antiderivatives of \(\cos x\).
  3. For a polynomial of degree \(4\), how many nonzero polynomial rows appear in the derivative column?
  4. Evaluate \(\int_0^1 xe^x\,dx\), including both endpoint values.
  5. Why does the tabular sum stop after the last nonzero derivative of the polynomial?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon