You are on page 1of 9

Cambridge Physics PhD Tutor IB DSE IGCSE SAT

hinwahk@gmail.com
UC Math MA, HKU Chemist 93197825 AP MCAT GCE
HKU 1st Hons Engineer

Integration by parts
Suppose u and v are functions of x.
(u ( x)v( x) )' = u ' ( x)v( x) + u ( x)v' ( x) (product rule)
 u ' ( x)v( x) = (u ( x)v( x) )'−u ( x)v' ( x).
Now, integrate on both sides:

 u ' ( x)v( x)dx =  (u ( x)v( x))' dx −  u ( x)v' ( x)dx

 u ' ( x)v( x)dx = u ( x)v( x) −  u ( x)v' ( x)dx.

 vdu = uv −  udv
The formula above is the formula for integration by parts.
With the alternative notation for the derivative,
du ( x) dv( x)
 dx
v( x)dx = u ( x)v( x) − 
dx
u ( x)dx.

Mainly 3 Types
1) Product of 2 completely different functions (exponential, polynomial, trigonometric,
logarithmic)
2) Inverse function
3) Logarithmic function

Example 1. Evaluate the integral ∫ 𝒙𝒆𝒙 𝒅𝒙.


Solution.
Let 𝑢 = 𝑥, 𝑑𝑣 = 𝑒 𝑥 𝑑𝑥.

Then ∫ 𝑢𝑑𝑣 = 𝑢𝑣 − ∫ 𝑣𝑑𝑢,

Using the integration by parts formula

∫ 𝑥𝑒 𝑥 𝑑𝑥 = 𝑥(𝑒 𝑥 ) − ∫ (𝑒 𝑥 )𝑑𝑥 = 𝑥𝑒 𝑥 − ∫ 𝑒 𝑥 𝑑𝑥 = 𝑥𝑒 𝑥 − 𝑒 𝑥 + 𝐶 = 𝑒 𝑥 (𝑥 − 1) + 𝐶.
Example 2 Evaluate  x sin( x)dx .

 x sin( x)dx =  xd cos( x) = − x cos( x) −  (−1  cos( x))dx = − x cos( x) + sin( x) + C


x2 1
  x sin( x)dx = sin( x) −  x 2 cos(x)dx.
2 2

Example 3 Evaluate  x ln (x )dx


2

2 1 3 1 3
 3 x3

x3 1 x3 x2 x3 x3
 x ln(x)dx = 3  ln(x)dx = 3 ln(x)x −  x d ln(x) = 3 ln(x) −  3 x dx  3 ln(x) −  3 dx  3 ln(x) − 9 + C

 sin (x )dx
−1
Example 4 Evaluate

 sin (x )dx = x sin (x ) −  xd sin (x ) = x sin (x ) − 


−1 −1 −1 −1 xdx
1 − x2
dx 2
= x sin −1 (x ) −
1
2  1 − x2
1 d (1 − x 2 )
= x sin (x ) + 
−1
.
2 1 − x2
1
− +1
1 (1 − x 2 ) 2
= x sin −1 (x ) + +C
2 − 1 +1
2
= x sin −1 (x ) + 1 − x 2 + C

 sin (x)dx = x sin (x) +


−1 −1
1− x2 + C
Example 5. Find the integral ∫ 𝐚𝐫𝐜𝐭𝐚𝐧⁡ 𝒙𝒅𝒙.

Solution.

let

𝑢 = arctan 𝑥 , 𝑑𝑣 = 𝑑𝑥.

Then

𝑑𝑥
𝑑𝑢 = , 𝑣 = 𝑥,
1 + 𝑥2

and

𝑥𝑑𝑥
𝐼 = arctan ∫ 𝑥𝑑𝑥 = xarctan 𝑥 − ∫ .
1 + 𝑥2

We use integration by substitution to find the last integral:

𝑑𝑡
𝑡 = 𝑥 2 + 1, ⇒ 𝑑𝑡 = 2𝑥𝑑𝑥, ⇒ 𝑥𝑑𝑥 = ,
2

so

