Tutorials › AP Statistics › Selecting Integration-by-Parts Setups and Avoiding Sign Errors

Numerical and BC Integration Methods · Tutorial 522 of 999

Selecting Integration-by-Parts Setups and Avoiding Sign Errors

Compare integration-by-parts choices, identify the setup that reduces the work, and use differentiation to catch sign errors.

Advanced 9 min read

What You'll Learn

  • Choose \(u\) to make differentiation simpler and \(dv\) to make antidifferentiation manageable.
  • Compare alternative setups for polynomial, exponential, logarithmic, and trigonometric factors.
  • Apply integration by parts and check each result by differentiation.
  • Keep track of the minus sign in the integration-by-parts formula.
  • Distinguish \(v\), an antiderivative of the chosen \(dv\), from the original integrand.

Choosing a Setup That Simplifies the Integral

Integration by parts can turn a product into an integral that is easier to evaluate. The formula itself is short; the important choice is how to divide the integrand into \(u\) and \(dv\). A useful setup makes \(du\) simpler than \(u\), gives a manageable antiderivative \(v\) for \(dv\), and leaves an integral that is simpler than the one you started with.

A poor choice may still be mathematically valid, but it can make the remaining integral more complicated. Signs also deserve care: the remaining integral is subtracted, and that minus sign combines with any negative signs in \(v\) or \(du\).

