# Computing derivatives – Serlo

Zur Navigation springen Zur Suche springen

In the last chapter we defined the derivative function ${\displaystyle f':D\to \mathbb {R} }$ of another differentiable function ${\displaystyle f:D\to \mathbb {R} }$ as follows: ${\displaystyle f'({\tilde {x}}):=\lim _{x\rightarrow {\tilde {x}}}{\tfrac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}}$. However, evaluating this limit can be a very cumbersome way to determine the derivative. For example, take the function ${\displaystyle g:\mathbb {R} \to \mathbb {R} }$ with ${\displaystyle g(x)=x^{2}\cdot \ln(x)}$. To calculate their derivatives we would have to determine ${\displaystyle \lim _{x\rightarrow {\tilde {x}}}{\tfrac {x^{2}\cdot \ln(x)-{\tilde {x}}^{2}\cdot \ln({\tilde {x}})}{x-{\tilde {x}}}}}$ for every ${\displaystyle {\tilde {x}}\in \mathbb {R} }$.

It would be great to apply some rules to directly find an expression for the derivative function, which saves us the differential quotient computation. And luckily there are indeed derivative rules that trace derivatives of a complicated function back to derivatives of some very basic functions that are known exactly.

## Overview

If ${\displaystyle f}$ and ${\displaystyle g}$ are differentiable functions, with the compositions ${\displaystyle af}$ (with ${\displaystyle a\in \mathbb {R} }$), ${\displaystyle f+g}$, ${\displaystyle fg}$, ${\displaystyle {\tfrac {f}{g}}}$ and ${\displaystyle f\circ g}$ being all well-defined and differentiable, Then the following derivative rules apply:

Name Regel
Factor rule ${\displaystyle (af)'=af'}$
Sum rule ${\displaystyle (f\pm g)'=f'\pm g'}$
Product rule ${\displaystyle (fg)'=f'g+fg'}$
Quotient rule ${\displaystyle \left({\frac {f}{g}}\right)'={\frac {gf'-fg'}{g^{2}}}}$
Inverse rule ${\displaystyle \left({\frac {1}{g}}\right)'=-{\frac {g'}{g^{2}}}}$
Chain rule ${\displaystyle (f\circ g)'=(f'\circ g)\cdot g'}$
Special cases of the chain rule {\displaystyle {\begin{aligned}(f^{n})'&=nf^{n-1}\cdot f'\\({\sqrt {f}})'&={\frac {f'}{2{\sqrt {f}}}}\\(\exp \circ f)'&=(\exp \circ f)\cdot f'\\(\ln \circ f)'&={\tfrac {f'}{f}}\end{aligned}}}
Inverse rule (yet missing) ${\displaystyle (f^{-1})'={\tfrac {1}{f'\circ f^{-1}}}}$

## All rules at one glance

The derivatives rules can be explained in simple words:

• Factor rule ${\displaystyle (af)'=af'}$: The derivative is linear, so we can pull out any real (or even complex) number.
• Sum and difference rule ${\displaystyle (f\pm g)'=f'\pm g'}$: The derivative is linear, so for a sum, we can take the derivative of both summands separately.
• Product rule ${\displaystyle (fg)'=f'g+fg'}$: "Derive the first function and the second remains unchanged plus derive the second function and the first remains unchanged".
• Quotient rule ${\displaystyle \left({\tfrac {f}{g}}\right)'={\tfrac {gf'-fg'}{g^{2}}}}$: DDE-EDD is a simple memorization rule for the numerator ("denominator derivative enumerator minus enumerator derivative denominator")
• Inverse rule ${\displaystyle \left({\frac {1}{g}}\right)'=-{\frac {g'}{g^{2}}}}$: This is the special case of the quotient rule with ${\displaystyle f\equiv 1}$ (enumerator is constant ${\displaystyle 1}$).
• Chain rule ${\displaystyle (f\circ g)'=(f'\circ g)\cdot g'}$: "Derive the outer function times derive the inner function". Caution, the derivative of the outer function must be taken with the inner function inserted (${\displaystyle f'(g(x))}$). The differentiation of the inner function must not be forgotten either.

## Factor rule

Theorem (Factor product)

Let ${\displaystyle f:D\to \mathbb {R} }$ be a differentiable function with derivative ${\displaystyle f':D\to \mathbb {R} }$ and let ${\displaystyle \lambda \in \mathbb {R} }$ be a scalar factor. Then ${\displaystyle (\lambda f)':D\to \mathbb {R} }$ is differentiable and

${\displaystyle (\lambda f)'=\lambda f'}$

Proof (Factor product)

