# Math for Non-Geeks/ Derivative - inverse function

In the following article we will investigate the conditions under which the inverse function of a bijective function is differentiable at one point. We will also derive a formula with which we can explicitly determine the derivative of the inverse function. The practical thing about this formula is that it allows us to determine the derivative at certain points, even if we do not know the inverse function explicitly or it is insanely difficult.

## Motivation

Let us first consider a linear function as an example. For this it is very easy to determine the derivative of the inverse function. Non-constant linear functions are bijective and therefore invertible on $\mathbb {R}$. In this case we can calculate the inverse function explicitly and differentiate it. Concretely we choose $f:\mathbb {R} \to \mathbb {R}$ with $f(x)=2x-1$. The inverse function is
$f^{-1}:\mathbb {R} \to \mathbb {R} :f^{-1}(y)={\tfrac {1}{2}}y+{\tfrac {1}{2}}$
$f^{-1}$ is differentiable on $\mathbb {R}$ and $(f^{-1})'(y)={\frac {1}{2}}$ for all $y\in \mathbb {R}$.
Let us next consider the function $f(x)=x^{2}$. Here we have to be careful, because it is not injective on all of $\mathbb {R}$ and therefore not invertible. But if we restrict the domain of definition to $\mathbb {R} _{0}^{+}$, then $f:\mathbb {R} _{0}^{+}\to \mathbb {R} _{0}^{+},f(x)=x^{2}$ is bijective. The inverse function is the square root function
$f^{-1}:\mathbb {R} _{0}^{+}\to \mathbb {R} _{0}^{+}:f^{-1}(y)={\sqrt {y}}$
For differentiability we have to consider another thing: $f^{-1}$ is not differentiable at $y=0$. We can show this by examining the differential quotient. Or we consider the following:
Since the root function $f^{-1}$ is the inverse function of the square function $f$, there is $f^{-1}\circ f={\text{id}}$. At zero there is thus in particular
$\underbrace {f^{-1}(f(0))} _{=f^{-1}(0)}={\text{id}}(0)$
If now $f^{-1}$ was differentiable at 0, then the chain rule would yield
$\underbrace {(f^{-1})'(f(0))\cdot \overbrace {f'(0)} ^{=0}} _{=0}=\underbrace {{\text{id}}'(0)} _{=1}$
So $f^{-1}$ cannot be differentiable at 0. However, on $\mathbb {R} ^{+}$ , the function $f^{-1}$ is differentiable, and there is
$(f^{-1})'(y)={\tfrac {1}{2{\sqrt {y}}}}$
This example shows that in case $f'(x)=0$, it may happen that $f^{-1}$ is not differentiable although $f$ is differentiable everywhere.
In the two examples it was relatively easy to determine the derivative of the inverse function directly (it was a polynomial). But what about more complicated functions, for example $\ln$ as an inverse function of $\exp$? Here we cannot simply calculate the derivative of the inverse function, if only derivatives of exponentials and polynomials are known. It may even occur that a bijective function cannot be inverted explicitly. In these cases it would be good to have a general formula with which we can determine the derivative of $f^{-1}$ from the derivative of $f$. If we look again at the derivative from the second example, we may see the following:
$(f^{-1})'(y)={\tfrac {1}{2{\sqrt {y}}}}={\tfrac {1}{2f^{-1}(y)}}={\tfrac {1}{f'(f^{-1}(y))}}$
Since there is $f^{-1}(y)={\sqrt {y}}$ for all $y\in \mathbb {R} ^{+}$ and $f'(x)=2x$ for all $x\in \mathbb {R} ^{+}$. In the first example (straight lines), there is also
$(f^{-1})'(y)={\tfrac {1}{2}}={\tfrac {1}{f'(f^{-1}(y))}}$
Can this be chance? Actually, it's not: the formula is valid for a general. Consider $f:D\to W$ being differentiable at ${\tilde {x}}\in D$ and being differentiable $f^{-1}:W\to D$ at ${\tilde {y}}=f({\tilde {x}})\in W$ . By definition of the inverse function,
$y=f(f^{-1}(y))$
for all $y\in W$. Now we take the derivative and obtain by the chain rule:
$1=f'(f^{-1}({\tilde {y}}))\cdot (f^{-1})'({\tilde {y}})$
Here we have used that $f$ in $f^{-1}({\tilde {y}})={\tilde {x}}$ and $f^{-1}$ in ${\tilde {y}}$ are differentiable. Now we divide on both sides by $f'(f^{-1}({\tilde {y}}))$ (note: this only possible if the expression is not equal to zero), and get
$(f^{-1})'({\tilde {y}})={\frac {1}{f'(f^{-1}({\tilde {y}}))}}$
or equivalently
$(f^{-1})'(f({\tilde {x}}))={\frac {1}{f'({\tilde {x}})}}$
So the formula also holds in general under certain conditions. Now the question is, under which conditions at $f$ the derivative of $f^{-1}$ exists.
* On the one hand the $f^{-1}$ must exist. This is exactly the case if $f$ is bijective, which is exactly the case if $f$ is surjective and strictly monotone.
* As we have seen above, $f$ must be differentiable in the point ${\tilde {x}}=f^{-1}({\tilde {y}})$ with $f'({\tilde {x}})\neq 0$.
* We will see that we need one more condition, namely that $f^{-1}$ is continuous in ${\tilde {y}}$. If the domain of definition $D$ of $f$ is an interval, then this is always fulfilled according to the theorem about continuity of the inverse function.
These are the conditions necessary for our formula to hold. Let's put it into a theorem:

