# Does the inverse function theorem require continuity as a hypothesis?

This question is about the inverse function theorem for real-valued functions.

Suppose $$f$$ is a one-to-one, that $$a$$ is in the domain of $$f$$, and that $$f$$ is defined on an open interval containing $$a$$. Suppose further that $$f$$ is differentiable at $$a$$, and $$f'(a)\neq0$$. Does it follow that $$f^{-1}$$ is differentiable at $$f(a)$$, and $$\bigl(f^{-1}\bigr)'\bigl(f(a)\bigr)=\frac{1}{f'(a)} \, ?$$ I ask this question because some presentations of the inverse function theorem (e.g. in Spivak's Calculus) seem to additionally require that $$f$$ is continuous on an open interval containing $$a$$. I see three possibilities:

1. That the hypotheses given above imply that $$f$$ is continuous on an open interval containing $$a$$, and so it is redundant to state this as a hypothesis.
2. That the hypotheses given above do not imply that $$f$$ is continuous on an open interval containing $$a$$, but the theorem holds anyway.
3. That the hypothesis that $$f$$ is continuous on an open interval containing $$a$$ is in fact necessary, and so there is a counter-example to the "theorem" stated above.
• Comments are not for extended discussion; this conversation has been moved to chat. Commented Sep 29, 2022 at 13:02

As it turns out, there is a relatively simple counter-example to the "theorem" given above. Let $$f$$ be given by $$f(x)=\begin{cases} x^3+x & \text{if x is rational,} \\ x &\text{if x is irrational.} \end{cases}$$ We have $$f'(0)=1$$, but $$f^{-1}$$ is not differentiable at $$f(0)=0$$ as it is not defined in a neighbourhood of $$0$$. This is because we can find arbitrarily small rational numbers $$y$$ which are not of the form $$x^3+x$$ for some $$x\in\mathbb Q$$.
• It is an interesting exercise to verify the last sentence of my post. I used the rational root theorem to prove that $x^3+x=1/2^n$ does not have rational solutions for $n\in\mathbb N$.