# 5. Derivative of the Logarithmic Function

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 "lnx").

The tangent at *x* = 2 is included on the graph.

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= lnx, then `(dy)/(dx)=1/x`

We now show where the formula for the derivative of `log_e x` comes from, using first principles.

### 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

### Example 2

Find the derivative of

y= lnx^{2}

## 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 (3*x*^{2} − 1).

We need the following formula to solve such problems.

If

y= lnu

and *u* is some function of *x*, then:

`(dy)/(dx)=(u’)/u`

where

u'is the derivative ofu

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= lnf(x),

then the derivative of *y* is given by:

`(dy)/(dx)=(f’(x))/(f(x)`

### Example 3

Find the derivative of

y= 2 ln (3x^{2}− 1).

### Example 4

Find the derivative of

y= ln(1 − 2x)^{3}.

### Example 5

Find the derivative of `y=ln[(sin\ 2x)(sqrt(x^2+1))]`

## Differentiating Logarithmic Functions with Bases other than *e*

If

u=f(x) is a function ofx,

and

y= log_{b}uis a logarithm with baseb,

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

ulog

is a constant. See change of base rule to see how to work out such constants on your calculator.)_{b}e

**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

= 1.]_{e}e

[See the chapter on Exponential and Logarithmic Functions base *e* if you need a refresher on all this.]

### Example 6

Find the derivative
of *y* = log_{2}6*x*.

### Example 7

Find the derivative
of *y* = 3 log_{7}(*x*^{2} + 1).

**Note: **Where possible, always use the properties of logarithms to simplify
the process of obtaining the derivatives.

## Exercises

1. Find the derivative of

y= ln(2x^{3}−x)^{2}.

2. Find the derivative of

y= ln(cosx^{2}).

3. Find the derivative of

y=xln^{3}x.

4. Find the derivative of

3 ln

xy+ siny=x^{2}.

5. Find the derivative of

y= (sinx)^{x}

by first taking logarithms of each side of the equation.

### Online Algebra Solver

This algebra solver can solve a wide range of math problems. (Please be patient while it loads.)

Go to: Online algebra solver

### Calculus Lessons on DVD

Easy to understand calculus lessons on DVD. See samples before you commit.

More info: Calculus videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!