MATH 141 Calculus 2 • McGill University, Montreal

Revision sheet: integration by parts (MATH 141)

This sheet is not a summary of section 7.1 of Stewart: you already have the course notes. It answers one question only, what makes students lose marks on integration by parts in MATH 141 at McGill University, and which precise gesture avoids each loss.

Everything is done by hand, as on the exam: the answers are exact, and every antiderivative quoted below has been checked by the one test that settles it, differentiating it back.

The thread of the chapter

Integration by parts does not compute an integral, it TRADES it: ∫u dv\int u\,dv becomes uv−∫v duuv - \int v\,du, and the choice of uu is judged by one thing only, whether the NEW integral is easier. On a definite integral, the bracket [uv]ab\left[uv\right]_a^b is a number, evaluated at both bounds like the new integral.

This chapter is part of MATH 141, Calculus 2 (McGill)

The essentials

The formula is a trade, not a computation

  • • From the product rule (uv)′=u′v+uv′(uv)' = u'v + uv': ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du. The integral on the left is REPLACED by the one on the right.
  • • Write four pieces before the formula: uu, dudu, dvdv, vv. Any antiderivative of dvdv is a valid vv; the constant is yours to choose.
  • • The choice is right when ∫v du\int v\,du is simpler than ∫u dv\int u\,dv: a power of xx that went down, a logarithm that became 1x\frac{1}{x}, an inverse function that became algebraic.
  • • If the new integral is worse, the equation you wrote is still TRUE, but useless: swap uu and dvdv after one line, do not push on.
  • • Definite form: ∫abu dv=[uv]ab−∫abv du\int_a^b u\,dv = \left[uv\right]_a^b - \int_a^b v\,du. The bracket is a number; the new integral keeps the bounds aa and bb.
0.250.50.7511.250.250.50.751AB(1, π/4)y = arctan x
A=∫01arctan⁡x dxA = \int_0^1 \arctan x\,dx and B=∫0π/4tan⁡y dy=ln⁡22B = \int_0^{\pi/4} \tan y\,dy = \frac{\ln 2}{2} fill the rectangle [xarctan⁡x]01=π4\left[x\arctan x\right]_0^1 = \frac{\pi}{4}, so A=π4−ln⁡22A = \frac{\pi}{4} - \frac{\ln 2}{2}.

Geometrically, ∫u dv+∫v du=u(b)v(b)−u(a)v(a)\int u\,dv + \int v\,du = u(b)v(b) - u(a)v(a): the two integrals are the two pieces of a difference of rectangles. That is the whole content of the formula, and it is why the bracket can never be skipped.

Four forms, four gestures

  • • Polynomial times eaxe^{ax}, sin⁡bx\sin bx or cos⁡bx\cos bx: uu = the polynomial, one trade per degree, or the tabular method with alternating signs.
  • • Polynomial times ln⁡x\ln x, arctan⁡x\arctan x or arcsin⁡x\arcsin x: uu = the logarithm or inverse function, dvdv = the polynomial.
  • • A lone ln⁡x\ln x, arctan⁡x\arctan x, arcsin⁡x\arcsin x or (ln⁡x)n(\ln x)^n: dv=dxdv = dx, v=xv = x.
  • • eaxe^{ax} times sin⁡bx\sin bx or cos⁡bx\cos bx: two trades with the SAME type as uu, then solve the equation for the integral.
  • • With a letter in the exponent (xnx^n, (ln⁡x)n(\ln x)^n): one trade gives a reduction formula linking InI_n to In−1I_{n-1}.

The rules in table form

Each row reads from left to right: the assumptions, then the result. A red cell is not an answer, it is the finding that the form settles nothing and the instruction to rewrite it. Every case is followed by a worked example.

Which u for which product

Read a line as: for an integrand of this form, take this uu and this dvdv, and the result is in the last column. The red line is the rule students invent.

IntegrandudvResult
xe2xx e^{2x} xx e2x dxe^{2x}\,dx e2x(2x−1)4+C\frac{e^{2x}(2x - 1)}{4} + C

Example: On [0,1][0, 1]: e2⋅14−−14=e2+14\frac{e^2 \cdot 1}{4} - \frac{-1}{4} = \frac{e^2 + 1}{4}.

x3ln⁡xx^3 \ln x ln⁡x\ln x x3 dxx^3\,dx x4ln⁡x4−x416+C\frac{x^4 \ln x}{4} - \frac{x^4}{16} + C

Example: On [1,e][1, e]: e44−e416+116=3e4+116\frac{e^4}{4} - \frac{e^4}{16} + \frac{1}{16} = \frac{3e^4 + 1}{16}.

