In this note, we study derivatives of logarithmic and exponential functions.
Derivatives of Logarithmic Functions
First recall that \begin{equation}\label{eq:euler}\lim_{t\to 0}(1+t)^{\frac{1}{t}}=e\end{equation}\begin{align*}\frac{d}{dx}\ln x&=\lim_{h\to 0}\frac{\ln(x+h)-\ln x}{h}\\&=\lim_{h\to 0}\frac{1}{h}\ln\left(\frac{x+h}{x}\right)\\&=\frac{1}{x}\lim_{h\to 0}\ln\left(1+\frac{h}{x}\right)^{\frac{x}{h}}\\&=\frac{1}{x}\lim_{t\to 0}\ln(1+t)^{\frac{1}{t}}\\&=\frac{1}{x}\end{align*} with $t=\frac{h}{x}$.\begin{equation}\label{eq:dln}\frac{d}{dx}\ln x=\frac{1}{x}\end{equation} Using the change of base formula $\log_ax=\frac{\ln x}{\ln a}$, we obtain \begin{equation}\label{eq:dlog}\frac{d}{dx}\log_ax=\frac{1}{x\ln a}\end{equation}
Derivatives of Exponential Functions
We can find the derivative of the natural exponential function $y=e^x$ using the relationship $x=\ln y$ and implicit differentiation. Differentiating $x=\ln y$ with respect to $x$ we obtain $1=\frac{1}{y}\frac{dy}{dx}$ i.e. $\frac{dy}{dx}=y=e^x$. Hence \begin{equation}\label{eq:dnatexp}\frac{d}{dx}e^x=e^x\end{equation} Note that $a^x=e^{x\ln a}$. So by the chain rule we find $$\frac{d}{dx}a^x=\frac{d}{dx}e^{x\ln a}=e^{x\ln a}\ln a=a^x\ln a$$ Hence\begin{equation}\label{label:dexp}\frac{d}{dx}a^x=a^x\ln a\end{equation}
The Power Rule (General Form)
Let us consider $x^n$ for any $x>0$ and any real number $n$. As we have seen above $x^n=e^{n\ln x}$ so by the chain rule $$\frac{d}{dx}x^n=\frac{d}{dx}e^{n\ln x}=e^{n\ln x}\frac{n}{x}=nx^{n-1}$$ This completes the proof of the general power rule.
Logarithmic Differentiation
The derivatives of functions involving products, quotients, and powers may be found more easily (quickly) by taking the natural logarithm of such functions before differentiating. This allows us to break a complicated function into simpler pieces using properties of the natural logarithm. This whole process, which is called logarithmic differentiation, makes differentiation much easier and quicker.
Example. Use logarithmic differentiation to find the derivative of $y=\frac{x\sqrt{x^2+1}}{(x+1)^{\frac{2}{3}}}$.
Solution. \begin{align*}\ln y&=\lnĀ \frac{x\sqrt{x^2+1}}{(x+1)^{\frac{2}{3}}}\\&=\ln x+\frac{1}{2}\ln(x^2+1)-\frac{2}{3}\ln(x+1)\end{align*} Differentiating with respect to $x$, $$\frac{1}{y}\frac{dy}{dx}=\frac{1}{x}+\frac{x}{x^2+1}-\frac{2}{3(x+1)}$$ Therefore, $$\frac{dy}{dx}=\left[\frac{1}{x}+\frac{x}{x^2+1}-\frac{2}{3(x+1)}\right]\frac{x\sqrt{x^2+1}}{(x+1)^{\frac{2}{3}}}$$
Example. Let $y=x^x$, $x>0$. Find $\frac{dy}{dx}$.
Solution 1. $y=x^x=e^{x\ln x}$ and by the chain rule we obtain $$\frac{dy}{dx}=x^x(1+\ln x)$$
Solution 2. Use logarithmic differentiation. $\ln y=x\ln x$ and differentiating this with respect to $x$, we have $$\frac{1}{y}\frac{dy}{dx}=1+\ln x$$ Hence, $$\frac{dy}{dx}=x^x(1+\ln x)$$
Alternative Approach
In the earlier approach we started out with $e^x$ and regarded $\ln x$ as its inverse function. It can also be done the other way around, namely we first define $\ln x$ and regard $e^x$ as its inverse function. The natural logarithmic function $\ln x$ can be defined by \begin{equation}\label{eq:natlog}\ln x=\int_1^x\frac{1}{t}dt,\ x>0\end{equation} The number $x$ that satisfies the equation $\ln x=1$ is denoted by $e$. All properties of natural logarithm can be derived from definition \eqref{eq:natlog}. Also from definition \eqref{eq:natlog}, we obtain \eqref{eq:dln} by the Fundamental Theorem of Calculus. Using \eqref{eq:dln} one can show the limit $$\lim_{x\to 0}(1+x)^{\frac{1}{x}}=e$$
Proof. Let $f(x)=\ln x$. Then $f'(x)=\frac{1}{x}$ and so $f'(1)=1$. On the other hand, \begin{align*}f'(1)&=\lim_{x\to 0}\frac{f(1+x)-f(1)}{x}\\&=\lim_{x\to 0}\frac{\ln(1+x)}{x}\\&=\lim_{x\to 0}\ln(1+x)^{\frac{1}{x}}\\&=\ln[\lim_{x\to 0}(1+x)^{\frac{1}{x}}]\end{align*} Therefore, $$\lim_{x\to 0}(1+x)^{\frac{1}{x}}=e$$
Remark. By substituting $y=\frac{1}{x}$, $$e=\lim_{y\to\infty}\left(1+\frac{1}{y}\right)^y$$
Remark. An alternative definition of $e$ is as an infinite series $$e=1+\frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}+\cdots$$ For details see here.