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.
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.
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
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.
Identify the nonzero value of \(a\) and the polynomial degree \(n\).
Use \(I_0=e^{ax}/a\) as a particular antiderivative.
Apply \(I_k=x^k e^{ax}/a-(k/a)I_{k-1}\) for each \(k\) from \(1\) to \(n\).
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:
For degree one, substitute \(I_0\):
For degree two, substitute \(I_1\) and distribute the factor \(-2/3\):
Therefore,
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
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
Apply the recurrence successively. For degree one,
For degree two, the recurrence has coefficient \(-2/(-2)=1\):
For degree three, the coefficient of \(I_2\) is \(-3/(-2)=3/2\):
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
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:
For degree four, the multiplier of \(I_3\) is \(-4/2=-2\):
To verify, define \(P(x)=x^4/2-x^3+3x^2/2-3x/2+3/4\). Then
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
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
This incorrectly treats \(-1/a\) as \(-1/2\). In fact, \(a=-2\), so
Using the base case \(I_0=-e^{-2x}/2\), the correct computation is
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
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.
- Evaluate \(\int x^2e^x\,dx\).
- For \(\int x^3e^{4x}\,dx\), what is the coefficient multiplying \(I_2\) when applying the recurrence at degree three?
- Explain why the recurrence requires \(a\ne0\).
- Evaluate \(\int xe^{-3x}\,dx\), taking particular care with the sign of \(-1/a\).
- For an answer written as \(e^{ax}P(x)+C\), what expression must equal \(x^n\) when you check it by differentiation?