arctan⁡x\arctan x arctan⁡x\arctan x dxdx xarctan⁡x−12ln⁡(1+x2)+Cx\arctan x - \frac{1}{2}\ln(1 + x^2) + C

Example: On [0,1][0, 1]: π4−ln⁡22\frac{\pi}{4} - \frac{\ln 2}{2}, the area AA of the figure above.

exsin⁡xe^x \sin x sin⁡x\sin x, then cos⁡x\cos x ex dxe^x\,dx twice ex(sin⁡x−cos⁡x)2+C\frac{e^x(\sin x - \cos x)}{2} + C

Example: On [0,π][0, \pi]: eπ+12\frac{e^{\pi} + 1}{2}, more than 1010.

f(x)g(x)f(x)g(x) none none ∫f dx⋅∫g dx\int f\,dx \cdot \int g\,dx no such rule

Example: ∫01xex dx=1\int_0^1 x e^x\,dx = 1, but ∫01x dx⋅∫01ex dx=e−12≈0.86\int_0^1 x\,dx \cdot \int_0^1 e^x\,dx = \frac{e - 1}{2} \approx 0.86.

What to do: Integrate by parts: u=xu = x, dv=ex dxdv = e^x\,dx, giving (x−1)ex+C(x - 1)e^x + C.

Every blue line is checked by differentiating the result. The red line fails that test at once: ddx(x22ex)=xex+x22ex\frac{d}{dx}\left(\frac{x^2}{2}e^x\right) = x e^x + \frac{x^2}{2}e^x.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Integrating a product factor by factor

the whole question

What not to write

“∫xex dx=x22ex+C\int x e^x\,dx = \frac{x^2}{2}e^x + C.”

What to write

“u=xu = x, dv=ex dxdv = e^x\,dx, v=exv = e^x: ∫xex dx=xex−∫ex dx=(x−1)ex+C\int x e^x\,dx = x e^x - \int e^x\,dx = (x - 1)e^x + C.”

0.250.50.7511.251.50.511.522.53area 1height (e − 1)/2y = x e^xx
The shaded area ∫01xex dx\int_0^1 x e^x\,dx is exactly 11; the dashed height e−12≈0.86\frac{e - 1}{2} \approx 0.86 over [0,1][0, 1] is the product of the two separate integrals, visibly smaller.

Why: There is no product rule for integrals; integration by parts is what replaces it. The derivative of x22ex\frac{x^2}{2}e^x is xex+x22exx e^x + \frac{x^2}{2}e^x, not xexx e^x, and on [0,1][0, 1] the two computations give 11 against e−12\frac{e - 1}{2}.

2. Choosing u so that the power goes up

10 minutes, then the question if you push on

What not to write

“u=e2xu = e^{2x}, dv=x dxdv = x\,dx: ∫xe2x dx=x2e2x2−∫x2e2x dx\int x e^{2x}\,dx = \frac{x^2 e^{2x}}{2} - \int x^2 e^{2x}\,dx, then again with u=e2xu = e^{2x}...”

What to write

“The new integral has x2x^2: wrong trade. I swap: u=xu = x, dv=e2x dxdv = e^{2x}\,dx, and ∫xe2x dx=e2x(2x−1)4+C\int x e^{2x}\,dx = \frac{e^{2x}(2x - 1)}{4} + C.”

Why: The equation after the wrong choice is true, which is why students keep going. Judge every choice by the new integral, after ONE line: if the power went up, swap uu and dvdv.

3. Losing the minus sign hidden in v

1 to 2 marks

What not to write

“v=−cos⁡xv = -\cos x, so ∫xsin⁡x dx=−xcos⁡x−sin⁡x+C\int x\sin x\,dx = -x\cos x - \sin x + C.”

What to write

“∫xsin⁡x dx=−xcos⁡x−∫(−cos⁡x) dx=−xcos⁡x+sin⁡x+C\int x\sin x\,dx = -x\cos x - \int(-\cos x)\,dx = -x\cos x + \sin x + C.”

Why: The formula subtracts ∫v du\int v\,du, and here vv is itself negative: two minus signs, one plus. Write −∫v du-\int v\,du with vv in parentheses on its own line. The derivative of the wrong answer is xsin⁡x−2cos⁡xx\sin x - 2\cos x.

4. Table signs that do not alternate

2 marks

What not to write

“∫x2e3x dx=e3x(x23+2x9+227)+C\int x^2 e^{3x}\,dx = e^{3x}\left(\frac{x^2}{3} + \frac{2x}{9} + \frac{2}{27}\right) + C.”

What to write

