Skip to main content

Section 1.3 Derivatives of Elementary Functions

Armed with the rules of differentiation from the previous section and some basic facts about elementary functions, we will discuss how to compute their derivatives.

Subsection 1.3.1 Derivatives of Algebraic Functions

The derivative of a constant function is zero and the derivative of \(x\) (the identity function of \(x\)) is \(1\text{.}\) Since polynomial functions in \(x\) are obtained by taking sums and products on the constants and \(x\text{,}\) we can find their derivatives using the sum and product rules.

Example 1.13.

The derivative of \(f(x) = x^2 - 3x +1\) is
\begin{align*} (x^2 -3x +1)' & = (x^2)' + (-3x)' + (-1)'\\ & = 2x +(-3)(x)' + 0\\ & = 2x -3 \end{align*}
In general,
\begin{equation*} \left( \sum_{k=0}^n a_k x^k \right)' = \sum_{k=0}^n k a_k x^{k-1} \end{equation*}
Computing the derivative of rational functions can now be handled by the quotient rule.

Example 1.14.

\(\frac{3x-2}{x^2-3x+1}\text{.}\)\(f(x) = 3x-2\)\(g(x)=x^2 -3x+1\text{.}\)\(f'(x) = 3\)\(g'(x) = 2x-3\text{.}\)
\begin{align*} f'g-fg' & = 3(x^2 -3x+1) - (3x-2)(2x-3) \\ & = 3x^2 -9x +3 - (6x^2 -13x +6)\\ & = -3x^2 +4x -3 \end{align*}
\begin{equation*} \left( \dfrac{3x-2}{x^2-3x+1} \right)' = \frac{f'g - fg'}{g^2} = \frac{-3x^2 + 4x-3}{(x^2-3x+1)^2} \end{equation*}

Subsection 1.3.2 Derivatives of Exponential and Logarithmic Functions

Up to this point, we have not developed enough theory to show that exponential functions/logarithmic functions are differentiable. There are a couple of ways to develop the theory. For example, through the theory of integration, we can define the natural logarithm first. Or we can define the function \(e^x\) using power series. We will see both ways in Part II. At this point, let us just take a \(b \gt 0\) other than \(1\) (so the function \(b^x\) is not constantly \(1\)). By examine its graph, it is quite convincing that \(b^x\) is differentiable at \(x=0\text{.}\) So there is a unique function \(\varphi_b(x)\) continuous at \(x=0\) such that
\begin{equation*} b^h - b^0 = \varphi_b(h)(h-0). \end{equation*}
But then for any fixed \(x\text{,}\) by multiplying the above with \(b^x\text{,}\) we get
\begin{equation*} b^{x+h} - b^x = b^x\varphi_b(h)h. \end{equation*}
This shows that \(b^x\) is differentiable everywhere and \((b^x)' = \varphi_b(0)b^x\text{.}\) That is the derivative of \(b^x\) is itself multiplied by its derivative at \(x=0\text{.}\) Moreover, by inspecting the graph of \(b^x\) for various \(b\text{,}\) one should be convinced that there is a unique number \(b\) somewhere between \(2\) and \(3\) such that \(\varphi_b(0)\text{,}\) i.e. the derivative of \(b^x\) at \(x=0\) is exactly \(1\text{.}\) This special number is denoted by \(e\) (the Euler constant). Thus, \(e^x\) is a function whose derivative is itself. In fact, it can be shown that \(e^x\) is the unique function \(f(x)\) satisfying
\begin{equation*} f(0) = 1\ \text{and}\ \dfrac{df(x)}{dx} = f(x). \end{equation*}
Since \(e^x\text{,}\) which is the derivative of itself, is positive everywhere, \(e^x\) is strictly increasing on the real line (we will justify all these later). Thus, the inverse function of \(e^x\) (or \(\exp(x)\)), denoted by \(\ln(x)\text{,}\) exists and is also differentiable everywhere. This function is called the natural logarithm of \(x\text{.}\) Moreover, let \(y = \ln(x)\text{,}\) i.e. \(e^y = x\text{,}\) then by taking the derivative implicitly, we get
\begin{equation*} 1 = \frac{dx}{dx} = \frac{d e^y}{dx} = \frac{d e^y}{dy}\frac{dy}{dx} = e^y \dfrac{dy}{dx}. \end{equation*}
Therefore,
\begin{equation*} \frac{d \ln(x)}{dx} = \frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}. \end{equation*}

Checkpoint 1.15.

