Tutorials › Calculus II › Linear Polynomial Times An Exponential

Integration by Parts I · Tutorial 31 of 998

Linear Polynomial Times An Exponential

Integrate (mx+n)e^(kx) by choosing the polynomial as u, applying parts once, and simplifying to a polynomial times e^(kx).

Intermediate 10 min read

What You'll Learn

  • Recognize integrals of the form (mx+n)e^(kx) with k nonzero.
  • Choose u and dv so that one integration by parts removes the polynomial factor.
  • Derive and use the closed formula for the antiderivative.
  • Confirm a result with the undetermined-coefficient check and by differentiation.
  • Avoid dropping the second factor of 1/k in the final answer.

Why a Linear Polynomial Times an Exponential Needs Parts

Many integrands are products of two different kinds of functions, and no single substitution turns them into a table integral. The product \((mx+n)e^{kx}\) is a standard example. The exponential \(e^{kx}\) is easy to integrate, and the linear factor \(mx+n\) becomes a constant when it is differentiated. Integration by parts exploits exactly this contrast: it moves the derivative onto the polynomial, where it does useful work, and leaves the exponential to be integrated.

In this tutorial \(m\), \(n\), and \(k\) are real constants with \(k\ne0\). If \(k=0\), then \(e^{kx}=1\) and the integrand is just the polynomial \(mx+n\), which needs no special technique. If \(m=0\), the integrand is a constant times \(e^{kx}\), which integrates directly. The interesting case is \(m\ne0\) and \(k\ne0\).

Formula: For \(k\ne0\), \(\displaystyle\int (mx+n)e^{kx}\,dx=\left(\frac{mx+n}{k}-\frac{m}{k^2}\right)e^{kx}+C.\)

Deriving the Formula by Parts

Recall that integration by parts states \(\int u\,dv=uv-\int v\,du\). To remove the polynomial, let \(u=mx+n\) and \(dv=e^{kx}\,dx\). Then \(du=m\,dx\) and, because \(k\ne0\), \(v=e^{kx}/k\). Substituting these four pieces gives

$$ \int (mx+n)e^{kx}\,dx=\frac{(mx+n)e^{kx}}{k}-\int \frac{m}{k}e^{kx}\,dx. $$

The new integral contains only a constant times \(e^{kx}\), so it can be evaluated at once: \(\int \frac{m}{k}e^{kx}\,dx=\frac{m}{k^2}e^{kx}\). Therefore

$$ \int (mx+n)e^{kx}\,dx=\frac{(mx+n)e^{kx}}{k}-\frac{m\,e^{kx}}{k^2}+C=\left(\frac{mx+n}{k}-\frac{m}{k^2}\right)e^{kx}+C. $$

One application of parts was enough because differentiating a degree-one polynomial produces a constant. A degree-two polynomial would need two applications, and a degree-\(d\) polynomial would need \(d\) of them. That is the pattern behind tabular integration, which later tutorials organize more efficiently.

A Second Derivation: Undetermined Coefficients

It is useful to see the answer from a different direction. Since differentiating \((Ax+B)e^{kx}\) yields another polynomial of degree one times \(e^{kx}\), it is reasonable to look for an antiderivative of that form. By the product rule,

$$ \frac{d}{dx}\bigl[(Ax+B)e^{kx}\bigr]=\bigl(kAx+kB+A\bigr)e^{kx}. $$

For this to equal \((mx+n)e^{kx}\), the coefficients must match: \(kA=m\) and \(kB+A=n\). Hence \(A=m/k\) and \(B=(n-A)/k=\frac{n}{k}-\frac{m}{k^2}\). Then \(Ax+B=\frac{mx+n}{k}-\frac{m}{k^2}\), exactly the polynomial in the formula. Both derivations agree, which is reassuring, and the second one also explains why the answer always has the same form: a degree-one polynomial multiplying \(e^{kx}\).

Worked Examples

Worked Example: A Positive Exponent

Evaluate \(\int (3x+2)e^{4x}\,dx\).

Here \(m=3\), \(n=2\), and \(k=4\). Choose \(u=3x+2\) and \(dv=e^{4x}\,dx\), so \(du=3\,dx\) and \(v=e^{4x}/4\). Then

$$ \begin{aligned} \int (3x+2)e^{4x}\,dx&=\frac{(3x+2)e^{4x}}{4}-\frac34\int e^{4x}\,dx\\ &=\frac{(3x+2)e^{4x}}{4}-\frac{3e^{4x}}{16}+C\\ &=\frac{(12x+8-3)e^{4x}}{16}+C=\frac{(12x+5)e^{4x}}{16}+C. \end{aligned} $$

Check by differentiating: \(\frac{d}{dx}\left[\frac{(12x+5)e^{4x}}{16}\right]=\frac{12e^{4x}+4(12x+5)e^{4x}}{16}=\frac{(48x+32)e^{4x}}{16}=(3x+2)e^{4x}\). The derivative recovers the integrand.

Worked Example: A Negative Exponent and a Decreasing Line

Evaluate \(\int (5-2x)e^{-3x}\,dx\).

Now \(m=-2\), \(n=5\), and \(k=-3\). Take \(u=5-2x\) and \(dv=e^{-3x}\,dx\). Then \(du=-2\,dx\) and \(v=-\tfrac13e^{-3x}\). Be careful with the signs:

$$ \begin{aligned} \int (5-2x)e^{-3x}\,dx&=-\frac{(5-2x)e^{-3x}}{3}-\int\left(-\frac13e^{-3x}\right)(-2)\,dx\\ &=-\frac{(5-2x)e^{-3x}}{3}-\frac23\int e^{-3x}\,dx\\ &=-\frac{(5-2x)e^{-3x}}{3}+\frac{2e^{-3x}}{9}+C\\ &=\frac{(-15+6x+2)e^{-3x}}{9}+C=\frac{(6x-13)e^{-3x}}{9}+C. \end{aligned} $$

Check: \(\frac{d}{dx}\left[\frac{(6x-13)e^{-3x}}{9}\right]=\frac{6e^{-3x}-3(6x-13)e^{-3x}}{9}=\frac{(45-18x)e^{-3x}}{9}=(5-2x)e^{-3x}\), as required.

Worked Example: A Definite Integral

Evaluate \(\int_0^1 (2x+1)e^{x}\,dx\).

With \(m=2\), \(n=1\), and \(k=1\), the formula gives the antiderivative \(\bigl((2x+1)-2\bigr)e^x=(2x-1)e^x\). Evaluate between the limits:

$$ \int_0^1(2x+1)e^x\,dx=\Bigl[(2x-1)e^x\Bigr]_0^1=(1)e^1-(-1)e^0=e+1. $$

The integrand is positive on \([0,1]\), and \(e+1\approx3.72\) is a reasonable area: the integrand rises from \(1\) at \(x=0\) to \(3e\approx8.15\) at \(x=1\), and the area under such a curve is a few units. Notice that the lower limit contributes \(-(-1)=+1\); forgetting the sign of the lower-endpoint value is a frequent slip.

Common Mistake: Forgetting the Second Factor of 1/k

The most frequent error is to stop after the first term and write \(\int (mx+n)e^{kx}\,dx=\frac{(mx+n)e^{kx}}{k}+C\). That would be correct only if the polynomial factor were constant. To see that it is wrong, differentiate the proposed answer for \((3x+2)e^{4x}\):

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

The extra \(\tfrac34e^{4x}\) comes from differentiating the polynomial factor, and the missing term \(-\frac{m}{k^2}e^{kx}\) is precisely what cancels it. A short derivative check catches this error immediately, which is why every worked example above ends with one.

Reading the Answer and Its Conditions

The antiderivative is always an \(e^{kx}\) multiple of a degree-one polynomial, with leading coefficient \(m/k\). Its sign pattern follows the sign of \(k\): if \(k>0\) the exponential grows and the polynomial coefficient has the sign of \(m\), while if \(k<0\) the exponential decays and the coefficient has the opposite sign. The formula is valid for every real \(x\), because \(e^{kx}\) is defined and differentiable everywhere. The only restriction is \(k\ne0\), since \(k\) appears in a denominator; for \(k=0\) one integrates the polynomial directly.

As a final habit, compare a computed antiderivative with the formula before simplifying. If the algebra produces something that does not have the shape \(\bigl(\frac{mx+n}{k}-\frac{m}{k^2}\bigr)e^{kx}\), recheck the signs in \(v\) and \(du\); most errors with negative \(k\) or negative \(m\) come from one lost minus sign.

A Reliable Procedure

Because the same pattern recurs in every problem of this type, it helps to follow a fixed order of steps. Each step is small, and the last one catches nearly every error.