“Signs +,−,++, -, +: ∫x2e3x dx=e3x(x23−2x9+227)+C\int x^2 e^{3x}\,dx = e^{3x}\left(\frac{x^2}{3} - \frac{2x}{9} + \frac{2}{27}\right) + C.”

Why: Each row of the table is one trade, and each trade carries the minus of −∫v du-\int v\,du: the signs alternate +,−,+,−+, -, +, -, starting with ++. Each D entry pairs with the I entry ONE ROW BELOW.

5. Swapping the roles in a cyclic integral

the whole question, or half of it if you forget to divide by 2

What not to write

“Step 1 with u=sin⁡xu = \sin x, step 2 with u=exu = e^x: I get ∫exsin⁡x dx=∫exsin⁡x dx\int e^x \sin x\,dx = \int e^x \sin x\,dx, parts fails.”

What to write

“Step 2 with u=cos⁡xu = \cos x again: I=exsin⁡x−excos⁡x−II = e^x\sin x - e^x\cos x - I, so I=ex(sin⁡x−cos⁡x)2+CI = \frac{e^x(\sin x - \cos x)}{2} + C.”

Why: Swapping the roles in the second step undoes the first trade and hands back the integral you started from. Keep the same TYPE of function as uu in both steps; then the original integral comes back with a coefficient, and you solve for it, dividing the WHOLE right side.

6. Dropping the bounds of the new integral, or the lower bound

1 to 2 marks, and a negative area

What not to write

“∫12ln⁡x dx=[xln⁡x−x]2=2ln⁡2−2\int_1^2 \ln x\,dx = \left[x\ln x - x\right]^2 = 2\ln 2 - 2, since ln⁡1=0\ln 1 = 0.”

What to write

“∫12ln⁡x dx=(2ln⁡2−2)−(0−1)=2ln⁡2−1\int_1^2 \ln x\,dx = (2\ln 2 - 2) - (0 - 1) = 2\ln 2 - 1.”

Why: ln⁡1=0\ln 1 = 0 kills xln⁡xx\ln x at the lower bound, not −x-x. On [1,2][1, 2], 0≤ln⁡x≤ln⁡20 \le \ln x \le \ln 2, so the value lies between 00 and ln⁡2≈0.69\ln 2 \approx 0.69: 2ln⁡2−2≈−0.612\ln 2 - 2 \approx -0.61 is impossible, 2ln⁡2−1≈0.392\ln 2 - 1 \approx 0.39 fits.

7. Stopping after uv on a lone logarithm

1 mark each, and every later value that uses it

What not to write

“∫ln⁡x dx=xln⁡x+C\int \ln x\,dx = x\ln x + C.” or “∫ln⁡x dx=(ln⁡x)22+C\int \ln x\,dx = \frac{(\ln x)^2}{2} + C.”

What to write

“u=ln⁡xu = \ln x, dv=dxdv = dx, v=xv = x: ∫ln⁡x dx=xln⁡x−∫1 dx=xln⁡x−x+C\int \ln x\,dx = x\ln x - \int 1\,dx = x\ln x - x + C.”

Why: The trade has two halves and the second one, −∫v du=−x-\int v\,du = -x, is not optional. The other answer applies the power rule to ln⁡x\ln x as if it were the variable: its derivative is ln⁡xx\frac{\ln x}{x}.

Which method to choose

Choosing u by the FORM of the integrand

Look at the two factors, or at the single factor, before writing any formula

  • If polynomial times eaxe^{ax}, sin⁡bx\sin bx or cos⁡bx\cos bx → u is the polynomial; one trade per degree, or the tabular method

    Example: ∫x2e−x dx=−e−x(x2+2x+2)+C\int x^2 e^{-x}\,dx = -e^{-x}(x^2 + 2x + 2) + C

  • If polynomial times ln⁡x\ln x → u=ln⁡xu = \ln x, dvdv = the polynomial, one trade

    Example: ∫x2ln⁡x dx=x3ln⁡x3−x39+C\int x^2 \ln x\,dx = \frac{x^3 \ln x}{3} - \frac{x^3}{9} + C

  • If polynomial times arctan⁡x\arctan x or arcsin⁡x\arcsin x → u is the inverse function; try a constant in v that simplifies

    Example: ∫xarctan⁡x dx\int x\arctan x\,dx with v=x2+12v = \frac{x^2 + 1}{2}: x2+12arctan⁡x−x2+C\frac{x^2 + 1}{2}\arctan x - \frac{x}{2} + C

  • If a single ln⁡x\ln x, arctan⁡x\arctan x, arcsin⁡x\arcsin x → dv=dxdv = dx, v=xv = x

    Example: ∫01/2arcsin⁡x dx=π12+32−1\int_0^{1/2} \arcsin x\,dx = \frac{\pi}{12} + \frac{\sqrt 3}{2} - 1

  • If eaxe^{ax} times sin⁡bx\sin bx or cos⁡bx\cos bx → two trades, same type as u both times, then solve for the integral

    Example: ∫e2xcos⁡3x dx=e2x(2cos⁡3x+3sin⁡3x)13+C\int e^{2x}\cos 3x\,dx = \frac{e^{2x}(2\cos 3x + 3\sin 3x)}{13} + C

  • If a letter nn in the exponent → one trade gives a reduction formula; compute the first term with care

    Example: In=∫01xnex dx=e−nIn−1I_n = \int_0^1 x^n e^x\,dx = e - nI_{n-1}, I0=e−1I_0 = e - 1, I3=6−2eI_3 = 6 - 2e

