Tutorials › AP Statistics › Choosing Factors for Polynomial-Exponential Integrals

Numerical and BC Integration Methods · Tutorial 517 of 999

Choosing Factors for Polynomial-Exponential Integrals

Choose factors that make polynomial-exponential integrals simpler, then verify the resulting antiderivatives by differentiation.

Advanced 9 min read

What You'll Learn

  • Choose \(u\) and \(dv\) for products of polynomials and exponentials
  • Explain why differentiating the polynomial simplifies repeated integration by parts
  • Integrate linear and quadratic polynomial-exponential products
  • Keep track of the exponential rate and signs in each step
  • Verify an antiderivative by differentiating it
  • Identify and correct a common integration-by-parts sign error

Why the Choice of Factors Matters

Integration by parts is especially effective when an integrand is the product of a polynomial and an exponential function. The key is to assign the polynomial to \(u\) and the exponential factor, including \(dx\), to \(dv\). Differentiating a polynomial lowers its degree, while integrating an exponential preserves its basic form. Repeating the process therefore simplifies the remaining integral.

For example, if the polynomial is quadratic, its first derivative is linear, its second derivative is constant, and its third derivative is zero. This gives a natural stopping point: after enough rounds of integration by parts, the polynomial part disappears.

Key strategy: For an integral containing a polynomial times \(e^{ax}\), with \(a\ne 0\), usually choose \(u\) to be the polynomial and \(dv=e^{ax}\,dx\). Then \(du\) has a lower-degree polynomial, and \(v=\frac{1}{a}e^{ax}\).

The Formula and the Factor Choice

The integration-by-parts formula follows from the product rule and is used here in its indefinite-integral form:

$$ \int u\,dv=uv-\int v\,du. $$

In this formula, \(u\) and \(v\) are functions of \(x\), and \(du\) and \(dv\) represent their differentials. When using the formula for an indefinite integral, include a constant of integration in the final result.

For \(e^{ax}\), where \(a\ne 0\), an antiderivative is \(\frac{1}{a}e^{ax}\), since

$$ \frac{d}{dx}\left(\frac{1}{a}e^{ax}\right)=e^{ax}. $$

Thus, for an integrand \(P(x)e^{ax}\), where \(P\) is a polynomial, the factor choice is typically

$$ u=P(x), \qquad dv=e^{ax}\,dx, \qquad du=P'(x)\,dx,\qquad v=\frac{1}{a}e^{ax}. $$

This choice is not a rule that must be followed mechanically in every possible integral. It is effective here because the derivative of the polynomial becomes simpler, while the exponential is straightforward to integrate. Choosing the exponential as \(u\) and the polynomial as \(dv\) generally makes the remaining integral more complicated rather than reducing the polynomial degree.

Worked Example: A Linear Polynomial and an Exponential

Worked Example: A Linear Polynomial and an Exponential

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

Choose \(u=x\), because its derivative is the simpler function \(1\). Choose \(dv=e^{2x}\,dx\), whose antiderivative is \(\frac12e^{2x}\). Therefore,

$$ u=x,\qquad du=dx,\qquad dv=e^{2x}\,dx,\qquad v=\frac12e^{2x}. $$

Apply integration by parts:

$$ \begin{aligned} \int x e^{2x}\,dx &=uv-\int v\,du\\ &=\frac{x}{2}e^{2x}-\int\frac12e^{2x}\,dx\\ &=\frac{x}{2}e^{2x}-\frac14e^{2x}+C\\ &=e^{2x}\left(\frac{x}{2}-\frac14\right)+C. \end{aligned} $$

Check by differentiating the proposed antiderivative:

$$ \begin{aligned} \frac{d}{dx}\left[e^{2x}\left(\frac{x}{2}-\frac14\right)\right] &=2e^{2x}\left(\frac{x}{2}-\frac14\right) +e^{2x}\left(\frac12\right)\\ &=e^{2x}\left(x-\frac12+\frac12\right)\\ &=xe^{2x}. \end{aligned} $$

