Tutorials › Calculus II › Choosing Tables or Recurrences for Product Integrals

Repeated and Tabular Parts · Tutorial 74 of 998

Choosing Tables or Recurrences for Product Integrals

Compare finite tabular expansion with degree-lowering recurrences, then choose and check an efficient method for polynomial-exponential and polynomial-trigonometric integrals.

Intermediate 10 min read

What You'll Learn

  • Recognize when repeated differentiation makes a polynomial factor terminate.
  • Use a finite tabular expansion for polynomial-exponential products.
  • Apply degree-lowering recurrences to polynomial-exponential integrals.
  • Use coupled recurrences for polynomial-sine and polynomial-cosine integrals.
  • Compare the efficiency of tables and recurrences for a given integral.
  • Check antiderivatives by differentiation and catch a common sign error.

Choosing a Method for Product Integrals

Integration by parts can be repeated in two useful ways when an integrand contains a polynomial multiplied by an exponential or a trigonometric function. A finite tabular expansion records the repeated steps in a compact table. A degree-lowering recurrence relates an integral involving a polynomial of degree \(n\) to one involving a polynomial of degree \(n-1\).

These methods use the same underlying integration-by-parts structure. The useful question is not which method is universally better, but which one makes the calculation shortest and easiest to check. A table is often effective for one integral of modest degree. A recurrence is often clearer when the problem concerns a family of integrals or when its endpoint terms simplify.

Definition: A finite tabular expansion repeatedly differentiates a polynomial factor until its derivatives are zero, while integrating the other factor at each step. A degree-lowering recurrence expresses an integral with a polynomial of degree \(n\) in terms of one or more integrals with degree \(n-1\), together with explicit terms.

The Polynomial-Exponential Choice

Let \(P\) be a polynomial and let \(a\ne 0\). In \(\int P(x)e^{ax}\,dx\), differentiating \(P\) eventually gives zero, while \(e^{ax}\) remains an exponential after every integration. This makes the integral suitable for a finite table.

Formula: If \(P\) has degree \(n\) and \(a\ne 0\), then
$$ \int P(x)e^{ax}\,dx = e^{ax}\sum_{k=0}^{n}\frac{(-1)^kP^{(k)}(x)}{a^{k+1}}+C. $$

The same calculation can be organized as a recurrence. For a polynomial \(P\), one integration by parts gives

$$ \int P(x)e^{ax}\,dx = \frac{P(x)e^{ax}}{a} -\frac{1}{a}\int P'(x)e^{ax}\,dx. $$

Each recurrence step lowers the polynomial degree by one. For \(P(x)=x^n\), this becomes

$$ \int x^n e^{ax}\,dx = \frac{x^ne^{ax}}{a} -\frac{n}{a}\int x^{n-1}e^{ax}\,dx, \qquad n\ge 1. $$

The tabular formula and recurrence do not give different mathematics. The table writes out the successive degree-lowering steps at once; the recurrence emphasizes how one integral in a family depends on the next simpler one.

Worked Example: A Finite Table for a Cubic-Exponential Product

Evaluate \(\int x^3e^{2x}\,dx\). The polynomial reaches zero after four differentiations, so a finite table gives the full answer directly.

$$ \begin{array}{c|c|c} \text{Sign} & \text{Differentiate }x^3 & \text{Integrate }e^{2x}\\ + & x^3 & \frac12e^{2x}\\ - & 3x^2 & \frac14e^{2x}\\ + & 6x & \frac18e^{2x}\\ - & 6 & \frac1{16}e^{2x}\\ & 0 & \end{array} $$

Multiply along the rows, with the indicated signs, and add:

$$ \int x^3e^{2x}\,dx = \frac{x^3e^{2x}}{2} -\frac{3x^2e^{2x}}{4} +\frac{6xe^{2x}}{8} -\frac{6e^{2x}}{16}+C = e^{2x}\left(\frac{x^3}{2}-\frac{3x^2}{4} +\frac{3x}{4}-\frac{3}{8}\right)+C. $$

