Differentiation

Differentiability

Definition

We say that \( f : D \to \mathbb{R} \) is differentiable at \( x \) if the limit

\[ f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \]

exists. We call \( f'(x) \) the derivative of \( f(x) \). If \( f'(x) \) exists for all \( x \in D \) then we say \( f \) is differentiable.

Differentiation and Continuity

Theorem

If \( f : D \rightarrow \mathbb{R} \) is differentiable at \( a \in D \) then \( f \) is continuous at \( a \).

Proof

We want to show that \(\lim_{x \to a}f(x) = f(a)\). But if \( x = a + h \) then this is the same as \(\lim_{h \to 0}f(a+h) = f(a)\). We will show that this is true by proving \(\lim_{h \to 0}(f(a+h) - f(a)) = 0\).

\[\lim_{h \to 0}(f(a+h) - f(a)) = \lim_{h \to 0}\frac{f(a+h) - f(a)}{h} \cdot h\] \[= \lim_{h \to 0}\frac{f(a+h) - f(a)}{h} \cdot \lim_{h \to 0}h\] \[= f'(a) \cdot 0\] \[= 0\]

$\square$

Remarks

The absolute value function

Theorem

The function \( f(x) = |x| \) is continuous, but not differentiable.

Proof

At the point \(a=0\) we have

\[ \lim_{x\to 0^{-}}|x|=0=\lim_{x\to 0^{+}}|x|\quad\text{ so }\quad\lim_{x\to 0}f(x)=0=f(0) \]

So the function is continuous.
We will now show that \(f(x)\) is not differentiable. Unsurprisingly, the interesting thing happens when \(x=0\).

\[ \lim_{h\to 0}\frac{f(0+h)-f(0)}{h}=\lim_{h\to 0}\frac{|h|}{h}=\begin{cases} -1 & \text{if }h < 0\\ 1 & \text{if }h>0 \end{cases} \]

The expression \(\left.\frac{|h|}{h}\right|\) is not defined when \(h=0\) (but we don't care about this as \(h\) never equals zero in our limit). So

\[ \lim_{h\to 0^{-}}\frac{|h|}{h}=-1\qquad\text{ and }\qquad\lim_{h\to 0^{+}}\frac{|h|}{h}=1 \]

These limits are not equal, so \(\lim_{h\to 0}\frac{|h|}{h}\) does not exist. So \(f(x)=|x|\) is not differentiable when \(x=0\).

$\square$

Differentiation of common functions

See the proof of many common functions under démonstration des fonctions dérivées.

Sum rule of differentiation

Theorem

If \(f\) and \(g\) are differentiable at \(x\) then

\[ (f+g)^{\prime}(x) = f^{\prime}(x) + g^{\prime}(x) \]

Proof

We want to show that \((f+g)^{\prime}(x)\) exists and is equal to \(f^{\prime}(x)+g^{\prime}(x)\). Recall that

\[ f^{\prime}(x) = \lim_{h\to 0}\frac{f(x+h)-f(x)}{h} \]

so

\[ (f+g)^{\prime}(x) = \lim_{h\to 0}\frac{(f+g)(x+h)-(f+g)(x)}{h} \] \[ = \lim_{h\to 0}\frac{f(x+h)+g(x+h)-f(x)-g(x)}{h} \] \[ = \lim_{h\to 0}\frac{(f(x+h)-f(x))+(g(x+h)-g(x))}{h} \] \[ = \lim_{h\to 0}\frac{f(x+h)-f(x)}{h} + \frac{g(x+h)-g(x)}{h} \] \[ = \lim_{h\to 0}\frac{f(x+h)-f(x)}{h} + \lim_{h\to 0}\frac{g(x+h)-g(x)}{h} \] \[ = f^{\prime}(x) + g^{\prime}(x) \]

Product rule of differentiation

Theorem

If \( f \) and \( g \) are differentiable at \( x \) then

\[ (fg)'(x) = f(x)g'(x) + f'(x)g(x) \]

Proof

As for the sum rule, we want to show that \( (fg)'(x) \) exists and is equal to \( f(x)g'(x) + f'(x)g(x) \). Recall that

\[ (fg)'(x) = \lim_{h \to 0} \frac{(fg)(x+h)-(fg)(x)}{h} \] \[ = \lim_{h \to 0} \frac{f(x+h)g(x+h)-f(x)g(x)}{h} \] \[ = \lim_{h \to 0} \frac{f(x+h)g(x+h)-f(x+h)g(x)+f(x+h)g(x)-f(x)g(x)}{h} \] \[ = \lim_{h \to 0} \frac{f(x+h)g(x+h)-f(x+h)g(x)}{h} + \frac{f(x+h)g(x)-f(x)g(x)}{h} \] \[ = \lim_{h \to 0} f(x+h)\frac{g(x+h)-g(x)}{h} + \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}g(x) \] \[ = f(x)g'(x) + f'(x)g(x) \]

Chain rule of differentiation

Theorem

If \( f \) and \( g \) are differentiable then

\[ (f \circ g)'(x) = f'(g(x))g'(x) \]

Proof

\[ (f \circ g)'(x) = \lim_{h \to 0} \frac{(f \circ g)(x + h) - (f \circ g)(x)}{h} \] \[ = \lim_{h \to 0} \frac{f(g(x + h)) - f(g(x))}{h} \] \[ = \lim_{h \to 0} \frac{f(g(x + h)) - f(g(x))}{g(x + h) - g(x)} \cdot \frac{g(x + h) - g(x)}{h} \] \[ = \left( \lim_{h \to 0} \frac{f(g(x + h)) - f(g(x))}{g(x + h) - g(x)} \right) \left( \lim_{h \to 0} \frac{g(x + h) - g(x)}{h} \right) \] \[ = f'(g(x))g'(x) \]

To justify this, we define \( H = g(x + h) - g(x) \), and equivalently \( g(x + h) = g(x) + H \). Note that

\[ \lim_{h \to 0} H = \lim_{h \to 0} g(x + h) - g(x) = g(x) - g(x) = 0 \]

By making the substitutions we have that

\[ \left( \lim_{h \to 0} \frac{f(g(x+h)) - f(g(x))}{g(x+h) - g(x)} \right) g'(x) = \left( \lim_{H \to 0} \frac{f(g(x) + H) - f(g(x))}{H} \right) g'(x) \] \[ = f'(g(x)) g'(x) \]

Quotient rule of differentiation

Theorem

If \(f\) and \(g\) are differentiable at \(x\), then

\[ \left( \frac{f}{g} \right)'(x) = \frac{f'(x)g(x) - f(x)g'(x)}{g^2(x)} \]

Proof

TBD

Inverse functions

Definition

We say that \(g : D_g \rightarrow \mathbb{R}\) is the inverse function of \(f : D_f \rightarrow \mathbb{R}\) if for all \(x \in D_g\)

\[ (f \circ g)(x) = x = (g \circ f)(x) \]

and if for all \(x \in D_f\) we have

\[ (g \circ f)(x) = x \]

Remark

Note that in certain cases we might be interested in functions that are not defined over all of $\mathbb{R}$.

Differentiation of inverse functions

Proposition

If \( f^{-1} \) is differentiable at \( y \), then

\[ (f^{-1})'(y) = \frac{1}{f'(f^{-1}(y))} \]

Proof

By the rule of composing functions, the derivative of \( f^{-1}(f(x)) \) is

\[ f'(x)(f^{-1})'(f(x)) \]

but because \( f^{-1}(f(x)) = x \) this is also equal to 1. Hence

\[ f'(x)(f^{-1})'(f(x)) = 1 \]

and so

\[ (f^{-1})'(f(x)) = \frac{1}{f'(x)} \]

Now setting \( f(x) = y \) we have \( x = f^{-1}(y) \) and so

\[ (f^{-1})'(y) = \frac{1}{f'(f^{-1}(y))} \]

$\square$