Tutorials › Calculus II › Definite Exponential Moments On Finite Intervals

Integration by Parts I · Tutorial 32 of 998

Definite Exponential Moments On Finite Intervals

Learn to evaluate this definite exponential moment while keeping its boundary term and remaining integral distinct.

Beginner 9 min read

What You'll Learn

  • Apply definite integration by parts to \(x e^{kx}\) when \(k\) is nonzero.
  • Identify the endpoint contribution and the remaining exponential integral separately.
  • Use a compact endpoint formula and understand how it follows from integration by parts.
  • Evaluate examples with positive and negative values of \(k\), including nonzero lower endpoints.
  • Check results by differentiating an antiderivative and by checking signs or limiting cases.

Why Keep Track of Both Contributions?

The integral of \(x e^{kx}\) over a finite interval combines a changing linear factor with an exponential factor. Its evaluation is short, but it contains two distinct contributions: one from the interval’s endpoints and one from integrating the remaining exponential. Keeping these contributions separate makes the calculation easier to check and helps prevent a common sign error.

Throughout, \(a\) and \(b\) are finite real numbers with \(a\le b\), and \(k\) is a nonzero real constant. The focus is the definite integral

$$ \int_a^b x e^{kx}\,dx. $$

The assumption \(k\ne 0\) matters because the antiderivative of \(e^{kx}\) includes division by \(k\). If \(a=b\), the definite integral is zero, as the formula below also shows. For a reversed interval, the usual convention \(\int_a^b f(x)\,dx=-\int_b^a f(x)\,dx\) applies.

Definition: Here, an exponential moment means an integral in which the exponential \(e^{kx}\) is weighted by a power of \(x\). In this tutorial the weight is the first power, \(x\), and the interval has finite endpoints.

Formula and Its Two Parts

Use integration by parts with \(u=x\) and \(dv=e^{kx}\,dx\). Then \(du=dx\), while \(v=e^{kx}/k\). The definite integration-by-parts formula gives

$$ \int_a^b x e^{kx}\,dx = \left[\frac{x e^{kx}}{k}\right]_a^b - \int_a^b \frac{e^{kx}}{k}\,dx. $$

The bracketed expression is the endpoint contribution. The integral that remains is elementary, but it must still be evaluated and subtracted. Since \(k\) is constant and nonzero,

$$ \int_a^b \frac{e^{kx}}{k}\,dx = \left[\frac{e^{kx}}{k^2}\right]_a^b = \frac{e^{kb}-e^{ka}}{k^2}. $$

Thus the two contributions, kept separate, are

$$ \underbrace{\frac{b e^{kb}-a e^{ka}}{k}}_{\text{endpoint contribution}} \;-\; \underbrace{\frac{e^{kb}-e^{ka}}{k^2}}_{\text{remaining integral}}. $$

Combining them gives a compact version of the same result:

Theorem: For finite real endpoints \(a\le b\) and a nonzero real constant \(k\),
$$ \int_a^b x e^{kx}\,dx = \frac{b e^{kb}-a e^{ka}}{k} - \frac{e^{kb}-e^{ka}}{k^2} = \frac{(kb-1)e^{kb}-(ka-1)e^{ka}}{k^2}. $$

The compact form follows by putting the endpoint contribution over the denominator \(k^2\), then collecting the terms at \(b\) and at \(a\). The two forms are equivalent; the separated form is often safer during a calculation because it displays where the subtraction comes from.

Why the Formula Works

The calculation is an application of the product rule, expressed over a definite interval. This also provides a direct justification of the formula. Define

$$ F(x)=\frac{x e^{kx}}{k}-\frac{e^{kx}}{k^2} =\frac{(kx-1)e^{kx}}{k^2}. $$

Differentiate each term. By the product rule,

$$ \frac{d}{dx}\left(\frac{x e^{kx}}{k}\right) = \frac{e^{kx}}{k}+x e^{kx}, \qquad \frac{d}{dx}\left(\frac{e^{kx}}{k^2}\right) = \frac{e^{kx}}{k}. $$

The two terms involving \(e^{kx}/k\) cancel, so

$$ F'(x) = \left(\frac{e^{kx}}{k}+x e^{kx}\right)-\frac{e^{kx}}{k} = x e^{kx}. $$

Therefore \(F\) is an antiderivative of the integrand. The Fundamental Theorem of Calculus says that the definite integral is \(F(b)-F(a)\). Substituting the endpoints gives exactly the stated formula. The cancellation in the derivative explains why the endpoint expression and the subtracted exponential integral must appear together.

Worked Examples

Worked Example: A Positive Exponent on an Interval Starting at Zero

Evaluate \(\int_0^1 x e^x\,dx\). Here \(k=1\), \(a=0\), and \(b=1\). First calculate the endpoint contribution:

$$ \left[\frac{x e^x}{1}\right]_0^1 = \frac{1\cdot e^1}{1}-\frac{0\cdot e^0}{1} = e-0 = e. $$

Next calculate the remaining integral, including the minus sign from integration by parts:

$$ -\int_0^1 e^x\,dx = -\left[e^x\right]_0^1 = -(e^1-e^0) = -(e-1) = 1-e. $$

Add the two parts:

$$ \int_0^1 x e^x\,dx = e+(1-e) = 1. $$

Check by differentiating the antiderivative \(F(x)=(x-1)e^x\):

$$ F'(x) = e^x+(x-1)e^x = x e^x. $$

Its endpoint difference is \(F(1)-F(0)=0-(-1)=1\), agreeing with the integration-by-parts calculation.

Worked Example: A Negative Exponent

Evaluate \(\int_0^1 x e^{-x}\,dx\). Now \(k=-1\), so the factors \(1/k\) and \(1/k^2\) have different signs and values. The endpoint contribution is

$$ \left[\frac{x e^{-x}}{-1}\right]_0^1 = \frac{1\cdot e^{-1}}{-1}-\frac{0\cdot e^0}{-1} = -\frac{1}{e}. $$

The remaining integral, with the required subtraction, is

$$ -\int_0^1 \frac{e^{-x}}{-1}\,dx = \int_0^1 e^{-x}\,dx = \left[-e^{-x}\right]_0^1 = -\frac{1}{e}-(-1) = 1-\frac{1}{e}. $$

Combining the contributions gives

$$ \int_0^1 x e^{-x}\,dx = -\frac{1}{e}+1-\frac{1}{e} = 1-\frac{2}{e}. $$

Check with \(F(x)=-(x+1)e^{-x}\). Differentiation gives

$$ F'(x) = -e^{-x}+(x+1)e^{-x} = x e^{-x}. $$

Also, \(F(1)-F(0)=-2/e-(-1)=1-2/e\), as required. The integrand is nonnegative on \([0,1]\), and the result is positive because \(e>2\); this is a useful sign check.

Worked Example: Both Endpoints Contribute

Evaluate \(\int_1^2 x e^x\,dx\). With \(k=1\), the endpoint contribution contains a nonzero term at each end:

$$ \left[x e^x\right]_1^2 = 2e^2-1e = 2e^2-e. $$

The remaining integral, including its minus sign, is

$$ -\int_1^2 e^x\,dx = -(e^2-e) = -e^2+e. $$

Adding the parts,

$$ \int_1^2 x e^x\,dx = (2e^2-e)+(-e^2+e) = e^2. $$

For a check, an antiderivative is \(F(x)=(x-1)e^x\), since

$$ F'(x) = e^x+(x-1)e^x = x e^x. $$

Its endpoint difference is \(F(2)-F(1)=e^2-0=e^2\). In particular, the lower endpoint term cannot be dropped even though it cancels with part of the remaining integral in the final simplification.

A Reliable Calculation Sequence

When evaluating a particular integral, it is useful to keep the parameter values and the two contributions visible until the final line. This makes the boundary evaluation and the subtraction independently checkable.

1
Record the conditions.
Identify finite endpoints \(a\) and \(b\), and verify that \(k\ne0\).
2
Evaluate the endpoint contribution.
Compute \(b e^{kb}/k-a e^{ka}/k\), retaining both endpoint values.
3
Evaluate and subtract the remainder.
Compute \((e^{kb}-e^{ka})/k^2\), then subtract the entire quantity.
4
Combine and check.
Simplify the exact result and verify it with an antiderivative or another appropriate sign check.

Common Mistake: Omitting the Remaining Integral

A frequent error is to perform the endpoint evaluation from the first term of integration by parts and treat it as the complete answer. For example, on \([0,1]\) with \(k=1\), this incorrect calculation stops at

$$ \left[x e^x\right]_0^1=e. $$

That is only the endpoint contribution. It is not the value of the original integral. The correction is to include the remaining integral with its minus sign:

$$ \int_0^1 x e^x\,dx = \left[x e^x\right]_0^1-\int_0^1 e^x\,dx = e-(e-1) = 1. $$

A related sign error is to subtract only the first endpoint value of the remaining integral, rather than the complete difference \(e^{kb}-e^{ka}\). The bracket notation means “value at \(b\) minus value at \(a\),” and the minus sign from integration by parts applies to that whole difference.

Interpreting the Result

For \(k>0\) and \(0\le a<b\), the integrand \(x e^{kx}\) is nonnegative, so the integral must be nonnegative. This does not mean the endpoint contribution alone must equal the integral; the remaining term may substantially change it. For \(k<0\), the exponential decreases as \(x\) increases, but the integrand on a nonnegative interval is still nonnegative. These simple observations can detect a sign mistake without replacing the calculation.

The formula is also consistent with an interval of zero length. Setting \(b=a\), both endpoint differences vanish, so the result is zero. The condition \(k\ne0\) should not be discarded casually: the displayed formula contains division by \(k\). When \(k=0\), the integrand is simply \(x\), and that case is evaluated directly as \(\int_a^b x\,dx=(b^2-a^2)/2\).

The main practical lesson is to preserve the structure of integration by parts: first record the boundary term, then evaluate the integral that remains, and only then combine them. The compact formula is efficient for substitution, while the separated form shows why each part is present.

Check Your Understanding

For each question, keep the endpoint term and the remaining integral distinct before simplifying.

  1. State the conditions on \(a\), \(b\), and \(k\) for the displayed exponential-moment formula to apply.
  2. For \(\int_0^1 x e^{2x}\,dx\), write down the endpoint contribution and the subtracted remaining integral before combining them.
  3. Why does integration by parts produce a minus sign in front of the remaining integral?
  4. Evaluate \(\int_1^2 x e^{-x}\,dx\) using the separated form of the formula.
  5. What direct calculation applies when \(k=0\), and why should the nonzero-\(k\) formula not be used in that case?

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