The derivative is the original integrand, so the antiderivative checks.

Why Repeating the Choice Works

After one application of integration by parts, the polynomial is differentiated once. If it is still nonconstant, the same choice can be used again on the remaining polynomial-exponential product. Each new derivative reduces the polynomial's degree by one, so after finitely many steps the polynomial derivative becomes zero.

The exponential remains an exponential throughout: each integration of \(e^{ax}\) contributes a factor of \(\frac1a\), and each differentiation of the exponential contributes a factor of \(a\). The method therefore transforms the integral into a finite sequence of simpler polynomial-exponential terms rather than creating an endless cycle.

Reason the method terminates: A polynomial of degree \(n\) has zero \((n+1)\)st derivative. Repeatedly differentiating the polynomial eventually removes it from the remaining integral, while integrating \(e^{ax}\) is possible at every step when \(a\ne 0\).

Worked Example: A Quadratic Polynomial

Worked Example: A Quadratic Polynomial

Evaluate \(\int x^2e^x\,dx\).

Set \(u=x^2\) and \(dv=e^x\,dx\). Then \(du=2x\,dx\) and \(v=e^x\). The first application gives

$$ \begin{aligned} \int x^2e^x\,dx &=x^2e^x-\int 2xe^x\,dx\\ &=x^2e^x-2\int xe^x\,dx. \end{aligned} $$

The remaining integral still has a polynomial times an exponential, so apply integration by parts again. For \(\int xe^x\,dx\), choose \(u=x\), \(du=dx\), \(dv=e^x\,dx\), and \(v=e^x\):

$$ \begin{aligned} \int xe^x\,dx &=xe^x-\int e^x\,dx\\ &=xe^x-e^x\\ &=e^x(x-1). \end{aligned} $$

Substitute this result into the first equation:

$$ \begin{aligned} \int x^2e^x\,dx &=x^2e^x-2e^x(x-1)+C\\ &=x^2e^x-2xe^x+2e^x+C\\ &=e^x(x^2-2x+2)+C. \end{aligned} $$

Differentiate to verify the result:

$$ \begin{aligned} \frac{d}{dx}\left[e^x(x^2-2x+2)\right] &=e^x(x^2-2x+2)+e^x(2x-2)\\ &=e^x\left(x^2-2x+2+2x-2\right)\\ &=x^2e^x. \end{aligned} $$

The terms of degree one and zero cancel in the derivative, leaving the original quadratic-exponential integrand.

Worked Example: A Polynomial with a Negative Exponential Rate

Worked Example: A Polynomial with a Negative Exponential Rate

Evaluate \(\int (3x^2-2x+1)e^{-2x}\,dx\). The same factor choice applies: take the polynomial as \(u\) and \(e^{-2x}\,dx\) as \(dv\). The negative rate matters because \(\int e^{-2x}\,dx=-\frac12e^{-2x}\).

For the first application, use

$$ u=3x^2-2x+1,\qquad du=(6x-2)\,dx,\qquad dv=e^{-2x}\,dx,\qquad v=-\frac12e^{-2x}. $$

Then

$$ \begin{aligned} \int (3x^2-2x+1)e^{-2x}\,dx &=-\frac12(3x^2-2x+1)e^{-2x} +\frac12\int(6x-2)e^{-2x}\,dx\\ &=-\frac12(3x^2-2x+1)e^{-2x} +\int(3x-1)e^{-2x}\,dx. \end{aligned} $$

For the remaining integral, let \(u=3x-1\), \(du=3\,dx\), \(dv=e^{-2x}\,dx\), and \(v=-\frac12e^{-2x}\). Thus

$$ \begin{aligned} \int(3x-1)e^{-2x}\,dx &=-\frac12(3x-1)e^{-2x} -\int\left(-\frac12e^{-2x}\right)3\,dx\\ &=-\frac12(3x-1)e^{-2x} +\frac32\int e^{-2x}\,dx\\ &=-\frac12(3x-1)e^{-2x}-\frac34e^{-2x}. \end{aligned} $$