𝑑𝑡
𝑥𝑑𝑥 2 = 1 ∫ 𝑑𝑡 = 1 ln|𝑡| = 1 ln|1 + 𝑥 2 | = 1 ln(1 + 𝑥 2 ).
∫ = ∫
1 + 𝑥2 𝑡 2 𝑡 2 2 2

Hence, the original integral is given by

1
𝐼 = 𝑥arctan⁡ 𝑥 − ln⁡(1 + 𝑥 2 ) + 𝐶.
2

Example 6 Evaluate  ln (x )dx


 ln (x )dx
= x ln (x ) −  xd ln( x) =x ln (x ) −  x dx = x ln (x ) −  dx
1
x
= x ln (x ) − x + C
Example 7. Integrate ∫ 𝒙𝐜𝐬𝐜 𝟐 𝒙𝒅𝒙 by parts.

Solution.

We can choose u=x because du=dx is simpler. Then

𝑑𝑥
𝑑𝑣 = csc 2 𝑥𝑑𝑥 = ,
sin2 𝑥

so we can easily integrate it and find the function v:

𝑑𝑥
𝑣 = ∫ 𝑑𝑣 = ∫ = −cot⁡ 𝑥.
sin2 𝑥

Apply the integration by parts formula:

∫ 𝑢𝑑𝑣 = 𝑢𝑣 − ∫ 𝑣𝑑𝑢, ⇒ ∫ 𝑥 csc 2 𝑥𝑑𝑥 = 𝑥 (−cot⁡ 𝑥) − ∫ (−cot⁡ 𝑥)𝑑𝑥 = −𝑥cot⁡ 𝑥 + ∫ cot⁡ 𝑥𝑑𝑥.
⏟ ⏟ ⏟ ⏟ ⏟ ⏟
𝑢 𝑑𝑣 𝑢 𝑣 𝑣 𝑑𝑢

The last integral is well known:

∫ cot⁡ 𝑥𝑑𝑥 = ln⁡ | sin 𝑥 | + 𝐶.

Hence

∫ 𝑥csc 2 𝑥𝑑𝑥 = −𝑥cot⁡ 𝑥 + ln | sin 𝑥 | + 𝐶.

Shortcut
∫ 𝑥csc 2 𝑥𝑑𝑥 = −∫ 𝑥𝑑cot⁡𝑥
= −𝑥 cot 𝑥 + ∫ cot 𝑥 𝑑𝑥
cos 𝑥
= −𝑥 cot 𝑥 + ∫ 𝑑𝑥
sin 𝑥
1
= −𝑥 cot 𝑥 + ∫ 𝑑 sin 𝑥
sin 𝑥
= −𝑥cot⁡ 𝑥 + ln | sin 𝑥 | + 𝐶.
Example 8. Evaluate the integral ∫
𝐥𝐧 𝒙
𝒙𝟐
𝒅𝒙.

Solution.

𝑑𝑥
𝑢 = ln 𝑥 , 𝑑𝑣 = .
𝑥2

Then

𝑑𝑥 𝑑𝑥 1
𝑑𝑢 = ,𝑣 = ∫ 2 = − .
𝑥 𝑥 𝑥

Integrating by parts, we obtain

ln 𝑥 1 1 𝑑𝑥 ln 𝑥 𝑑𝑥 ln 𝑥 1
∫ 2
𝑑𝑥 = ln 𝑥 ⋅ (− ) − ∫ (− ) =− +∫ 2 =− − + 𝐶.
𝑥 𝑥 𝑥 𝑥 𝑥 𝑥 𝑥 𝑥

Example 9. Evaluate the integral ∫ 𝐥𝐨𝐠 𝟐 𝒙𝒅𝒙.

Solution.

To use integration by parts we rewrite the integral as follows:

∫ log 2 𝑥𝑑𝑥 = ∫ 1 ⋅ log 2 𝑥𝑑𝑥

𝑢 = log 2 𝑥, 𝑑𝑣 = 1𝑑𝑥.

This yields

𝑑𝑥
𝑑𝑢 = , 𝑣 = ∫ 1𝑑𝑥 = 𝑥.
xln 2

