In this article we will show that the derivative of $a^x$, is $\boxed{a^x \cdot \ln(a)}$.

To obtain this result, we will use the chain rule and the fact that $\ln x$ and $e^x$ are inverse functions. More specifically,

$$a^x= e^{\ln(a^x)} = e^{x\ln a}$$

The chain rule states that for two functions $f(x)$ and $g(x)$

\begin{align*} \dfrac{d}{dx}(f(g(x))) = f'(g(x)) \cdot g'(x)) \end{align*}

We will let $f(x) = e^x$ and $g(x) = x\ln a$. Then $f'(x) = e^x$ and $g'(x) = \ln a$.

\[\begin{align*} \dfrac{d}{dx} a^x =\frac d{dx} e^{x \ln a} = e^{x \ln a}\ln a \end{align*}\]

Finally, we write $e^{x\ln a}$ as $a^x$ to get the final result

$$\boxed{\frac d{dx} a^x = a^x \cdot \ln(a)}$.

### Alternative proof

Another way to prove this same statement is to use implicit differentiation and chain rule. We can write

\begin{align*} y&= a^x\\ \ln y &= \ln a^x = x\ln a\\ \frac {y’}{y} &= \ln a\\ y’ = y\ln a$$

We may now substitute $y = a^x$ back to get the same result:

$$ \frac d{dx} a^x = a^x \ln a$$

### Practice Question 1

Find the derivative of $5^x$.

In this case $a = 5$ and we can use the formula from the above. We get that

\[\begin{align*} \dfrac{d}{dx} 5^x = 5^x \ln(5). \end{align*}\]

### Practice Question 2

Find the derivative of $x^x$.

You might be tempted to write the answer as $x^x\ln x$, but this would be wrong! The reason why you may not apply the rule is that $x$ is not a constant and the rule above only works for differentiating $a^x$ where $a$ is a constant.