
# 6.2: Derivatives


##### Definition

Suppose $$D \subset \mathbb{R}, f: D \rightarrow \mathbb{R}, a$$ is an interior point of $$D,$$ and $$f$$ is differentiable at $$a .$$ We call

$\lim _{x \rightarrow a} \frac{f(x)-f(a)}{x-a}$

the derivative of $$f$$ at $$a,$$ which we denote $$f^{\prime}(a)$$.

Note that if $$f$$ is differentiable at $$a,$$ then

$\lim _{x \rightarrow a} \frac{f(x)-f(a)}{x-a}=\lim _{h \rightarrow 0} \frac{f(a+h)-f(a)}{h}.$

##### Definition

Suppose $$D \subset \mathbb{R}, f: D \rightarrow \mathbb{R},$$ and $$E$$ is the set of interior points of $$D$$ at which $$f$$ is differentiable. We call the function $$f^{\prime}: E \rightarrow \mathbb{R}$$ defined by

$f^{\prime}(x)=\lim _{h \rightarrow 0} \frac{f(x+h)-f(x)}{h}$

the derivative of $$f$$.

##### Example $$\PageIndex{1}$$

Let $$n \in \mathbb{Z}^{+}$$ and define $$f: \mathbb{R} \rightarrow \mathbb{R}$$ by $$f(x)=x^{n} .$$ Then

\begin{aligned} f^{\prime}(x) &=\lim _{h \rightarrow 0} \frac{(x+h)^{n}-x^{n}}{h} \\ &=\lim _{h \rightarrow 0} \frac{x^{n}+n x^{n-1} h+\sum_{k=2}^{n}\left(\begin{array}{l}{n} \\ {k}\end{array}\right) x^{n-k} h^{k}-x^{n}}{h} \\ &=\lim _{h \rightarrow 0}\left(n x^{n-1}+\sum_{k=2}^{n}\left(\begin{array}{l}{n} \\ {k}\end{array}\right) x^{n-k} h^{k-1}\right) \\ &=n x^{n-1}.\end{aligned}

##### Example $$\PageIndex{2}$$

Define $$f: \mathbb{R} \rightarrow \mathbb{R}$$ by $$f(x)=|x| .$$ Then

