# 5.5 Differentiation of Log Functions

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

## The Derivative of the Natural Logarithmic Function

If $x>0$ and $y=\ln x$, then

$$\frac{dy}{dx}=\frac{1}{x}$$

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

$$h^{\prime}(x)=\frac{1}{g(x)} g^{\prime}(x)$$

## Proof

If $x>0$ and $y=\ln x$, then $e^y=x.$ Differentiating both sides of this equation results in the equation

$$e^y\frac{dy}{dx}=1.$$

Solving for $\frac{dy}{dx}$ yields

$$\frac{dy}{dx}=\frac{1}{e^y}.$$

Finally, we substitute $x=e^y$ to obtain

$$\frac{dy}{dx}=\frac{1}{x}.$$

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

$$\frac{dy}{dx}=\frac{1}{f^{\prime}(g(x))}=\frac{1}{e^{\ln x}}=\frac{1}{x}$$

Using this result and applying the chain rule to $h(x)=\ln(g(x))$ yields

$$h^{\prime}(x)=\frac{1}{g(x)} g^{\prime}(x).$$
The graph of $y=\ln x$ and its derivative $\frac{dy}{dx}=\frac{1}{x}$ are shown in the following figure.

Long description: The function ln x is increasing on (0, + ∞). Its derivative is decreasing but greater than 0 on (0, + ∞).

Now that we can differentiate the natural logarithmic function, we can use this result to find the derivatives of $y=\log_b x$ and $y=b^x$ for $b>0, \, b\ne 1$.

## Derivatives of General Exponential and Logarithmic Functions

Let $b>0, \, b\ne 1$, and let $g(x)$ be a differentiable function.

1. If $y=\log_b x$, then
$$\frac{dy}{dx}=\frac{1}{x \ln b}.$$
More generally, if $h(x)=\log_b (g(x))$, then for all values of $x$ for which $g(x)>0$,
$$h^{\prime}(x)=\frac{g^{\prime}(x)}{g(x) \ln b}.$$
2. If $y=b^x$, then
$$\frac{dy}{dx}=b^x \ln b.$$
More generally, if $h(x)=b^{g(x)}$, then
$$h^{\prime}(x)=b^{g(x)} g^{\prime}(x) \ln b$$

## Proof

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

$$\frac{dy}{dx}=\frac{1}{x \ln b}.$$

The derivative in (Figure) now follows from the chain rule.

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

$$\frac{dy}{dx}=y \ln b=b^x \ln b.$$

The more general derivative, $h^{\prime}(x)=b^{g(x)} g^{\prime}(x) \ln b,$
follows from the chain rule.

## Logarithmic Differentiation

At this point, we can take derivatives of functions of the form $y=(g(x))^n$ for certain values of $n$, as well as functions of the form $y=b^{g(x)}$, where $b>0$ and $b\ne 1$. Unfortunately, we still do not know the derivatives of functions such as $y=x^x$ or $y=x^{\pi}$. These functions require a technique called logarithmic differentiation, which allows us to differentiate any function of the form $h(x)=g(x)^{f(x)}$. It can also be used to convert a very complex differentiation problem into a simpler one, such as finding the derivative of $y=\frac{x\sqrt{2x+1}}{e^x \sin^3 x}$. We outline this technique in the following problem-solving strategy.

### Problem-Solving Strategy: Using Logarithmic Differentiation

1. To differentiate $y=h(x)$ using logarithmic differentiation, take the natural logarithm of both sides of the equation to obtain $\ln y=\ln (h(x))$.
2. Use properties of logarithms to expand $\ln (h(x))$ as much as possible.
3. Differentiate both sides of the equation. On the left we will have $\frac{1}{y}\frac{dy}{dx}$.
4. Multiply both sides of the equation by $y$ to solve for $\frac{dy}{dx}$.
5. Replace $y$ by $h(x)$.