## Derivatives of logarithms summary

## Derivative of $\ln x$

The derivative of $\ln x$ is

$$\frac{d}{dx} \Big( \ln x \Big) = \frac{1}{x}.$$

We can prove this by using the fact that $\ln x$ and $e^x$ are inverse functions and using the derivative of $e^x$, which is $e^x$. Therefore we have that $e^{\ln x} = x$. Taking the derivative of both sides of this equation (and using the chain rule on the left) we get that:

$$\begin{eqnarray} \frac{d}{dx} \Big(e^{\ln x} \Big) &=& \frac{d}{dx}\Big(x\Big)\\

e^{\ln x} \frac{d}{dx} \Big(\ln x\Big) & =& 1\\

x \frac{d}{dx} \Big(\ln x\Big) & = &1\\

\frac{d}{dx} \Big(\ln x\Big) & =& \frac{1}{x}. \end{eqnarray}$$

Which gives the derivative stated above.

Now let’s check out some problems where we use this derivative:

#### Example

Let $h(x) = e^x \ln x$ what is $h'(x)?$

#### Solution

We begin by noticing that $h(x)$ is a product of the functions $e^x$ and $\ln x$. Therefore we can apply the product rule to get $$h'(x) = e^x cdot \ln x + e^x cdot \frac{1}{x} = e^x\left(\ln x + \frac{1}{x}\right).$$

#### Example

Let $f(x) = \ln (x^3)$ what is $f'(x)?$

#### Solution

There are actually two ways of doing this problem, the first of these uses the chain rule, and the second one uses log rules. Let’s take a look at them both.

For the first we begin by looking at the function as it was given to us and notice that this is a function composition with inner function $g(x) = x^3$ and outer function $h(x) = \ln x$, therefore when we apply the chain rule we get

$$begin{eqnarray}

f'(x) & = h'(g(x))g'(x)\

& = \frac{1}{g(x)}cdot g'(x)\

& = \frac{1}{x^3}\cdot 3x^2 = \frac{3}{x}.

end{eqnarray}$$

Alternatively we can use log rules to rewrite

$$f(x) = 3\ln x.$$

In this case we can differentiate immediately using the linearity of the derivative (i.e. that the constant 3 just pulls through the derivative). This gives us:

$$

f'(x) = 3\frac{1}{x}.

$$

Now you try it!

## Practice Problems for derivatives logarithms

Like learning by solving problems? Try this and more in the Dogl Calculus app ðŸ˜ƒ

## Derivative of $\log_a x$

The derivative of $log_a x$ is

$$frac{d}{dx} Big(\log_a xBig) = \frac{1}{x\ln a}.$$

This can be computed from the derivative of $\ln x$ we just computed by using logarithm rules.

#### Logarithm Change of Base Formula

$$\log_a b = \frac{\log_c b}{\log_c a}$$

##### Proof

If we take $x = \log_a b$ this means that $a^x = b$. Now let’s apply $\log_c$ to both sides of the equation. This gives us

$$\log_c a^x = \log_c b.$$

Then using the power rule for logarithms

$$\begin{eqnarray}

x \log_c a&= \log_c b\\

\log_a b = x& = \frac{\log_c b}{\log_c a}.

\end{eqnarray}$$

We using the log rule above we can rewrite $f(x)$ as

$$f(x) = \log_a x =\frac{\ln x}{\ln a}.$$

Now the $\frac{1}{\ln a}$ is just a constant so can be pulled through the derivative leaving us with

$$\begin{eqnarray}\frac{d}{dx} \left(\frac{\ln x}{\ln a}\right) &= \frac{1}{\ln a} \frac{d}{dx} \left( \ln x \right)\\

& = \frac{1}{x\ln a}.

\end{eqnarray}$$

#### Example

Let $g(t) = t^2 \log_3 t$, what is $g'(t)$?

#### Solution

We can start by noticing that $g(t)$ is a product, meaning we need to use the product rule to take the derivative. Doing this we get

$$begin{eqnarray}g'(t) & = &\frac{d}{dt}\left(t^2\right)\cdot \log_3 t + t^2 \cdot \frac{d}{dt} \left( \log_3 t\right)\\

& = 2t \log_3 t + t^2 \frac{1}{t\ln 3}.

end{eqnarray}$$

## What are logarithms again?

The logarithm function $f(x) = \log_a x$ is the function that gives you the number $y$ where $a^y = x$. This can seem a bit complicated, but let’s look at some specific examples:

#### Example

What is $\log_2 8$?

#### Solution

This is just another way of asking the question: What power do we need to raise $2$ in order to get $8$? The answer is $3$ because $2^3 = 8$.

#### Example

What is $\log \frac{1}{100}$? Here we’re using $\log$ without a subscript to denote $\log_{10}$.

#### Solution

As in the previous question, this is another way of asking the question: What power do we need to raise $10$ in order to get $\frac{1}{100}$?

In this case we know that $10^2=100$, so $10^{-2} = \frac{1}{100}$. From this we can see that $\log \frac {1}{100} = -2$.

In addition to defining $\log_a b$ as the function that returns the exponent $y$ that satisfies $a^y = b$, we can also define a logarithm as the inverse of an exponential function.

#### Logarithms and Exponentials

The logarithmic function $f(x) = \log_a x$ is the inverse of the exponential function $g(x) = a^x$. In other words:

$$a^{\log_a x} = x \quad \text{ and } \quad \log_a \big(a^x\big) = x.$$

Check for yourself if the final two identities in the box above make sense with the definition in terms of “the exponent that gives you $a^y =x$.”

## Graphs of logarithms

The relationship between logarithms and exponentials gives us a good way to look at graphs of logarithms. In particular we can find the graph of $\log_a x$ by reflecting the graph of $a^x$ across the line $y=x$. Let’s look at the example of $f(x) = 3^x$ and $f^{-1}(x) = \log_3 x$.

Now you might be wondering why derivatives of exponentials are exponentials, but derivatives of logarithms don’t give back logarithms so nicely in the same way. Looking at the graph, and we can see immediately at least one problem, which is that the graph of the logarithm changes sign, but it’s slope is always either positive (when $a>1$) or negative (when $a<1$). Let's look again at the example of $3^x$ and $\log_3 x$, but this time also with their derivatives.

Now let’s finish off with a quick look at what happens when the base $a$ is less than 1. Let’s look at the example $\log_{\frac{1}{3}} x$. For this it can be useful to remember that

$$\left(\frac{1}{3}\right)^y = 3^{-y},$$

which means that $\log_{\frac{1}{3}} x = – \log_3 x$ (since they both answer the question “what do you have to raise $1/3$ to in order to get $x$?”). This means that the graphs of both $\log_{\frac{1}{3}} x$ and its derivative can be gotten from the graphs of $\log_3 x$ and its derivative by reflecting across the $x$-axis.