<s>[INST] Differentiation of 5^x I differentiated $5^x$ and got $x5^{x-1}.$ 
But the answer is $5^x\log_e 5.$ 
Why so?
 [/INST] 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)
$$
So
$$
\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$
</s>