Let \(a\) be a constant. Show that \((e^{ax})' = ae^{ax}\text{.}\) Deduce that \((b^x)' = \ln(b)b^x.\)
This matches our earlier observation that the derivative of \(b^x\) is a multiple of itself by its derivative at \(x=0\text{.}\) The exercise above shows that this derivative is the natural log of \(b\text{.}\)

Checkpoint 1.16.

Check that \(\dfrac{d}{dx}\ln f = \dfrac{f'}{f}\text{.}\) The function \(f'/f\) is called the logarithmic derivative of \(f\text{.}\)
Taking the logarithmic derivative is useful for finding derivatives of functions of the from \(g(x)^{f(x)}\) where \(g(x)\) is always positive. Note that we interpret \(g^f\) as \(\exp(f\ln g)\) thus it is differentiable when both \(f\) and \(g\) are.

Example 1.17.

Let \(f\) and \(g\) be differentiable and suppose \(g\) is positive. Let us find the derivative of \(h:=g^f\text{.}\) Applying the logarithmic derivative operator to \(h\text{,}\) we get
\begin{align*} \frac{h'}{h} & = \dfrac{d}{dx}\ln g^f =\dfrac{d}{dx} f\ln g = f'\ln g + f\dfrac{g'}{g} \end{align*}
So
\begin{align*} h' & = h\left(f'\ln g + \dfrac{fg'}{g}\right) = h\dfrac{f'g\ln g+ fg'}{g} \end{align*}

Checkpoint 1.18.

Verify the power rule for \(x^r = \exp(r\ln x)\text{.}\)

Checkpoint 1.19.

Compute the derivative of \(x^x\text{.}\)

Subsection 1.3.3 Derivatives of trigonometric functions and their inverses

If you estimate the derivatives of the graph \(y = \sin(x)\) at various points and plot them out, you will get a graph that looks like \(y=\cos(x)\text{.}\) At least, one thing for sure is that the places where \(y=\sin(x)\) have a horizontal tangent coincide with the zeros of \(\cos(x)\text{.}\) So, is it really the case that \((\sin(x))' = \cos(x)\text{?}\) The answer is ’yes’ and we are going to justify this assertion here. It turns out that all we need to know is that the limit \(\lim_{h \to 0} \sin(h)/h\) which is the derivative of \(\sin(x)\) at \(x=0\text{,}\) is \(1\) and consequently \(\lim_{h\to 0} (1-\cos(h))/h = 0\) (see Appendix B). So, we have
\begin{align*} \frac{\sin(x+h) - \sin(x)}{h} & = \frac{\sin(x)\cos(h) + \sin(h)\cos(x)-\sin(x)}{h}\\ & = \left(\sin(x)\frac{\cos(h)-1}{h} + \frac{\sin(h)}{h}\cos(x)\right) \end{align*}
and from the two limits aforementioned, the last function tends to \(\cos(x)\) as \(h\to 0\text{.}\)
Figure 1.20.
So, indeed the derivative of \(\sin(x)\) is \(\cos(x)\text{.}\) This is a very interesting phenomenon, namely \(\sin(x)\) is a function whose derivative is a translation of itself! More precisely, \((\sin(x))' = \sin(x + \pi/2)\text{.}\) Moreover, since one really cannot distinguish \(\sin(x)\) from \(\cos(x)\) without a coordinate system, the derivative of \(\cos(x)\) must also be the translation of itself by \(\pi/2\text{.}\) That is
\begin{equation*} (\cos(x))' = \cos(x+\pi/2) = -\sin(x)\text{.} \end{equation*}
Certainly one arrives to the same conclusion by the chain rule as the derivative of \(\cos(x)\) is the second derivative of \(\sin(x)\text{:}\)
\begin{align*} \frac{d}{dx} \cos(x) & = \frac{d^2}{dx^2}\sin(x) = \frac{d}{dx}\sin(x+\pi/2) \\ & = \sin(x+\pi/2+\pi/2)\frac{d}{dx}(x+\pi/2) = \sin(x+\pi) = -\sin(x). \end{align*}
Continuing with this game, we see that the \(n\)th derivative of \(\sin(x)\) is \(\sin(x+n\pi/2)\text{.}\) In particular, the 3rd derivative of \(\sin(x)\) is \(\sin(x+3\pi/2) = -\cos(x)\) and the fourth derivative of \(\sin(x)\) is itself since \(\sin(x+4\pi/2) = \sin(x+2\pi) = \sin(x)\text{.}\) So the derivatives of \(\sin(x)\) (also \(\cos(x)\)) form a cycle of length four. Thus, we can quickly figure out any derivative of \(\sin(x)\text{.}\) For example, since the remainder of \(57\) divided by \(4\) is \(1\text{,}\) the \(57\)th derivative of \(\sin(x)\) is the same as the first derivative of \(\sin(x)\) which is \(\cos(x)\text{.}\)
Other trigonometric functions can be expressed using \(\sin(x)\) and \(\cos(x)\text{,}\) their derivatives can be computed readily.

Example 1.21.

Let us compute the derivative of \(\tan(x)\text{.}\) Let \(y=\tan(x)=\sin(x)/\cos(x) \text{,}\) so then
\begin{equation*} y\cos(x) = \sin(x) \end{equation*}
Taking the derivative on both sides, we get
\begin{equation*} y'\cos(x) - y\sin(x) = \cos(x). \end{equation*}
Therefore,
\begin{equation*} y' = 1+ y\frac{\sin(x)}{\cos(x)} = 1+ y^2. \end{equation*}
\((\tan(x))' = 1+\tan^2(x) = \sec^2(x).\)

Checkpoint 1.22.

Find the derivatives of \(\csc(x), \sec(x)\) and \(\cot(x)\text{.}\)
Much like how we deduce the derivative of \(\ln(x)\) from knowing the derivative of \(e^x\text{,}\) the derivatives of the inverse of the trigonometric functions can now be found by implicit differentiation.

Example 1.23.

Let \(y = \arctan(x)\text{.}\) So, \(\tan(y) = x\) and
\begin{align*} 1 & = \frac{dx}{dx} = \frac{d}{dx}\tan(y) = \frac{d}{dy}\tan(y)\frac{dy}{dx}\\ & (1+\tan^2(y))\frac{dy}{dx} = (1+x^2)\frac{dy}{dx} =1. \end{align*}
Therefore, \(\dfrac{d}{dx} \arctan(x) = \dfrac{1}{1+x^2}\text{.}\)

Example 1.24.

One needs to exercise a bit more care in finding the derivative of \(\asec(x)\) as its domain, unlike that of \(\arctan(x)\text{,}\) is not a interval but a disconnected union of two intervals \((-\infty,-1]\) and \([1,\infty)\text{.}\) Let \(y = \asec(x)\) and proceed as usual, we find that
\begin{align*} \frac{dy}{dx} & = \frac{1}{dx/dy}=\frac{1}{d\sec(y)/dy} \frac{1}{\sec(y)\tan(y)}= \frac{1}{x\tan(y)}. \end{align*}
The trickier part is to express \(\tan(y)\) in terms of \(x=\sec(y)\text{.}\) Certainly, \(\tan^2(y) \equiv \sec^2(y)-1=x^2 -1\) but note that in the domain of \(\asec(x)\text{,}\) \(0 \le y \lt \pi/2\) when \(x \ge 1\) and \(\pi/2 \le y \lt \pi\) when \(x \le -1\text{.}\) And so,
\begin{equation*} \tan(y) = \begin{cases} \phantom{-}\sqrt{x^2-1} & x \ge 1; \\ -\sqrt{x^2-1} & x \le -1. \end{cases} \end{equation*}
Therefore,
\begin{equation*} \frac{d}{dx}\asec(x) = \begin{cases} \dfrac{1}{x\sqrt{x^2-1}} & x \ge 1; \\ \dfrac{-1}{x\sqrt{x^2-1}} & x \le -1. \end{cases} \end{equation*}
or \((\asec(x))' = \dfrac{1}{|x|\sqrt{x^2-1}}\) as some may prefer to write it more succinctly. We should also point out that by examining the graph of \(\asec(x)\text{,}\) it is clear that the derivative of \(\asec(x)\) is an even function hence one can deduce its expression on \(x \lt -1\) from its expression on \(x \ge 1\text{.}\)
Figure 1.25.

Checkpoint 1.26.

Find the derivatives of \(\arcsin(x)\text{.}\) Deduce the derivative of \(\arccos(x)\) using the fact that \(\arcsin(x)+\arccos(x)\) is the constant function \(\pi/2 \ (-1\le x \le 1)\text{.}\) Likewise, deduce the derivatives of \(\operatorname{arccsc}(x)\) and \(\operatorname{arccot}(x)\) from that of \(\asec(x)\) and \(\arctan(x)\text{,}\) respectively.