AP · Calculus BC · Integration by Parts and Partial Fractions
Integration by Parts
18 min readUpdated November 30, 2026FreeAP Calculus BC, Further Integration Techniques
Integration by parts turns the integral of a product into a different integral that is easier to find, using ∫udv=uv−∫vdu. You use it when one factor gets simpler when you differentiate it, such as x,lnx or arctanx, and the other factor is easy to integrate, such as ex,sinx or cosx.
Quick check
1Differentiate xsinx.Show answerHide answer
sinx+xcosx. The product rule gives the derivative of the first factor times the second, plus the first factor times the derivative of the second. See the AP® Calculus AB note on the product rule if this is not yet automatic.
2Find ∫e3xdx.Show answerHide answer
31e3x+C. Differentiating e3x gives 3e3x, so you divide by 3.
3In ∫xe5xdx, which factor gets simpler when you differentiate it?Show answerHide answer
x. Its derivative is 1, while the derivative of e5x is still an exponential, 5e5x.
Explain how the integration by parts formula comes from the product rule.
Determine which factor to call u so that the new integral is simpler than the original.
Find antiderivatives that need parts more than once, using a table for the repeats.
Find ∫lnxdx and ∫arctanxdx by taking dv=dx.
Evaluate definite integrals by parts, applying the limits to every term.
Key terms
Integration by parts
The rule ∫udv=uv−∫vdu, where u and v are differentiable functions of x,du=u′(x)dx and dv=v′(x)dx.
In plain English
You trade the integral you can't do for one you can, by differentiating one factor and integrating the other.
Don't write
∫f(x)g(x)dx=∫f(x)dx⋅∫g(x)dx; the integral of a product is not the product of the integrals.
Tabular integration
A layout for repeated integration by parts: one column of successive derivatives of u, one column of successive antiderivatives of dv, and row signs that alternate +,−,+,…
In plain English
A table that does several rounds of parts at once when u is a polynomial.
Don't write
Every product with a + sign; the signs alternate, starting with +.
Where does the formula come from?
It is the product rule read backwards. For differentiable functions u and v of x:
dxd(uv)=udxdv+vdxdu
Integrate both sides with respect to x. The left side gives back uv, so uv=∫udv+∫vdu. Rearranging gives the rule.
Learn this (there is no formula sheet for AP® Calculus BC):
∫udv=uv−∫vdu
To use it, split the integrand into u, which you will differentiate, and dv, which you will integrate. Write down all four pieces, u,du,v and dv, before you substitute; that habit prevents most slips.
For ∫xexdx, take u=x and dv=exdx. Then du=dx and v=ex, so
∫xexdx=xex−∫exdx=xex−ex+C
You don't need a constant when you find v: any antiderivative works, and a single +C goes on at the end.
Key idea
Integration by parts swaps ∫udv for uv−∫vdu, so it only helps when ∫vdu is easier than the integral you started with.
Check yourself
Find ∫xcosxdx.
Show answerHide answer
xsinx+cosx+C. With u=x and dv=cosxdx, you get du=dx and v=sinx, so the integral is xsinx−∫sinxdx=xsinx+cosx+C.
How do you choose u and dv?
Pick u so that its derivative is simpler, and dv so that you can integrate it. This order of preference for u works for most integrands:
Prefer as u
Examples
Reason
Logarithms
lnx
You can differentiate them, but not integrate them directly
Inverse trig functions
arctanx,arcsinx
Their derivatives are algebraic fractions
Polynomials
x,x2+1
Each derivative lowers the power
Exponentials and sine or cosine
e3x,sin2x
They are easy to integrate, so they belong in dv
The real test is what happens to the new integral. In ∫xexdx, the choice u=x leaves ∫exdx, which is simpler. The opposite choice, u=ex and dv=xdx, gives
2x2ex−∫2x2exdx
and the power of x has gone up, so the new integral is harder. When that happens, stop and swap.
Check yourself
For ∫x2lnxdx, which factor should be u?
Show answerHide answer
u=lnx. Its derivative x1 cancels with a power of x, whereas dv=lnxdx would need ∫lnxdx before you even start.
What if one round of parts isn't enough?
If u is x2, one round leaves a new integral that still contains x, so you use parts a second time. For ∫x2exdx:
First round, with u=x2 and dv=exdx:∫x2exdx=x2ex−∫2xexdx.
Second round, with u=2x:∫2xexdx=2xex−2ex.
So ∫x2exdx=x2ex−2xex+2ex+C.
When u is a polynomial and dv can be integrated again and again, tabular integration does the same work faster. Differentiate u down the middle column until you reach 0, integrate dv down the right column, and give the rows the signs +,−,+,…
Sign
Differentiate u
Integrate dv
+
x2
ex
−
2x
ex
+
2
ex
0
ex
Multiply each entry in the middle column by the right-column entry one row lower, with its row's sign: +x2ex−2xex+2ex, the same result.
Examiner's eye
Marks are lost when one sign in a repeated integration is dropped. Differentiate your final answer: it must give back the integrand.
Check yourself
Use a table to find ∫x3exdx.
Show answerHide answer
ex(x3−3x2+6x−6)+C. The middle column is x3,3x2,6x,6,0, every right-column entry is ex, and the signs run +,−,+,−.
How do you handle lnx,arctanx and limits?
For a single function that you can differentiate but not integrate, treat it as a product with 1: take u as the function and dv=dx, so v=x.
For a definite integral, the limits apply to both parts. Learn this:
∫abudv=[uv]ab−∫abvdu
For example, with u=x and dv=sinxdx, so that v=−cosx:
∫0πxsinxdx=[−xcosx]0π+∫0πcosxdx=π+0=π
The bracket is −πcosπ−0=π, and ∫0πcosxdx=sinπ−sin0=0.
Check yourself
Evaluate ∫1elnxdx.
Show answerHide answer
1. The antiderivative is xlnx−x, and (elne−e)−(1ln1−1)=0−(−1)=1.
Which method fits the integrand?
What you see
Method
A factor times the derivative of an inside function, such as xcos(x2)
u-substitution, from AP® Calculus AB
A polynomial times ekx,sinkx or coskx
Parts, with u as the polynomial
lnx or arctanx, alone or times a power of x
Parts, with u as the log or inverse trig function
A polynomial u of degree 2 or more
Parts more than once, or a table
A rational function whose denominator factors
Partial fractions: see the note on integration using partial fractions
Worked example 1: A polynomial times a cosine
Question: Find ∫xcos(3x)dx.
What tells you the method
The integrand is a product of x, which differentiates to 1, and cos(3x), which you can integrate. The factor x is not a constant multiple of the derivative of the inside function 3x, so u-substitution won't work.
1
Step 1: Choose and list the pieces.
u=x and dv=cos(3x)dx, so du=dx and v=31sin(3x).
Why
Differentiating x removes it, and cos(3x) integrates to 31sin(3x) because the chain rule brings out a factor of 3.
2
Step 2: Apply the formula.
∫xcos(3x)dx=3xsin(3x)−∫31sin(3x)dx.
Why
This is uv−∫vdu.
3
Step 3: Finish the new integral.
∫31sin(3x)dx=−91cos(3x), so the result is 3xsin(3x)+91cos(3x)+C.
Why
Subtracting −91cos(3x) gives +91cos(3x).
Check it
Differentiating gives 31sin(3x)+xcos(3x)−31sin(3x)=xcos(3x), the integrand.
Answer
3xsin(3x)+91cos(3x)+C
Worked example 2: A logarithm with limits
Question: Evaluate ∫1ex2lnxdx. Give the exact value and a decimal to three places.
What tells you the method
lnx can't be integrated directly, but it differentiates to x1, which cancels with a power of x.
1
Step 1: Choose and list the pieces.
u=lnx and dv=x2dx, so du=x1dx and v=3x3.
Why
Logarithms come first as u.
2
Step 2: Apply the formula with limits.
∫1ex2lnxdx=[3x3lnx]1e−∫1e3x2dx.
Why
vdu=3x3⋅x1dx=3x2dx.
3
Step 3: Evaluate each part.
The bracket is 3e3−0, and ∫1e3x2dx=9e3−1.
Why
lne=1 and ln1=0.
4
Step 4: Combine.
3e3−9e3−1=93e3−e3+1=92e3+1.
Why
Write both over the common denominator 9.
Check it
The integrand rises from 0 at x=1 to e2≈7.39 at x=e. A trapezoid with those heights has area about 6.35, and the graph bends upward, so the true value is less than that; 4.575 fits.
Answer
92e3+1≈4.575
Worked example 3: Parts twice in a free-response setting
Question: The function f satisfies f′(x)=x2e−x for all x, and f(0)=1. (a) Find f(x). (b) Find f(2), correct to three decimal places.
What tells you the method
f is an antiderivative of a polynomial times an exponential, and the polynomial is x2, so you need parts twice; a table is quickest.
1
Step 1: Set up the table.
Differentiate down from x2:x2,2x,2,0. Integrate down from e−x:e−x,−e−x,e−x,−e−x. The row signs are +,−,+.
Why
x2 reaches 0 after three derivatives, and each antiderivative of e−x flips the sign.
2
Step 2: Multiply along the diagonals.
+x2(−e−x)−2x(e−x)+2(−e−x)=−e−x(x2+2x+2).
Why
Each derivative pairs with the antiderivative one row lower, carrying its row's sign.
3
Step 3: Use the initial condition.
f(x)=−e−x(x2+2x+2)+C, and f(0)=−2+C=1, so C=3.
Why
The condition fixes the one constant.
4
Step 4: Evaluate at x=2.
f(2)=3−e−2(4+4+2)=3−10e−2.
Why
Keep e−2 exact until the final rounding.
Check it
f′(x)=e−x(x2+2x+2)−e−x(2x+2)=x2e−x, the given derivative, and f(0)=3−2=1.
Answer
(a) f(x)=3−e−x(x2+2x+2). (b) f(2)=3−10e−2≈1.647.
Your turn
Question: Evaluate ∫01arctanxdx. Give the exact value and a decimal to three places.
1
Step 1:
arctanx can't be integrated directly, so take u=arctanx and dv=dx. Then du=1+x21dx and v=x.
2
Step 2:
The formula gives [xarctanx]01−∫011+x2xdx.
3
Step 3: Your go: evaluate both parts.
Use arctan1=4π, and find the last integral with the substitution w=1+x2.
Show the full solutionHide the solution
The bracket is 1⋅4π−0=4π.
With w=1+x2,dw=2xdx, so ∫011+x2xdx=21[ln(1+x2)]01=21ln2.
Answer:4π−21ln2≈0.439
Traps
Trap
Taking u=ex and dv=xdx in ∫xexdx.
It seems right because ex is its own derivative, so it looks harmless as u. But u must be the factor that gets simpler: this choice leaves ∫2x2exdx, which is harder. Take u=x, so the new integral is ∫exdx.
Check yourself
In ∫xsinxdx, does u=x or u=sinx give the simpler new integral?
Show answerHide answer
u=x. It leaves ∫(−cosx)dx, while u=sinx with dv=xdx leaves ∫2x2cosxdx, with a higher power of x.
Trap
Putting the limits on the new integral only, as in ∫02xexdx=xex−∫02exdx.
It seems right because the limits sit on the integral sign. But the uv term must be evaluated at the limits too: [xex]02−∫02exdx=2e2−(e2−1)=e2+1.
Check yourself
Evaluate ∫12lnxdx.
Show answerHide answer
2ln2−1. The bracket [xlnx]12=2ln2, and you subtract ∫121dx=1.
Trap
Giving every row of a table a + sign.
It seems right because each row looks like a fresh product. But each row is one more round of uv−∫vdu, and the minus sign in front of ∫vdu flips the sign each time, so the signs run +,−,+,−,…
Check yourself
In the table for ∫x2sinxdx, the second row pairs 2x with −sinx. What term does it give?
Show answerHide answer
+2xsinx. The second row has a minus sign, so the term is −2x(−sinx). The full result is −x2cosx+2xsinx+2cosx+C.
What's examined
Integration by parts is part of Unit 6 (Further Integration Techniques) of the AP® Calculus BC exam. It can appear in multiple choice, where options can differ by a single sign or a missing term, so differentiate your answer to check it. In free response it sits inside questions that need an antiderivative: finding f from f′, an area, a volume or an accumulated amount. Expect to do it by hand, so write u,dv,du and v, then each stage of the working. When a graphing calculator is allowed, write the definite integral with its limits before giving its value.
Practice questions
Recall Which choice of u and dv leads most directly to ∫xlnxdx?
A) u=x,dv=lnxdx
B) u=xlnx,dv=dx
C) u=lnx,dv=xdx
D) u=1,dv=xlnxdx
Show answer
Answer: C, u=lnx and dv=xdx.
Marking points:
du=x1dx and v=2x2, so the new integral is ∫2xdx, which is easy.
A needs ∫lnxdx before you start; B gives du=(lnx+1)dx, which brings the original integral back; D leaves the original integral untouched.
Apply Find ∫(2x+1)exdx.
Show answer
Answer:(2x−1)ex+C
Marking points:
u=2x+1 and dv=exdx, so du=2dx and v=ex.
(2x+1)ex−∫2exdx=(2x+1)ex−2ex+C=(2x−1)ex+C.
Apply What is the value of ∫01xexdx?
A) 1
B) 2e
C) e
D) 2e−1
Show answer
Answer: A, 1.
Marking points:
u=x and dv=exdx:[xex]01−∫01exdx=e−(e−1)=1.
B comes from taking u=ex and dropping the new integral; C drops ∫vdu; D adds ∫vdu instead of subtracting it.
Apply Find ∫x3lnxdx.
Show answer
Answer:4x4lnx−16x4+C
Marking points:
u=lnx and dv=x3dx, so du=x1dx and v=4x4.
4x4lnx−∫4x3dx=4x4lnx−16x4+C.
Exam-style Which of the following is ∫x2cosxdx?
A) x2sinx−2xcosx−2sinx+C
B) −x2sinx+2xcosx+2sinx+C
C) x2sinx+2xcosx+C
D) x2sinx+2xcosx−2sinx+C
Show answer
Answer: D, x2sinx+2xcosx−2sinx+C.
Marking points:
Table: derivatives x2,2x,2,0; antiderivatives of cosx:sinx,−cosx,−sinx; signs +,−,+.
+x2sinx−2x(−cosx)+2(−sinx)=x2sinx+2xcosx−2sinx.
A gives every row a + sign; B integrates cosx as −sinx; C stops one row early.
Apply What is the value of ∫0π/2xcosxdx?
A) 2π+1
B) 2π−1
C) 2π
D) 1−2π
Show answer
Answer: B, 2π−1.
Marking points:
u=x and dv=cosxdx:[xsinx]0π/2−∫0π/2sinxdx=2π−1.
A integrates sinx as cosx; C drops ∫vdu; D uses v=−sinx.
Exam-style Let R be the region in the first quadrant bounded by the graph of y=xe−x, the x-axis and the line x=2. (a) Find the area of R, exact and to three decimal places. (b) Find the volume of the solid generated when R is revolved about the x-axis, correct to three decimal places.
Show answer
Answer: (a) 1−3e−2≈0.594. (b) 4π(1−13e−4)≈0.598.
Marking points:
Area =∫02xe−xdx; parts with u=x gives [−(x+1)e−x]02=1−3e−2.
Volume =π∫02x2e−2xdx by disks (see the AP® Calculus AB note on volumes of revolution).
A table gives the antiderivative −e−2x(2x2+2x+41), which runs from −41 at x=0 to −413e−4 at x=2.
So the volume is π(41−413e−4)≈0.598.
Key points
Recall, then reveal
Say the main points from memory first, then check them.
Show key pointsHide key points
∫udv=uv−∫vdu is the product rule integrated and rearranged; learn it, because there is no formula sheet.
Choose u to get simpler when differentiated (logs, inverse trig, then polynomials) and dv to be something you can integrate.
A polynomial u of degree n needs n rounds of parts; a table with alternating signs sets them all out at once.
For lnx or arctanx on its own, take dv=dx so that v=x.
With limits, evaluate [uv]ab as well as the new integral.