1
Identify the constants.
Read off \(m\), \(n\), and \(k\) from the integrand \((mx+n)e^{kx}\), and confirm that \(k\ne0\).
2
Assign the parts.
Take \(u=mx+n\) so that differentiation lowers the degree, and \(dv=e^{kx}\,dx\), which integrates without effort.
3
Compute the other two pieces.
Write \(du=m\,dx\) and \(v=e^{kx}/k\). Keep the minus sign if \(k\) is negative.
4
Apply the formula once.
Form \(uv-\int v\,du\) and integrate the remaining constant multiple of \(e^{kx}\).
5
Factor and simplify.
Pull out \(e^{kx}\) and combine the polynomial terms over a common denominator.
6
Differentiate to check.
Use the product rule on the answer. The derivative must equal the original integrand exactly.

Worked Example: A Linear Factor with No Constant Term

Evaluate \(\int_0^2 xe^{-x}\,dx\).

Here \(m=1\), \(n=0\), and \(k=-1\). The formula gives the antiderivative \(\left(\frac{x}{-1}-\frac{1}{(-1)^2}\right)e^{-x}=-(x+1)e^{-x}\). Evaluate it between the limits:

$$ \int_0^2xe^{-x}\,dx=\Bigl[-(x+1)e^{-x}\Bigr]_0^2=-3e^{-2}+1=1-3e^{-2}\approx0.594. $$

The same antiderivative handles the improper integral on \([0,\infty)\). As \(x\to\infty\), \((x+1)e^{-x}\to0\), so \(\int_0^\infty xe^{-x}\,dx=0-(-1)=1\). This value is the mean of an exponential distribution with rate \(1\), one reason integrals of this form appear in probability and survival analysis.

Connections to Higher Degrees and Tabular Integration

If the polynomial factor has degree \(d\), each application of parts lowers the degree by one, so the process needs \(d\) steps. The final antiderivative is always \(e^{kx}\) times a polynomial of the same degree \(d\), and the coefficients alternate in sign when \(k\) is negative. Writing the repeated products in a table of successive derivatives of the polynomial against successive antiderivatives of the exponential records all \(d\) steps at once. That tabular method, treated in later tutorials, is nothing more than the formula above applied repeatedly with the bookkeeping done in columns.

The undetermined-coefficient viewpoint gives the same insight in a different language. Because the derivative of \(p(x)e^{kx}\) is \(\bigl(kp(x)+p'(x)\bigr)e^{kx}\), a polynomial \(p\) of degree \(d\) produces a polynomial of degree \(d\) again, and the leading coefficient is multiplied by \(k\). Solving for \(p\) given the right-hand side is a finite triangular system, which is why the method always terminates.

Takeaway: For \(k\ne0\), integrating \((mx+n)e^{kx}\) takes one integration by parts and produces \(\bigl(\frac{mx+n}{k}-\frac{m}{k^2}\bigr)e^{kx}\). Always verify with the product rule.

Quick Reference

IntegrandAntiderivativeCondition
\(xe^{kx}\)\(\left(\frac{x}{k}-\frac{1}{k^2}\right)e^{kx}\)\(k\ne0\)
\((mx+n)e^{kx}\)\(\left(\frac{mx+n}{k}-\frac{m}{k^2}\right)e^{kx}\)\(k\ne0\)
\(e^{kx}\)\(\frac{e^{kx}}{k}\)\(k\ne0\)
\((mx+n)\cdot1\)\(\frac{mx^2}{2}+nx\)\(k=0\)

Where This Fits in the Course

This tutorial belongs to the module “Integration by Parts I”. The tutorial just before it is “Diagnosing Sign And Boundary-Term Errors,” and the one that follows is “Definite Exponential Moments On Finite Intervals.” It is the first case of a polynomial times an exponential, and it establishes the single-step pattern that the longer polynomial and tabular cases repeat.

Check Your Understanding

Use the formula and the derivation above to answer these questions.

  1. Choose \(u\) and \(dv\) for \(\int (4x-1)e^{2x}\,dx\), and explain why choosing \(u=e^{2x}\) would not simplify the integral.
  2. Evaluate \(\int (x+3)e^{-x}\,dx\) and verify the answer by differentiation.
  3. Why does one application of integration by parts suffice for a degree-one polynomial factor?
  4. What goes wrong with the formula if \(k=0\), and how should that case be integrated?
  5. Find \(A\) and \(B\) so that \((Ax+B)e^{3x}\) is an antiderivative of \(6xe^{3x}\).

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