## Theorem: derivative of the inverse function
### Theorem and proof

Theorem (Derivative of the inverse function)
Let $D,W\subseteq \mathbb {R}$ and $D$ be an interval. further, let $f:D\to W$ be a surjective and strictly monotone function, which is differentiable in ${\tilde {x}}\in D$ where $f'({\tilde {x}})\neq 0$. Then, $f$ has an inverse function $f^{-1}:W\to D$, which is differentiable at ${\tilde {y}}:=f({\tilde {x}})$ and there is:
$(f^{-1})'({\tilde {y}})={\frac {1}{f'(f^{-1}({\tilde {y}}))}}$
Remarks:
* The surjectivity of $f$ is equivalent to $W=f(D)$.
* If $f$ is differentiable on all of $D$, then according to the monotonicity criterion the strict monotonicity can be seen most easily by $f'>0$ or $f'<0$.
* As we have seen above with the derivative of the square root function $y\mapsto {\sqrt {y}}$ in ${\tilde {y}}=f({\tilde {x}})=0$, the condition $f'({\tilde {x}})\neq 0$ must not be omitted under any circumstances. Otherwise, it produces "infinite derivatives", which are not well-defined!
* The theorem also holds if $D$ is not an interval. But then it must be demanded additionally that $f^{-1}$ in ${\tilde {y}}$ is continuous. Furthermore, ${\tilde {x}}$ and ${\tilde {y}}$ must be accumulation points of $D$ and $W$ respectively.
* If $f$ is additionally continuous, then by continuity of the inverse function it follows that $W$ is an interval.
Summary of proof (Derivative of the inverse function)
First of all we justify that $f^{-1}$ exists. Then we conclude by the theorem about the continuity of the inverse function that $f$ is continuous. We show that the differential quotient $\lim \limits _{y\to {\tilde {y}}}{\tfrac {f^{-1}(y)-f^{-1}({\tilde {y}})}{y-{\tilde {y}}}}$ exists and has the value ${\tfrac {1}{f'(f^{-1}({\tilde {y}}))}}$. That is, that for every sequence $(y_{n})$ with $y_{n}\to {\tilde {y}}$ there is $\lim \limits _{n\to \infty }{\tfrac {f^{-1}(y_{n})-f^{-1}({\tilde {y}})}{y_{n}-{\tilde {y}}}}={\tfrac {1}{f'(f^{-1}({\tilde {y}}))}}$.
Proof (Derivative of the inverse function)
$f:D\to W$ is surjective and strictly monotone, i.e. bijective. So the inverse function $f^{-1}:W\to D$ exists. Since we have assumed that $D$ is an interval, the theorem about the continuity of the inverse function implies that $f^{-1}$ is continuous on $W$. There is thus $\lim \limits _{y\to {\tilde {y}}}{f^{-1}(y)}=f^{-1}({\tilde {y}})$ with ${\tilde {y}}:=f({\tilde {x}})\in W$. Let now $(y_{n})_{n\in \mathbb {N} }=(f(x_{n}))_{n\in \mathbb {N} }$ be a sequence in $W$ with $\lim _{n\to \infty }y_{n}={\tilde {y}}$, then there is
${\begin{aligned}&\lim \limits _{n\to \infty }{\frac {f^{-1}(y_{n})-f^{-1}({\tilde {y}})}{y_{n}-{\tilde {y}}}}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ f(f^{-1}(y_{n}))=y_{n}{\text{ and }}f(f^{-1}({\tilde {y}}))={\tilde {y}}\right.}\\[0.3em]=\ &\lim \limits _{n\to {\tilde {\infty }}}{\frac {f^{-1}(y_{n})-f^{-1}({\tilde {y}})}{f(f^{-1}(y_{n}))-f(f^{-1}({\tilde {y}}))}}\\[0.3em]=\ &\lim \limits _{n\to \infty }{\frac {1}{\frac {f(f^{-1}(y_{n}))-f(f^{-1}({\tilde {y}}))}{f^{-1}(y_{n})-f^{-1}({\tilde {y}})}}}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ f^{-1}(y_{n})=x_{n}{\text{ and }}f^{-1}({\tilde {y}})={\tilde {x}}\right.}\\[0.3em]=\ &\lim \limits _{n\to \infty }{\frac {1}{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}}\\[0.3em]=\ &{\frac {1}{\lim \limits _{n\to \infty }{\frac {f(x_{n})-f({\tilde {x}})}{x_{n}-{\tilde {x}}}}}}\\[0.3em]&{\color {OliveGreen}\left\downarrow \ f{\text{ differentiable at }}{\tilde {x}}\right.}\\[0.3em]=\ &{\frac {1}{f'({\tilde {x}})}}\\[0.3em]=\ &{\frac {1}{f'(f^{-1}({\tilde {y}}))}}\end{aligned}}$
Hence, $f^{-1}$ is differentiable in ${\tilde {y}}$ and there is $(f^{-1})'({\tilde {y}})={\frac {1}{f'(f^{-1}({\tilde {y}})}}$.
Alternative proof (Derivative of the inverse function)
Another way of proof is given by an equivalent characterization of the derivative: $f$ is differentiable in ${\tilde {x}}\in D$ if and only if there is a function $\varphi :D\to W$ continuous at ${\tilde {x}}$ with
$f(x)-f({\tilde {x}})=\varphi (x)(x-{\tilde {x}})$
If this is the case, then $\varphi ({\tilde {x}})=f'({\tilde {x}})$. Since by assumption, $f({\tilde {x}})=\varphi ({\tilde {x}})\neq 0$ and $f$ is strictly monotone, $\varphi (x)\neq 0$ follows for all $x\in D$. If we now set $y=f(x)$ and $x=f^{-1}(y)$, the above equation is
$y-{\tilde {y}}=\varphi (f^{-1}(y))(f^{-1}(y)-f^{-1}({\tilde {y}}))$
This is now equivalent to
$f^{-1}(y)-f^{-1}({\tilde {y}})={\frac {1}{\varphi (f^{-1}(y))}}(y-{\tilde {y}})$
Since $\varphi$ and $f^{-1}$ are continuous at ${\tilde {y}}=f({\tilde {x}})\in W$ we also get continuity of ${\tfrac {1}{\varphi \circ f^{-1}}}$ at ${\tilde {y}}$. If we now use again the equivalent characterization of continuity, it follows from the last equation that $f^{-1}$ is differentiable in ${\tilde {y}}$ with
$(f^{-1})'({\tilde {y}})={\frac {1}{\varphi (f^{-1}({\tilde {y}}))}}={\frac {1}{f'(f^{-1}({\tilde {y}}))}}$

