Tutorials › Calculus II › Evaluating Polynomial-Exponential Integrals

Reduction Formulas · Tutorial 82 of 998

Evaluating Polynomial-Exponential Integrals

Learn to iterate the recurrence, organize its signs and coefficients, and verify each antiderivative by differentiation.

Intermediate 10 min read

What You'll Learn

  • Apply the recurrence for integrating x to a power times an exponential.
  • Identify the base case and the conditions on the exponent and degree.
  • Compute examples with degrees two, three, and four.
  • Use a finite-sum expression to organize the resulting terms.
  • Check an antiderivative by differentiating it.
  • Recognize and correct a common sign error in the recurrence.

From a Recurrence to an Antiderivative

A product such as \(x^n e^{ax}\) combines a polynomial factor with an exponential factor. When \(n\) is a nonnegative integer and \(a\) is nonzero, repeated integration by parts reduces the power of \(x\) one step at a time. The recurrence makes that reduction systematic: each new integral is expressed in terms of one with a lower polynomial degree.

The recurrence is useful only if its base case is clear and its signs and coefficients are handled consistently. In this tutorial, we will apply it to several indefinite integrals, including cases where \(a\) is negative. We will also verify the resulting expressions by differentiation, so the calculation ends with a direct check.

Definition: For a fixed real number \(a\ne 0\) and a nonnegative integer \(n\), let \(I_n\) denote an antiderivative of \(x^n e^{ax}\). Thus \(I_n'(x)=x^n e^{ax}\). Indefinite integrals that differ by a constant represent the same family of antiderivatives.

The Recurrence and Its Conditions

The base case follows by integrating the exponential directly. For \(n\ge 1\), integration by parts gives the recurrence below. It applies for every real \(x\), provided \(a\ne 0\); the degree \(n\) must be a positive integer for the reduction to terminate at the base case.

Recurrence: If \(a\ne 0\), then
$$ I_0=\int e^{ax}\,dx=\frac{e^{ax}}{a}+C, \qquad I_n=\int x^n e^{ax}\,dx =\frac{x^n e^{ax}}{a}-\frac{n}{a}I_{n-1} \quad(n\ge 1). $$

To see why the recurrence works, use integration by parts with \(u=x^n\) and \(dv=e^{ax}\,dx\). Then \(du=nx^{n-1}\,dx\) and \(v=e^{ax}/a\). Substitution into \(\int u\,dv=uv-\int v\,du\) yields

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

The reduction is finite because the exponent of \(x\) decreases from \(n\) to \(n-1\) at each step, eventually reaching zero. At that point the base case applies. The factor \(1/a\) also explains why \(a=0\) is excluded: if \(a=0\), the integrand is \(x^n\), and the displayed recurrence would divide by zero.

When using the recurrence, it is often tidier to carry forward particular antiderivatives without writing a new arbitrary constant at every line. The final indefinite integral then receives one \(+C\). This convention avoids confusing several independent-looking constants in intermediate expressions.

A Reliable Calculation Pattern

For a specific degree, start with \(I_0\), then calculate \(I_1,I_2,\ldots,I_n\) in order. At each stage, substitute the previous expression before simplifying. This makes the alternating signs visible and reduces the chance of dropping a coefficient.

1
Record the parameters.
Identify the nonzero value of \(a\) and the polynomial degree \(n\).
2
Write the base case.
Use \(I_0=e^{ax}/a\) as a particular antiderivative.
3
Reduce one degree at a time.
Apply \(I_k=x^k e^{ax}/a-(k/a)I_{k-1}\) for each \(k\) from \(1\) to \(n\).
4
Collect and check.
Factor out \(e^{ax}\), add \(C\), and differentiate the result to recover the integrand.

Worked Examples

Worked Example: A Quadratic Factor with \(a=3\)

Evaluate \(\int x^2e^{3x}\,dx\). Here \(n=2\) and \(a=3\), so the recurrence is \(I_k=x^ke^{3x}/3-(k/3)I_{k-1}\). Begin with the base case:

$$ I_0=\frac{e^{3x}}{3}. $$

For degree one, substitute \(I_0\):

$$ I_1=\frac{xe^{3x}}{3}-\frac{1}{3}I_0 =\frac{xe^{3x}}{3}-\frac{e^{3x}}{9} =e^{3x}\left(\frac{x}{3}-\frac{1}{9}\right). $$

For degree two, substitute \(I_1\) and distribute the factor \(-2/3\):

$$ \begin{aligned} I_2 &=\frac{x^2e^{3x}}{3}-\frac{2}{3}I_1\\ &=\frac{x^2e^{3x}}{3} -\frac{2}{3}e^{3x}\left(\frac{x}{3}-\frac{1}{9}\right)\\ &=e^{3x}\left(\frac{x^2}{3}-\frac{2x}{9}+\frac{2}{27}\right). \end{aligned} $$

Therefore,

$$ \int x^2e^{3x}\,dx =e^{3x}\left(\frac{x^2}{3}-\frac{2x}{9}+\frac{2}{27}\right)+C. $$

For the check, let \(P(x)=x^2/3-2x/9+2/27\). The derivative of \(e^{3x}P(x)\) is \(e^{3x}(3P(x)+P'(x))\). Since

$$ 3P(x)=x^2-\frac{2x}{3}+\frac{2}{9}, \qquad P'(x)=\frac{2x}{3}-\frac{2}{9}, \qquad 3P(x)+P'(x)=x^2, $$

the derivative is \(x^2e^{3x}\), as required.

Worked Example: A Cubic Factor with \(a=-2\)

Evaluate \(\int x^3e^{-2x}\,dx\). A negative value of \(a\) is allowed as long as it is nonzero. Here \(1/a=-1/2\), and the base case is

$$ I_0=-\frac{e^{-2x}}{2}. $$

Apply the recurrence successively. For degree one,

$$ I_1=-\frac{xe^{-2x}}{2}-\frac{1}{-2}I_0 =e^{-2x}\left(-\frac{x}{2}-\frac{1}{4}\right). $$

For degree two, the recurrence has coefficient \(-2/(-2)=1\):

$$ I_2=-\frac{x^2e^{-2x}}{2}+I_1 =e^{-2x}\left(-\frac{x^2}{2}-\frac{x}{2}-\frac{1}{4}\right). $$

For degree three, the coefficient of \(I_2\) is \(-3/(-2)=3/2\):

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

Thus the answer is \(I_3+C\). To check it, set \(P(x)=-x^3/2-3x^2/4-3x/4-3/8\). Differentiation gives \(e^{-2x}(P'-2P)\), and

$$ P'(x)=-\frac{3x^2}{2}-\frac{3x}{2}-\frac{3}{4}, \qquad -2P(x)=x^3+\frac{3x^2}{2}+\frac{3x}{2}+\frac{3}{4}. $$

Adding these expressions gives \(P'(x)-2P(x)=x^3\). The derivative of the proposed antiderivative is therefore \(x^3e^{-2x}\).

Worked Example: A Fourth-Degree Factor with \(a=2\)

Evaluate \(\int x^4e^{2x}\,dx\). The recurrence gives the following steps, with each new line using the preceding degree:

$$ I_0=\frac{e^{2x}}{2}, \qquad I_1=\frac{xe^{2x}}{2}-\frac{1}{2}I_0 =e^{2x}\left(\frac{x}{2}-\frac{1}{4}\right). $$
$$ \begin{aligned} I_2&=\frac{x^2e^{2x}}{2}-I_1 =e^{2x}\left(\frac{x^2}{2}-\frac{x}{2}+\frac{1}{4}\right),\\ I_3&=\frac{x^3e^{2x}}{2}-\frac{3}{2}I_2 =e^{2x}\left(\frac{x^3}{2}-\frac{3x^2}{4} +\frac{3x}{4}-\frac{3}{8}\right). \end{aligned} $$

For degree four, the multiplier of \(I_3\) is \(-4/2=-2\):

$$ \begin{aligned} I_4 &=\frac{x^4e^{2x}}{2}-2I_3\\ &=e^{2x}\left(\frac{x^4}{2}-x^3+\frac{3x^2}{2} -\frac{3x}{2}+\frac{3}{4}\right). \end{aligned} $$

To verify, define \(P(x)=x^4/2-x^3+3x^2/2-3x/2+3/4\). Then

$$ 2P(x)=x^4-2x^3+3x^2-3x+\frac{3}{2}, \qquad P'(x)=2x^3-3x^2+3x-\frac{3}{2}. $$

Consequently \(2P(x)+P'(x)=x^4\). The product rule gives \(\frac{d}{dx}(e^{2x}P(x))=e^{2x}x^4\), confirming the result.

Reading the Result as a Finite Sum

The examples display a consistent pattern. At each recurrence step, the polynomial degree drops by one, the sign alternates, and the numerator gains the next descending factor from \(n!\). For a nonnegative integer \(n\), this pattern can be written compactly as

Useful formula: For \(a\ne 0\) and \(n\ge 0\),
$$ \int x^n e^{ax}\,dx =e^{ax}\sum_{k=0}^{n} \frac{(-1)^k n!}{(n-k)!}\frac{x^{n-k}}{a^{k+1}}+C. $$

Here \(n!=n(n-1)\cdots 2\cdot1\) for positive integers \(n\), and \(0!=1\). The term indexed by \(k=0\) is \(e^{ax}x^n/a\), which is the first term in the recurrence. Each successive term contains one additional factor of \(-1\), one additional factor from the descending product \(n(n-1)\cdots\), and one additional power of \(1/a\). The sum stops at \(k=n\), so its last term has no factor of \(x\).

This expression is a concise way to record the result, not a substitute for tracking the recurrence carefully. In a worked calculation, writing the intermediate lower-degree antiderivatives makes it easier to identify where a sign or coefficient has gone wrong.

A Common Sign Error

The recurrence contains a minus sign in front of \(nI_{n-1}/a\). When \(a\) is negative, that minus sign combines with the negative denominator. Treating the coefficient as negative automatically is a common mistake.

Common Mistake: Keeping the Wrong Sign When \(a=-2\)

For \(n=1\) and \(a=-2\), an incorrect substitution might be written as

$$ I_1\overset{\text{wrong}}{=}-\frac{xe^{-2x}}{2} -\frac{1}{2}I_0. $$

This incorrectly treats \(-1/a\) as \(-1/2\). In fact, \(a=-2\), so

$$ -\frac{1}{a}=-\frac{1}{-2}=\frac{1}{2}. $$

Using the base case \(I_0=-e^{-2x}/2\), the correct computation is

$$ I_1=-\frac{xe^{-2x}}{2}+\frac{1}{2}I_0 =-\frac{xe^{-2x}}{2}-\frac{e^{-2x}}{4} =e^{-2x}\left(-\frac{x}{2}-\frac{1}{4}\right). $$

Differentiate this expression. With \(P(x)=-x/2-1/4\), the derivative is \(e^{-2x}(P'-2P)\). Since \(P'=-1/2\) and \(-2P=x+1/2\), their sum is \(x\). The derivative is \(xe^{-2x}\), confirming the corrected sign.

Why the Check Matters

An antiderivative calculation can look plausible while containing a wrong sign, a missing factor, or an incorrectly simplified coefficient. Differentiation tests the entire result at once: if the proposed expression is \(e^{ax}P(x)+C\), then the product rule gives

$$ \frac{d}{dx}\bigl(e^{ax}P(x)+C\bigr) =e^{ax}\bigl(aP(x)+P'(x)\bigr). $$

Thus the check is to confirm that \(aP(x)+P'(x)=x^n\). The arbitrary constant disappears under differentiation, as it should. This verification is especially useful when \(a\) is negative, because the signs in the recurrence and the derivative both depend on \(a\).

The recurrence applies specifically to a power \(x^n\) multiplied by \(e^{ax}\), where \(n\) is a nonnegative integer and \(a\ne0\). It does not require \(a\) to be positive. Its practical advantage is that a higher-degree integral is reduced through a finite sequence of simpler ones, ending at the directly integrated exponential.

Check Your Understanding

Use the recurrence, keep the intermediate degree reductions visible, and verify each final result by differentiation.

  1. Evaluate \(\int x^2e^x\,dx\).
  2. For \(\int x^3e^{4x}\,dx\), what is the coefficient multiplying \(I_2\) when applying the recurrence at degree three?
  3. Explain why the recurrence requires \(a\ne0\).
  4. Evaluate \(\int xe^{-3x}\,dx\), taking particular care with the sign of \(-1/a\).
  5. For an answer written as \(e^{ax}P(x)+C\), what expression must equal \(x^n\) when you check it by differentiation?

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