Why Endpoint Terms Matter
When a polynomial is multiplied by an exponential, integration by parts can lower the polynomial’s degree. For an indefinite integral, the resulting reduction formula is usually written with an integration constant. For a definite integral, the same step produces explicit values at the two endpoints. Those values are part of the answer: they cannot be discarded or treated as a single endpoint contribution.
This tutorial develops the recurrence for integrating \(x^n e^{ax}\) over a finite interval. It gives a systematic way to reduce the power of \(x\), provided the exponential parameter is nonzero, and makes clear how the lower and upper endpoint terms enter.
The recurrence below applies when \(a\ne 0\). The case \(a=0\) is different because the exponential then equals \(1\); it has a direct polynomial antiderivative. The integer \(n\) will decrease by one at each recurrence step, so the process eventually reaches \(I_0\), the base case.
Deriving the Definite Recurrence
Take \(n\ge 1\) and \(a\ne 0\). In integration by parts, choose \(x^n\) as the factor to differentiate and \(e^{ax}\,dx\) as the factor to integrate. Then \(d(x^n)=n x^{n-1}\,dx\) and an antiderivative of \(e^{ax}\) is \(e^{ax}/a\). Applying integration by parts on \([u,v]\) gives a boundary difference, not just an unspecified constant.
Here, \([F(x)]_u^v\) means \(F(v)-F(u)\). Substituting the definition of \(I_{n-1}\) gives the definite recurrence.
The formula’s sign pattern follows directly from integration by parts: the endpoint evaluation appears with a plus sign at \(v\) and a minus sign at \(u\), while the remaining integral is subtracted. The coefficient of that integral is \(n/a\), with the minus sign shown in the theorem.
Base Cases and Special Parameters
The recurrence stops at \(n=0\). When \(a\ne 0\), integrating the exponential directly gives the base value.
If \(a=0\), then \(e^{ax}=1\) for every \(x\), so the original integral is simply a power integral. This case is not obtained by substituting \(a=0\) into the recurrence, which divides by \(a\).
Thus there are two clear situations: use the recurrence and exponential base case when \(a\ne 0\), and use the polynomial formula when \(a=0\). The recurrence is valid for any finite endpoints \(u\le v\), including negative endpoints. It does not require either endpoint to be zero.
Worked Example: A Second-Power Integral on \([0,1]\)
Worked Example: A Second-Power Integral on \([0,1]\)
Evaluate \(I_2(0,1;2)=\int_0^1 x^2e^{2x}\,dx\). Since \(a=2\ne0\), apply the recurrence, then find \(I_1\) and \(I_0\).
First, the base value is \(I_0(0,1;2)=(e^2-e^0)/2=(e^2-1)/2\).
For \(n=1\), the endpoint term is \((1\cdot e^2-0\cdot e^0)/2=e^2/2\). Therefore \(I_1(0,1;2)=e^2/2-(1/2)I_0(0,1;2)\).
Substitute the base value: \(I_1(0,1;2)=e^2/2-(e^2-1)/4=(2e^2-e^2+1)/4=(e^2+1)/4\).
For \(n=2\), the endpoint term is \((1^2e^2-0^2e^0)/2=e^2/2\). Hence \(I_2(0,1;2)=e^2/2-(2/2)I_1(0,1;2)\).
Substituting \(I_1\) gives \(I_2(0,1;2)=e^2/2-(e^2+1)/4=(2e^2-e^2-1)/4=(e^2-1)/4\).
Check: An antiderivative is \(F(x)=e^{2x}(x^2/2-x/2+1/4)\). Differentiating gives \(F'(x)=e^{2x}(x^2-x+1/2)+e^{2x}(x-1/2)=x^2e^{2x}\). Also, \(F(1)=e^2/4\) and \(F(0)=1/4\), so \(F(1)-F(0)=(e^2-1)/4\), as obtained.
Worked Example: Both Endpoints in the Boundary Term
Worked Example: Both Endpoints in the Boundary Term
Evaluate \(\int_0^{\ln 2} x e^x\,dx\). Here \(n=1\), \(a=1\), and the upper endpoint is \(\ln 2\). The recurrence requires \(I_0(0,\ln 2;1)\) as well as the boundary difference.
First, \(I_0(0,\ln 2;1)=e^{\ln 2}-e^0=2-1=1\).
The boundary term for \(n=1\) is \([xe^x]_0^{\ln 2}=(\ln 2)e^{\ln 2}-0e^0=2\ln 2\). Therefore \(I_1(0,\ln 2;1)=2\ln 2-I_0(0,\ln 2;1)=2\ln 2-1\).
Check: An antiderivative is \(F(x)=e^x(x-1)\), and \(F'(x)=e^x(x-1)+e^x=xe^x\). At the endpoints, \(F(\ln 2)=2(\ln 2-1)\) and \(F(0)=-1\). Their difference is \(2\ln 2-2-(-1)=2\ln 2-1\), which agrees with the recurrence.
Worked Example: A Negative Exponent Parameter
Worked Example: A Negative Exponent Parameter
Evaluate \(\int_{-1}^{1}x^2e^{-x}\,dx=I_2(-1,1;-1)\). The parameter is negative but nonzero, so the same recurrence applies.
Start with \(I_0(-1,1;-1)=(e^{-1}-e^1)/(-1)=e-e^{-1}\).
For \(n=1\), the boundary term is \([xe^{-x}/(-1)]_{-1}^{1}\). At \(x=1\), its value is \(-e^{-1}\); at \(x=-1\), its value is \(e\). Thus the boundary difference is \(-e^{-1}-e\), and \(I_1(-1,1;-1)=-e^{-1}-e- (1/(-1))I_0=-e^{-1}-e+(e-e^{-1})=-2e^{-1}\).
For \(n=2\), the boundary term is \([x^2e^{-x}/(-1)]_{-1}^{1}\). Its values are \(-e^{-1}\) at \(1\) and \(-e\) at \(-1\), so the difference is \(e-e^{-1}\). Consequently, \(I_2(-1,1;-1)=e-e^{-1}-(2/(-1))I_1=e-e^{-1}+2(-2e^{-1})=e-5e^{-1}\).
Check: An antiderivative is \(F(x)=-e^{-x}(x^2+2x+2)\). Differentiation gives \(F'(x)=e^{-x}(x^2+2x+2)-e^{-x}(2x+2)=x^2e^{-x}\). Now \(F(1)=-5e^{-1}\) and \(F(-1)=-e\), so \(F(1)-F(-1)=e-5e^{-1}\), as required.
A Reliable Reduction Procedure
For a higher power, apply the recurrence repeatedly until the base case is reached. At every step, evaluate the boundary contribution using the same endpoints and the current power. Keeping these steps separate helps prevent the endpoint values from being lost among the reduced integrals.
Confirm \(a\ne0\) and \(n\ge1\) before using the recurrence. If \(a=0\), integrate the polynomial directly.
Compute \((v^n e^{av}-u^n e^{au})/a\), explicitly subtracting the value at \(u\).
Subtract \((n/a)I_{n-1}(u,v;a)\), then repeat with \(n-1\) if needed.
Use \(I_0=(e^{av}-e^{au})/a\), simplify, and check the result by evaluating an antiderivative or differentiating one.
Common Pitfall: Losing the Lower Endpoint
A frequent error is to evaluate the boundary expression at \(v\) but forget to subtract its value at \(u\). For example, with \(n=1\), \(a=1\), \(u=1\), and \(v=2\), the correct boundary difference is
A wrong calculation would keep only the upper value and write \([xe^x]_1^2=2e^2\). That omits the lower-endpoint contribution \(e\), changing the integral by \(e\). The correction is to use the bracket convention literally: compute the value at \(2\), then subtract the value at \(1\).
A related sign error can occur when \(a<0\). The recurrence contains \(-n/a\), so this coefficient is positive when \(a\) is negative. Do not replace it by \(-n/|a|\); retain the signed value of \(a\) throughout. In the third example, \(-2/(-1)=2\), which is why the reduced-integral term was added.
Why the Recurrence Is Useful
The formula provides a finite calculation for every nonnegative integer power: each application lowers the power by one, and the base case is explicit. It also keeps information about the interval visible. Two integrals with the same \(n\) and \(a\) but different endpoints generally have different boundary contributions and different values.
For instance, if \(u=0\) and \(n\ge1\), the lower boundary term \(u^n e^{au}\) vanishes. But that simplification is specific to a zero lower endpoint and a positive power; it is not valid for a general interval. If \(u\ne0\), or if the base case \(n=0\) is being evaluated, the lower endpoint must still be included. The recurrence is therefore both a computational tool and a useful way to audit endpoint bookkeeping.
In summary, for \(a\ne0\) and \(n\ge1\), reduce the power using the boundary difference at the two endpoints and the lower-power integral. Compute the exponential base case separately, and treat \(a=0\) directly. These conditions make the method reliable on any finite interval with \(u\le v\).
Check Your Understanding
Answer each question, and check that your reasoning includes the endpoint terms and parameter conditions.
- State the definite recurrence for \(I_n(u,v;a)\), including its conditions and both boundary contributions.
- Find \(I_0(0,\ln 3;2)\) and state which formula you used.
- For \(a=0\), evaluate \(I_2(1,3;0)\) directly.
- In the recurrence with \(a=-2\) and \(n=3\), what is the sign of the coefficient \(-n/a\)?
- Explain why the lower endpoint cannot generally be omitted from \([x^n e^{ax}/a]_u^v\).