If none of these forms appears, integration by parts is probably not the first move: simplify, or look for a substitution. And if a branch gives a new integral WORSE than the old one, you misread the form.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Writing an integration by parts for full marks

When to use it: Any question that says use integration by parts, or any product where the method is yours to choose

  1. 1 Name the choice in a box of four: u=…u = \dots, du=…du = \dots, dv=…dv = \dots, v=…v = \dots. Compute vv by integrating dvdv, and check it by differentiating.
  2. 2 Write the formula with your pieces: uv−∫v duuv - \int v\,du, with vv in parentheses when it carries a sign.
  3. 3 Judge the new integral in one sentence: the power went down, the logarithm disappeared, or the original integral came back.
  4. 4 Finish the new integral (another trade, a table integral, a substitution named as such, or solving for II).
  5. 5 On a definite integral, evaluate the bracket at BOTH bounds, then the new integral at both bounds, on separate lines.
  6. 6 Check: differentiate the antiderivative, or compare a definite value with bounds read on the integrand.

Concluding sentence

“Let u=ln⁡xu = \ln x, du=dxxdu = \frac{dx}{x}, dv=x3 dxdv = x^3\,dx, v=x44v = \frac{x^4}{4}. Then ∫x3ln⁡x dx=x4ln⁡x4−∫x34 dx=x4ln⁡x4−x416+C\int x^3\ln x\,dx = \frac{x^4\ln x}{4} - \int \frac{x^3}{4}\,dx = \frac{x^4\ln x}{4} - \frac{x^4}{16} + C.”

The trap: Writing only the result of the table or of the cyclic computation. Without the four pieces, the marker cannot give the method marks, and a single sign error then costs the whole question.

Marking: Typically 1 mark for the choice of u and dv with du and v, 1 for the formula correctly applied, 1 for the new integral, and the check is what protects the other three.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

A definite integral by two trades, with the bracket evaluated each time

Compute ∫0πx2sin⁡x dx\int_0^{\pi} x^2 \sin x\,dx exactly, the area of the region shown.

No calculator. Every step must be justified as on a MATH 141 final.

0.511.522.533.51234Ay = x² sin xπx
The region under y=x2sin⁡xy = x^2\sin x on [0,π][0, \pi]: the curve rises to about 44 near x≈2.3x \approx 2.3, so the area must be a few units, less than π⋅4\pi \cdot 4.

Step 1

u=x2u = x^2, du=2x dxdu = 2x\,dx; dv=sin⁡x dxdv = \sin x\,dx, v=−cos⁡xv = -\cos x.

Why

Polynomial times sine: the polynomial is uu, because its degree goes down. The sign of vv is written now, in the box, where it cannot be lost.

Step 2

∫0πx2sin⁡x dx=[−x2cos⁡x]0π+2∫0πxcos⁡x dx\int_0^{\pi} x^2\sin x\,dx = \left[-x^2\cos x\right]_0^{\pi} + 2\int_0^{\pi} x\cos x\,dx, and [−x2cos⁡x]0π=−π2(−1)−0=π2\left[-x^2\cos x\right]_0^{\pi} = -\pi^2(-1) - 0 = \pi^2.

Why

−∫v du=−∫(−cos⁡x)(2x) dx=+2∫xcos⁡x dx-\int v\,du = -\int(-\cos x)(2x)\,dx = +2\int x\cos x\,dx. The bracket is evaluated immediately at both bounds, so it becomes a number and leaves the computation.

Step 3

Second trade: u=xu = x, dv=cos⁡x dxdv = \cos x\,dx, v=sin⁡xv = \sin x: ∫0πxcos⁡x dx=[xsin⁡x]0π−∫0πsin⁡x dx=0−2=−2\int_0^{\pi} x\cos x\,dx = \left[x\sin x\right]_0^{\pi} - \int_0^{\pi} \sin x\,dx = 0 - 2 = -2.

