Tutorials › AP Calculus › Deriving Integration by Parts from the Product Rule

Numerical and BC Integration Methods · Tutorial 516 of 999

Deriving Integration by Parts from the Product Rule

Learn why integration by parts works and how to judge whether a choice of factors produces a more manageable integral.

Advanced 9 min read

What You'll Learn

  • Derive the integration-by-parts formula from the product rule.
  • Interpret the notation \(u\), \(dv\), \(du\), and \(v\).
  • Identify the differentiability and antiderivative conditions needed to use the formula.
  • Compare factor choices by examining the new integral they produce.
  • Recognize when a choice of factors makes no progress.
  • Check a resulting antiderivative by differentiation.

Why a Product Rule Leads to an Integration Rule

A product of functions can be easy to differentiate but less obvious to integrate. The product rule gives a way to reverse part of that differentiation: it expresses the integral of one product as a product minus a different integral.

The key is that the factors are not interchangeable in their roles. One factor is differentiated, while the other is integrated. The choice affects the new integral, so a useful setup is one that leaves an integral we can handle more readily than the one we started with.

Deriving the Formula

Let \(u\) and \(v\) be differentiable functions on an interval. The product rule states that the derivative of their product is

$$ \frac{d}{dx}\bigl(u(x)v(x)\bigr) = u'(x)v(x)+u(x)v'(x). $$

