Tutorials › AP Calculus › Definite Integration by Parts and Boundary Terms

Numerical and BC Integration Methods · Tutorial 519 of 999

Definite Integration by Parts and Boundary Terms

Use the definite integration-by-parts formula with care: evaluate the boundary term at both limits, then compute and check the remaining integral.

Advanced 10 min read

What You'll Learn

  • State the definite integration-by-parts formula and its conditions
  • Evaluate a boundary term as an upper-endpoint value minus a lower-endpoint value
  • Simplify the remaining definite integral after applying the formula
  • Choose definite examples whose endpoint terms may vanish or contribute
  • Check an answer using an antiderivative and its endpoint values
  • Recognize and correct common boundary-term and sign errors

Why Boundary Terms Matter

A definite integral asks for an accumulated value across a specific interval. Integration by parts can transform that integral into another one, but the transformation includes a contribution from both endpoints. Keeping track of that contribution is essential: it may be zero, nonzero, or negative.

The formula resembles the indefinite integration-by-parts rule, but in a definite integral the boundary term is evaluated immediately. There is no arbitrary constant of integration. The remaining definite integral must then be evaluated using the same original limits unless a change of variable is made.

Key idea: Definite integration by parts has two parts: an endpoint difference and a remaining definite integral. Neither part can be omitted.

The Definite Integration-by-Parts Formula