\frac{f(0+h)-f(0)}{h}=\frac{|h|}{h}=\left\{\begin{aligned} 1, & \text { if } h>0, \\-1, & \text { if } h<0. \end{aligned}\right.

Hence

$\lim _{h \rightarrow 0^{-}} \frac{f(0+h)-f(0)}{h}=-1$

and

$\lim _{h \rightarrow 0+} \frac{f(0+h)-f(0)}{h}=1.$

Thus $$f$$ is not differentiable at $$0 .$$

##### Exercise $$\PageIndex{1}$$

Show that if $$c \in \mathbb{R}$$ and $$f(x)=c$$ for all $$x \in \mathbb{R},$$ then $$f^{\prime}(x)=0$$ for all $$x \in \mathbb{R}$$.

##### Exercise $$\PageIndex{2}$$

Define $$f:[0,+\infty) \rightarrow[0,+\infty)$$ by $$f(x)=\sqrt{x} .$$ Show that $$f^{\prime}:(0,+\infty) \rightarrow(0,+\infty)$$ is given by

$f^{\prime}(x)=\frac{1}{2 \sqrt{x}}.$

##### Exercise $$\PageIndex{3}$$

Define $$f: \mathbb{R} \rightarrow \mathbb{R}$$ by

$f(x)=\left\{\begin{array}{ll}{x,} & {\text { if } x<0,} \\ {x^{2},} & {\text { if } x \geq 0.}\end{array}\right.$

Is $$f$$ differentiable at $$0 ?$$

##### Exercise $$\PageIndex{4}$$

Define $$f: \mathbb{R} \rightarrow \mathbb{R}$$ by

$f(x)=\left\{\begin{array}{ll}{x^{2},} & {\text { if } x<0,} \\ {x^{3},} & {\text { if } x \geq 0.}\end{array}\right.$

Is $$f$$ differentiable at $$0 ?$$

##### Proposition $$\PageIndex{1}$$

If $$f$$ is differentiable at $$a$$, then $$f$$ is continuous at $$a$$.

Proof

If $$f$$ is differentiable at $$a,$$ then

$\lim _{x \rightarrow a}(f(x)-f(a))=\lim _{x \rightarrow a}\left(\frac{f(x)-f(a)}{x-a}\right)(x-a)=f^{\prime}(a)(0)=0.$

Hence $$\lim _{x \rightarrow a} f(x)=f(a),$$ and so $$f$$ is continuous at $$a$$. $$\quad$$ Q.E.D.

## 6.2.1 The Rules

##### Proposition $$\PageIndex{2}$$

Suppose $$f$$ is differentiable at $$a$$ and $$\alpha \in \mathbb{R} .$$ Then $$\alpha f$$ is differentiable at $$a$$ and $$(\alpha f)^{\prime}(a)=\alpha f^{\prime}(a)$$.

##### Exercise $$\PageIndex{5}$$

Prove the previous proposition.

##### Proposition $$\PageIndex{3}$$

Suppose $$f$$ and $$g$$ are both differentiable at $$a .$$ Then $$f+g$$ is differentiable at $$a$$ and $$(f+g)^{\prime}(a)=f^{\prime}(a)+g^{\prime}(a)$$.

##### Exercise $$\PageIndex{6}$$

Prove the previous proposition.

##### Proposition $$\PageIndex{4}$$

(Product rule).

Suppose $$f$$ and $$g$$ are both differentiable at a. Then $$f g$$ is differentiable at $$a$$ and

$(f g)^{\prime}(a)=f(a) g^{\prime}(a)+g(a) f^{\prime}(a).$

Proof

We have

\begin{aligned}(f g)^{\prime}(a) &=\lim _{h \rightarrow 0} \frac{f(a+h) g(a+h)-f(a) g(a)}{h} \\ &=\lim _{h \rightarrow 0} \frac{f(a+h) g(a+h)-f(a) g(a+h)+f(a) g(a+h)-f(a) g(a)}{h} \\ &=\lim _{h \rightarrow 0}\left(g(a+h) \frac{f(a+h)-f(a)}{h}+f(a) \frac{g(a+h)-g(a)}{h}\right) \\ &=g(a) f^{\prime}(a)+f(a) g^{\prime}(a). \end{aligned}

where we know $$\lim _{h \rightarrow 0} g(a+h)=g(a)$$ by the continuity of $$g$$ at $$a,$$ which in turn follows from the assumption that $$g$$ is differentiable at $$a .$$ $$\quad$$ Q.E.D.

##### Exercise $$\PageIndex{7}$$

Given $$n \in \mathbb{Z}^{+}$$ and $$f(x)=x^{n},$$ use induction and the product rule to show that $$f^{\prime}(x)=n x^{n-1}$$.

##### Proposition $$\PageIndex{5}$$

(Quotient rule).

Suppose $$D \subset \mathbb{R}, f: D \rightarrow \mathbb{R}, g: D \rightarrow \mathbb{R}$$, $$a$$ is in the interior of $$D$$, and $$g(x) \neq 0$$ for all $$x \in D .$$ If $$f$$ and $$g$$ are both differentiable at $$a$$, then $$\frac{f}{g}$$ is differentiable at $$a$$ and

$\left(\frac{f}{g}\right)^{\prime}(a)=\frac{g(a) f^{\prime}(a)-f(a) g^{\prime}(a)}{(g(a))^{2}}.$

Proof

\begin{aligned}\left(\frac{f}{g}\right)^{\prime}(a) &=\lim _{h \rightarrow 0} \frac{\frac{f(a+h)}{g(a+h)}-\frac{f(a)}{g(a)}}{h} \\ &=\lim _{h \rightarrow 0} \frac{f(a+h) g(a)-f(a) g(a+h)}{h g(a+h) g(a)} \\ &=\lim _{h \rightarrow 0} \frac{f(a+h) g(a)-f(a) g(a)+f(a) g(a)-f(a) g(a+h)}{h g(a+h) g(a)} \\ &=\lim _{h \rightarrow 0} \frac{g(a)\frac{f(a+h)-f(a)}{h}-f(a) \frac{g(a+h)-g(a)}{h}}{g(a+h)g(a)} \\ &=\frac{g(a) f^{\prime}(a)-f(a) g^{\prime}(a)}{(g(a))^{2}}; \end{aligned}

where we know $$\lim _{h \rightarrow 0} g(a+h)=g(a)$$ by the continuity of $$g$$ at $$a,$$ which in turn follows from the assumption that $$g$$ is differentiable at $$a .$$ $$\quad$$ Q.E.D.

##### Exercise $$\PageIndex{8}$$

Show that for any integer $$n \neq 0,$$ if $$f(x)=x^{n},$$ then $$f^{\prime}(x)=n x^{n-1}$$.

##### Proposition $$\PageIndex{6}$$

(Chain rule).

Suppose $$D \subset \mathbb{R}, E \subset \mathbb{R}, g: D \rightarrow \mathbb{R}, f: E \rightarrow\mathbb{R}, g(D) \subset E, g$$ is differentiable at $$a,$$ and $$f$$ is differentiable at $$g(a) .$$ Then $$f \circ g$$ is differentiable at $$a$$ and

$(f \circ g)^{\prime}(a)=f^{\prime}(g(a)) g^{\prime}(a).$

Proof

Since $$a$$ is an interior point of $$D$$ and $$g(a)$$ is an interior point of $$E,$$ we may choose $$\delta>0$$ so that $$(a-\delta, a+\delta) \subset D$$ and $$\epsilon>0$$ so that $$(g(a)-\epsilon, g(a)+\epsilon) \subset E$$. Define $$\varphi:(-\delta, \delta) \rightarrow \mathbb{R}$$ by

$\varphi(h)=\left\{\begin{array}{ll}{\frac{g(a+h)-g(a)-g^{\prime}(a) h}{h},} & {\text { if } h \neq 0,} \\ {0,} & {\text { if } h=0,}\end{array}\right.$

and $$\psi:(-\epsilon, \epsilon) \rightarrow \mathbb{R}$$ by

$\psi(h)=\left\{\begin{array}{ll}{\frac{f(g(a)+h)-f(g(a))-f^{\prime}(g(a)) h}{h},} & {\text { if } h \neq 0,} \\ {0,} & {\text { if } h=0.}\end{array}\right.$

The assumption that $$g$$ is differentiable at $$a$$ implies that $$\varphi$$ is continuous at 0 and the assumption that $$f$$ is differentiable at $$g(a)$$ implies that $$\psi$$ is continuous at $$0 .$$ Moreover, note that

$g(a+h)=h \varphi(h)+g^{\prime}(a) h+g(a)$

for $$h \in(-\delta, \delta)$$ and

$f(g(a)+h)=h \psi(h)+f^{\prime}(g(a)) h+f(g(a))$

for $$h \in(-\epsilon, \epsilon) .$$ From $$(6.2 .12)$$ we have

$f(g(a+h))=f\left(h \varphi(h)+g^{\prime}(a) h+g(a)\right)$

for $$h \in(-\delta, \delta) .$$ Now

$\lim _{h \rightarrow 0}\left(h \varphi(h)+g^{\prime}(a) h\right)=0,$

so we may choose $$\gamma>0$$ so that $$\gamma \leq \delta$$ and

$\left|h \varphi(h)+g^{\prime}(a) h\right|<\epsilon$

whenever $$h \in(-\gamma, \gamma) .$$ Thus, using $$(6.2 .13)$$ and $$(6.2 .14)$$,

$f(g(a+h))=\left(h \varphi(h)+g^{\prime}(a) h\right) \psi\left(h \varphi(h)+g^{\prime}(a) h\right)+f^{\prime}(g(a))\left(h \varphi(h)+g^{\prime}(a) h\right)+f(g(a)),$

so

\begin{aligned} f(g(a+h))-f(g(a))=&\left(h \varphi(h)+g^{\prime}(a) h\right) \psi\left(h \varphi(h)+g^{\prime}(a) h\right) \\ &+f^{\prime}(g(a))\left(h \varphi(h)+g^{\prime}(a) h\right) \\=& h \varphi(h) \psi\left(h \varphi(h)+g^{\prime}(a) h\right) \\ &+h g^{\prime}(a) \psi\left(h \varphi(h)+g^{\prime}(a) h\right) \\ &+f^{\prime}(g(a)) \varphi(h) h+f^{\prime}(g(a)) g^{\prime}(a) h. \end{aligned}

Hence

\begin{aligned} \frac{f(g(a+h))-f(g(a))}{h}=f^{\prime}(g(a)) g^{\prime}(a)+\varphi(h) \psi\left(h \varphi(h)+g^{\prime}(a) h\right) \\+g^{\prime}(a) \psi\left(h \varphi(h)+g^{\prime}(a) h\right)+f^{\prime}(g(a)) \varphi(h). \end{aligned}

Now

$\lim _{h \rightarrow 0} \varphi(h)=0,$

$\lim _{h \rightarrow 0}\left(h \varphi(h)+g^{\prime}(a) h\right)=0,$

and, since $$\varphi$$ and $$\psi$$ are continuous at 0,

$\lim _{h \rightarrow 0} \psi\left(h \varphi(h)+g^{\prime}(a) h\right)=0.$

Thus

$\lim _{h \rightarrow 0} \frac{f(g(a+h))-f(g(a))}{h}=f^{\prime}(g(a)) g^{\prime}(a).$

Q.E.D.

##### Proposition $$\PageIndex{7}$$

Suppose $$D \subset \mathbb{R}, f: D \rightarrow \mathbb{R}$$ is one-to-one, $$a$$ is in the interior of $$D, f(a)$$ is in the interior of $$f(D), f^{-1}$$ is continuous at $$f(a),$$ and $$f$$ is differentiable at $$a$$ with $$f^{\prime}(a) \neq 0 .$$ Then $$f^{-1}$$ is differentiable at $$f(a)$$ and

$\left(f^{-1}\right)^{\prime}(f(a))=\frac{1}{f^{\prime}(a)}.$

Proof

Choose $$\delta>0$$ so that $$(f(a)-\delta, f(a)+\delta) \subset f(D) .$$ For $$h \in(-\delta, \delta),$$ let

$k=f^{-1}(f(a)+h)-a.$

Then

$f^{-1}(f(a)+h)=a+k,$

so

$f(a)+h=f(a+k)$

and

$h=f(a+k)-f(a).$

Hence

$\frac{f^{-1}(f(a)+h)-f^{-1}(f(a))}{h}=\frac{a+k-a}{f(a+k)-f(a)}=\frac{1}{\frac{f(a+k)-f(a)}{k}}.$

Now if $$\left.h \rightarrow 0, \text { then } k \rightarrow 0 \text { (since } f^{-1} \text { is continuous at } f(a)\right),$$ and so

$\lim_{h \rightarrow 0} \frac{f^{-1}(f(a)+h)-f^{-1}(f(a))}{h}=\lim_{k \rightarrow 0} \frac{1}{\frac{f(a+k)-f(a)}{k}}=\frac{1}{f^{\prime}(a)}.$

Q.E.D.

##### Example $$\PageIndex{3}$$

For $$n \in Z^{+},$$ define $$f:[0,+\infty) \rightarrow \mathbb{R}$$ by $$f(x)=\sqrt[n]{x} .$$ Then $$f$$ is the inverse of $$g:[0,+\infty) \rightarrow \mathbb{R}$$ defined by $$g(x)=x^{n} .$$ Thus, for any $$x \in(0,+\infty)$$,

$f^{\prime}(x)=\frac{1}{g^{\prime}(f(x))}=\frac{1}{n(\sqrt[n]{x})^{n-1}}=\frac{1}{n} x^{\frac{1}{n}-1}.$

##### Exercise $$\PageIndex{9}$$

Let $$n \neq 0$$ be a rational number and let $$f(x)=x^{n} .$$ Show that $$f^{\prime}(x)=n x^{n-1}$$.