Rearrange this equation to isolate the term containing \(u(x)v'(x)\):

$$ u(x)v'(x) = \frac{d}{dx}\bigl(u(x)v(x)\bigr)-v(x)u'(x). $$

Now take antiderivatives of both sides. The antiderivative of the derivative of \(uv\) is \(uv\), up to an arbitrary constant. Therefore, whenever the antiderivatives involved exist on the interval,

$$ \int u(x)v'(x)\,dx = u(x)v(x)-\int v(x)u'(x)\,dx+C. $$

This is integration by parts. It is the product rule rearranged and integrated—not a separate rule with an unrelated origin.

Theorem: If \(u\) and \(v\) are differentiable on an interval, and the integrals in the equation exist there, then $$ \int u(x)v'(x)\,dx = u(x)v(x)-\int v(x)u'(x)\,dx+C. $$ The constant \(C\) is arbitrary. In differential notation, with \(du=u'(x)\,dx\) and \(dv=v'(x)\,dx\), this is written \(\int u\,dv=uv-\int v\,du+C\).

The notation \(dv=v'(x)\,dx\) signals that we need an antiderivative \(v\) of the factor being integrated. The notation \(du=u'(x)\,dx\) records the derivative of the factor being differentiated. Thus, for an integrand written as a product, we choose one factor to be \(u\) and the other, together with \(dx\), to be \(dv\).

What Makes a Factor Choice Useful?

The formula always transforms the integral in the stated way when its conditions hold. But it does not guarantee that the new integral will be easier. A sensible choice usually has two features:

  • The chosen \(dv\) has an antiderivative \(v\) that can be found.
  • The product \(v\,du\) produces a simpler or more familiar integral than the original one.

These are practical goals, not additional mathematical assumptions. A choice may satisfy the formula perfectly and still make the calculation harder. Looking at the integral that will remain—before carrying out the calculation—is an important part of using the method well.

1
Choose \(u\).
Decide which factor will be differentiated, and calculate \(du\).
2
Choose \(dv\).
Assign the remaining factor and \(dx\) to \(dv\), then find an antiderivative \(v\).
3
Inspect the remainder.
Substitute into \(uv-\int v\,du\). Check whether the new integral is manageable.
4
Verify the result.
Differentiate the proposed antiderivative and confirm that it gives the original integrand.

Worked Examples

Worked Example: Choosing Factors for \(\int x\cos x\,dx\)

Let \(u=x\) and \(dv=\cos x\,dx\). Then \(du=dx\), and an antiderivative of \(\cos x\) is \(v=\sin x\). Apply the formula:

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

For the second line, \(\int\sin x\,dx=-\cos x+C\), so subtracting that antiderivative gives \(+\cos x\). Check by differentiation:

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

The derivative matches the integrand. This choice is useful because differentiating \(x\) gives \(1\), leaving the manageable integral \(\int\sin x\,dx\).

Worked Example: Choosing Factors for \(\int x\sin x\,dx\)

Set \(u=x\) and \(dv=\sin x\,dx\). Then \(du=dx\), and \(v=-\cos x\), since \(\frac{d}{dx}(-\cos x)=\sin x\). Substitution into the formula gives

$$ \begin{aligned} \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. \end{aligned} $$

Check the result:

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

The opposite signs in the antiderivative of \(\sin x\) and in the formula’s subtraction are both essential. Writing \(v=-\cos x\) first makes the sign in the remaining integral visible.

Worked Example: A Radical Product with a Manageable Remainder

Find \(\int x\sqrt{x+1}\,dx\) on \(x>-1\). Choose \(u=x\), so \(du=dx\), and \(dv=\sqrt{x+1}\,dx\). An antiderivative for \(dv\) is

$$ v=\frac{2}{3}(x+1)^{3/2}, \qquad \frac{d}{dx}\left(\frac{2}{3}(x+1)^{3/2}\right)=\sqrt{x+1}. $$

Now use integration by parts:

$$ \begin{aligned} \int x\sqrt{x+1}\,dx &=\frac{2}{3}x(x+1)^{3/2} -\frac{2}{3}\int(x+1)^{3/2}\,dx\\ &=\frac{2}{3}x(x+1)^{3/2} -\frac{2}{3}\left(\frac{2}{5}(x+1)^{5/2}\right)+C\\ &=\frac{2}{3}x(x+1)^{3/2} -\frac{4}{15}(x+1)^{5/2}+C. \end{aligned} $$

In the second line, \(\int(x+1)^{3/2}\,dx=\frac{2}{5}(x+1)^{5/2}+C\), as can be checked by differentiating. Check the final expression:

$$ \begin{aligned} \frac{d}{dx}\left( \frac{2}{3}x(x+1)^{3/2} -\frac{4}{15}(x+1)^{5/2} \right) &=\frac{2}{3}(x+1)^{3/2} +x(x+1)^{1/2} -\frac{2}{3}(x+1)^{3/2}\\ &=x\sqrt{x+1}. \end{aligned} $$

The two terms involving \((x+1)^{3/2}\) cancel, leaving exactly the original integrand.

When a Different Choice Does Not Help

For the first example, we chose \(u=x\) and \(dv=\cos x\,dx\). Reversing those roles is valid as a formal application, but it does not make progress. To see why, let \(u=\cos x\), \(dv=x\,dx\), so \(du=-\sin x\,dx\) and \(v=x^2/2\). If \(I=\int x\cos x\,dx\), the formula gives

$$ I=\frac{x^2}{2}\cos x+\frac{1}{2}\int x^2\sin x\,dx. $$

For the remaining integral, set \(J=\int x^2\sin x\,dx\), and apply the formula with \(u=x^2\), \(dv=\sin x\,dx\). Then \(du=2x\,dx\) and \(v=-\cos x\), so

$$ \begin{aligned} J &=-x^2\cos x+2\int x\cos x\,dx\\ &=-x^2\cos x+2I. \end{aligned} $$

Substituting this expression for \(J\) into the first equation yields

$$ I=\frac{x^2}{2}\cos x+\frac{1}{2}\bigl(-x^2\cos x+2I\bigr)=I. $$

This identity is true, but it gives no new information about \(I\): the unknown integral cancels from both sides. By contrast, the earlier choice reduced the calculation to \(\int\sin x\,dx\), which could be evaluated directly. This illustrates why factor choice determines whether the transformed integral is useful.

A Common Mistake: Forgetting the Subtraction

A frequent error is to write the product term correctly but use a plus sign before the remaining integral. For \(\int x\cos x\,dx\), that mistake would give

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

Differentiate this incorrect result:

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

This is not the original integrand. The correct formula has a minus sign before \(\int v\,du\). Since \(\int\sin x\,dx=-\cos x\), the correct result is \(x\sin x+\cos x+C\), whose derivative is \(x\cos x\).

Why the Derivation Matters

Remembering the formula is useful, but understanding its origin helps control its signs and roles. The term \(uv\) comes from the derivative of a product; the remaining integral appears because the product rule has two terms, and one of them must be moved to the other side. When in doubt, begin with \((uv)'=u'v+uv'\), rearrange, and then take antiderivatives.

Integration by parts is most effective when the choice of \(u\) and \(dv\) produces a remainder that is simpler or already understood. It is not enough for a split to be algebraically valid. Compare the new integral with the original one, and check the final answer by differentiation.

Check Your Understanding

Answer each question, and use differentiation to check any antiderivative you find.

  1. Starting from the product rule, explain how rearranging and taking antiderivatives gives the integration-by-parts formula.
  2. For \(\int x\sin x\,dx\), identify \(u\), \(dv\), \(du\), and \(v\) when \(u=x\), and explain why \(v=-\cos x\).
  3. Evaluate \(\int x\sin x\,dx\) using integration by parts, showing the remaining integral and the constant of integration.
  4. What makes the choice \(u=x\), \(dv=\cos x\,dx\) useful for \(\int x\cos x\,dx\)?
  5. Why does reversing the factors for \(\int x\cos x\,dx\) lead to an identity rather than a new evaluation?

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