by M. Bourne
Later On this Page
Derivative of y = ln x
Derivative of a log of a function
Derivative of logs with base other than e
First, let's look at a graph of the log function with base e, that is:
f(x) = log_{e}(x) (usually written "ln x").
The tangent at x = 2 is included on the graph.
The graph of `y=ln(x)` showing the tangent at `x=2.`
The slope of the tangent of y = ln x at `x = 2` is `1/2`. (We can observe this from the graph, by looking at the ratio rise/run).
If y = ln x,
`x`  1  2  3  4  5 

slope of graph  `1`  `1/2`  `1/3`  `1/4`  `1/5` 
`1/x`  `1`  `1/2`  `1/3`  `1/4`  `1/5` 
We see that the slope of the graph for each value of x is equal to `1/x`. This works for any positive value of x (we cannot have the logarithm of a negative number, of course).
If we did many more examples, we could conclude that the derivative of the logarithm function y = ln x is
`dy/dx = 1/x`
Note 1: Actually, this result comes from first principles.
Note 2: We are using logarithms with base e. If you need a reminder about log functions, check out Log base e from before.
Derivative of the Logarithm Function y = ln x
The derivative of the logarithmic function y = ln x is given by:
`d/(dx)(ln\ x)=1/x`
You will see it written in a few other ways as well. The following are equivalent:
`d/(dx)log_ex=1/x`
If y = ln x, then `(dy)/(dx)=1/x`
We now show where the formula for the derivative of `log_e x` comes from, using first principles.
Proof of formula
For this proof, we'll need the following background mathematics.
First principles formula for the derivative of a function `f(x)`, that is:
`(df)/(dx) = lim_{h>0}(f(x+h)f(x))/h`
The logarithm laws
`log a  log b= log (a/b)`
and
`n log a = log a^n`.
Graph of `y=(1+t)^{1"/"t}`
The fact "log" and `e` are inverses, so
`log_e(e) = 1`.
The wellknown limit
`lim_{t>0}(1+t)^{1"/"t} = e`
(We will not prove this limit here. The graph on the right demonstrates that as `t>0`, the graph of `y=(1+t)^{1"/"t}` approaches the value `e~~2.71828`.)
I will write `log(x)` to mean `log_e(x) = ln(x)`, to make it easier to read.
We have `f(x) = log(x)` so the derivative will be given by:
`(df)/(dx) = lim_{h>0}(log(x+h)log(x))/h `
Now the top of our fraction is
`log(x+h)log(x)` ` = log((x+h)/x)` ` = log(1 + h/x)`.
To simplify the algebra, we now substitute `t=h/x` and this gives us `h = xt`. Of course,
`lim_{h>0}(h) = lim_{t>0}(xt) = 0`.
So we have now:
`(log(x+h)log(x))/h` ` = 1/(xt)log(1 + t)`.
We write this as:
`1/x[1/tlog(1 + t)]`.
Considering the expression in square brackets, we use the log law
`n log a = log a^n`
and write:
`1/tlog(1 + t) = log(1+t)^(1"/"t}`
Next, the limit of the expression `(1+t)^(1"/"t}` is:
`lim_{t>0}(1 + t)^{1"/"t} = e`.
Because `log(e)=1`, we can conclude:
`(dlog(x))/(dx) = lim_{h>0}(log(x+h)log(x))/h`
`= 1/x log(lim_{t>0}(1 + t)^{1"/"t})`
` = 1/x log(e)`
` = 1/x`
Tip
For some problems, we can use the logarithm laws to simplify our log expression before differentiating it.
Example 1
Find the derivative of
y = ln 2x
Answer
We use the log law:
log ab = log a + log b
We can write our question as:
y = ln 2x = ln 2 + ln x
Now, the derivative of a constant is 0, so
`d/(dx)ln\ 2=0`
So we are left with (from our formula above)
`d/(dx)(ln\ x)=1/x`
The final answer is:
`(dy)/(dx)=1/x`
We can see from the following graph that the slope of y = ln 2x (curve in green, tangent in magenta) is the same as the slope of y = ln x (curve in gray, tangent in dashed gray), at the point x = 2.
The graph of `y=ln(2x)` (in green) and `y=ln(x)` (in gray) showing their tangents at `x=2.`
Example 2
Find the derivative of
y = ln x^{2}
Answer
We use the log law:
log a^{n} = n log a
So we can write the question as
y = ln x^{2} = 2 ln x
The derivative will be simply 2 times the derivative of ln x.
So the answer is:
`d/(dx)ln\ x^2=2 d/(dx)ln\ x=2/x`
We can see from the graph of y = ln x^{2} (curve in black, tangent in red) that the slope is twice the slope of y = ln x (curve in blue, tangent in pink).
The graph of `y=ln(x^2)` (in green) and `y=ln(x)` (in gray) showing their tangents at `x=2.`
NOTE: The graph of `y=ln(x^2)` actually has 2 "arms", one on the negative side and one on the positive. The above graph only shows the positive arm for simplicity.
Derivative of y = ln u (where u is a function of x)
Unfortunately, we can only use the logarithm laws to help us in a limited number of logarithm differentiation question types.
Most often, we need to find the derivative of a logarithm of some function of x. For example, we may need to find the derivative of y = 2 ln (3x^{2} − 1).
We need the following formula to solve such problems.
If
y = ln u
and u is some function of x, then:
`(dy)/(dx)=(u')/u`
where u' is the derivative of u
Another way to write this is
`(dy)/(dx)=1/u(du)/(dx)`
You might also see the following form. It means the same thing.
If
y = ln f(x),
then the derivative of y is given by:
`(dy)/(dx)=(f'(x))/(f(x)`
Example 3
Find the derivativeof
y = 2 ln (3x^{2} − 1).
Answer
We put
u = 3x^{2} − 1
Then the derivative of u is given by:
`u'=(du)/dx=6x`
So the final answer is :
`(dy)/(dx)=2 (u')/u`
`=2xx(6x)/(3x^21)`
`=(12x)/(3x^21)`
Example 4
Find the derivativeof
y = ln(1 − 2x)^{3}.
Answer
First, we simplify our log expression using the log law:
log a^{n} = n log a
We can write
y = ln(1 − 2x)^{3} = 3 ln(1 − 2x)
Then we put
u = 1 − 2x
So
`u' = (du)/dx=2`
So our answer is:
`(dy)/(dx)=3 (u')/u`
`=3xx(2)/(12x)`
`=(6)/(12x)`
Example 5
Find the derivativeof `y=ln[(sin 2x)(sqrt(x^2+1))]`
Answer
First, we use the following log laws to simplify our logarithm expression:
log ab = log a + log b
and
log a^{n} = n log a
So we can write our question as:
`y=ln[(sin 2x)(sqrt(x^2+1))]`
`=ln(sin 2x)+ln(sqrt(x^2+1))`
`=ln(sin 2x)+ln(x^2+1)^(1/2)`
`=ln(sin 2x)+1/2ln(x^2+1)`
Next, we use the following rule (twice) to differentiate the two log terms:
`(dy)/(dx)=(u')/u`
For the first term,
u = sin 2x
u' = 2 cos 2x
For the second term, we put
u = x^{2} + 1,
giving
u' = 2x
So our final answer is:
`(dy)/(dx)=(2\ cos 2x)/(sin 2x)+1/2 (2x)/(x^2+1)`
`=2\ cot\ 2x+x/(x^2+1)`
Differentiating Logarithmic Functions with Bases other than e
If
u = f(x) is a function of x,
and
y = log_{b} u is a logarithm with base b,
then we can obtain the derivative of the logarithm function with base b using:
`(dy)/(dx)=(log_be)(u')/u`
where
`u'` is the derivative of u
log_{b}e is a constant. See change of base rule to see how to work out such constants on your calculator.)
Note 1: This formula is derived from first principles.
Note 2: If we choose e as the base, then the derivative of ln u, where u is a function of x, simply gives us our formula above:
`(dy)/(dx)=(u')/u`
[Recall that log_{e}e = 1. ]
[See the chapter on Exponential and Logarithmic Functions base e if you need a refresher on all this.]
Example 6
Find the derivativeof y = log_{2}6x.
Answer
We begin by using the following log rule to simplify our question:
log ab = log a + log b
We can write our question as:
y = log_{2}6x = log_{2}6 + log_{2}x
The first term, log_{2}6, is a constant, so its derivative is 0.
The derivative of the second term is as follows, using our formula:
`(dy)/(dx)=(log_2e) (1/x)=(log_2e)/x`
The term on the top, log_{2}e, is a constant. If we need a decimal value, we can work it out using change of base as follows:
`log_2e=(log_10e)/(log_10 2)=1.442695041`
Example 7
Find the derivativeof y = 3 log_{7}(x^{2} + 1).
Answer
We put
u = x^{2} + 1,
giving
u' = 2x
Applying the formula, we have:
`(dy)/(dx)=3\ (log_7e)(2x)/(x^2+1)`
`=6\ (log_7e) x/(x^2+1)`
`=3.083 x/(x^2+1)`
The value 3.083 comes from using the change of base rule.
Note: Where possible, always use the properties of logarithms to simplifythe process of obtaining the derivatives.
Exercises
1. Find the derivative of
y = ln(2x^{3} − x)^{2}.
Answer
Using the Log Law `log a^n = n log a`, we can write:
y = ln(2x^{3} − x)^{2} = 2 ln(2x^{3} − x)
Put
`u = 2x^3 − x`
so
`u' = 6x^2 − 1`
This gives us:
`(dy)/(dx)=` `(dy)/(du)(du)/(dx) ` `=2(6x^21)/(2x^3x`
`x ≠ ±sqrt(0.5)`,
`x ≠ 0`
NOTE: We need to be careful with the domain of this solution, as it is only correct for certain valuesof x.
The graph of y = ln(2x^{3} − x)^{2} (which has power 2) is defined for all x except
` ±sqrt(0.5), 0`
Its graph is as follows:
The graph of y = ln(2x3 − x)2. (power 2)
The graph of y = 2 ln(2x^{3} − x), however, (it has 2 × at the front) is only defined for a more limiteddomain (since we cannot have the logarithm of a negativenumber.)
So we can only have x in the range `sqrt 0.5 < x < 0` and `x > sqrt0.5.`
The graph of y = 2 ln(2x3 − x). (product 2)
So when we find the differentiation of a logarithm using theshortcut given above, we need to be careful that the domain ofthe function and the domain of the derivative are stated.
2. Find the derivative of
y = ln(cos x^{2}).
Answer
Firstly,
`d/(dx)cos x^2=2x\ sin x^2`
So
`(dy)/(dx)=(2x\ sin x^2)/(cos x^2)=2x\ tan x^2`
3. Find the derivative of
y = x ln^{3} x.
Answer
The notation
`y = x(ln^3 x)`
means
`y = x(ln x)^3`
Note that we cannot use the log law
`log a^n= n log a`
Our expression is not
`y = x\ ln x^3`
The brackets make all the difference!
This is a product of x and `(ln x)^3`. So
`(dy)/(dx)=x(3(ln x)^2)/x+(ln x)^3(1)`
`=3(ln x)^2+(ln x)^3`
`=(ln x)^2(3+ln x)`
4. Find the derivative of
3 ln xy + sin y = x^{2}.
Answer
We need to recognise that this is an implicit function. We can simplify it first:
`3(ln\ x+ln\ y)+sin y=x^2`
Taking derivatives:
`3(1/x+1/y(dy)/(dx))+cos y (dy)/(dx)=2x`
Collecting terms gives us:
`3/y(dy)/(dx)+cos y(dy)/(dx)=2x3/x`
`(dy)/(dx)(3/y+cos y)=2x3/x`
So
`(dy)/(dx)=(2x3/x)/(3/y+cos y)`
`=(2x^2y3y)/(3x+xy\ cos y)`
5. Find the derivative of
y = (sin x)^{x}
by first taking logarithms of eachside of the equation.
Answer
NOTE: This has an exponent which is variable. We cannot use our formula
`d/dx x^n=nx^(n1)`
from before.
Now
`ln\ y=ln[(sin x)^x]=x\ ln(sin x)`
So
`1/y(dy)/(dx)=x(cos x)/(sin x)+ln(sin x)(1)`
Multiplying through by `y` gives:
`(dy)/(dx)=y(x\ cot\ x+ln(sin x))`
`=(sin x)^x(x\ cot\ x+ln(sin x))`
The graph of the function in Exercise 5 is quite interesting:
The graph of y = (sin x)^{x}.
I have a deep understanding of the logarithmic functions and their derivatives discussed in the article. The article covers the derivative of the natural logarithm function, ln(x), and extends the discussion to logarithmic functions with bases other than e. Additionally, it explores examples involving logarithmic differentiation and implicit differentiation.
Here's a breakdown of the key concepts covered in the article:

