I differentiated $5^x$ and got $x5^{x-1}.$

But the answer is $5^x\log_e 5.$

Why so?

  • 7
    $\begingroup$ This is a common mistake. The rule you want to use only works if the base is the variable and the exponent is a number. $\endgroup$ Commented Jun 13, 2018 at 23:29
  • 1
    $\begingroup$ The rule for powers applies when you differentiate with respect to the base, not with respect to the power. $\endgroup$ Commented Jun 13, 2018 at 23:30
  • 2
    $\begingroup$ You are misusing the rule. The rule you are trying to use applies to functions of the form $x^n$, where $n$ is a constant. Not functions of this form. $\endgroup$
    – lulu
    Commented Jun 13, 2018 at 23:30
  • 1
    $\begingroup$ The rule is that if $f(x)=x^n$ for some $n$, then $f'(x)=nx^{n-1}$. Your function is not of this form. Your function is of the form $f(x)=n^x,$ which is entirely different.Part of the problem is that the notation $f'$ doesn't indicate what you are differentiating against. $\endgroup$ Commented Jun 13, 2018 at 23:37
  • 1
    $\begingroup$ $x$ is not a constant and $5$ is not a variable. $x^n$ and $n^x$ are very different function. And a small change in the value of $x$ has different effects. $\frac {(x + h)^5 -x^5}{h}=\frac {x^5 + 5hx^4 + 10h^2x^3 + 10h^3x^2 + 5h^4x + h^5 - x^5}h = 5x^4 + 10hx^3+10h^2x^2+5h^3x + h^4\to 5x^4$ where as $\frac {5^{x+h} - 5^{x}}{h} = \frac {5^x*5^h -5^x}h= \frac {5^x(5^h -1)}{h$ which behaves very differently. $\endgroup$
    – fleablood
    Commented Jun 13, 2018 at 23:41

3 Answers 3


$5^x=e^{x\log(5)}$ so its differential is $\log(5)e^{x\log(5)}=\log(5)5^x$.

The differential of $e^{ax}=ae^{ax}$, write $f(x)=ax, g(x)=e^x$, $f'(x)=a, g'(x)=e^x$, you have $(g\circ f)'(x)=g'(f(x)).f(x)=e^{ax}.a$

  • 6
    $\begingroup$ @LianaA typically if mathematicians write $\log$, they mean $\ln$, so yes :) $\endgroup$ Commented Jun 13, 2018 at 23:39
  • 5
    $\begingroup$ $\log_{10}$ is nearly completely useless now that we no longer do multiplication using logarithm tables out of a book or slide rules. :) $\log_2$ is more often useful. $\endgroup$ Commented Jun 13, 2018 at 23:46
  • 1
    $\begingroup$ @Robert Lewis Interesting, thank you for point it out. $\endgroup$
    – AnyAD
    Commented Jun 13, 2018 at 23:50
  • 1
    $\begingroup$ @RobertLewis My profile picture used to be a photo of a statue of Bowditch in Mount Auburn Cemetery, where he is buried (right across the street from where I live.) flic.kr/p/pzh3jx $\endgroup$ Commented Jun 14, 2018 at 0:56
  • 3
    $\begingroup$ “Derivative”, not “Differential” $\endgroup$
    – MPW
    Commented Jun 14, 2018 at 2:03

For a generalized answer to this question, you can use the following which works in cases of $5^x$ and $x^5$:

$$ \frac{\mathrm{d}}{\mathrm{d}x}\left(f(x)^{g(x)}\right) = f(x)^{g(x)-1}(g(x)f'(x)+f(x)\log(f(x))g'(x) $$


$$ \begin{align} \frac{\mathrm{d}}{\mathrm{d}x}x^5 &= x^{5-1}(5 \times 1 + x \log(x) \times 0) \\ &= x^4(5+0) \\ &= 5x^4 \end{align} $$

And, likewise:

$$ \begin{align} \frac{\mathrm{d}}{\mathrm{d}x} 5^x &= 5^{x-1}(x \times 0 + 5 \log(5) \times 1) \\ &= 5^{x-1}(0 + 5 \log(5)) \\ &= 5^{x} \log(5) \end{align} $$

Note $5 \times 5^{x-1} \equiv 5^x$


One needs to respect two things:

first, the formulas

$\dfrac{dx^n}{dx} = nx^{n - 1}, \; n \ge 1 \tag 1$


$\dfrac{du^n(x)}{dx} = nu^{n - 1}(x)\dfrac{du}{dx}, \; n \ge 1, \tag 2$

where $u$ is a differentiable function of $x$, only apply when $n$ is a constant and the variable ($x$ or $u(x)$ here) occurs in the base, not in the exponent;

second, when the base is constant and the exponent varies, we are really dealing with a case of $e^{u(x)}$, which by the chain rule satisfies

$\dfrac{de^{u(x)}}{dx} = e^{u(x)} \dfrac{du(x)}{dx}; \tag 3$

in the present instance, we have

$5^x = (e^{\ln 5})^x = e^{(\ln 5)x}, \tag 4$


$\dfrac{d(5^x)}{dx} = \dfrac{de^{(\ln 5)x}}{dx} = e^{(\ln 5)x} \dfrac{d(\ln 5)x}{dx} = \ln 5 e^{(\ln 5)x} = (\ln 5)(5^x); \tag 5$

it is also worth noting that the formula (1), for $n \in \Bbb Z_+$, follows from the binomial theorem; for example, with $n = 3$, we have

$(x + h)^3 - x^3 = x^3 + 3x^2 h + 3x h^2 + h^3 - x^3 = 3x^2 h + 3xh^2 + h^3, \tag 6$


$\dfrac{(x + h)^3 - x^3}{h} = 3x^2 + (3xh + h^2) \to 3x^2 \; \text{as} \; h \to 0, \tag 7$

with a similar derivation for any $n \in \Bbb Z_+$; such an approach clearly won't work for functions of the form $a^x$, where we have

$\dfrac{a^{x + h} - a^x}{h} = a^x\dfrac{a^h - 1}{h}, \tag 8$

and thus we need to prove

$\displaystyle \lim_{h \to 0} \dfrac{a^h - 1}{h} = \ln a, \tag 9$

which follows from

$a^h = e^{(\ln a) h} = \displaystyle \sum_0^\infty \dfrac{(\ln a)^n h^n}{n!}. \tag{10}$

I leave the elementary details, which involve some notions of power series' convergence, to my readers.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .