Tutorials › Calculus II › Diagnosing Sign And Boundary-Term Errors

Integration by Parts I · Tutorial 30 of 998

Diagnosing Sign And Boundary-Term Errors

Use the product-rule formula and direct checks to identify and correct sign, antiderivative, and endpoint errors in integration by parts.

Beginner 9 min read

What You'll Learn

  • State the indefinite and definite integration-by-parts formulas with their conditions
  • Track the minus sign when substituting \(u\), \(dv\), \(v\), and \(du\)
  • Check that \(v\) is an antiderivative of the chosen \(dv\)
  • Evaluate a boundary term as its value at the upper endpoint minus its value at the lower endpoint
  • Verify corrected antiderivatives by differentiation and definite answers by substitution

Why Small Errors Change the Answer

Integration by parts is built from the product rule, so a sign or factor error can affect the entire result. In a definite integral, a correct interior calculation can still give a wrong answer if the boundary term is evaluated incorrectly. These errors are usually easy to diagnose once each part of the formula is checked separately.

For the indefinite formula, choose differentiable functions \(u\) and \(v\), and write \(du=u'(x)\,dx\) and \(dv=v'(x)\,dx\). The formula is

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

Here \(v\) must be an antiderivative of the expression represented by \(dv\). For a definite integral over \([a,b]\), provided the functions and derivatives involved are continuous on that interval, the corresponding formula is

$$ \int_a^b u\,dv = \left[uv\right]_a^b-\int_a^b v\,du, \qquad \left[uv\right]_a^b=u(b)v(b)-u(a)v(a). $$

The subtraction in the formula and the subtraction in endpoint evaluation are separate sources of errors. Keep both visible until the calculation is complete.

Where the Minus Sign Comes From

The sign is not a convention to memorize without reason. It follows from rearranging the product rule. Since \((uv)'=u'v+uv'\), we can write \(uv'= (uv)'-u'v\). Integrating both sides gives the integration-by-parts formula; integrating from \(a\) to \(b\) gives its definite form, with the product evaluated at the endpoints.

$$ (uv)'=u'v+uv' \quad\Longrightarrow\quad uv'= (uv)'-u'v \quad\Longrightarrow\quad \int u\,dv=uv-\int v\,du. $$

This also explains a useful diagnostic: if a calculation has \(+\int v\,du\) instead of \(-\int v\,du\), the rearranged product rule has been used incorrectly. When in doubt, differentiate the proposed antiderivative and compare it with the original integrand.

Sign check: After substituting into the formula, preserve the structure \(uv-\int v\,du\). Simplify the integral that follows the minus sign only after writing this structure clearly.

Worked Example: Catching a Reversed Minus Sign

Worked Example: Catching a Reversed Minus Sign

Evaluate \(\int x\sin x\,dx\), taking \(u=x\) and \(dv=\sin x\,dx\). The error to watch for is changing the formula’s minus sign to a plus sign.

First find both differentials and the required antiderivative:

$$ u=x,\qquad du=dx,\qquad dv=\sin x\,dx,\qquad v=-\cos x, $$

because \(\frac{d}{dx}(-\cos x)=\sin x\). Substitute into the formula without changing its sign:

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

A mistaken plus sign in the formula would instead produce \(x(-\cos x)+\int(-\cos x)\,dx=-x\cos x-\sin x+C\). Differentiate this wrong result:

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

This is not the original integrand \(x\sin x\), so the proposed answer fails the derivative check. For the corrected result,

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

The two \(\cos x\) terms cancel, verifying the corrected antiderivative.

Check That \(v\) Really Is an Antiderivative

