Integration by parts: Reassign derivative and antiderivative roles in a product

By Vegard Gjerde Based on Masterful Learning 9 min read
integration-by-parts calculus integrals math learning-strategies

Integration by parts rewrites an integral of a product into a boundary term minus a new integral, preserving the same antiderivative family on the interval: u(x)v(x)dx=u(x)v(x)u(x)v(x)dx\int u(x)v'(x)\,dx = u(x)v(x)-\int u'(x)v(x)\,dx. It applies when uu and vv are differentiable, so the core move-selection habit is checking that the chosen parts make the rewrite valid before worrying about whether they make the remaining integral easier. That condition-aware choice is exactly the kind of fluency the Unisium Study System trains.

Unisium hero image titled Integration by parts showing the principle equation and a conditions card.
The integration by parts move u(x)v(x)dx=u(x)v(x)u(x)v(x)dx\int u(x)v'(x)\,dx = u(x)v(x) - \int u'(x)v(x)\,dx under condition “u and v differentiable”.

On this page: The Principle | Conditions | Failure Modes | EE Questions | Retrieval Practice | Practice Ground | Solve a Problem | Related Principles | FAQ | How This Fits


The Principle

The move: Rewrite an integral of a product as boundary term minus a new integral after choosing one part to differentiate and the other to antidifferentiate.

The invariant: This preserves the antiderivative family of the original integrand; the rewritten expression differentiates back to the same product on the same interval.

Pattern: u(x)v(x)dxu(x)v(x)u(x)v(x)dx\int u(x)v'(x)\,dx \quad\longrightarrow\quad u(x)v(x) - \int u'(x)v(x)\,dx

Valid ✓Not valid ✗
xexdxxex1exdx\int x e^x\,dx \to x e^x - \int 1\cdot e^x\,dxx1dx↛xxxxxdx(interval contains 0)\int \lvert x\rvert\cdot 1\,dx \not\to \lvert x\rvert x - \int \frac{x}{\lvert x\rvert}x\,dx \quad (\text{interval contains } 0)

Left: choose u(x)=xu(x)=x and v(x)=exv'(x)=e^x, so both uu and v(x)=exv(x)=e^x are differentiable and the rewritten integral is valid. Right: the product shape is visible, but u(x)=xu(x)=\lvert x\rvert is not differentiable at 00, so the condition fails and the move is not valid on an interval containing that point.


Conditions of Applicability

Condition: u and v differentiable

Integration by parts starts from a deliberate choice of uu and v(x)v'(x), then uses a differentiable uu and a differentiable antiderivative vv to rewrite the integral. The rule is about a valid derivative-antiderivative swap, not about any visible product automatically qualifying.

Before applying, check: can you choose a differentiable uu and a differentiable vv such that v(x)v'(x) is the other factor on the working interval?

  • Product shape alone is not enough; your chosen split must produce a differentiable uu and a differentiable vv on the interval you are using.
  • Strategy note: once the rewrite is valid, prefer a choice that makes the remaining integral u(x)v(x)dx\int u'(x)v(x)\,dx simpler or more manageable.
  • The move comes from reversing the derivative product rule, so if your split does not correspond to a product whose differentiated form you can trust, choose again.
  • Keep the antiderivative target in view: after the rewrite, you are still producing an answer in the sense of indefinite integral as antiderivative, and you may combine the new integral with rules like the integral sum rule if needed.

Want the complete framework behind this guide? Read Masterful Learning.


Common Failure Modes

Failure mode: choose parts only by surface pattern, then run integration by parts where your selected uu or vv is not differentiable on the working interval → the rewrite looks formal but is not a valid application of the rule.

Debug: name your exact uu and vv before writing the formula; if either one fails differentiability on the interval, the move is not available with that choice.


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • Why does the rewrite produce a minus sign, and how does that sign trace back to the product rule rather than to a memorized pattern alone?
  • In u(x)v(x)dx\int u(x)v'(x)\,dx, why is it useful to think of one factor as the part that becomes simpler when differentiated and the other as the part that stays manageable when antidifferentiated?

For the Principle

  • When two different choices of uu and v(x)v'(x) are both valid, what makes one choice better for finishing the problem efficiently?
  • Why is differentiability part of the condition even though many classroom examples use polynomials, exponentials, or trig functions where it is automatic?

Between Principles

Generate an Example

  • Create one product integral where integration by parts is a good first move and one near-miss where a chosen split fails because one selected part is not differentiable on the interval.

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

State the move in one sentence: _____Rewrite an integral of a product as uv minus the integral of u prime times v after choosing one factor to differentiate and the other to antidifferentiate.
Write the canonical equation: _____u(x)v(x)dx=u(x)v(x)u(x)v(x)dx\int u(x)v'(x)\,dx = u(x)v(x) - \int u'(x)v(x)\,dx
State the canonical condition: _____u and v differentiable

Practice Ground

Use these exercises to build move-selection fluency. (See Self-Explanation for how to use worked examples effectively.)

Procedure Walkthrough

Starting from xexdx\int x e^x\,dx, reach a finished antiderivative. Choose u=xu=x and v(x)=exv'(x)=e^x, so u(x)=1u'(x)=1 and v(x)=exv(x)=e^x.

StepExpressionOperation
0xexdx\int x e^x\,dx-
1xex1exdxx e^x - \int 1\cdot e^x\,dxIntegration by parts with u=xu=x and v(x)=exv'(x)=e^x
2xexexdxx e^x - \int e^x\,dxSimplify the remaining integrand
3xexex+Cx e^x - e^x + CEvaluate the remaining integral
4(x1)ex+C(x-1)e^x + CFactor the common exponential

Drills

Format A: Forward step

Apply integration by parts and simplify.

xcosxdx\int x\cos x\,dx

Reveal

Choose u=xu=x and v(x)=cosxv'(x)=\cos x, so u(x)=1u'(x)=1 and v(x)=sinxv(x)=\sin x.

xcosxdx=xsinxsinxdx=xsinx+cosx+C\int x\cos x\,dx = x\sin x - \int \sin x\,dx = x\sin x + \cos x + C


Apply integration by parts and simplify.

xe2xdx\int x e^{2x}\,dx

Reveal

Choose u=xu=x and v(x)=e2xv'(x)=e^{2x}, so u(x)=1u'(x)=1 and v(x)=12e2xv(x)=\tfrac{1}{2}e^{2x}.

xe2xdx=xe2x2e2x2dx=xe2x2e2x4+C\int x e^{2x}\,dx = \frac{x e^{2x}}{2} - \int \frac{e^{2x}}{2}\,dx = \frac{x e^{2x}}{2} - \frac{e^{2x}}{4} + C


[Negative] On an interval containing 00, should you apply integration by parts directly after choosing u(x)=xu(x)=|x| and v(x)=exv'(x)=e^x for

xexdx?\int |x|e^x\,dx\, ?

Reveal

No. The split is not valid on an interval containing 00 because the chosen u(x)=xu(x)=|x| is not differentiable at 00. The product looks suitable, but the condition fails for that choice of parts. You would need a different interval or a different method.


Apply integration by parts to compute the definite integral.

01xexdx\int_0^1 x e^x\,dx

Reveal

Using the walkthrough antiderivative,

01xexdx=[(x1)ex]01=0(1)=1\int_0^1 x e^x\,dx = \left[(x-1)e^x\right]_0^1 = 0 - (-1) = 1


Format B: Action label

What rule was used in the step below, and what were the chosen parts?

xlnxdxx22lnxx221xdx(x>0)\int x\ln x\,dx \quad\longrightarrow\quad \frac{x^2}{2}\ln x - \int \frac{x^2}{2}\cdot\frac{1}{x}\,dx \qquad (x>0)

Reveal

Integration by parts. The choice was u(x)=lnxu(x)=\ln x and v(x)=xv'(x)=x, so u(x)=1xu'(x)=\frac{1}{x} and v(x)=x22v(x)=\frac{x^2}{2}. On x>0x>0, both chosen parts are differentiable, so the rewrite is valid.


What choice of parts is visible in this completed step?

arctanxdxxarctanxx1+x2dx\int \arctan x\,dx \quad\longrightarrow\quad x\arctan x - \int \frac{x}{1+x^2}\,dx

Reveal

The visible choice is u(x)=arctanxu(x)=\arctan x and v(x)=1v'(x)=1. Then u(x)=11+x2u'(x)=\frac{1}{1+x^2} and v(x)=xv(x)=x, which gives

arctanxdx=xarctanxx1+x2dx\int \arctan x\,dx = x\arctan x - \int \frac{x}{1+x^2}\,dx


[Negative] Explain why the proposed step is not a valid direct use of integration by parts on an interval containing 00.

xdxxxxxxdx\int |x|\,dx \quad\longrightarrow\quad |x|x - \int \frac{x}{|x|}x\,dx

Reveal

The chosen split is u(x)=xu(x)=|x| and v(x)=1v'(x)=1, but uu is not differentiable at 00. Since integration by parts requires the chosen uu and vv to be differentiable on the working interval, the step is not valid on any interval containing 00.


Format C: Transition identification

Which transition uses integration by parts directly?

xsinxdx(1)xcosx(cosx)dx(2)xcosx+cosxdx(3)xcosx+sinx+C\int x\sin x\,dx \xrightarrow{(1)} -x\cos x - \int (-\cos x)\,dx \xrightarrow{(2)} -x\cos x + \int \cos x\,dx \xrightarrow{(3)} -x\cos x + \sin x + C

Reveal

Transition (1) uses integration by parts directly. It chooses u=xu=x and v(x)=sinxv'(x)=\sin x, so u(x)=1u'(x)=1 and v(x)=cosxv(x)=-\cos x.

  • (2) simplifies the minus signs.
  • (3) evaluates the remaining integral.

Which proposed transitions are valid applications of integration by parts on the stated interval?

  1. On (0,)(0,\infty): (lnx)exdxexlnxexxdx\int (\ln x)e^x\,dx \to e^x\ln x - \int \frac{e^x}{x}\,dx
  2. On [1,1][-1,1]: xdxxxxxxdx\int |x|\,dx \to |x|x - \int \frac{x}{|x|}x\,dx
  3. On R\mathbb{R}: xcosxdxxsinxsinxdx\int x\cos x\,dx \to x\sin x - \int \sin x\,dx
Reveal

Valid transitions: 1 and 3.

  • 1 is valid on (0,)(0,\infty) because the chosen u(x)=lnxu(x)=\ln x and v(x)=exv(x)=e^x are differentiable there.
  • 2 is invalid on [1,1][-1,1] because the chosen u(x)=xu(x)=|x| is not differentiable at 00.
  • 3 is valid on all real numbers because u(x)=xu(x)=x and v(x)=sinxv(x)=\sin x are differentiable everywhere.

Format D: Goal micro-chain

Starting from x2exdx\int x^2 e^x\,dx, reach a finished antiderivative in the minimum number of moves.

Reveal

One efficient chain is:

  1. x2exdxx2ex2xexdx\int x^2 e^x\,dx \to x^2 e^x - \int 2x e^x\,dx
  2. x2ex2(xexexdx)\to x^2 e^x - 2\left(x e^x - \int e^x\,dx\right)
  3. x2ex2xex+2ex+C\to x^2 e^x - 2x e^x + 2e^x + C
  4. ex(x22x+2)+C\to e^x(x^2-2x+2) + C

The move is repeated because the first application leaves another product that is still simpler after a second pass.


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem: Compute

xlnxdx(x>0)\int x\ln x\,dx \qquad (x>0)

and simplify the result.

Full solution
StepExpressionMove
0xlnxdx\int x\ln x\,dx-
1x22lnxx221xdx\frac{x^2}{2}\ln x - \int \frac{x^2}{2}\cdot\frac{1}{x}\,dxIntegration by parts with u=lnxu=\ln x and v(x)=xv'(x)=x
2x22lnxx2dx\frac{x^2}{2}\ln x - \int \frac{x}{2}\,dxSimplify the remaining integrand
3x22lnx12xdx\frac{x^2}{2}\ln x - \frac{1}{2}\int x\,dxPull out the constant multiple
4x22lnxx24+C\frac{x^2}{2}\ln x - \frac{x^2}{4} + CEvaluate the remaining integral and simplify

Check: differentiating x22lnxx24\frac{x^2}{2}\ln x - \frac{x^2}{4} gives xlnx+x2x2=xlnxx\ln x + \frac{x}{2} - \frac{x}{2} = x\ln x, so the antiderivative is consistent.


PrincipleRelationship
Derivative product ruleIntegration by parts comes from rearranging the product rule after integration
Indefinite integral as antiderivativeClarifies what is preserved when the original integral is rewritten into a new antiderivative chain
Integral sum ruleOften helps finish the remaining integral after one or more integration-by-parts rewrites

FAQ

What is integration by parts?

It is the rewrite

u(x)v(x)dx=u(x)v(x)u(x)v(x)dx\int u(x)v'(x)\,dx = u(x)v(x) - \int u'(x)v(x)\,dx

which trades one derivative for one antiderivative inside a product. The goal is not to use the formula mechanically, but to choose parts so the new integral is easier than the original one.

When is integration by parts valid?

It is valid when the chosen uu and vv are differentiable on the working interval, with v(x)v'(x) matching the other factor in the product. Product shape by itself is not enough; the chosen split has to satisfy the condition.

How should I choose a function as uu?

Choose uu so that differentiating it makes it simpler or at least no harder. A standard classroom pattern is to differentiate algebraic or logarithmic factors and antidifferentiate exponentials, trig functions, or 11 when that makes the new integral cleaner.

Can I use integration by parts on definite integrals?

Yes. The same rewrite works, and then you evaluate the resulting antiderivative expression at the bounds. The condition still matters: your chosen uu and vv must be differentiable on the interval you are using.

Why is there a minus sign in the formula?

Because the rule comes from the product rule:

ddx(u(x)v(x))=u(x)v(x)+u(x)v(x)\frac{d}{dx}(u(x)v(x)) = u'(x)v(x) + u(x)v'(x)

Solving that equation for u(x)v(x)u(x)v'(x) and then integrating moves the u(x)v(x)u'(x)v(x) term to the other side, creating the minus sign.

What if integration by parts makes the integral worse?

Then the chosen split was valid but unhelpful. The rule is still valid, but move selection failed. Try a different choice of uu and v(x)v'(x), or use another method instead.


How This Fits in Unisium

In Unisium, integration by parts is trained as a move-selection principle: you look at a product integral, test whether your chosen parts meet the condition, and judge whether the rewrite is likely to simplify the task. That connects directly to retrieval practice, self-explanation, and the broader logic of Masterful Learning, where the point is not memorizing a slogan but recognizing when the move is both valid and useful. To keep building this fluency across calculus, practice directly in the Unisium app once you can spot a good integration-by-parts setup on sight.

Explore further:

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: retrieval, connection, explanation, problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →