A function with a non-zero derivative, with an inverse function that has no derivative. While studying calculus, I encountered the following statement:
"Given a function $f(x)$ with $f'(x_0)\neq 0$, such that $f$ has an inverse in some neighborhood of $x_0$, and such that $f$ is continuous on said neighborhood, then $f^{-1}$ has a derivative at $f(x_0)$ given by:
$${f^{-1}}'(x_0)=\frac{1}{f'(x_0)}$$
My questions is - why does $f$ have to be continuous on a whole neighborhood of $x_0$ and not just at $x_0$? Is there some known counter-example for that? 

The continuity condition is not necessary. It's enough that $f$ be injective on some neighborhood. This said, if your function has a sequence of jump discontinuities near $x_0$, you might have that there is no open interval $U$ around $x_0$ for which $f(U)$ is also an interval. This means that $f^{-1}$ might be defined on a strange domain, though we can still technically differentiate it to get the desired result.

Formally, the statement you would need to prove is the following:

Let $A$ and $B$ be subsets of $\mathbb R$ and $f:A\rightarrow B$ and $g:B\rightarrow \mathbb R$. Suppose that $x_0\in A$ is an accumulation point of $A$ and $f(x_0)$ is an accumulation point of $B$. Then,

*

*If two of the derivatives $f'(x_0)$ and $g'(f(x_0))$ and $(f\circ g)'(x_0)$ exist and are non-zero, the third exists as well.


*If all of the derivatives exist, then $(f\circ g)'(x_0)=f'(x_0)\cdot g'(f(x_0)).$

One you have this statement, you can apply it to a pair where we take $g=f^{-1}$. Note that we can make this work even if $f$ isn't defined on an interval around $x_0$ - it's okay as long as we have enough points to define the relevant limit towards $x_0$.
Granted, it is a bit unusual to talk about derivatives on sets that aren't open, but there's no technical limitations preventing it, though the proof of the suggested lemma is a pain.
