It is possible to calculate the derivatives of single variable functions using differentiation rules without taking limits each and every time we compute the derivatives. In this post, we introduce several rules of differentiation. However, we prove only a few of them and for the proof of the other rules, the reader should refer to standard calculus textbooks.

#### Differentiation rules: constant function rule and constant multiple rule

The derivative of a constant function \(f(x) = c\) is zero and the proof is as follows:

$$f'(x) =$$ $$\lim_{h \to 0} \frac{f(x+h) – f(x)}{h} = $$ $$\lim_{h \to 0} \frac{c – c}{h} = \lim_{h \to 0} 0 = 0.$$

The derivative of a constant multiple of a function is the derivative of the function multiplied by its constant multiple. In other words, $$(cf)’ = cf’,$$ and its proof goes as follows:

$$(cf)'(x) = $$ $$\lim_{h \to 0} \frac{(cf)(x+h) – (cf)(x)}{h} = $$ $$\lim_{h \to 0} c \cdot \frac{f(x+h) – f(x)}{h} = $$ $$c \lim_{h \to 0} \frac{f(x+h) – f(x)}{h} = cf'(x).$$

#### Differentiation rules: sums and differences rules

Let \(f\) and \(g\) be differentiable functions at a point \(a\). Then, their sum \(f+g\) and their difference \(f – g\) are differentiable at the point \(a\) and we have:

- \((f+g)'(a) = f'(a) + g'(a)\).
- \((f-g)'(a) = f'(a) – g'(a)\).

These are usually abbreviated in the following formula: $$(f \pm g)’ = f’ \pm g’.$$

#### Differentiation is a linear map

For the reader who is familiar with linear algebra topics, we add that the differentiation function who sends any differentiable function \(f\) to its derivative \(f’\) is a linear map (transformation). In view of the differentiation constant multiple rule and the differentiation rule for the sums of functions, the proof is straightforward. Moreover, the kernel of the differentiation map is the set of all constant functions because \(f’ = 0\) if and only if \(f\) is a constant function, i.e. there is a constant real number \(c\) such that \(f(x) = c\).

#### Differentiation rules: product and quotient rules

Let (f) and (g) be differentiable functions at a point \(a\). Then, their product \(fg\) is differentiable at the point \(a\) and we have: $$(fg)'(a) = f'(a)g(a) + f(a)g'(a).$$

Also, let (f) and (g) be differentiable functions at a point \(a\) with \(g'(a) \neq 0\). Then, their quotient \(f/g\) is differentiable at the point \(a\) and we have: $$(f/g)'(a) = \frac{f'(a)g(a) – f(a)g'(a)}{(g(a))^2}.$$

**Exercise** (the reciprocal rule). Let a function \(f\) be differentiable at a point \(a\) with \(f(a) \neq 0\). Prove that the derivative of the reciprocal \(1/f\) of the function \(f\) at \(a\) is: $$- \frac{f'(a)}{(f(a))^2}.$$

#### Differentiation of common functions

Since the derivative of the identity function \(f(x) = x\) is \(f'(x) = 1\), using differentiation rules, it is easy to see that the derivative of a linear function \(l(x) = mx+b\) is \(l'(x) = m\).

**Exercise**. Prove that the derivative of the power function \(p(x) = x^n\) is \(p'(x) = nx^{n-1}\).

**Solution**. The proof is by induction on the power of \(x\) in the function \(p(x) = x^n\). For the case, \(n=1\), we already know that if \(p(x) = x\), then \(p'(x) = 1\).

Now, assume that if \(p(x) = x^k\), then \(p'(x) = k x^{k-1}\). Observe that $$(x^{k+1})’ = (x x^k)’ = $$ $$x’ x^k + x (x^k)’ = $$ $$1 \cdot x^k + x (kx^{k-1}) = $$ $$x^k + kx^k = (k+1)x^k.$$

**Exercise**. Find the derivative of any polynomial function of the form $$p(x) = a_n x^n + \dots + a_1 x + a_0.$$

The formulas for the derivative of trigonometric functions are as follows:

- \((\sin x)’ = \cos x\).
- \((\cos x)’ = -\sin x\).

**Exercise**. Using differentiation quotient rule and the above formulas, compute the derivative of other trigonometric functions such as \(\tan x\), \(\cot x\), \(\sec x\), and \(\csc x\).

The derivative of an exponential function \(f(x) = a^x\), where \(a \neq 1\) is \(f'(x) = (\ln a) a^x\). In particular, \((e^x)’ = e^x\). Note that the derivative a single-variable function \(f(x)\) is the same the function itself if and only if \(f(x) = ke^x\) for some constant real number \(k\).

The derivative of a logarithmic function \(f(x) = \log_{b} x\), where \(b \neq 1\) is a positive real number, is $$f'(x) = \frac{1}{(\ln b) x}.$$ In particular, $$(\ln x)’ = \frac{1}{x}.$$

#### The chain rule

One of the most significant differentiation rules in calculus is the chain rule. The chain rule explains how to compute the derivative of the composition of functions.

**Result** (the chain rule). Let \(f(u)\) be differentiable at \(u = g(x)\) and \(g(x)\) be differentiable at \(x\). Then, the composition \(f \circ g\) of the function \(f\) and \(g\) is differentiable at \(x\) and $$(f \circ g)'(x) = f'(g(x)) \cdot g'(x).$$

**Exercise**. Calculate the derivative of the function \(\cos(x^2)\).

By the chain rule $$(\cos(x^2))’ = $$ $$ (x^2)’ \cos'(x^2) = $$ $$2x \times -\sin(x^2) = $$ $$-2x\sin(x^2).$$

**Exercise**. Let \(u\) be a function of the independent variable \(x\). Calculate the derivative of the function \(e^{u(x)}\).

**Exercise**. Let \(u\) and \(v\) be functions of the independent variable \(x\). Calculate the derivative of the function \(u(x)^{v(x)}\).

Hint: Write \(u^v = e^{v \ln u}\) and use the chain rule.

#### Differentiation rule for the inverse of a function

**Result**. Let \(f\) be a continuous 1-to-1 function over an open interval \(I\). Also, let \(f\) be differentiable at \(f^{-1}(y)\). Then, the following statements hold:

- If \(f'(f^{-1}(y)) = 0\), then \(f^{-1}\) is not differentiable at \(y\).
- If \(f'(f^{-1}(y)) \neq 0\), then \(f^{-1}\) is differentiable at \(y\) and $$(f^{-1})'(y) = \frac{1}{f'(f^{-1}(y))}.$$

The proof of the above result contains a couple of interesting points that are worth noting. The proof of the first statement is as follows:

On the contrary, assume that \(f^{-1}\) is differentiable at \(y\). From \(f(f^{-1}(y)) = y\) and the chain rule, we obtain that $$0 = f'(f^{-1}(y)) \cdot (f^{-1})'(y) = 1,$$ a contradiction. Now, we proceed to prove the second statement:

Let \(y = f(x)\). Observe that by the definition of the derivative of a function, $$(f^{-1})'(y) = $$ $$\lim_{h \to 0} \frac{f^{-1}(y+h) – f^{-1}(y)}{h} = $$ $$\lim_{h \to 0} \frac{f^{-1}(y+h) – x}{h}.$$ For each real number \(y+h\) in the domain of \(f^{-1}\), there is a unique real number \(k\) such that $$y + h = f(x+k).$$ From this, we obtain that $$ \frac{f^{-1}(y+h) – x}{h} = $$ $$ \frac{x+k – x}{f(x+k) – y} = $$ $$\frac{k}{f(x+k) – f(x)}.$$ On the other hand, \(f^{-1}(y+h) = x+k\) implies that $$k = f^{-1}(y+h) – f^{-1}(y).$$

By an exercise on the continuity of 1-to-1 functions mentioned in the post of the limit of a function, the function \(f^{-1}\) is continuous at \(y\). This implies that \(k\) approaches to zero as \(h\) approaches to zero. Finally, $$\lim_{k \to 0} \frac{f(x+k)-f(x)}{k} = $$ $$f'(x) = f'(f^{-1}(y)) \neq 0.$$ Hence, \((f^{-1})'(y) = \displaystyle \frac{1}{f'(f^{-1}(y))},\) as required.

#### An interesting point on the proof of the differentiation rule for the inverse of a function

Some references prove the above result using the chain rule as follows:

Since \(f(f^{-1}(y)) = y\), by the chain rule, we have $$f'(f^{-1}(y)) \cdot (f^{-1})'(y) = 1$$ which implies that $$(f^{-1})'(y) = \frac{1}{f'(f^{-1}(y))}.$$ However, this proof has a flaw – as Michael Spivak explains it in his book on single-variable calculus – since this proof uses this point that the function \(f^{-1}\) is differentiable without proving it.