Integrating by parts, we have

𝑑𝑥 1 𝑥
∫ log 2 𝑥𝑑𝑥 = 𝑥log 2 𝑥 − ∫ 𝑥 ⋅ = 𝑥log 2 𝑥 − ∫ 𝑑𝑥 = 𝑥log 2 𝑥 − + 𝐶.
xln 2 ln 2 ln 2
Example 10. Compute the integral ∫ 𝒙𝟐𝒙 𝒅𝒙.

Solution.
Let
𝑢 = 𝑥, 𝑑𝑣 = 2𝑥 𝑑𝑥.
Then
2𝑥
𝑑𝑢 = 𝑑𝑥, 𝑣 = ∫ 2𝑥 𝑑𝑥 = .
ln 2
This yields:
𝑥2𝑥 2𝑥 𝑥2𝑥 1 𝑥2𝑥 1 2𝑥 𝑥2𝑥 2𝑥
∫ 𝑥2𝑥 𝑑𝑥 = −∫ 𝑑𝑥 = − ∫ 2𝑥 𝑑𝑥 = − ⋅ +𝐶 = − +𝐶
ln 2 ln 2 ln 2 ln 2 ln 2 ln 2 ln 2 ln 2 (ln 2)2
2𝑥 1
= (𝑥 − ) + 𝐶.
ln 2 ln 2

Example 11. Compute the integral ∫ 𝒙𝟐 𝒆𝒙 𝒅𝒙.

Solution.
Let
𝑢 = 𝑥 2 , 𝑑𝑣 = 𝑒 𝑥 𝑑𝑥.
Then
𝑑𝑢 = 2𝑥𝑑𝑥, 𝑣 = ∫ 𝑒 𝑥 𝑑𝑥 = 𝑒 𝑥 ,
The integral is written as
∫ 𝑥 2 𝑒 𝑥 𝑑𝑥 = 𝑥 2 𝑒 𝑥 − ∫ 2𝑥𝑒 𝑥 𝑑𝑥 = 𝑥 2 𝑒 𝑥 − 2∫ 𝑥𝑒 𝑥 𝑑𝑥.
We calculate the last integral by repeated integration by parts. Choosing
𝑢 = 𝑥, 𝑑𝑣 = 𝑒 𝑥 𝑑𝑥,
we obtain
𝑑𝑢 = 𝑑𝑥, 𝑣 = ∫ 𝑒 𝑥 𝑑𝑥 = 𝑒 𝑥 ,
so
∫ 𝑥 2 𝑒 𝑥 𝑑𝑥 = 𝑥 2 𝑒 𝑥 − 2∫ 𝑥𝑒 𝑥 𝑑𝑥 = 𝑥 2 𝑒 𝑥 − 2(𝑥𝑒 𝑥 − ∫ 𝑒 𝑥 𝑑𝑥) = 𝑥 2 𝑒 𝑥 − 2(𝑥𝑒 𝑥 − 𝑒 𝑥 ) + 𝐶
= 𝑥 2 𝑒 𝑥 − 2𝑥𝑒 𝑥 + 2𝑒 𝑥 + 𝐶 = 𝑒 𝑥 (𝑥 2 − 2𝑥 + 2) + 𝐶.
HKDSE M2 Sample Question:

(a) Using integration by parts, find  x cos x dx .

(b) The inner surface of a container is formed by revolving the curve y = −cos x (for 0  x  ) about the
y-axis. Find the capacity of the container.

(6 marks)
Solution: (a)

 x cos x dx =  xd (sin x)
= x sin x −  sin xd x
= x sin x + cos x + C

(b) Using shell method, capacity is



2  rh dr
0

= 2  x[1 - (-cosx)]dx
0

= 2  (x + xcosx)dx
0
 
= 2   xdx +  xcosxdx 
 0 0 

 x2 
= 2  + x sin x + cos x 
2 0
=  ( 2 − 4)
An Integrand Involving a Quotient
xe x dx
Example 12:  (x + 1)2
Method 1: Method 2:
xe x dx 𝑒 x 𝑑𝑥 𝑒 x 𝑑𝑥
x  1 
xe x dx
 (x + 1)2 = − xe d  x + 1   (x + 1)2 =∫ x+1 −∫(x+1)2

