8.2 Differentiation of Logarithmic Functions

Derivative of y = logb x

Let y = logb x.
Let δx be a small increasement in x and δy be corresponding small increasement in y.
Then
y + δy = logb (x + δx)
δy = logb (x + δx) - logb x
= logb x + δx x
δy δx = 1 δx logb x + δx x
= logb ( x + δx x ) 1 δx
= logb (1 + δx x ) 1 δx

Let δx x = t, then 1 δx = 1 xt.
δy δx = logb (1 + t)1 xt
= 1 xlogb (1 + t) 1 t

When δx → 0, so t → 0. Then
$$\small{ \frac{dy}{dx} = \lim_{\delta x \rightarrow 0} \frac{\delta y}{\delta x} }$$ $$\small{ = \frac{1}{x} \lim_{t \to 0} log_b (1 + t)^{\frac{1}{t}} }$$ $$\small{ = \frac{1}{x} log_b (\lim_{t \to 0} (1 + t)^{\frac{1}{t}}) } $$
The following table shows
$$\small{ \lim_{t\to 0}(1 + t)^{\frac{1}{t}} = ? }$$
fig 8.2-1

The above table shows that (1 + t)1t → 2.7183 as t → 0.
This limit value is denoted by e which is called the exponential number.
In fact, e is an irrational number.
Therefore,
dydx = 1x logb e
ddx logb x = 1x logb e

If u(x) > 0 is a function of x,

ddx logb u(x) = 1u(x) ⋅ logb eddx u(x)
Logarithm of x to the base e is called natural or Napierian Logarithm and denote loge x = ln x.
Since
ddx logb x = 1x logb e
ddx loge x = 1x loge e
ddx ln x = 1x
In general
ddx ln u(x) = 1u(x)dudx
Example 3.
Differentiate the following functions with respect to x
(a) log10 x3
(b) log2 x3
(c) ln x3
$$\small{ \text{(d)} \,\, \text{ln}\, \sqrt{x^2 + 5} }$$ (e) ln sin 2x
(f) ln x log10 x
$$\small{ \text{(g)} \,\, \text{ln}\, \frac{x}{\sqrt{x^2 + 2} } }$$ (h) x2 log10 x
Solution
(a) log10 x3
d dx log10 x3 = 1 x3 log10 e d dx x3
= 1 x3 log10 e . 3x2
= 1 x . x2 . 3x2 log10 e
= 3 x log10 e .


(b) log2 x3
d dx log2 x3 = 1 x3 log2 e d dx x3
= 1 x3 log2 e . 3x2
= 1 x . x2 . 3x2 log2 e
= 3 x. log2 e .

(c) x2 log10 x
d dx x2 log10 x = log10 x. d dx x2 - x2. d dx log10 x (log10 x)2
= log10 x . 2x - x2 . 1 x . log10 e (log10 x)2
= 2x.log10 x - x . log10 e (log10 x)2


(d) ln x3
d dx ln x3 = 1 x3 d dx x3
= 1 x3 . 3x2
= 1 x . x2 . 3x2
= 3 x


$$\small{ \text{(d)} \,\, \text{ln}\, \sqrt{x^2 + 5} }$$ $$\small{ \frac{d}{dx}\, \text{ln}\, \sqrt{x^2 + 5} = \frac{1}{\sqrt{x^2 + 5}} \sdot \, \frac{d}{dx} \sqrt{x^2 + 5}}$$ $$\small{ = \frac{1}{\sqrt{x^2 + 5}} \sdot \frac{d}{dx} (x^2 + 5)^{\frac{1}{2} } } $$ $$\small{ = \frac{1}{\sqrt{x^2 + 5}} \sdot \frac{1}{2} (x^2 + 5)^{- \frac{1}{2}} \sdot \frac{d}{dx} (x^2 + 5) } $$ $$\small{ = \frac{1}{\sqrt{x^2 + 5}} \sdot \frac{1}{\cancel{2}} (x^2 + 5)^{- \frac{1}{2}} \sdot \cancel{2}x } $$ $$\small{ = \frac{1}{\sqrt{x^2 + 5}} \sdot \frac{1}{(x^2 + 5)^{\frac{1}{2} }} \sdot x } $$ $$\small{ = \frac{x}{\sqrt{x^2 + 5} \sdot \sqrt{x^2 + 5}} } $$ $$\small{ = \frac{x}{x^2 + 5} } $$
(e) ln sin 2x
d dx ln sin 2x = 1 sin 2x. d dx sin 2x
= 1 sin 2x . cos 2x d dx2x
= 1 sin 2x . 2 cos 2x
= 2 cos 2x sin 2x
= 2 cot 2x (∵ cos θ sin θ = cot θ)