### Memory rule and visualization

Using Leibniz's notation for the derivative, the formula of the derivative of the inverse function can be illustrated by a simple fraction-swap trick: For $f^{-1}(y)=x$ and $f(x)=y$ there is
${\frac {\mathrm {d} x}{\mathrm {d} y}}={\frac {1}{\frac {\mathrm {d} y}{\mathrm {d} x}}}$
We can also visualize the formula graphically: If the function $f$ is differentiable at $x_{0}$ , then $f'(x_{0})$ corresponds to the slope of the tangent to the graph in $(x_{0}|f(x_{0}))$. Hence,
$f'(x_{0})={\frac {\mathrm {d} y}{\mathrm {d} x}}=m$
We now obtain the graph of the inverse function in two steps:
* First we have to rotate the graph of $f$ by $90^{\circ }$ (clockwise or counter-clockwise). The resulting graph has the slope $-{\tfrac {1}{m}}$ at the point $x_{0}$, because the tangent at this point is perpendicular to the original tangent.
* Then we have to mirror the graph (horizontally or vertically). The sign of the tangent gradient is reversed.
Altogether we get
$(f^{-1})'(f(x_{0}))=(f^{-1})'(y_{0})={\frac {\mathrm {d} x}{\mathrm {d} y}}=-\left(-{\frac {1}{m}}\right)={\frac {1}{m}}$