Suppose \(u\) and \(v\) are differentiable on the closed interval \([a,b]\), and their derivatives are continuous there. The product rule gives \((uv)'=u'v+uv'\). Rearranging and integrating from \(a\) to \(b\) gives the definite integration-by-parts formula.

Theorem: If \(u\) and \(v\) satisfy the conditions above, then \[ \int_a^b u(x)v'(x)\,dx = \bigl[u(x)v(x)\bigr]_a^b - \int_a^b v(x)u'(x)\,dx, \] where \[ \bigl[u(x)v(x)\bigr]_a^b = u(b)v(b)-u(a)v(a). \]

In the usual shorthand, if \(du=u'(x)\,dx\) and \(dv=v'(x)\,dx\), the same rule is \(\int_a^b u\,dv=[uv]_a^b-\int_a^b v\,du\). The notation \([uv]_a^b\) always means the value at the upper limit minus the value at the lower limit.

Why the Formula Works

The formula follows directly from the product rule and the Fundamental Theorem of Calculus. The endpoint term is not an extra convention; it is exactly what results when the derivative of a product is integrated over an interval.

1
Start with the product rule.
\((uv)'=u'v+uv'\), so \(uv'= (uv)'-u'v\).
2
Integrate across the interval.
\(\int_a^b uv'\,dx=\int_a^b (uv)'\,dx-\int_a^b u'v\,dx\).
3
Apply the Fundamental Theorem of Calculus.
\(\int_a^b (uv)'\,dx=u(b)v(b)-u(a)v(a)\). Substitution gives the stated formula.

This derivation also explains why the lower endpoint must be subtracted. The Fundamental Theorem evaluates an antiderivative at the upper limit and subtracts its value at the lower limit.

A Reliable Calculation Order

For a definite integral, it helps to keep the endpoint evaluation visible instead of writing only an unevaluated bracket. Once \(u\) and \(dv\) have been selected, integrate \(dv\) to obtain \(v\), differentiate \(u\) to obtain \(du\), evaluate \(uv\) at both endpoints, and then calculate the remaining definite integral.

  1. Identify \(u\), \(du\), \(dv\), and \(v\).
  2. Write the boundary difference explicitly as \(u(b)v(b)-u(a)v(a)\).
  3. Subtract the remaining integral \(\int_a^b v\,du\).
  4. Simplify and evaluate that integral, preserving the limits.
  5. Check the result using an antiderivative when practical.

Integration by parts can be especially effective when differentiating one factor makes it simpler, or when integrating the other factor is straightforward. The definite limits do not change the choice of factors, but they do make the endpoint calculation an explicit part of the work.

Worked Example: A Logarithm on a Finite Interval

Evaluate \(\int_1^e \ln x\,dx\). Choose \(u=\ln x\) and \(dv=dx\). Then \(du=\frac{1}{x}\,dx\) and \(v=x\). Apply the formula:

$$ \begin{aligned} \int_1^e \ln x\,dx &= [x\ln x]_1^e-\int_1^e x\left(\frac{1}{x}\right)\,dx\\ &= \bigl(e\ln e-1\ln 1\bigr)-\int_1^e 1\,dx\\ &= (e-0)-[x]_1^e\\ &=e-(e-1)\\ &=1. \end{aligned} $$

Here \(\ln e=1\) and \(\ln 1=0\). The residual integral is \([x]_1^e=e-1\), so the result is \(1\). To check, an antiderivative is \(F(x)=x\ln x-x\), since \(F'(x)=\ln x+1-1=\ln x\). Its endpoint difference is \(F(e)-F(1)=(e-e)-(0-1)=1\), as required.

The Endpoint Term Can Vanish

Sometimes the boundary term is zero because one or both endpoint values make the product \(uv\) vanish. That should be concluded only after evaluating the product at both limits. For example, a factor \(x\) vanishes at \(x=0\), but that does not imply that the boundary term vanishes at a nonzero upper endpoint.

Worked Example: An Exponential Integral with a Nonzero Boundary Difference

Evaluate \(\int_0^1 xe^x\,dx\). Let \(u=x\), so \(du=dx\), and let \(dv=e^x\,dx\), so \(v=e^x\). Then

$$ \begin{aligned} \int_0^1 xe^x\,dx &=[xe^x]_0^1-\int_0^1 e^x\,dx\\ &=(1\cdot e^1-0\cdot e^0)-[e^x]_0^1\\ &=e-(e-1)\\ &=1. \end{aligned} $$

The boundary difference is \(e-0=e\); the lower endpoint contribution is zero, but the upper one is not. For a check, \(F(x)=e^x(x-1)\) satisfies \(F'(x)=e^x(x-1)+e^x=xe^x\). Also, \(F(1)=0\) and \(F(0)=-1\), so \(F(1)-F(0)=1\).

When the Remaining Integral Needs Simplifying

After integration by parts, the remaining integral may need algebraic simplification before it is easy to evaluate. The limits remain attached to the whole integral during that simplification. In particular, splitting an integrand into simpler terms is valid here because the definite integral is linear.

Worked Example: Simplifying the Remaining Definite Integral

Evaluate \(\int_0^1 x\ln(1+x)\,dx\). Choose \(u=\ln(1+x)\), so \(du=\frac{1}{1+x}\,dx\), and \(dv=x\,dx\), so \(v=\frac{x^2}{2}\). Then

$$ \begin{aligned} \int_0^1 x\ln(1+x)\,dx &=\left[\frac{x^2}{2}\ln(1+x)\right]_0^1 -\frac12\int_0^1\frac{x^2}{1+x}\,dx\\ &=\frac12\ln 2-\frac12\int_0^1\frac{x^2}{1+x}\,dx. \end{aligned} $$

To simplify the remaining integrand, divide \(x^2\) by \(x+1\): since \(x^2=(x+1)(x-1)+1\),

$$ \frac{x^2}{1+x}=x-1+\frac{1}{1+x}. $$

Therefore, the remaining integral is

$$ \begin{aligned} \int_0^1\frac{x^2}{1+x}\,dx &=\left[\frac{x^2}{2}-x+\ln(1+x)\right]_0^1\\ &=\left(\frac12-1+\ln 2\right)-0\\ &=\ln 2-\frac12. \end{aligned} $$

Substituting this value gives \(\frac12\ln 2-\frac12(\ln 2-\frac12)=\frac14\). For a check, an antiderivative of the original integrand is

$$ F(x)=\frac{x^2-1}{2}\ln(1+x)-\frac{x^2}{4}+\frac{x}{2}. $$

Differentiating, \(F'(x)=x\ln(1+x)+\frac{x^2-1}{2(1+x)}-\frac{x}{2}+\frac12\). Since \(\frac{x^2-1}{2(1+x)}=\frac{x-1}{2}\), the non-logarithmic terms cancel, leaving \(F'(x)=x\ln(1+x)\). Finally, \(F(1)=\frac14\) and \(F(0)=0\), confirming the definite integral is \(\frac14\).

A Trigonometric Example

The boundary difference can also contribute a familiar constant such as an endpoint angle. Keep the exact limits in the bracket until both endpoint values have been substituted.

Worked Example: A Product with a Trigonometric Factor

Evaluate \(\int_0^{\pi/2} x\cos x\,dx\). Take \(u=x\), \(du=dx\), \(dv=\cos x\,dx\), and \(v=\sin x\). Then

$$ \begin{aligned} \int_0^{\pi/2}x\cos x\,dx &=[x\sin x]_0^{\pi/2}-\int_0^{\pi/2}\sin x\,dx\\ &=\left(\frac{\pi}{2}\sin\frac{\pi}{2}-0\sin 0\right) -\left[-\cos x\right]_0^{\pi/2}\\ &=\frac{\pi}{2}-\bigl(0-(-1)\bigr)\\ &=\frac{\pi}{2}-1. \end{aligned} $$

For a check, \(F(x)=x\sin x+\cos x\) has derivative \(F'(x)=\sin x+x\cos x-\sin x=x\cos x\). The endpoint difference is \(F(\frac{\pi}{2})-F(0)=\frac{\pi}{2}-1\), in agreement.

Common Pitfall: Dropping the Remaining Integral

A frequent error is to calculate the boundary term and treat it as the entire answer. Integration by parts does not say that \(\int_a^b u\,dv=[uv]_a^b\); it says to subtract the remaining integral as well.

Incorrect: For \(\int_0^1 xe^x\,dx\), writing \([xe^x]_0^1=e\) and stopping gives \(e\), which is not the integral. Correction: The complete calculation is \([xe^x]_0^1-\int_0^1 e^x\,dx=e-(e-1)=1\). The antiderivative check above confirms the corrected value.

A related sign error is to reverse the boundary difference. By definition, \([uv]_a^b=u(b)v(b)-u(a)v(a)\), not the lower value minus the upper value. Writing the two endpoint values explicitly, as in the examples, makes this mistake easier to catch.

When the Boundary Term Is Zero

The endpoint product may vanish at both limits, but that is a conclusion about the specific \(u\), \(v\), and interval—not a general feature of definite integration by parts. If \([uv]_a^b=0\), the formula reduces to \(\int_a^b u\,dv=-\int_a^b v\,du\). If only one endpoint product is zero, the other still contributes.

It is useful to write down \(u(a)v(a)\) and \(u(b)v(b)\) separately before simplifying. This is particularly helpful when an endpoint involves a logarithm, a trigonometric value, or a factor that vanishes. Only after both values have been evaluated should the boundary term be combined with the remaining integral.

Summary

Definite integration by parts is the product rule integrated over an interval. It transforms an integral into an endpoint difference minus another definite integral. To use it accurately:

  • State \(u\), \(du\), \(dv\), and \(v\) clearly.
  • Evaluate the boundary term at the upper endpoint and subtract its value at the lower endpoint.
  • Keep the original limits on the remaining integral.
  • Simplify and evaluate that integral before combining terms.
  • Check the result by differentiating an antiderivative and evaluating its endpoint difference when practical.

Check Your Understanding

For each question, keep the endpoint evaluation explicit and check any computed integral where requested.

  1. Use integration by parts to evaluate \(\int_0^1 x\,dx\), choosing \(u=x\) and \(dv=dx\). What is the boundary difference?
  2. For \(\int_1^2 x\ln x\,dx\), identify a useful choice of \(u\) and \(dv\), then write the boundary term with both endpoint values shown.
  3. Explain why the formula includes \(u(b)v(b)-u(a)v(a)\), rather than just the upper-endpoint product.
  4. Evaluate \(\int_0^{\pi/2}x\sin x\,dx\) by parts and verify the result using an antiderivative.
  5. A student writes \(\int_a^b u\,dv=[uv]_a^b\). Identify the missing term and explain when the boundary term alone would happen to give the correct value.

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

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