Derivatives of Logarithmic Functions

The derivative of the natural logarithm is the simplest rational function: d d x ln x = 1 x . This leads to the technique of logarithmic differentiation, which simplifies derivatives of complicated products and quotients.

Function Derivative Condition
ln x 1 x x > 0
ln | x | 1 x x 0
log a x 1 x ln a x > 0
ln u (chain) 1 u d u d x u > 0

Derivative of ln x

Let y = ln x . Using the four-step method:

Step 1: y + Δ y = ln ( x + Δ x )

Step 2: Δ y = ln ( x + Δ x ) ln x = ln ( 1 + Δ x x )

Step 3: Δ y Δ x = 1 x ln ( 1 + Δ x x ) x / Δ x

Step 4: As Δ x 0 , letting u = Δ x / x 0 :

d y d x = 1 x ln [ lim u 0 ( 1 + u ) 1 / u ] = 1 x ln e = 1 x \boxed{\frac{d}{dx}\ln x=\frac{1}{x},\qquad(x>0)\tag{a}}

Derivative of log a x

Write log a x = ln x ln a :

d d x log a x = 1 ln a d d x ln x = 1 x ln a \boxed{\frac{d}{dx}\log_a x=\frac{1}{x\ln a},\qquad(x>0)\tag{b}}

Derivative of ln u via the Chain Rule

If u ( x ) > 0 is differentiable:

d d x ln u = 1 u d u d x

When working with logarithms, first use the properties of logarithms to convert products to sums, quotients to differences, and powers to multiples, then differentiate.

Worked Examples

Find the equation of the tangent to y = ln ( x 2 + 1 ) when x = 0 .

Solution d y d x = 1 x 2 + 1 2 x = 2 x x 2 + 1 At x = 0 : slope = 0 and y = ln ( 1 ) = 0 . The tangent is the horizontal line y = 0 .
Graph of y=ln(x^2+1) with horizontal tangent at origin

Find d d x [ ln x + 1 ( 2 + cos x ) x 2 ] .

Solution First expand using logarithm properties: = d d x [ 1 2 ln ( x + 1 ) + ln ( 2 + cos x ) 2 ln x ] = 1 2 ( x + 1 ) sin x 2 + cos x 2 x

Find d d x ln | x | .

Solution **Case x > 0 :** | x | = x , so d d x ln | x | = 1 x . **Case x < 0 :** | x | = x , so d d x ln ( x ) = 1 x ( 1 ) = 1 x . Both cases give the same result: \boxed{\frac{d}{dx}\ln|x|=\frac{1}{x},\qquad x\neq0\tag{c}} More generally, for differentiable u 0 : \boxed{\frac{d}{dx}\ln|u|=\frac{1}{u}\frac{du}{dx}\tag{d}}

Find d d x ln | cos x | .

Solution Let u = cos x . By formula (d): d d x ln | cos x | = 1 cos x ( sin x ) = tan x

Logarithmic Differentiation

To differentiate y = f ( x ) when f is a product/quotient/power combination:

  1. Take the natural logarithm of both sides: ln y = ln f ( x ) .
  2. Expand the right side using ln ( A B ) = ln A + ln B , ln ( A / B ) = ln A ln B , ln ( A r ) = r ln A .
  3. Differentiate both sides with respect to x .
  4. Solve for d y / d x and substitute back y = f ( x ) .

Find y' given y = x sin x ( 2 x ) 1 + x 4 .

Solution Take ln of both sides: ln y = ln x + ln sin x ln ( 2 x ) 1 2 ln ( 1 + x 4 ) Differentiate: \frac{y'}{y}=\frac{1}{x}+\frac{\cos x}{\sin x}+\frac{1}{2-x}-\frac{2x^3}{1+x^4} Multiply by y : y'=\frac{x\sin x}{(2-x)\sqrt{1+x^4}}\left[\frac{1}{x}+\cot x+\frac{1}{2-x}-\frac{2x^3}{1+x^4}\right]

Derivatives of Real Powers of x

Using logarithmic differentiation, we can prove the Power Rule for all real exponents:

Let y = x r ( r any real number, x > 0 ). Then ln | y | = r ln | x | . Differentiating:

\frac{y'}{y}=\frac{r}{x}\quad\Rightarrow\quad y'=r\frac{y}{x}=r\frac{x^r}{x}=rx^{r-1}

This confirms d d x x r = r x r 1 for all real r .

Frequently Asked Questions

When should I use logarithmic differentiation? Use it when the function involves products, quotients, and powers simultaneously, especially when the exponent is a variable. It converts multiplicative structure into additive structure, making differentiation much easier.

What is d d x ln ( x 2 + 1 ) ? By the Chain Rule: 1 x 2 + 1 2 x = 2 x x 2 + 1 .

Is ln | u | differentiable at u = 0 ? No, ln | u | is not defined (or differentiable) at u = 0 . The formula d d x ln | u | = 1 u d u d x requires u 0 .