### Extension to the whole domain

The converse of the theorem also holds:
Theorem (Converse of the theorem about inverse function derivative)
Let $D,W\subseteq \mathbb {R}$ and $D$ be an interval. Further, let $f:D\to W$ be a surjective, strictly monotone function, which is differentiable at ${\tilde {x}}\in D$. If further, the inverse function $f^{-1}:W\to D$ is differentiable at ${\tilde {y}}:=f({\tilde {x}})$, then there is: $f'({\tilde {x}})\neq 0$ and
$(f^{-1})'({\tilde {y}})={\frac {1}{f'(f^{-1}({\tilde {y}}))}}$
Proof (Converse of the theorem about inverse function derivative)
The proof works with the trick from the introduction. For all $x\in D$ we have
$f^{-1}(f(x))=x$
Under the above conditions, the left-hand side is differentiable at ${\tilde {x}}\in D$ (chain rule) with
$(f^{-1})'(f({\tilde {x}}))\cdot f'({\tilde {x}})=1$
Because 0 has no divisor (other than 0) in $\mathbb {R}$, there must be $f'({\tilde {x}})\neq 0$ and we get
$(f^{-1})'(f({\tilde {x}}))={\frac {1}{f'({\tilde {x}})}}$
Let us now additionally demand in the original theorem that $f$ is differentiable on all of $D$ with $f'\neq 0$. Then we can determine the derivative function of $f^{-1}$ on all of $W$:
Theorem (Derivative of the inverse function)
Let $D,W\subseteq \mathbb {R}$ and $D$ be an interval. Further, let $f:D\to W$ be a surjective, differentiable, strictly monotone function with $f'(x)\neq 0$ for all $x\in D$. Then $f$ has a differentiable inverse function, whose derivative is given by:
$(f^{-1})'={\frac {1}{f'\circ f^{-1}}}$

## Examples

Example (linear functions)
Let $a\in \mathbb {R} \setminus \{0\}$, $b\in \mathbb {R}$ and
$f:\mathbb {R} \to \mathbb {R} ,\ f(x)=ax+b$
a linear function. Then $f$ is surjective and strictly monotonically increasing, if $a>0$, and strictly monotonically decreasing, if $a<0$. Furthermore, $f$ is differentiable on all of $\mathbb {R}$ with derivative $f'\equiv a$. According to the theorem about the derivative of the inverse function there is thus for all $y\in \mathbb {R}$
$(f^{-1})'(y)={\frac {1}{f'(f^{-1}(y))}}={\frac {1}{a}}$
We could also have calculated this directly, as above.
Example (Root functions)
Let for $k\in \mathbb {N}$
$f:\mathbb {R} ^{+}\to \mathbb {R} ^{+},\ f(x)=x^{k}$
Then $f$ is differentiable and has the derivative $f'(x)=kx^{k-1}>0$. So it is monotonically increasing. Furthermore, $f$ is surjective. The inverse function is the $k$-th root function
$f^{-1}:\mathbb {R} ^{+}\to \mathbb {R} ^{+},\ f^{-1}(y)={\sqrt[{k}]{y}}$
For every $y\in \mathbb {R} ^{+}$ our theorem now yields
$(f^{-1})'(y)={\frac {1}{f'(f^{-1}(y))}}={\frac {1}{k{\sqrt[{k}]{y}}^{k-1}}}$.
If $k$ is odd, then the formula holds even for all $y\in \mathbb {R}$.
Example (Logarithmic functions)
Let us look at the exponential function
$f:\mathbb {R} \to \mathbb {R} ^{+},\ f(x)=\exp(x)$
We have learned that $f'=\exp$. So the function is differentiable, and because of $f'>0$ strictly monotonically increasing. Furthermore, $f$ is surjective. The inverse function is the (natural) logarithm function
$f^{-1}:\mathbb {R} ^{+}\to \mathbb {R} ,\ f^{-1}(y)=\ln y$
Our theorem now implies for $y\in \mathbb {R} ^{+}$:
$(f^{-1})'(y)={\frac {1}{f'(f^{-1}(y))}}={\frac {1}{e^{\ln y}}}={\frac {1}{y}}$

## Exercises

Math for Non-Geeks: Template:Aufgabe
Math for Non-Geeks: Template:Aufgabe