To check, let \(Q(x)=\frac{x^3}{2}-\frac{3x^2}{4}+\frac{3x}{4}-\frac38\). Then \(Q'(x)=\frac32x^2-\frac32x+\frac34\), so

$$ \frac{d}{dx}\left(e^{2x}Q(x)\right) =e^{2x}\bigl(2Q(x)+Q'(x)\bigr) =e^{2x}x^3. $$

The derivative is the original integrand, as required.

When a Recurrence Is the Better Organization

A recurrence can be a useful choice when the degree is represented by a variable \(n\), when several related integrals are needed, or when each step produces endpoint terms that simplify. For a single polynomial of moderate degree, a table may be quicker because it avoids repeatedly naming and carrying forward intermediate integrals. For a family of degrees, a recurrence makes the dependence on \(n\) explicit.

Worked Example: Reducing a Quadratic-Exponential Integral

Evaluate \(\int x^2e^{-x}\,dx\) by the degree-lowering recurrence. Here \(a=-1\), so the recurrence is \(I_n=-x^ne^{-x}+nI_{n-1}\), where \(I_n=\int x^ne^{-x}\,dx\).

$$ I_0=\int e^{-x}\,dx=-e^{-x}+C. $$

For \(n=1\),

$$ I_1=-xe^{-x}+I_0 =-xe^{-x}-e^{-x} =-(x+1)e^{-x}+C. $$

For \(n=2\),

$$ I_2=-x^2e^{-x}+2I_1 =-x^2e^{-x}-2(x+1)e^{-x} =-(x^2+2x+2)e^{-x}+C. $$

Differentiate the proposed antiderivative:

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

This verifies the result. The recurrence required two reductions after finding the base integral \(I_0\); a table would also terminate after two differentiations of \(x^2\).

Polynomial-Trigonometric Integrals

For trigonometric products, repeated integration does not terminate in the second column: sine and cosine alternate. The polynomial column still terminates, so a table remains finite. Alternatively, a pair of recurrences tracks the two alternating trigonometric integrals together.

Definition: For \(b\ne0\), define \(I_n=\int x^n\cos(bx)\,dx\) and \(J_n=\int x^n\sin(bx)\,dx\). For \(n\ge1\), integration by parts gives
$$ I_n=\frac{x^n\sin(bx)}{b}-\frac{n}{b}J_{n-1}, \qquad J_n=-\frac{x^n\cos(bx)}{b}+\frac{n}{b}I_{n-1}. $$

Both formulas reduce the polynomial degree, but they are coupled: calculating one may require the other. Their starting integrals are \(I_0=\sin(bx)/b+C\) and \(J_0=-\cos(bx)/b+C\). As with other indefinite-integral recurrences, constants of integration can be omitted during intermediate reductions and added to the final answer.

The formulas follow directly from integration by parts. For \(I_n\), take \(u=x^n\) and \(dv=\cos(bx)\,dx\), so \(du=nx^{n-1}\,dx\) and \(v=\sin(bx)/b\). Then \(I_n=x^n\sin(bx)/b-(n/b)J_{n-1}\). For \(J_n\), take \(u=x^n\) and \(dv=\sin(bx)\,dx\), so \(v=-\cos(bx)/b\). This gives \(J_n=-x^n\cos(bx)/b+(n/b)I_{n-1}\). Thus each step lowers the degree, and the alternating trigonometric factor explains why the recurrences are paired.

Worked Example: A Coupled Recurrence for a Cubic-Cosine Product

Evaluate \(\int x^3\cos(2x)\,dx\). Use the recurrence for \(I_3\), then reduce \(J_2\) and \(I_1\). First,

$$ I_3=\frac{x^3\sin(2x)}{2}-\frac{3}{2}J_2. $$

Next,

$$ J_2=-\frac{x^2\cos(2x)}{2}+\frac{2}{2}I_1 =-\frac{x^2\cos(2x)}{2}+I_1. $$

Reduce \(I_1\) using \(J_0=-\cos(2x)/2\):

$$ I_1=\frac{x\sin(2x)}{2}-\frac12J_0 =\frac{x\sin(2x)}{2}+\frac{\cos(2x)}{4}. $$

Substitute this into \(J_2\), then into \(I_3\):

$$ \begin{aligned} J_2&=-\frac{x^2\cos(2x)}{2} +\frac{x\sin(2x)}{2}+\frac{\cos(2x)}{4},\\ I_3&=\frac{x^3\sin(2x)}{2} +\frac{3x^2\cos(2x)}{4} -\frac{3x\sin(2x)}{4} -\frac{3\cos(2x)}{8}+C. \end{aligned} $$

Check by differentiating each term. The derivatives are

$$ \begin{aligned} \frac{d}{dx}\left(\frac{x^3\sin(2x)}2\right) &=\frac32x^2\sin(2x)+x^3\cos(2x),\\ \frac{d}{dx}\left(\frac{3x^2\cos(2x)}4\right) &=\frac32x\cos(2x)-\frac32x^2\sin(2x),\\ \frac{d}{dx}\left(-\frac{3x\sin(2x)}4\right) &=-\frac34\sin(2x)-\frac32x\cos(2x),\\ \frac{d}{dx}\left(-\frac{3\cos(2x)}8\right) &=\frac34\sin(2x). \end{aligned} $$

Adding these derivatives cancels the \(x^2\sin(2x)\), \(x\cos(2x)\), and \(\sin(2x)\) terms, leaving \(x^3\cos(2x)\). The antiderivative is verified.

A Practical Comparison

SituationOften convenientReason
One polynomial-exponential integral of modest degreeFinite tableThe polynomial derivatives terminate, and the full expansion is visible at once.
A family \(\int x^n e^{ax}\,dx\)Degree-lowering recurrenceThe formula records how degree \(n\) depends on degree \(n-1\).
One polynomial-trigonometric integralEither methodA table is compact; the recurrence can make the alternating reductions easier to track.
Many related polynomial-trigonometric integralsCoupled recurrencesThe pair \(I_n,J_n\) organizes the entire family and its base cases.

This is a guide, not a rigid rule. A table is not automatically more efficient just because it is finite, and a recurrence is not automatically clearer just because it is systematic. Consider how many reductions are needed, whether both trigonometric families will be used, and whether the endpoint or symbolic terms simplify in a recurrence.

A Common Sign Error

In the exponential recurrence, the second term has a minus sign. Losing that sign changes the answer. For example, a mistaken calculation might claim

$$ \int xe^{2x}\,dx =\frac{xe^{2x}}{2}+\frac{e^{2x}}{4}. $$

Differentiate this proposed answer:

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

The result is not the integrand \(xe^{2x}\). The recurrence gives the corrected sign:

$$ \int xe^{2x}\,dx =\frac{xe^{2x}}2-\frac12\int e^{2x}\,dx =\frac{xe^{2x}}2-\frac{e^{2x}}4+C. $$

Its derivative is \(\frac12e^{2x}+xe^{2x}-\frac12e^{2x}=xe^{2x}\). Differentiating a proposed antiderivative is a direct way to detect this kind of error.

Summary: Make the Structure Work for You

For a polynomial multiplied by an exponential, repeated integration by parts lowers the polynomial degree while the exponential remains an exponential. A table lays out the finite sequence; a recurrence emphasizes the step from degree \(n\) to degree \(n-1\). For polynomial-sine and polynomial-cosine products, the degree also decreases, but the two trigonometric types alternate, so recurrences come as a coupled pair.

Choose the organization that best fits the calculation, keep the signs and factors from the integration-by-parts step, and check the final expression by differentiation. The same underlying reductions can be presented in different forms; the efficient choice is the one that makes those reductions easiest to perform and verify.

Check Your Understanding

Use these questions to test both the formulas and the method choices.

  1. Why does the tabular method terminate for a polynomial-exponential integral when the polynomial is differentiated at each step?
  2. State the degree-lowering recurrence for \(\int x^n e^{ax}\,dx\), including the condition on \(a\).
  3. For polynomial-trigonometric integrals, why do the recurrences for cosine and sine need to be used together?
  4. For a single integral \(\int x^2e^{3x}\,dx\), name one reasonable method and explain why it applies.
  5. What calculation can you use to check whether a proposed indefinite integral is correct?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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