Integration-by-parts formula: If \(u\) is differentiable and \(v\) is an antiderivative of the chosen differential \(dv\) on an interval, then $$ \int u\,dv=uv-\int v\,du. $$ In ordinary \(x\)-notation, if \(dv=g(x)\,dx\) and \(du=u'(x)\,dx\), this is $$ \int u(x)g(x)\,dx=u(x)v(x)-\int v(x)u'(x)\,dx. $$ The resulting antiderivative includes a constant \(C\).

A Practical Choice Strategy

For a product, begin by asking which factor becomes simpler when differentiated and which factor has a straightforward antiderivative. These questions point toward a useful split, but they are a guide rather than a rule that guarantees success. The decisive test is the remaining integral.

  • Try a factor with a simpler derivative as \(u\). Polynomials often work well here because repeated differentiation eventually gives zero.
  • Try a factor with a familiar antiderivative as \(dv\). Exponentials, sines, cosines, and constants are common choices.
  • After applying the formula, compare the new integral with the original. It should be easier to evaluate, or at least lead to a manageable next step.
  • If a choice creates a more complicated product or returns an unevaluated integral of similar difficulty, reconsider the split.

For example, in \(\int x e^x\,dx\), taking \(u=x\) and \(dv=e^x\,dx\) reduces the power of the polynomial factor to a constant. Reversing the roles requires integrating \(x\) but leaves an integral involving \(x^2e^x\), a higher-degree polynomial product. The reversed choice is not forbidden; it is simply less efficient.

Why the Formula Works

The choice strategy rests on an identity, not on a special trick. The product rule says that the derivative of \(uv\) is the sum of two terms. Rearranging that rule and integrating gives integration by parts.

1
Apply the product rule.
If \(u\) and \(v\) are differentiable, then \((uv)'=u'v+uv'\).
2
Rearrange the identity.
Subtract \(u'v\) from both sides to get \(uv'= (uv)'-u'v\).
3
Integrate both sides.
Integrating with respect to \(x\) gives \(\int uv'\,dx=uv-\int vu'\,dx\), with an arbitrary constant included in the final antiderivative.

In differential notation, \(du=u'\,dx\) and \(dv=v'\,dx\). Thus \(\int u\,dv=\int uv'\,dx\), while \(\int v\,du=\int vu'\,dx\). This proves the stated formula wherever the functions involved are differentiable and the integrals exist on the interval under consideration. The minus sign comes directly from rearranging the product rule.

Worked Example: A Polynomial and an Exponential

Worked Example: Choosing the Polynomial as \(u\)

Evaluate \(\int x e^x\,dx\). Choose \(u=x\) and \(dv=e^x\,dx\). Then \(du=dx\) and \(v=e^x\). The formula gives

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

Check by differentiating the proposed antiderivative:

$$ \frac{d}{dx}\bigl((x-1)e^x\bigr) =e^x+(x-1)e^x =xe^x. $$

The derivative matches the integrand. The choice works well because differentiating \(x\) gives the simpler factor \(1\), while \(e^x\) has a straightforward antiderivative.

Worked Example: A Logarithm and a Power

Worked Example: Integrating a Logarithm by Parts

Evaluate \(\int x\ln x\,dx\), where \(x>0\). Choose \(u=\ln x\) and \(dv=x\,dx\). Then \(du=\frac{1}{x}\,dx\) and \(v=\frac{x^2}{2}\). Applying the formula:

$$ \begin{aligned} \int x\ln x\,dx &=\frac{x^2}{2}\ln x-\int \frac{x^2}{2}\cdot\frac{1}{x}\,dx\\ &=\frac{x^2}{2}\ln x-\frac{1}{2}\int x\,dx\\ &=\frac{x^2}{2}\ln x-\frac{x^2}{4}+C. \end{aligned} $$

Check the result:

$$ \begin{aligned} \frac{d}{dx}\left(\frac{x^2}{2}\ln x-\frac{x^2}{4}\right) &=x\ln x+\frac{x^2}{2}\cdot\frac{1}{x}-\frac{x}{2}\\ &=x\ln x+\frac{x}{2}-\frac{x}{2}\\ &=x\ln x. \end{aligned} $$

This split makes the logarithm disappear after differentiation and leaves a simple power integral. If instead \(u=x\) and \(dv=\ln x\,dx\), finding \(v\) already requires an integration-by-parts calculation. That reverses the useful order: it adds work before the original integral has been simplified.

Worked Example: Two Applications and Careful Signs

Worked Example: A Polynomial and a Trigonometric Factor

Evaluate \(\int x^2\sin x\,dx\). Choose \(u=x^2\) and \(dv=\sin x\,dx\). Then \(du=2x\,dx\) and \(v=-\cos x\). The negative sign in \(v\) matters:

$$ \begin{aligned} \int x^2\sin x\,dx &=-x^2\cos x-\int(-\cos x)(2x)\,dx\\ &=-x^2\cos x+2\int x\cos x\,dx. \end{aligned} $$

For the remaining integral, choose \(u=x\), \(dv=\cos x\,dx\), so \(du=dx\) and \(v=\sin x\):

$$ \begin{aligned} \int x\cos x\,dx &=x\sin x-\int\sin x\,dx\\ &=x\sin x+\cos x. \end{aligned} $$

Substitute this result into the first calculation:

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

Differentiate to check all terms:

$$ \begin{aligned} \frac{d}{dx}\bigl(-x^2\cos x+2x\sin x+2\cos x\bigr) &=-2x\cos x+x^2\sin x+2\sin x+2x\cos x-2\sin x\\ &=x^2\sin x. \end{aligned} $$

The terms involving \(x\cos x\) and \(\sin x\) cancel, leaving the original integrand.

Notation and Sign Checks

Writing each part explicitly prevents several common errors. \(dv\) is the chosen differential to integrate; \(v\) is an antiderivative of it. Likewise, \(du\) is found by differentiating \(u\). Do not treat \(dv\) and \(v\) as interchangeable, and do not omit the differential when recording the setup.

The formula has a minus sign before the remaining integral. That sign does not mean the result of the remaining integration must be negative. For instance, \(\int\sin x\,dx=-\cos x\), so subtracting this integral gives \(-\int\sin x\,dx=+\cos x\).

Sign check: Before simplifying, write the formula as \(uv-\int v\,du\). Then substitute \(v\) and \(du\) with their signs intact. Simplify only after the complete substitution is visible.

Common Mistake: Losing a Minus Sign

Consider \(\int x\cos x\,dx\). With \(u=x\), \(dv=\cos x\,dx\), we have \(du=dx\) and \(v=\sin x\). A common incorrect line is

$$ \int x\cos x\,dx=x\sin x-\cos x+C. $$

This mishandles the integral of \(\sin x\). Since \(\int\sin x\,dx=-\cos x\), the formula actually gives

$$ \begin{aligned} \int x\cos x\,dx &=x\sin x-\int\sin x\,dx\\ &=x\sin x-(-\cos x)+C\\ &=x\sin x+\cos x+C. \end{aligned} $$

Differentiate the incorrect expression to see the error:

$$ \frac{d}{dx}(x\sin x-\cos x) =\sin x+x\cos x+\sin x =x\cos x+2\sin x, $$

which is not the integrand. The corrected expression checks because

$$ \frac{d}{dx}(x\sin x+\cos x) =\sin x+x\cos x-\sin x =x\cos x. $$

How to Judge a Candidate Setup

A setup is useful when the new integral is easier to evaluate than the original, not merely because the formula can be applied. After choosing \(u\) and \(dv\), pause before doing more algebra and inspect \(\int v\,du\). If it has fewer polynomial factors, a simpler derivative, or a known elementary form, the choice is likely productive. If it introduces a more complicated power or a new integral that is harder to evaluate, try a different split.

Some integrals require repeated applications of the formula; others need a separate strategy if integration by parts does not simplify them. The formula guarantees an identity under its conditions, not that every choice leads to a quick antiderivative. In all cases, differentiating the final expression is a direct and reliable check for sign and algebra errors.

Check Your Understanding

For each question, identify the choice or calculation that makes the method simpler or verifies the result.

  1. For \(\int x^2e^x\,dx\), which factor is a useful choice for \(u\), and why?
  2. For \(\int\ln x\,dx\) on \(x>0\), what can you choose for \(u\) and \(dv\)?
  3. In integration by parts, what does \(v\) represent, and how is it related to \(dv\)?
  4. Explain why subtracting \(\int\sin x\,dx\) produces \(+\cos x\).
  5. What derivative check would confirm that a proposed antiderivative is correct?

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