Substituting and collecting terms gives

$$ \begin{aligned} \int (3x^2-2x+1)e^{-2x}\,dx &=e^{-2x}\left[-\frac12(3x^2-2x+1) -\frac12(3x-1)-\frac34\right]+C\\ &=e^{-2x}\left(-\frac32x^2-\frac12x-\frac34\right)+C. \end{aligned} $$

Check by differentiating. Let \(Q(x)=-\frac32x^2-\frac12x-\frac34\), so \(Q'(x)=-3x-\frac12\). The product rule gives

$$ \begin{aligned} \frac{d}{dx}\left[e^{-2x}Q(x)\right] &=e^{-2x}\left(Q'(x)-2Q(x)\right)\\ &=e^{-2x}\left[ -3x-\frac12 +3x^2+x+\frac32 \right]\\ &=e^{-2x}\left(3x^2-2x+1\right). \end{aligned} $$

This is exactly the original integrand, including its exponential factor.

Choosing Factors: A Practical Comparison

The choice of \(u\) and \(dv\) determines whether the remaining integral is simpler. For polynomial-exponential products, compare what happens to the polynomial under each possible choice.

Choice Effect after integration by parts Typical usefulness here
\(u=P(x)\), \(dv=e^{ax}\,dx\) \(du=P'(x)\,dx\), so the polynomial degree decreases Usually effective when \(a\ne 0\)
\(u=e^{ax}\), \(dv=P(x)\,dx\) \(du=ae^{ax}\,dx\), while \(v\) is an antiderivative of the polynomial Usually less effective because the polynomial's degree can increase

The second choice is not automatically invalid, but it often works against the aim of simplifying the integral. For instance, integrating \(x\) to obtain \(\frac{x^2}{2}\) increases the polynomial degree, whereas differentiating \(x\) gives the simpler constant \(1\).

A Common Sign Error

A frequent mistake is to replace the minus sign in integration by parts with a plus sign. For \(\int xe^x\,dx\), the incorrect calculation would be

$$ \int xe^x\,dx \overset{\text{wrong}}{=}xe^x+\int e^x\,dx =xe^x+e^x+C. $$

This answer fails a differentiation check:

$$ \frac{d}{dx}(xe^x+e^x) =e^x(x+1)+e^x =e^x(x+2), $$

which is not the original integrand \(xe^x\). The correct formula is \(uv-\int v\,du\), so the corrected calculation is

$$ \int xe^x\,dx =xe^x-\int e^x\,dx =e^x(x-1)+C. $$

Now the derivative check confirms it:

$$ \frac{d}{dx}\left[e^x(x-1)\right] =e^x(x-1)+e^x =xe^x. $$

What to Check Before Finishing

For an indefinite integral of a polynomial times \(e^{ax}\), use the polynomial for \(u\) and integrate the exponential for \(dv\), provided \(a\ne 0\). If the polynomial still has positive degree after an application, repeat the process on the remaining integral. Keep the factor \(\frac1a\) every time you integrate \(e^{ax}\), and preserve the minus sign in the integration-by-parts formula.

Finally, differentiate the proposed antiderivative. This is particularly useful when several terms have been collected: the product rule exposes errors in coefficients, signs, or the exponential rate. The derivative must equal the entire original integrand, not merely its polynomial or exponential factor.

Check Your Understanding

For each question, state the factor choice clearly and use differentiation when asked to verify an antiderivative.

  1. For \(\int x^3e^x\,dx\), what should \(u\) and \(dv\) be, and how many derivatives of the polynomial are needed before it becomes zero?
  2. Evaluate \(\int xe^{3x}\,dx\) by integration by parts, then differentiate your result.
  3. In \(\int (x^2+1)e^{-x}\,dx\), what is \(v\) when \(dv=e^{-x}\,dx\)?
  4. Explain why choosing the polynomial as \(u\) makes the repeated process terminate.
  5. For \(\int xe^x\,dx\), show what derivative check reveals about the incorrect answer \(xe^x+e^x+C\).

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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