We need to show that ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {(\lambda f)(x)-(\lambda f)({\tilde {x}})}{x-{\tilde {x}}}}}$ exists and equals ${\displaystyle \lambda f'}$. For ${\displaystyle {\tilde {x}}\in D}$ there is

{\displaystyle {\begin{aligned}&\lim _{x\to {\tilde {x}}}{\frac {(\lambda f)({\tilde {x}})-(\lambda f)(x)}{{\tilde {x}}-x}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {\lambda f({\tilde {x}})-\lambda f(x)}{{\tilde {x}}-x}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\lambda {\frac {f({\tilde {x}})-f(x)}{{\tilde {x}}-x}}}\\[0.3em]&{\color {Gray}\left\downarrow \ \lim _{x\to a}\lambda g(x)=\lambda \lim _{x\to a}g(x)\right.}\\[0.3em]=\ &\lambda \lim _{x\to {\tilde {x}}}{\frac {f({\tilde {x}})-f(x)}{{\tilde {x}}-x}}\\[0.3em]=\ &\lambda f'({\tilde {x}})\end{aligned}}}

So ${\displaystyle (\lambda f)'=\lambda f'}$.

## Sum rule

### Theorem

Now we want to determine the derivative of a function ${\displaystyle g+f}$, where ${\displaystyle g:D\to \mathbb {R} }$ and ${\displaystyle f:D\to \mathbb {R} }$ are both differentiable functions.

Theorem (Sum rule)

Let ${\displaystyle f,g:D\to \mathbb {R} }$ with ${\displaystyle D\subseteq \mathbb {R} }$ be two differentiable functions with derivatives ${\displaystyle f':D\to \mathbb {R} }$ and ${\displaystyle g':D\to \mathbb {R} }$. Then ${\displaystyle f+g:D\to \mathbb {R} }$ is differentiable and for all ${\displaystyle x\in D}$ there is:

${\displaystyle (f+g)'(x)=f'(x)+g'(x)}$

Proof (Sum rule)

We need to prove that the limit ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {(f+g)(x)-(f+g)({\tilde {x}})}{x-{\tilde {x}}}}}$ exists. We have

{\displaystyle {\begin{aligned}&\lim _{x\to {\tilde {x}}}{\frac {(f+g)(x)-(f+g)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {f(x)+g(x)-f({\tilde {x}})-g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{{\bigg (}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}+{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}{\bigg )}}\\[0.3em]&{\color {Gray}\left\downarrow \ f{\text{ and }}g{\text{ are differentiable}}\right.}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}+\lim _{x\to {\tilde {x}}}{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &f'({\tilde {x}})+g'({\tilde {x}})\end{aligned}}}

So ${\displaystyle (f+g)'(x)=f'(x)+g'(x)}$.

### Example

Example (Sums of lines)

We consider two straight lines ${\displaystyle f,g:\mathbb {R} \to \mathbb {R} }$ with ${\displaystyle f(x)=m_{1}x+t_{1}}$ and ${\displaystyle g(x)=m_{2}x+t_{2}}$. Then

${\displaystyle (f+g)(x)=m_{1}x+t_{1}+m_{2}x+t_{2}=(m_{1}+m_{2})x+(t_{1}+t_{2})}$

The derivative of a function at the position ${\displaystyle x}$ is the slope of the function at this position. The slope of the straight lines ${\displaystyle f}$ and ${\displaystyle g}$ are ${\displaystyle m_{1}}$ and ${\displaystyle m_{2}}$ respectively. So ${\displaystyle f'(x)=m_{1}}$ and ${\displaystyle g'(x)=m_{2}}$ for all ${\displaystyle x\in \mathbb {R} }$.

For the straight line ${\displaystyle f+g}$ , the slope is ${\displaystyle m_{1}+m_{2}}$ . So we have ${\displaystyle (f+g)'(x)=m_{1}+m_{2}=f'(x)+g'(x)}$. Hence, the summation rule holds for straight lines.

### Difference rule

Exercise (Difference rule)

Prove the difference rule for derivatives, in analogy to the summation rule: Let ${\displaystyle f,g:D\to \mathbb {R} }$ with ${\displaystyle D\subseteq \mathbb {R} }$ be two differentiable functions with derivative ${\displaystyle f':D\to \mathbb {R} }$ and ${\displaystyle g':D\to \mathbb {R} }$. Then ${\displaystyle f-g}$ is also differentiable. And for all ${\displaystyle x\in D}$, there is:

${\displaystyle (f-g)'(x)=f'(x)-g'(x)}$

Proof (Difference rule)

For ${\displaystyle {\tilde {x}}\in D}$ there is

{\displaystyle {\begin{aligned}&\lim _{x\to {\tilde {x}}}{\frac {(f-g)(x)-(f-g)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {f(x)-g(x)-f({\tilde {x}})+g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{{\bigg (}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}-{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}{\bigg )}}\\[0.3em]&{\color {Gray}\left\downarrow \ f{\text{ and }}g{\text{ are differentiable}}\right.}\\[0.3em]=\ &\lim _{x\to {\tilde {x}}}{\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}-\lim _{x\to {\tilde {x}}}{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &f'({\tilde {x}})-g'({\tilde {x}})\end{aligned}}}

## Product rule

Theorem (Product rule)

Let ${\displaystyle f:D\to \mathbb {R} }$ and ${\displaystyle g:D\to \mathbb {R} }$ with ${\displaystyle D\subseteq \mathbb {R} }$ be differentiable functions with known derivative functions ${\displaystyle f',g':D\to \mathbb {R} }$. Then, ${\displaystyle f\cdot g:D\to \mathbb {R} ,(f\cdot g)(x):=f(x)\cdot g(x)}$ is differentiable and there is

${\displaystyle (f\cdot g)':D\to \mathbb {R} ,(f\cdot g)'(x)=f'(x)\cdot g(x)+g'(x)\cdot f(x)}$

Proof (Product rule)

Let ${\displaystyle x\in D}$. Then, there is:

{\displaystyle {\begin{aligned}&\lim _{x\rightarrow {\tilde {x}}}{\frac {(f\cdot g)(x)-(f\cdot g)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{definition of }}(f\cdot g)\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {f(x)g(x)-f({\tilde {x}})g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ -f({\tilde {x}})g(x)+f({\tilde {x}})g(x)=0\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {f(x)g(x)-f({\tilde {x}})g(x)+f({\tilde {x}})g(x)-f({\tilde {x}})g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{{\frac {f(x)g(x)-f({\tilde {x}})g(x)}{x-{\tilde {x}}}}+{\frac {f({\tilde {x}})g(x)-f({\tilde {x}})g({\tilde {x}})}{x-{\tilde {x}}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{pull apart the limit}}\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {f(x)g(x)-f({\tilde {x}})g(x)}{x-{\tilde {x}}}}+\lim _{x\rightarrow {\tilde {x}}}{\frac {f({\tilde {x}})g(x)-f({\tilde {x}})g({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{factor out }}g(x){\text{ and }}f({\tilde {x}})\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{g(x){\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}}+\lim _{x\rightarrow {\tilde {x}}}{f({\tilde {x}}){\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{limit theorems}}\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}\underbrace {g(x)} _{\to g({\tilde {x}})}\cdot \lim _{x\rightarrow {\tilde {x}}}\underbrace {\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}} _{\to f'({\tilde {x}})}+f({\tilde {x}})\cdot \lim _{x\rightarrow {\tilde {x}}}\underbrace {\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}} _{\to g'({\tilde {x}})}\\[0.3em]=\ &g({\tilde {x}})\cdot f'({\tilde {x}})+f({\tilde {x}})\cdot g'({\tilde {x}})\end{aligned}}}

In order to justify that the limits may be pulled apart, one must look at the calculation from back to front. Since all sub-expressions converge, the limit sets are allowed to be used.

Alternative proof (Product rule)

We look at any ${\displaystyle {\tilde {x}}\in D}$. Since ${\displaystyle f}$ and ${\displaystyle g}$ are differentiable according to the condition in ${\displaystyle {\tilde {x}}}$, there are functions ${\displaystyle \delta _{f},\delta _{g}:D\to \mathbb {R} }$, such that for all ${\displaystyle x\in D}$ there is

{\displaystyle {\begin{aligned}&f(x)=f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta _{f}(x)\\[0.3em]&g(x)=g({\tilde {x}})+g'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta _{g}(x)\end{aligned}}}

In addition, there is ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {\delta _{f}(x)}{x-{\tilde {x}}}}=0}$ and ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {\delta _{f}(x)}{x-{\tilde {x}}}}=0}$. Hence, for all ${\displaystyle x\in D}$ we have

{\displaystyle {\begin{aligned}&f(x)\cdot g(x)\\[0.3em]=\ &(f({\tilde {x}})+f'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta _{f}(x))\cdot (g({\tilde {x}})+g'({\tilde {x}})\cdot (x-{\tilde {x}})+\delta _{g}(x))\\[0.3em]=\ &f({\tilde {x}})g({\tilde {x}})+(f'({\tilde {x}})g({\tilde {x}})+g'({\tilde {x}})f({\tilde {x}}))(x-{\tilde {x}})\\[0.3em]&+\delta _{f}(x)g'({\tilde {x}})(x-{\tilde {x}})+\delta _{g}(x)f'({\tilde {x}})(x-{\tilde {x}})+f'({\tilde {x}})g'({\tilde {x}}){(x-{\tilde {x}})}^{2}\\[0.3em]&+f({\tilde {x}})\delta _{g}(x)+g({\tilde {x}})\delta _{f}(x)+\delta _{f}(x)\delta _{g}(x)\end{aligned}}}

Now, we define the function ${\displaystyle \delta _{f\cdot g}:D\to \mathbb {R} }$ by

{\displaystyle {\begin{aligned}\delta _{f\cdot g}(x):=&\delta _{f}(x)g'({\tilde {x}})(x-{\tilde {x}})+\delta _{g}(x)f'({\tilde {x}})(x-{\tilde {x}})+f'({\tilde {x}})g'({\tilde {x}}){(x-{\tilde {x}})}^{2}\\[0.3em]&+f({\tilde {x}})\delta _{g}(x)+g({\tilde {x}})\delta _{f}(x)+\delta _{f}(x)\delta _{g}(x)\end{aligned}}}

So for all ${\displaystyle x\in D}$:

${\displaystyle f(x)g(x)=f({\tilde {x}})g({\tilde {x}})+(f'({\tilde {x}})g({\tilde {x}})+g'({\tilde {x}})f({\tilde {x}}))(x-{\tilde {x}})+\delta _{f\cdot g}(x)}$

If we can show that ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {\delta _{f\cdot g}(x)}{x-{\tilde {x}}}}=0}$, then ${\displaystyle f\cdot g}$ is differentiable at ${\displaystyle {\tilde {x}}}$ and ${\displaystyle (f\cdot g)'({\tilde {x}})=f'({\tilde {x}})g({\tilde {x}})+g'({\tilde {x}})f({\tilde {x}})}$. It is sufficient to show that all summands of the term ${\displaystyle \delta _{f\cdot g}(x)}$ converge faster than ${\displaystyle x-{\tilde {x}}}$ towards ${\displaystyle 0}$:

{\displaystyle {\begin{aligned}\lim _{x\to {\tilde {x}}}{\frac {\delta _{g}(x)f'({\tilde {x}})(x-{\tilde {x}})}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{\underbrace {\delta _{f}(x)} _{\to 0}g'({\tilde {x}})}=0\\[0.5em]\lim _{x\to {\tilde {x}}}{\frac {\delta _{g}(x)f'({\tilde {x}})(x-{\tilde {x}})}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{\underbrace {\delta _{g}(x)} _{\to 0}f'({\tilde {x}})}=0\\[0.5em]\lim _{x\to {\tilde {x}}}{\frac {f'({\tilde {x}})g'({\tilde {x}}){(x-{\tilde {x}})}^{2}}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{f'({\tilde {x}})g'({\tilde {x}})\underbrace {(x-{\tilde {x}})} _{\to 0}}=0\\[0.5em]\lim _{x\to {\tilde {x}}}{\frac {f({\tilde {x}})\delta _{g}(x)}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{f({\tilde {x}})\underbrace {\frac {\delta _{g}(x)}{x-{\tilde {x}}}} _{\to 0}}=0\\[0.5em]\lim _{x\to {\tilde {x}}}{\frac {g({\tilde {x}})\delta _{f}(x)}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{g({\tilde {x}})\underbrace {\frac {\delta _{f}(x)}{x-{\tilde {x}}}} _{\to 0}}=0\\[0.5em]\lim _{x\to {\tilde {x}}}{\frac {\delta _{f}(x)\delta _{g}(x)}{x-{\tilde {x}}}}&=\lim _{x\to {\tilde {x}}}{\underbrace {\delta _{f}(x)} _{\to 0}\underbrace {\frac {\delta _{g}(x)}{x-{\tilde {x}}}} _{\to 0}}=0\\[0.5em]\end{aligned}}}

## Quotient rule

Theorem (Quotient rule)

Let ${\displaystyle f,g:D\to \mathbb {R} }$ be two differentiable functions with ${\displaystyle g(x)\neq 0}$ for all ${\displaystyle x\in D}$. Then the derivative of the function ${\displaystyle {\tfrac {f}{g}}:D\to \mathbb {R} }$, defined by ${\displaystyle \left({\tfrac {f}{g}}\right)(x)={\tfrac {f(x)}{g(x)}}}$, is differentiable and for ${\displaystyle \left({\tfrac {f}{g}}\right)':D\to \mathbb {R} }$ there is

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

Here, ${\displaystyle g^{2}(x)=g(x)\cdot g(x)}$. In particular, we have the inverse rule:

${\displaystyle \left({\frac {1}{g}}\right)'(x)=-{\frac {g'(x)}{g^{2}(x)}}}$

Proof (Quotient rule)

To prove the statement we first show that ${\displaystyle \left({\tfrac {1}{g}}\right)'(x)=-{\tfrac {g'(x)}{g^{2}(x)}}}$ holds. Here, ${\displaystyle g:D\to \mathbb {R} }$ is a differentiable function with ${\displaystyle g(x)\neq 0}$ for all ${\displaystyle x\in D}$. Let now ${\displaystyle {\tilde {x}}\in D}$. We consider ${\displaystyle \lim _{x\to {\tilde {x}}}{\tfrac {\left({\tfrac {1}{g}}\right)(x)-\left({\tfrac {1}{g}}\right)({\tilde {x}})}{x-{\tilde {x}}}}}$. There is

{\displaystyle {\begin{aligned}&\lim _{x\to {\tilde {x}}}{\frac {\left({\frac {1}{g}}\right)(x)-\left({\frac {1}{g}}\right)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.5em]=\ &\lim _{x\to {\tilde {x}}}{\frac {{\frac {1}{g(x)}}-{\frac {1}{g({\tilde {x}})}}}{x-{\tilde {x}}}}\\[0.5em]=\ &\lim _{x\to {\tilde {x}}}{\frac {\frac {g({\tilde {x}})-g(x)}{g(x)\cdot g({\tilde {x}})}}{x-{\tilde {x}}}}\\[0.5em]=\ &\lim _{x\to {\tilde {x}}}{\frac {g({\tilde {x}})-g(x)}{g({\tilde {x}})\cdot g(x)(x-{\tilde {x}})}}\\[0.5em]=\ &\lim _{x\to {\tilde {x}}}{\left(-{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}\cdot {\frac {1}{g({\tilde {x}})g(x)}}\right)}\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{limit theorems}}\right.}\\[0.5em]=\ &\lim _{x\to {\tilde {x}}}{\left(-{\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}}\right)}\cdot \lim _{x\to {\tilde {x}}}{\frac {1}{g({\tilde {x}})g(x)}}\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{factor rule}}\right.}\\[0.5em]=\ &-\lim _{x\to {\tilde {x}}}\underbrace {\frac {g(x)-g({\tilde {x}})}{x-{\tilde {x}}}} _{\to g'({\tilde {x}})}\cdot {\frac {1}{g({\tilde {x}})\lim _{x\to {\tilde {x}}}\underbrace {g(x)} _{\to g({\tilde {x}})}}}\\[0.5em]=\ &-g'({\tilde {x}}){\frac {1}{g({\tilde {x}})g({\tilde {x}})}}\\[0.5em]=\ &-{\frac {g'({\tilde {x}})}{g^{2}({\tilde {x}})}}\end{aligned}}}

In the end, we see that all sub-expressions converge. That is why the limit theorems are allowed to be used. Now we derive the quotient rule for ${\displaystyle {\tfrac {f}{g}}{g}}$ from this. Here we have ${\displaystyle f,g:D\to \mathbb {R} }$ and ${\displaystyle g(x)\neq 0}$ for all ${\displaystyle x\in D}$. The quotient rule can then be derived from the product rule:

{\displaystyle {\begin{aligned}&\left({\frac {f}{g}}\right)'(x)=\left({\frac {f(x)}{g(x)}}\right)'=\left(f(x)\cdot {\frac {1}{g(x)}}\right)'\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{product rule}}\right.}\\[0.5em]=\ &f'(x)\cdot {\frac {1}{g(x)}}+f(x)\left(-{\frac {g'(x)}{g^{2}(x)}}\right)\\[0.5em]=\ &{\frac {f'(x)g(x)-f(x)g'(x)}{g^{2}(x)}}\end{aligned}}}

## Chain rule

Theorem (Chain rule)

Let ${\displaystyle f:A\to B}$ and ${\displaystyle g:C\to D}$ be two real-valued and differentiable functions with ${\displaystyle A,B,C,D\subseteq \mathbb {R} }$ and ${\displaystyle f(A)\subseteq C}$. Then, for the derivative function of ${\displaystyle g\circ f:A\to D}$, there is:

${\displaystyle (g\circ f)':A\to \mathbb {R} ,(g\circ f)'(x)=g'(f(x))\cdot f'(x)}$

How to get to the proof? (Chain rule)

We could first try to conduct the proof directly via the differential quotient:

{\displaystyle {\begin{aligned}&\lim _{x\rightarrow {\tilde {x}}}{\frac {(g\circ f)(x)-(g\circ f)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {(g(f(x))-(g(f({\tilde {x}}))}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{expand by }}f(x)-f({\tilde {x}})\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{{\frac {(g(f(x))-(g(f({\tilde {x}}))}{f(x)-f({\tilde {x}})}}\cdot {\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{limit theorems}}\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}\underbrace {\frac {(g(f(x))-(g(f({\tilde {x}}))}{f(x)-f({\tilde {x}})}} _{\to g'(f({\tilde {x}}))}\cdot \lim _{x\rightarrow {\tilde {x}}}\underbrace {\frac {f(x)-f({\tilde {x}})}{x-{\tilde {x}}}} _{\to f'({\tilde {x}})}\\[0.3em]=\ &g'(f({\tilde {x}}))\cdot f'({\tilde {x}})\end{aligned}}}

These arithmetic steps reflect the basic idea behind a proof of the chain rule. But this argumentation is problematic (i.e. wrong) for several reasons:

• We expand by ${\displaystyle f(x)-f({\tilde {x}})}$. But what happens if ${\displaystyle f({\tilde {x}})=f(x)}$? Then we have expanded by zero, which is not allowed. So the found limit value doesn't need to be correct any more.
• In the last step we claim that ${\displaystyle \lim _{\color {Orange}x\rightarrow {\tilde {x}}}{\tfrac {g(f(x))-(g(f({\tilde {x}})}{f(x)-f({\tilde {x}})}}=g'(f({\tilde {x}}))}$ would hold. All we know is that ${\displaystyle \lim _{\color {OliveGreen}f(x)\rightarrow f({\tilde {x}})}{\tfrac {g(f(x))-(g(f({\tilde {x}})}{f(x)-f({\tilde {x}})}}=g'(f({\tilde {x}}))}$, but we cannot say anything about how this limit value behaves in the limit ${\displaystyle x\to {\tilde {x}}}$ instead of ${\displaystyle f(x)\to f({\tilde {x}})}$.

To save the proof, we take a way around, using an auxiliary function. This function will be well defined at the position ${\displaystyle {\tilde {x}}}$, so we avoid the extension with ${\displaystyle f(x)-f({\tilde {x}})}$.

Proof (Chain rule)

Let ${\displaystyle {\tilde {x}}\in A}$. We define the following auxiliary function:

${\displaystyle {\tilde {g}}:C\to \mathbb {R} ,u\mapsto {\begin{cases}{\frac {g(u)-g(f({\tilde {x}}))}{u-f({\tilde {x}})}}&;u\neq f({\tilde {x}})\\g'(f({\tilde {x}}))&;u=f({\tilde {x}})\end{cases}}}$

Then, there is for all ${\displaystyle u\in C}$:

${\displaystyle g(u)-g(f({\tilde {x}}))={\tilde {g}}(u)\cdot (u-f({\tilde {x}}))}$

Further, ${\displaystyle {\tilde {g}}}$ is continuous at all ${\displaystyle u\neq f({\tilde {x}})}$: it is just a combination of continuous functions.${\displaystyle {\tilde {g}}}$ is even continuous at ${\displaystyle u=f({\tilde {x}})}$, since differentiability of ${\displaystyle g}$ implies

${\displaystyle \lim _{u\to f({\tilde {x}})}{{\tilde {g}}(u)}=\lim _{u\to f({\tilde {x}})}{\frac {g(u)-g(f({\tilde {x}}))}{u-f({\tilde {x}})}}=g'(f({\tilde {x}}))={\tilde {g}}(f({\tilde {x}}))}$

So:

{\displaystyle {\begin{aligned}&\lim _{x\rightarrow {\tilde {x}}}{\frac {(g\circ f)(x)-(g\circ f)({\tilde {x}})}{x-{\tilde {x}}}}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {(g(f(x))-(g(f({\tilde {x}}))}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ g(f(x))-(g(f({\tilde {x}}))={\tilde {g}}(f(x))\cdot (f(x)-f({\tilde {x}}))\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}{\frac {{\tilde {g}}(f(x))\cdot (f(x)-f({\tilde {x}}))}{x-{\tilde {x}}}}\\[0.3em]&{\color {Gray}\left\downarrow \ {\text{limit theorems}}\right.}\\[0.3em]=\ &\lim _{x\rightarrow {\tilde {x}}}\underbrace {\frac {(f(x)-f({\tilde {x}}))}{x-{\tilde {x}}}} _{\to f'({\tilde {x}})}\cdot \lim _{x\rightarrow {\tilde {x}}}{{\tilde {g}}(f(x))}\\[0.3em]=\ &f'({\tilde {x}})\cdot \lim _{x\rightarrow {\tilde {x}}}{{\tilde {g}}(f(x))}\\[0.3em]&{\color {Gray}\left\downarrow \ {\tilde {g}}{\text{ is continuous}}\right.}\\[0.3em]=\ &f'({\tilde {x}})\cdot {\tilde {g}}\left(\lim _{x\rightarrow {\tilde {x}}}{f(x)}\right)\\[0.3em]&{\color {Gray}\left\downarrow \ f{\text{ is continuous }}\right.}\\[0.3em]=\ &f'({\tilde {x}})\cdot {\tilde {g}}(f({\tilde {x}}))\\[0.3em]=\ &f'({\tilde {x}})\cdot g'(f({\tilde {x}}))\end{aligned}}}

Alternative proof (Chain rule)

Let ${\displaystyle {\tilde {x}}\in A}$. Since ${\displaystyle f}$ and ${\displaystyle g}$ are differentiable , there are functions ${\displaystyle \delta _{f}:{\tilde {A}}:=\lbrace a-{\tilde {x}}|a\in A\rbrace \to \mathbb {R} }$ and ${\displaystyle \delta _{g}:{\tilde {C}}:=\lbrace c-f({\tilde {x}})|c\in C\rbrace \to \mathbb {R} }$, such that for all ${\displaystyle h\in {\tilde {A}}}$ and all ${\displaystyle i\in {\tilde {C}}}$ there is

{\displaystyle {\begin{aligned}&f({\tilde {x}}+h)=f({\tilde {x}})+f'({\tilde {x}})\cdot h+\delta _{f}(h)\\[0.3em]&g(f({\tilde {x}})+i)=g(f({\tilde {x}}))+g'(f({\tilde {x}}))\cdot i+\delta _{g}(i)\end{aligned}}}

In addition ${\displaystyle \lim _{h\to 0}{\tfrac {\delta _{f}(h)}{h}}=0}$ as well as ${\displaystyle \lim _{i\to 0}{\tfrac {\delta _{g}(i)}{i}}=0}$. So:

{\displaystyle {\begin{aligned}&(g\circ f)({\tilde {x}}+h)\\[0.3em]=\ &g(f({\tilde {x}})+f'({\tilde {x}})\cdot h+\delta _{f}(h))\\[0.3em]=\ &g(f({\tilde {x}}))+g'(f({\tilde {x}}))\cdot (f'({\tilde {x}})\cdot h+\delta _{f}(h))+\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))\\[0.3em]=\ &g(f({\tilde {x}}))+g'(f({\tilde {x}}))f'({\tilde {x}})h+g'(f({\tilde {x}}))\delta _{f}(h)+\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))\\[0.3em]\end{aligned}}}

We now define

${\displaystyle \delta _{g\circ f}:{\tilde {A}}\to \mathbb {R} ,x\mapsto g'(f({\tilde {x}}))\delta _{f}(h)+\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}$

In order to prove that ${\displaystyle g\circ f}$ is differentiable at ${\displaystyle {\tilde {x}}}$ with ${\displaystyle (g\circ f)'({\tilde {x}})=g'(f({\tilde {x}}))f'({\tilde {x}})}$ we need to show that ${\displaystyle \lim _{h\to 0}{\tfrac {\delta _{g\circ f}(h)}{h}}=0}$ holds. There is:

{\displaystyle {\begin{aligned}&\lim _{h\to 0}{\frac {\delta _{g\circ f}(h)}{h}}\\[0.5em]=\ &\lim _{h\to 0}{\frac {g'(f({\tilde {x}}))\delta _{f}(h)+\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{pull apart the limit}}\right.}\\[0.5em]=\ &\lim _{h\to 0}{\frac {g'(f({\tilde {x}}))\delta _{f}(h)}{h}}+\lim _{h\to 0}{\frac {\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}\\[0.5em]=\ &g'(f({\tilde {x}}))\lim _{h\to 0}{\frac {\delta _{f}(h)}{h}}+\lim _{h\to 0}{\frac {\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}\\[0.5em]&{\color {Gray}\left\downarrow \ \lim _{h\to 0}{\frac {\delta _{f}(h)}{h}}=0\right.}\\[0.5em]=\ &g'(f({\tilde {x}}))\cdot 0+\lim _{h\to 0}{\frac {\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}\\[0.5em]=\ &\lim _{h\to 0}{\frac {\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}\end{aligned}}}

To calculate this limit, we consider any sequence ${\displaystyle (h_{n})_{n\in \mathbb {N} }}$ in ${\displaystyle \mathbb {R} \setminus \{0\}}$ which converges towards ${\displaystyle 0}$. For all ${\displaystyle n\in \mathbb {N} }$ with ${\displaystyle f'({\tilde {x}})\cdot h_{n}+\delta _{f}(h_{n})=0}$ , there is ${\displaystyle \delta _{g}(0)=0}$ so ${\displaystyle {\tfrac {\delta _{g}(f'({\tilde {x}})\cdot h_{n}+\delta _{f}(h_{n}))}{h_{n}}}=0}$.

If only there are finally many ${\displaystyle n\in \mathbb {N} }$ with ${\displaystyle {\tfrac {\delta _{g}(f'({\tilde {x}})\cdot h_{n}+\delta _{f}(h_{n}))}{h_{n}}}\neq 0}$, then we have ${\displaystyle \lim _{n\to \infty }{\tfrac {\delta _{g}(f'({\tilde {x}})\cdot h_{n}+\delta _{f}(h_{n}))}{h_{n}}}=0}$. So let us consider the case that for infinitely many ${\displaystyle n\in \mathbb {N} }$ there is ${\displaystyle {\tfrac {\delta _{g}(f'({\tilde {x}})\cdot h_{n}+\delta _{f}(h_{n}))}{h_{n}}}\neq is0}$. Let ${\displaystyle (h_{n_{k}})_{k\in \mathbb {N} }}$ be the subsequence of elements of ${\displaystyle (h_{n})_{n\in \mathbb {N} }}$ with ${\displaystyle \delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))\neq 0}$. There is

{\displaystyle {\begin{aligned}&\lim _{k\to \infty }{\frac {\delta _{g}(f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}}))}{h_{n_{k}}}}\\[0.5em]=\ &\lim _{k\to \infty }{{\frac {\delta _{g}(f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}}))}{f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}})}}\cdot {\frac {f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}})}{h_{n_{k}}}}}\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{pull apart the limit}}\right.}\\[0.5em]=\ &\lim _{k\to \infty }{\frac {\delta _{g}(f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}}))}{f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}})}}\cdot \lim _{k\to \infty }{\frac {f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}})}{h_{n_{k}}}}\\[0.5em]&{\color {Gray}\left\downarrow \ {\text{since}}\lim _{k\to \infty }{h_{n_{k}}}=0{\text{ there is }}\lim _{k\to \infty }{f'({\tilde {x}})\cdot h_{n_{k}}+\delta _{f}(h_{n_{k}})}=0\right.}\\[0.5em]=\ &\lim _{{\hat {h}}\to 0}{\frac {\delta _{g}({\hat {h}})}{\hat {h}}}\cdot \left(\lim _{k\to \infty }{\frac {f'({\tilde {x}})\cdot h_{n_{k}}}{h_{n_{k}}}}+\lim _{k\to \infty }{\frac {\delta _{f}(h_{n_{k}})}{h_{n_{k}}}}\right)\\[0.5em]&{\color {Gray}\left\downarrow \ \lim _{{\hat {h}}\to 0}{\frac {\delta _{g}({\hat {h}})}{\hat {h}}}=0{\text{ and }}\lim _{k\to \infty }{h_{n_{k}}}=0\right.}\\[0.5em]=\ &0\cdot \left(f'({\tilde {x}})+\lim _{{\tilde {h}}\to 0}{\frac {\delta _{f}({\tilde {h}})}{\tilde {h}}}\right)\\[0.5em]&{\color {Gray}\left\downarrow \ \lim _{{\tilde {h}}\to 0}{\frac {\delta _{g}({\tilde {h}})}{\tilde {h}}}=0\ \right.}\\[0.5em]=\ &0\cdot \left(f'({\tilde {x}})+0\right)\\[0.5em]=\ &0\end{aligned}}}

So we have

${\displaystyle \lim _{h\to 0}{\frac {\delta _{g}(f'({\tilde {x}})\cdot h+\delta _{f}(h))}{h}}=0}$

Hint

Using the chain rule, we may prove the inverse rule ${\displaystyle \left({\tfrac {1}{f}}\right)'=-{\tfrac {f'}{f^{2}}}}$ . If we set the "outer function" ${\displaystyle g(x)={\tfrac {1}{x}}}$, then there is ${\displaystyle g'(x)=-{\tfrac {1}{x^{2}}}}$. So we have

{\displaystyle {\begin{aligned}\left({\tfrac {1}{f}}\right)'(x)&=(g\circ f)'(x)=g'(f(x))\cdot f'(x)\\[0.3em]&=-{\tfrac {1}{f^{2}(x)}}\cdot f'(x)=-{\tfrac {f'(x)}{f^{2}(x)}}\end{aligned}}}

We used this rule above to derive the quotient rule. That means, the quotient rule can be shown with the chain rule and the product rule at hand. Conversely, we may prove the product rule using the chain rule. For the exercise we recommend our exercise (yet missing).