A second frequent error is choosing a \(v\) that looks plausible but differentiates to a multiple of the required integrand. The test is direct: differentiate \(v\) and confirm that \(v'(x)\,dx\) matches \(dv\). Any constant factor in \(dv\) must be accounted for when finding \(v\).

Worked Example: Restoring a Missing Factor in \(v\)

Evaluate \(\int x\cos(2x)\,dx\) by parts. Choose \(u=x\) and \(dv=\cos(2x)\,dx\). Since \(\frac{d}{dx}\sin(2x)=2\cos(2x)\), the antiderivative must include a factor of \(\frac12\):

$$ du=dx,\qquad v=\frac12\sin(2x), \qquad \frac{d}{dx}\left(\frac12\sin(2x)\right)=\cos(2x). $$

Now substitute into the formula:

$$ \begin{aligned} \int x\cos(2x)\,dx &=x\left(\frac12\sin(2x)\right) -\int\left(\frac12\sin(2x)\right)\,dx\\ &=\frac{x}{2}\sin(2x)+\frac14\cos(2x)+C. \end{aligned} $$

For the last step, \(\int\frac12\sin(2x)\,dx=-\frac14\cos(2x)\), so subtracting that integral gives \(+\frac14\cos(2x)\).

If the factor \(\frac12\) were omitted and \(v=\sin(2x)\) used instead, then \(v'=2\cos(2x)\), not \(\cos(2x)\). That wrong choice would lead to \(x\sin(2x)+\frac12\cos(2x)\). Its derivative is

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

which is twice the integrand. Finally, check the corrected answer:

$$ \frac{d}{dx}\left(\frac{x}{2}\sin(2x)+\frac14\cos(2x)\right) =\frac12\sin(2x)+x\cos(2x)-\frac12\sin(2x) =x\cos(2x). $$

The derivative matches the integrand exactly.

Endpoint Evaluation Is an Ordered Subtraction

For a definite integral, the boundary term is not just the value at the upper endpoint. The bracket notation \(\left[F(x)\right]_a^b\) means \(F(b)-F(a)\). Both values must be substituted, and the lower-endpoint value must be subtracted as a whole.

Endpoint rule: Evaluate the entire expression at \(b\), evaluate the entire expression at \(a\), and then subtract: \(\left[F(x)\right]_a^b=F(b)-F(a)\).

Worked Example: Evaluating a Boundary Term Correctly

Evaluate \(\int_0^\pi x\cos x\,dx\). Take \(u=x\), \(du=dx\), \(dv=\cos x\,dx\), and \(v=\sin x\). The definite formula gives

$$ \int_0^\pi x\cos x\,dx =\left[x\sin x\right]_0^\pi-\int_0^\pi\sin x\,dx. $$

Evaluate the boundary term at each endpoint:

$$ \left[x\sin x\right]_0^\pi =(\pi\sin\pi)-(0\sin 0) =(\pi\cdot 0)-(0\cdot 0) =0. $$

Next, evaluate the remaining integral:

$$ \int_0^\pi\sin x\,dx =\left[-\cos x\right]_0^\pi =(-\cos\pi)-(-\cos 0) =1-(-1)=2. $$

Therefore, the original definite integral is \(0-2=-2\). A wrong boundary evaluation might claim \(\pi\sin\pi=\pi\), as if \(\sin\pi=1\), or omit the lower-endpoint subtraction. Here \(\sin\pi=0\), and the lower product is also zero, so the boundary term is zero. Check the answer using the antiderivative found by parts, \(x\sin x+\cos x\):

$$ \left[x\sin x+\cos x\right]_0^\pi =(0-1)-(0+1) =-1-1=-2. $$

The endpoint check agrees with the integration-by-parts calculation.

A Reliable Error-Diagnosis Routine

When an answer seems wrong, retrace the calculation in a fixed order. This helps distinguish a bad choice of \(v\) from a sign error or a boundary-evaluation error, rather than trying to repair several lines at once.

1
Check the setup.
Identify \(u\), \(du\), \(dv\), and \(v\). Confirm by differentiation that \(du=u'(x)\,dx\) and that \(v'(x)\,dx=dv\).
2
Keep the formula’s sign visible.
Write \(uv-\int v\,du\), or for a definite integral, \(\left[uv\right]_a^b-\int_a^b v\,du\), before simplifying.
3
Finish each calculation separately.
For indefinite integrals, simplify the remaining integral and include \(+C\). For definite integrals, evaluate the remaining integral and the boundary term.
4
Verify the result.
Differentiate an indefinite answer. For a definite answer, substitute into an antiderivative or repeat the endpoint subtraction carefully.

This routine matters because errors can mask one another. For instance, a missing factor in \(v\) may make the final derivative too large, while an incorrect minus sign may change the terms that should cancel. Checking each stage isolates the source of the problem.

Common Mistakes to Avoid

MistakeWhy it failsCorrection
Changing the minus sign to a plusThe formula comes from rearranging the product rule with a subtraction.Write \(uv-\int v\,du\) before substituting.
Using an incorrect antiderivative for \(dv\)Then the product-rule identity no longer corresponds to the original integrand.Differentiate \(v\) and compare \(v'\,dx\) with \(dv\).
Taking only the upper endpointThe bracket means the upper value minus the lower value.Write \(F(b)-F(a)\) explicitly.
Dropping a negative sign in the lower valueThe entire lower-endpoint expression is subtracted.Use parentheses around \(F(a)\) before subtracting.

Check Your Understanding

For each question, identify the step that should be checked before accepting the result.

  1. In the indefinite formula, why must the remaining integral have a minus sign?
  2. If \(dv=\cos(3x)\,dx\), what is \(v\), and how can you verify it?
  3. What does \(\left[F(x)\right]_a^b\) mean? Write it without bracket notation.
  4. A proposed antiderivative differentiates to twice the original integrand. Which part of an integration-by-parts setup is worth checking first?
  5. What two checks can confirm a completed definite integration-by-parts calculation?

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