Derivative of the Logarithmic Function

Now that we have the derivative of the natural exponential function, we can use implicit differentiation to find the derivative of its inverse, the natural logarithmic function.

Theorem 3.15

The Derivative of the Natural Logarithmic Function

If \(x > 0\) and \(y = \text{ln} x ,\) then

\[\frac{d y}{d x} = \frac{1}{x} .\]

More generally, let \(g \left(\right. x \left.\right)\) be a differentiable function. For all values of \(x\) for which \(g \left(\right. x \left.\right) > 0 ,\) the derivative of \(h \left(\right. x \left.\right) = \text{ln} \left(\right. g \left(\right. x \left.\right) \left.\right)\) is given by

\[h^{'} \left(\right. x \left.\right) = \frac{1}{g \left(\right. x \left.\right)} g^{'} \left(\right. x \left.\right) .\]

Proof

If \(x > 0\) and \(y = \text{ln} x ,\) then \(e^{y} = x .\) Differentiating both sides of this equation results in the equation

\[e^{y} \frac{d y}{d x} = 1 .\]

Solving for \(\frac{d y}{d x}\) yields

\[\frac{d y}{d x} = \frac{1}{e^{y}} .\]

Finally, we substitute \(x = e^{y}\) to obtain

\[\frac{d y}{d x} = \frac{1}{x} .\]

We may also derive this result by applying the inverse function theorem, as follows. Since \(y = g \left(\right. x \left.\right) = \text{ln} x\) is the inverse of \(f \left(\right. x \left.\right) = e^{x} ,\) by applying the inverse function theorem we have

\[\frac{d y}{d x} = \frac{1}{f^{'} \left(\right. g \left(\right. x \left.\right) \left.\right)} = \frac{1}{e^{\text{ln} x}} = \frac{1}{x} .\]

Using this result and applying the chain rule to \(h \left(\right. x \left.\right) = \text{ln} \left(\right. g \left(\right. x \left.\right) \left.\right)\) yields

\[h^{'} \left(\right. x \left.\right) = \frac{1}{g \left(\right. x \left.\right)} g^{'} \left(\right. x \left.\right) .\]

The graph of \(y = \text{ln} x\) and its derivative \(\frac{d y}{d x} = \frac{1}{x}\) are shown in Figure 3.35.

Graph of the function ln x along with its derivative 1/x. The function ln x is increasing on (0, + ∞). Its derivative is decreasing but greater than 0 on (0, + ∞).
Figure 3.35 \(\text{The function} y = \text{ln} x\) is increasing on \(\left(\right. 0 , + \infty \left.\right) .\) Its derivative \(y ' = \frac{1}{x}\) is greater than zero on \(\left(\right. 0 , + \infty \left.\right) .\)

Example 3.77

Taking a Derivative of a Natural Logarithm

Find the derivative of \(f \left(\right. x \left.\right) = \text{ln} \left(\right. x^{3} + 3 x - 4 \left.\right) .\)

Solution

Use Equation 3.31 directly.

\[\begin{aligned} f^{'} \left(\right. x \left.\right) & = \frac{1}{x^{3} + 3 x - 4} \cdot \left(\right. 3 x^{2} + 3 \left.\right) & & & \text{Use} g \left(\right. x \left.\right) = x^{3} + 3 x - 4 \text{in} h^{'} \left(\right. x \left.\right) = \frac{1}{g \left(\right. x \left.\right)} g^{'} \left(\right. x \left.\right) . \\ & = \frac{3 x^{2} + 3}{x^{3} + 3 x - 4} & & & \text{Rewrite}. \end{aligned}\]

Example 3.78

Using Properties of Logarithms in a Derivative

Find the derivative of \(f \left(\right. x \left.\right) = \text{ln} \left(\right. \frac{x^{2} \text{sin} x}{2 x + 1} \left.\right) .\)

Solution

At first glance, taking this derivative appears rather complicated. However, by using the properties of logarithms prior to finding the derivative, we can make the problem much simpler.

\[\begin{aligned} f \left(\right. x \left.\right) & = & \text{ln} \left(\right. \frac{x^{2} \text{sin} x}{2 x + 1} \left.\right) = 2 \text{ln} x + \text{ln} \left(\right. \text{sin} x \left.\right) - \text{ln} \left(\right. 2 x + 1 \left.\right) & & & \text{Apply properties of logarithms}. \\ f^{'} \left(\right. x \left.\right) & = & \frac{2}{x} + \text{cot} x - \frac{2}{2 x + 1} & & & \text{Apply sum rule and} h^{'} \left(\right. x \left.\right) = \frac{1}{g \left(\right. x \left.\right)} g^{'} \left(\right. x \left.\right) . \end{aligned}\]

Checkpoint 3.52

Differentiate: \(f \left(\right. x \left.\right) = \text{ln} \left(\right. 3 x + 2 \left.\right)^{5} .\)

Now that we can differentiate the natural logarithmic function, we can use this result to find the derivatives of \(y = l o g_{b} x\) and \(y = b^{x}\) for \(b > 0 , b \neq 1 .\)

Theorem 3.16

Derivatives of General Exponential and Logarithmic Functions

Let \(b > 0 , b \neq 1 ,\) and let \(g \left(\right. x \left.\right)\) be a differentiable function.

  1. If, \(y = \text{log}_{b} x ,\) then
    \[\frac{d y}{d x} = \frac{1}{x \text{ln} b} .\]

    More generally, if \(h \left(\right. x \left.\right) = \text{log}_{b} \left(\right. g \left(\right. x \left.\right) \left.\right) ,\) then for all values of x for which \(g \left(\right. x \left.\right) > 0 ,\)
    \[h^{'} \left(\right. x \left.\right) = \frac{g^{'} \left(\right. x \left.\right)}{g \left(\right. x \left.\right) \text{ln} b} .\]
  2. If \(y = b^{x} ,\) then
    \[\frac{d y}{d x} = b^{x} \text{ln} b .\]

    More generally, if \(h \left(\right. x \left.\right) = b^{g \left(\right. x \left.\right)} ,\) then
    \[h^{'} \left(\right. x \left.\right) = b^{g \left(\right. x \left.\right)} g ′ \left(\right. x \left.\right) \text{ln} b .\]

Proof

If \(y = \text{log}_{b} x ,\) then \(b^{y} = x .\) It follows that \(\text{ln} \left(\right. b^{y} \left.\right) = \text{ln} x .\) Thus \(y \text{ln} b = \text{ln} x .\) Solving for \(y ,\) we have \(y = \frac{\text{ln} x}{\text{ln} b} .\) Differentiating and keeping in mind that \(\text{ln} b\) is a constant, we see that

\[\frac{d y}{d x} = \frac{1}{x \text{ln} b} .\]

The derivative in Equation 3.32 now follows from the chain rule.

If \(y = b^{x} ,\) then \(\text{ln} y = x \text{ln} b .\) Using implicit differentiation, again keeping in mind that \(\text{ln} b\) is constant, it follows that \(\frac{1}{y} \frac{d y}{d x} = \text{ln} b .\) Solving for \(\frac{d y}{d x}\) and substituting \(y = b^{x} ,\) we see that

\[\frac{d y}{d x} = y \text{ln} b = b^{x} \text{ln} b .\]

The more general derivative (Equation 3.35) follows from the chain rule.

Example 3.79

Applying Derivative Formulas

Find the derivative of \(h \left(\right. x \left.\right) = \frac{3^{x}}{3^{x} + 2} .\)

Solution

Use the quotient rule and Derivatives of General Exponential and Logarithmic Functions.

\[\begin{aligned} h^{'} \left(\right. x \left.\right) & = \frac{3^{x} \text{ln} 3 \left(\right. 3^{x} + 2 \left.\right) - 3^{x} \text{ln} 3 \left(\right. 3^{x} \left.\right)}{\left(\right. 3^{x} + 2 \left.\right)^{2}} & & & \text{Apply the quotient rule}. \\ & = \frac{2 \cdot 3^{x} \text{ln} 3}{\left(\right. 3^{x} + 2 \left.\right)^{2}} & & & \text{Simplify}. \end{aligned}\]

Example 3.80

Finding the Slope of a Tangent Line

Find the slope of the line tangent to the graph of \(y = \text{log}_{2} \left(\right. 3 x + 1 \left.\right)\) at \(x = 1 .\)

Solution

To find the slope, we must evaluate \(\frac{d y}{d x}\) at \(x = 1 .\) Using Equation 3.33, we see that

\[\frac{d y}{d x} = \frac{3}{\left(\right. 3 x + 1 \left.\right) \text{ln} 2} .\]

By evaluating the derivative at \(x = 1 ,\) we see that the tangent line has slope

\[\begin{aligned} \frac{d y}{d x} \left|\right. \\ _{x = 1} = \frac{3}{4 \text{ln} 2} = \frac{3}{ \text{ln} 16} . \end{aligned}\]

Checkpoint 3.53

Find the slope for the line tangent to \(y = 3^{x}\) at \(x = 2 .\)

This lesson is part of:

Derivatives

View Full Tutorial

Track Your Learning Progress

Sign in to unlock unlimited practice exams, tutorial practice quizzes, personalized weak area practice, AI study assistance with Lexi, and detailed performance analytics.