Derivative of ln(x):
 The derivative of the natural logarithmic function, ln(x), is given by
dy/dx = 1/x
.  This result is derived from first principles, involving the limit definition of the derivative.
 The derivative of the natural logarithmic function, ln(x), is given by

Logarithmic Differentiation Examples:
 Examples are provided to illustrate the application of logarithmic differentiation to find the derivatives of more complex functions.
 Example 1: Derivative of y = ln(2x)
 Example 2: Derivative of y = ln(x^2)
 Example 3: Derivative of y = 2 ln(3x^2 − 1)
 Example 4: Derivative of y = ln(1 − 2x)³
 Example 5: Derivative of y = ln[(sin 2x)(sqrt(x^2+1))]

Logarithmic Functions with Bases other than e:
 The article introduces a formula for finding the derivative of a logarithmic function with a base other than e.
 If u = f(x) and y = log_b(u), then
(dy/dx) = (log_b(e) * u') / u
.

Examples Involving Logarithmic Functions with Bases other than e:
 Example 6: Derivative of y = log_2(6x)
 Example 7: Derivative of y = 3 log_7(x^2 + 1)

Implicit Differentiation:
 The article demonstrates the use of implicit differentiation in finding the derivative of implicit functions involving logarithms.

Exercises:
 The article concludes with exercises for the readers to practice, involving the derivative of more complex logarithmic expressions.
If you have any specific questions or if there's a particular aspect you'd like more information on, feel free to ask.