(f) ln x.log10 x
d dx ln x.log10 x = ln x d dx log10 x + log10 x d dx ln x
= ln x 1 x log10 e + log10 x . 1 x


$$\small{ \text{(g)} \,\, \text{ln}\, \frac{x}{\sqrt{x^2 + 2} } }$$ $$\small{ \frac{d}{dx}\, \text{ln}\, \frac{x}{\sqrt{x^2 + 2}}= \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{d}{dx} \frac{x}{\sqrt{x^2 + 2}}}$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} \,\frac{dx}{dx} - x\, \frac{d}{dx}\, \sqrt{x^2 + 2}}{(\sqrt{x^2 + 2})^2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} \,\frac{dx}{dx} - x\, \frac{d}{dx}\, (x^2 + 2)^{\frac{1}{2}}}{(\sqrt{x^2 + 2})^2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} \sdot 1 - x\sdot \frac{1}{2}\, (x^2 + 2)^{- \frac{1}{2}} \sdot \frac{d}{dx} (x^2 + 2)}{x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} - x\sdot \frac{1}{\cancel{2}}\, (x^2 + 2)^{- \frac{1}{2}} \sdot \cancel{2}x}{x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} - \frac{x \sdot x}{(x^2 + 2)^{\frac{1}{2}} } } {x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\sqrt{x^2 + 2} - \frac{x^2}{\sqrt{x^2 + 2} } } {x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{\frac{\sqrt{x^2 + 2} \,\sdot\, \sqrt{x^2 + 2} }{\sqrt{x^2 + 2}} - \frac{x^2}{\sqrt{x^2 + 2} } } {x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{ \frac{x^2 + 2 - x^2}{\sqrt{x^2 + 2} } } {x^2 + 2} }$$ $$\small{ = \frac{\sqrt{x^2 + 2}}{x} \sdot \frac{ \frac{2}{\sqrt{x^2 + 2} } } {x^2 + 2} }$$ $$\small{ = \frac{\cancel{\sqrt{x^2 + 2}}}{x} \sdot \frac{ 2 } {x^2 + 2 \sdot \cancel{\sqrt{x^2 + 2}}} }$$ $$\small{= \frac{2}{x(x^2 + 2)} }$$
(h) x2 log10 x
d dx x2 log10 x = log10 x. d dx x2 - x2. d dx log10 x (log10 x)2
= log10 x . 2x - x2 . 1 x . log10 e (log10 x)2
= 2x.log10 x - x . log10 e (log10 x)2


Logarithmic Differentiation: The derivative of positive functions can be found by taking the natural logarithm of both sides before differentiating as in the following examples.

Example 4.
$$ \small{ \text{find} \, \frac{dy}{dx} \, \text{if} \, y = \sqrt{(x^2 + 1) (x - 1)^2} } $$ Solution
$$ \small{ y = \sqrt{(x^2 + 1) (x - 1)^2} } $$ $$ \small{ \text{ln} \, y = \text{ln} \,\sqrt{(x^2 + 1) (x - 1)^2} } $$ $$ \small{= \frac{1}{2}\, (\text{ln}\, (x^2 + 1) (x - 1)^2) } $$ $$ \small{\frac{d}{dx} \, \text{ln}\, y = \frac{d}{dx}\, (\frac{1}{2}\, (\text{ln}\, (x^2 + 1) (x - 1)^2)) } $$ $$ \small{ \frac{1}{y} \frac{dy}{dx} = \frac{1}{2}(\frac{1}{x^2 + 1} \, \sdot 2x \, + \, \frac{1}{(x - 1)^2}\sdot 2(x - 1)) } $$ $$ \small{ = \frac{x}{x^2 + 1} + \frac{2}{x - 1} }$$ $$ \small{ \frac{dy}{dx} = y(\frac{x}{x^2 + 1} + \frac{2}{x - 1}) }$$ $$ \small{ = \sqrt{(x^2 + 1) (x - 1)^2} \, (\frac{x}{x^2 + 1} + \frac{2}{x - 1}) } $$
Example 5
Find dy dx if $$\small{ y = \frac{x\,sin \,x}{\sqrt{sec\, x}}} , \, \, \, \, 0 \lt x \lt \frac{\pi}{2}. $$ Solution
$$\small{ y = \frac{x\,sin\, x}{\sqrt{sec\, x}}} , \, \, \, \, 0 \lt x \lt \frac{\pi}{2}. $$ $$\small{ \text{ln} \, y = \text{ln} (\frac{x \, sin\, x}{\sqrt{sec\, x}}) }$$ = ln x + ln sin x - 12 ln sex x
ddx ln y = ddx(ln x + ln sin x - 12 ln sec x)
1y dydx = 1x + 1sin x ⋅ cos x - 12 1 sec x ⋅ sec x ⋅ tan x
= 1x + cot x - 12 tan x
ddx = y(1x + cot x - 12 tan x)
$$\small{ = \frac{x \, sin \, x}{\sqrt{sec \, x}} (\frac{1}{x} \, + \, cot \, x \, - \, \frac{1}{2} \, tan \, x) }$$

Exercise 8.2
1. Differentiate the following functions with respect to x.

(a) ln (2x2 + 3)
Solution
ddx ln (2x2 + 3) = 12x2 + 3 ddx (2x2 + 3)
= 12x2 + 3 ⋅ 4x
= 4x2x2 + 3

(b) ln |x|
Solution
For x > 0,
ddx ln |x| = ddx ln x
= 1x,         x ≠ 0

For x < 0,
ddx ln |x| = ddx ln (-x)
= 1- x ddx (- x)
= 1- x ⋅ (-1)
= 1x ,         x ≠ 0

(c) x2 log2 x
Solution
d dx x2 log2 x = x2d dx log2 x + log2 x d dx x2
= x21 x log2 e + log2 x ⋅ 2x
= x ⋅ log2 e + 2x ⋅ log2 x

(d) sin 3x ⋅ log10 (x + 1)
Solution
d dx sin 3x ⋅ log10 (x + 1) = sin 3x d dx log10 (x + 1) + log10 (x + 1) d dx sin 3x
= sin 3x1 x + 1 ⋅ log10 e + log10 (x + 1) cos 3x d dx 3x
= sin 3x x + 1 ⋅ log10 e + log10 (x + 1) ⋅ cos 3x⋅3
= sin 3x x + 1 ⋅ log10 e + log10 (x + 1) ⋅ 3 cos 3x

$$\small{ \text{(e)}\,\, \text{ln}\, \sqrt{5x - 4}}$$ Solution
$$\small{ \frac{d}{dx} \text{ln}\, \sqrt{5x - 4} = \frac{1}{\sqrt{5x - 4} }\frac{d}{dx} (5x - 4)^{\frac{1}{2}} }$$ $$\small{ = \frac{1}{\sqrt{5x - 4} }\sdot \frac{1}{2} (5x - 4)^{-\frac{1}{2}}\sdot \frac{d}{dx} (5x - 4) }$$ $$\small{ = \frac{1}{\sqrt{5x - 4} }\sdot\frac{1}{2}\sdot \frac{1}{(5x - 4)^{\frac{1}{2}}}\sdot 5 }$$ $$\small{ = \frac{1}{\sqrt{5x - 4} }\sdot\frac{1}{2} \sdot \frac{5}{\sqrt{5x - 4}} }$$ $$\small{ = \frac{1}{2}\sdot\frac{5}{5x - 4} }$$
(f) ln (ln x)
Solution
ddx ln (ln x) = 1ln x ddx ln x
= 1ln x1x

2. Use logarithmic differentiation to find the derivative of y with respect to x.
$$\small{ \text{(a)}\,\, \sqrt{x(x + 1)} }$$ Solution
$$\small{ y = \sqrt{x(x + 1)} }$$ $$\small{ ln \, y = ln \, \sqrt{x(x + 1)} = ln\, [x (x + 1)]^{\frac{1}{2}}}$$ $$\small{ = \frac{1}{2} \,[ln \, x + ln \, (x + 1)] }$$ $$\small{ \frac{d}{dx}\,ln \, y = \frac{d}{dx} \,\frac{1}{2}\, [ln \,x + ln\,(x + 1)] }$$ $$\small{ \frac{1}{y} \,\frac{dy}{dx} = \frac{1}{2} \,[\frac{1}{x} \,+\, \frac{1}{x + 1}] }$$ $$\small{ \frac{dy}{dx} = \frac{1}{2} \sdot y \,\sdot \, \frac{1 \sdot (x + 1)}{x (x + 1)}\,+\, \frac{1\sdot x}{x(x + 1)} }$$ $$\small{ = \frac{1}{2} \sdot\,\sqrt{x(x + 1)} \,\sdot \,\frac{x + 1 + x}{x(x + 1)} }$$ $$\small{ = \frac{1}{2} \sdot\,\cancel{\sqrt{x(x + 1)}} \,\sdot \,\frac{2x + 1}{\cancel{\sqrt{x(x + 1)}} \, \sqrt{x(x + 2)}} }$$ $$\small{ = \frac{2x + 1}{2\, \sqrt{x (x + 1)}} }$$
(b) y = x(x + 1) (x + 2)
Solution
y = x(x + 1) (x + 2)
ln y = ln [x(x + 1) (x + 2)]
ln y = ln x + ln (x + 1) + ln (x + 2)
ddx ln y = ddx [ln x + ln (x + 1) + ln (x + 2)]
1y dydx = 1x + 1x + 1 + 1x + 2
dydx = y[ 1x + 1x + 1 + 1x + 2]
dydx = y[ 1⋅(x + 1)(x + 2)x(x + 1)(x + 2) + 1⋅x(x + 2)x(x + 1)(x + 2) + 1⋅x(x + 1)x(x + 1)(x + 2)]
dydx = y[ x2 + 3x + 2x(x + 1)(x + 2) + x2 + 2x x(x + 1)(x + 2) + x2 + xx(x + 1)(x + 2)]
= yx2 + 3x + 2   +   x2 + 2x   +   x2 + x x(x + 1)(x + 2)
= y3x2 + 6x + 2 x(x + 1)(x + 2)
= x(x + 1)(x + 2) ⋅ 3x2 + 6x + 2 x(x + 1)(x + 2)
= 3x2 + 6x + 2

$$\small{\text{(c)}\,\, y = \frac{x\sqrt{x^2 + 1}}{(x + 1)^{\frac{2}{3}} } }$$ Solution
$$\small{ y = \frac{x\sqrt{x^2 + 1}}{(x + 1)^{\frac{2}{3}} } }$$ $$\small{\text{ln}\, y = \text{ln}\, \frac{x\sqrt{x^2 + 1}}{(x + 1)^{\frac{2}{3}} } }$$ $$\small{ = \text{ln}\, x + \text{ln}\,\sqrt{x^2 + 1} - \text{ln}\, (x + 1)^{\frac{2}{3}} }$$ $$\small{ = \text{ln}\, x + \frac{1}{2}\, \text{ln}\,(x^2 + 1) - \frac{2}{3}\, \text{ln}\, (x + 1) }$$ Differentiating with respect to x.
$$\small{\frac{d}{dx}\, \text{ln}\, y = \frac{d}{dx}\, [ \text{ln}\, x + \frac{1}{2}\, \text{ln}\,(x^2 + 1) - \frac{2}{3}\, \text{ln}\, (x + 1)] }$$ $$\small{\frac{1}{y}\, \frac{dy}{dx} = \frac{1}{x} + \frac{1}{2}\, \frac{1}{x^2 + 1}\, \frac{d}{dx}(x^2 + 1) - \frac{2}{3}\, \frac{1}{x + 1} }$$ $$\small{\frac{1}{y}\, \frac{dy}{dx} = \frac{1}{x} + \frac{1}{\cancel{2}}\, \frac{1}{x^2 + 1}\sdot \cancel{2}x - \frac{2}{3}\, \frac{1}{x + 1} }$$ $$\small{ \frac{dy}{dx} = y \, [\frac{1}{x} + \, \frac{x}{x^2 + 1}\, - \, \frac{2}{3(x + 1)}] }$$ $$\small{ = \frac{x\sqrt{x^2 + 1}}{(x + 1)^{\frac{2}{3}} } \, [\frac{1}{x} + \, \frac{x}{x^2 + 1}\, - \, \frac{2}{3(x + 1)}] }$$