Why

The degree went from 22 to 11, so one more trade finishes. The bracket vanishes at both ends (sin⁡π=sin⁡0=0\sin \pi = \sin 0 = 0), and ∫0πsin⁡x dx=2\int_0^{\pi}\sin x\,dx = 2.

Step 4

∫0πx2sin⁡x dx=π2+2(−2)=π2−4\int_0^{\pi} x^2\sin x\,dx = \pi^2 + 2(-2) = \pi^2 - 4.

Why

The factor 22 in front of the second integral is the one most often lost: it came from du=2x dxdu = 2x\,dx in the first trade, and it multiplies the whole result of the second.

Step 5

Check by the table: antiderivative −x2cos⁡x+2xsin⁡x+2cos⁡x-x^2\cos x + 2x\sin x + 2\cos x, equal to π2−2\pi^2 - 2 at π\pi and 22 at 00: difference π2−4≈5.9\pi^2 - 4 \approx 5.9.

Why

Two independent routes, one number. Size: the curve peaks near 44 over a base of π\pi; a triangle of that height and base has area about 6.26.2, the same order, and the value is positive as the figure demands.

The conclusion, written out

“∫0πx2sin⁡x dx=π2−4\int_0^{\pi} x^2\sin x\,dx = \pi^2 - 4.”

The classic mistake on this problem: Losing the minus sign of v=−cos⁡xv = -\cos x, which gives −π2−4-\pi^2 - 4, a negative area; or dropping the factor 22 of dudu, which gives π2−2\pi^2 - 2.

Learn by heart

  • • ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du; definite: [uv]ab−∫abv du\left[uv\right]_a^b - \int_a^b v\,du, both at both bounds.
  • • Write uu, dudu, dvdv, vv first. The choice is judged by the NEW integral.
  • • Polynomial with eaxe^{ax}, sin⁡\sin, cos⁡\cos: uu = polynomial. With ln⁡\ln, arctan⁡\arctan, arcsin⁡\arcsin: uu = that function.
  • • Lone ln⁡x\ln x: ∫ln⁡x dx=xln⁡x−x+C\int \ln x\,dx = x\ln x - x + C. Lone arctan⁡x\arctan x: xarctan⁡x−12ln⁡(1+x2)+Cx\arctan x - \frac{1}{2}\ln(1 + x^2) + C.
  • • Table: D column down to 00, I column, each D with the I one row below, signs +,−,+,…+, -, +, \dots
  • • Cyclic: same type as uu twice, then solve for II; denominator a2+b2a^2 + b^2.
  • • Any constant in vv is allowed: v=x2+12v = \frac{x^2 + 1}{2} for ∫xarctan⁡x dx\int x\arctan x\,dx.
  • • NEVER ∫fg dx=∫f dx⋅∫g dx\int fg\,dx = \int f\,dx \cdot \int g\,dx.

Frequently asked questions

How do I choose u and dv in integration by parts?

Take as u the factor that becomes simpler when you differentiate it, and as dv a factor you can integrate. Then judge the choice by the new integral: if the power of x went down or the logarithm disappeared, it was right; if the new integral is worse, swap the two. The LIATE order, logarithm, inverse trigonometric, algebraic, trigonometric, exponential, is a guide for u, not a law.

When can I use the tabular method for integration by parts?

When one factor is a polynomial, which you differentiate down to zero in the first column, and the other factor can be integrated again and again, like an exponential, a sine or a cosine. Multiply each derivative by the antiderivative one row below and alternate the signs plus, minus, plus. It is useless for a logarithm, whose derivatives never reach zero.

How do you integrate e to the x times sin x by parts?

Integrate by parts twice, keeping the sine family as u both times. The original integral comes back with a minus sign: I equals e to the x times sin x, minus e to the x times cos x, minus I. Move it to the left and divide by two: the answer is e to the x times the quantity sin x minus cos x, all over two, plus C.

How do I integrate ln x when there is only one factor?

Use integration by parts with u equal to ln x and dv equal to dx, so v equals x. The formula gives x ln x minus the integral of x times one over x, which is the integral of 1. The answer is x ln x minus x plus C. Differentiating it gives ln x plus one minus one, which confirms it. The same trick works for arctan x and arcsin x.

Practise it

Corrected exercises: Integration by parts, MATH 141 at McGill

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Previous sheet The substitution rule Next sheet Trigonometric integrals

See also

Looking for a MATH 141 tutor in Montreal?

Get in touch for a first session. Integration by parts is the first technique of the course where the method, not the table, earns the marks.

Site by Studio Squalli