=−
xe x
x +1
+
1
x +1
d xe x ( ) 𝑑𝑒 x 𝑒 x 𝑑𝑥
=∫x+1 −∫(x+1)2
xe x
xe x + e x
=− + dx 𝑒x 1
=x+1 −∫𝑒 x 𝑑 (𝑥+1) −∫(x+1)2
𝑒 x 𝑑𝑥
x +1 x +1
xe x ( x + 1)e x
=− + dx 𝑒x 𝑒 x 𝑑𝑥 𝑒 x 𝑑𝑥
x +1 x +1 =x+1 +∫(x+1)2 −∫(x+1)2
xe x
=− +  e x dx
x +1 𝑒x
=x+1 + 𝐾
xe x
=− + ex + C
x +1

𝑒x
=x+1 + 𝐾

Repeated Application of Integration by Parts


Example 13 Evaluate x
2
sin (x )dx

Let u = x 2  du = 2 xdx
Let dv = sin (x )dx  v = − cos(x )

Then x
2
sin ( x )dx = − x 2 cos( x ) +  2 x cos( x )dx = − x 2 cos( x ) + 2  x cos( x )dx

Apply integration by parts again on 2  x cos( x )dx .

Let u = x  du = dx
Let dv = cos(x )dx  v = sin (x )

Then  x cos(x )dx = x sin (x ) −  sin (x )dx = x sin (x ) + cos(x )

Thus x
2
sin (x )dx = − x 2 cos(x ) + 2 x sin (x ) + 2 cos(x ) + C
Example 14. Find a reduction formula for ∫ sin𝑛 𝑥𝑑𝑥,

Solution.

We apply integration by parts: = 𝑢𝑣 − ∫ 𝑣𝑑𝑢. Let 𝑢 = sin𝑛−1 𝑥, Then

Then

𝑑
𝑑𝑢 = sin𝑛−1 𝑥 = (𝑛 − 1)sin𝑛−2 xcos 𝑥𝑑𝑥 , 𝑣 = sin ∫ 𝑥𝑑𝑥 = − cos 𝑥.
𝑑𝑥

Hence,

∫ sin𝑛 𝑥𝑑𝑥 = − cos 𝑥sin𝑛−1 𝑥 − (− cos 𝑥)(𝑛 − 1)sin𝑛−2 xcos ∫ 𝑥𝑑𝑥


= − cos 𝑥sin𝑛−1 𝑥 − ∫ (𝑛 − 1)sin𝑛−2 𝑥cos 2 𝑥𝑑𝑥
= − cos 𝑥sin𝑛−1 𝑥 + ∫ (𝑛 − 1)sin𝑛−2 𝑥 (1 − sin2 𝑥)𝑑𝑥
= − cos 𝑥sin𝑛−1 𝑥 + (𝑛 − 1)∫ sin𝑛−2 𝑥𝑑𝑥 − (𝑛 − 1)∫ sin𝑛 𝑥𝑑𝑥.

Solve the equation for ∫ sin𝑛 𝑥𝑑𝑥.

As a result, we obtain

∫ sin𝑛 𝑥𝑑𝑥 + (𝑛 − 1)∫ sin𝑛 𝑥𝑑𝑥 = −cos⁡ 𝑥sin𝑛−1 𝑥 + (𝑛 − 1)∫ sin𝑛−2 𝑥𝑑𝑥, ⇒ 𝑛∫ sin𝑛 𝑥𝑑𝑥
= (𝑛 − 1)∫ sin𝑛−2 𝑥𝑑𝑥 − cos⁡ 𝑥sin𝑛−1 𝑥, ⇒ ∫ sin𝑛 𝑥𝑑𝑥
𝑛−1 𝑛−2
cos⁡ 𝑥sin𝑛−1 𝑥
= ∫ sin 𝑥𝑑𝑥 − .
𝑛 𝑛

You might also like