Lecture 32 Integration Involving Logarithms
John Nakhoul
[email protected]
UNSW COLLEGE
2025
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
We wont be integrating ln(x) in this course: to do so requires
more knowledge of integration which we wont be developing.
There is however a class of functions which integrate to give
expressions involving logarithms.
The following is thy starter pack:
Integration involving logarithms
We have
Z
1
dx = ln |x| + C
x
Z
1 1
dx = ln |ax + b| + C
ax + b a
Z ′
f (x)
dx = ln |f (x)| + C
f (x)
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Okay so before we dive head first into mounds of computations,
let’s say something about the mathematical elephant in the room:
why on earth are there absolute values?
Great question! We already know from our previous efforts that
d 1
ln x = .
dx x
So that means Z
1
dx = ln x + C .
x
That’s all fine, but notice the above can only be true for x > 0,
because anything inside the logarithm needs to be positive.
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
What’s more broadly true though is
d 1
ln |x| = .
dx x
This is because if x < 0, then ln |x| = ln(−x) and so
d −1 1
ln(−x) = = .
dx −x x
This confirms the result that
Z
1
dx = ln |x| + C .
x
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example A
Evaluate the following indefinite integrals:
Z
3
1 dx
x
Z
dx
2
3x
3x 4 + 4x + 2
Z
3 dx
x2
Z
dx
4
3x + 1
Z
dx
5
(3x + 1)2
Z
x
6
2
dx
x +1
Z
sin x
7 dx
1 + cos x
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example A continued
e 3x
Z
8 dx
e 3x + 1
Z
9 cot x dx
6x 2
Z
10 dx
2x 3 − 8
6x 2
Z
11 √ dx
2x 3 − 8
Solution:
1 We have Z Z
3 1
dx = 3 dx = 3 ln |x| + C .
x x
1
2 Pulling out the gives
3
Z Z
1 1 1 1
dx = dx = ln |x| + C .
3x 3 x 3
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example A continued
3 Rearranging the fraction gives
3x 4 + 4x + 2 3x 4 4x
Z Z
2
dx = + 2 + 2 dx
x2 x2 x x
Z
4
= 3x 2 + + 2x −2 dx
x
= x 3 + 4 ln |x| − 2x −1 + C .
4 Using the second result on integration involving logs gives
Z
1 1
dx = ln |3x + 1| + C .
3x + 1 3
5 This actually requires use of
(ax + b)n+1
Z
(ax + b)n dx = +C
a(n + 1)
which is one of the first integration results we encountered.
John Nakhoul
[email protected] Lecture 32 Integration Involving Logarithms
Example A continued
We have
(3x + 1)−1
Z Z
1 −2 1
2
dx = (3x+1) dx = +C = − +C .
(3x + 1) 3 × −1 3(3x + 1)
6 Here the denominator is x 2 + 1 whilst the numerator is x. So
we’re not quite in the situation where
Z ′
f (x)
dx = ln |f (x)| + C
f (x)
can be used. With a bit of manipulation though we most
certainly can be :
Z Z
x 1 2x
2
dx = 2
dx
x +1 2 x +1
1
= ln(x 2 + 1) + C .
2
John Nakhoul
[email protected] Lecture 32 Integration Involving Logarithms
Example A continued
7 We have
− sin x
Z Z
sin x
dx = − = − ln |1 + cos x| + C .
1 + cos x 1 + cos x
8 Here we again need to manipulate the expression inside the
integral before applying the reverse chain rule:
e 3x 3e 3x
Z Z
1 1
3x
dx = 3x
= ln(e 3x + 1) + C .
e +1 3 e +1 3
9 Rewriting cotangent as a quotient of cosine by sine yields
Z Z
cos x
cot x dx = dx = ln | sin x| + C .
sin x
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example A continued
10 Quite happily the expression inside the integration is already
f ′ (x)
of the form with f (x) = 2x 3 − 8. Therefore
f (x)
6x 2
Z
= ln |2x 3 − 8| + C .
2x 3 − 8
11 This one requires use of the bracket form reverse chain rule:
we have
6x 2
Z Z
1
√ dx = 6x 2 (2x 3 − 8)− 2 dx
3
2x − 8
1
(2x 3 − 8) 2
= +C
( 21 )
p
= 2 2x 3 − 8 + C .
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Exercise A
1 1 1
1 Show that = − .
(x + 3)(x + 4) x +3 x +4
Z
dx
2 Hence compute .
(x + 3)(x + 4)
Next we should try working out some definite integrals.
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example B
Evaluate the following definite integrals:
Z 6
dx
1
1 7 −x
Z e2
2
2 dx
e x
Z π
4
3 tan x dx
0
π
sec2 x
Z
3
4 dx
π 1 + tan x
4
1 2
Z 7
√
5 x+√
1 x
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example B continued
Solution: Z
1 1
1 Using dx = ln |ax + b| + C , we have
ax + b a
Z 6 6
dx
= − ln |7 − x|
1 7−x 1
= − ln 1 + ln 6
= ln 6.
2 Here we have
Z e2 Z e2
2 1
dx = 2 dx
e x e x
e 2
= 2 ln |x|
e
2
= 2 ln |e | − ln |e|
= 3.
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example B continued
3 Rewriting the tan function as a quotient of sine by cosine gives
Z π Z π
4 4 sin x
tan xdx = dx
0 0 cos x
π
− sin x
Z
4
=− dx
0 cos x
π
4
= − ln | cos x|
0
π
= −(ln | cos | − ln | cos 0|)
4
1
= − ln √
2
ln 2
= .
2
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example B continued
4 We have
Z π π
sec2 x
3 3
dx = ln |1 + tan x|
π 1 + tan x π
4 4
π π
= ln(|1 + tan |) − ln(|1 + tan |)
3 4
√ !
1+ 3
= ln .
2
5 Expanding the expression inside the integration symbol leads
to
1 2
Z 7 Z 7
√
1
x+√ dx = x + 2 + dx
1 x 1 x
2 7
x
= + 2x + ln |x|
2 1
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example B continued
49 1
= + 14 + ln 7 − + 2 + ln 1
2 2
= 36 + ln 7.
We can now calculate the area under hyperbolic functions.
Example C
1
Find the area bounded by the curve y = and
x
1 the lines x = 1 and x = e
2 the lines x = −e and x = −1
Solution:
1 Here is a sketch of the function with the relevant area shaded.
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Example C continued
y 1
y=
x
x
1 e
The area is given by
Z e e
1
dx = ln |x| = ln |e| − ln |1| = 1.
1 x 1
John Nakhoul
[email protected] Lecture 32 Integration Involving Logarithms
Example C continued
2 .
y 1
y=
x
−e −1
x
Here the area is given by
Z −1 −1
1
dx = ln |x| = ln | − 1| − ln | − e| = 1.
−e x −e
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms
Exercise B
Z e+1
x +7
1 Show that dx = e + 7.
2 x −1
d ln x 1 − ln x
2 Show that = and hence evaluate
Z e dx x x2
ln x
2
dx.
1 x
John Nakhoul [email protected] Lecture 32 Integration Involving Logarithms