# Continuity is required for differentiability?

My professor emphasized that:

1. Differentiability implies continuity and
2. Continuity is required for differentiability.

Since a function like $\frac 1 x$ is differentiable but not continuous, I thought my professor simply forgot to say that the 2 rules only apply at a point, not an interval.

However, in the textbook, we were given the following questions and the corresponding solutions:

1. If $f$ is differentiable and $f(-1)=f(1),$ then there is a number $c$ such that $|c|<1$ and $f'(c)=0.$ (true)

My solution: consider $f=\frac 1 {x^2}$, therefore it is false.

1. If $f'(x)$ exists and is nonzero for all $x,$ then $f(1)\neq f(0).$ (true)

My solution: consider $f=\frac 1 {(x-0.5)^2}$, therefore it is false.

The textbook's answer only makes sense if differentiability implies continuity on an interval. So does differentiability imply continuity on an interval or is the textbook wrong?

• Sorry, but $f(x)=1/x$ and $f(x)=1/x^2$ are not differentiable in $0$, which is also the point where they are not continuous... so what are you asking, exactly? – wisefool Dec 4 '14 at 23:30
• The textbook isn't wrong, it's just sloppy. It means "differentiable over (-1,1)" for question 1, and "for all $x\in \mathbb{R}$ for question 2. – charlotte Dec 4 '14 at 23:36
• I could hardly see the difference between f and f' (without MathJax formatting) and almost made an incorrect comment as a result. It's much easier (and less error-prone) to read $f$ and $f'$. – David K Dec 5 '14 at 4:26

## 3 Answers

The functions $f(x) = 1/x$ and $f(x) = 1/x^2$ are not defined in $0$. So in particular it makes no sense to think about continuity or differentiability at $0$. Both your statement hold only on intervals.

Differentiability does not imply continuity on an interval! Consider the somewhat artificial functions defined as $0$ on the rationals and $x^2$ on the irrationals. It is continuous and differentiable at $0$ and neither continuous nor differentiable on $\mathbb{R} \setminus \{0\}$.

Edit: I think I misunderstood the "on an interval" part. Anyway, the implication is pointwise.

• "Differentiability does not imply continuity on an interval!" Yes it does. Or I misunderstand. Could you please be more precise? – Jonas Meyer Dec 5 '14 at 6:05
• @JonasMeyer: When a function is differentiable at a point $x$, this does not imply existence of an open neighborhood $U$ of $x$ in which it is continuous. It only implies continuity at $x$. – 1k5 Dec 5 '14 at 6:26
• But actually I think this was not what the OP meant and I misunderstood... – 1k5 Dec 5 '14 at 6:29

The other answers are perfectly fine... but here's a proof for why continuity holds:

Suppose that $f$ is differentiable at $x$, then $f'(x)$ exists, so for any $h>0$:

$$f(x+h)-f(x) = \frac{f(x+h)-f(x)}{h} h \to f'(x)\cdot 0$$

as $h\to 0$ because $f'$ is differentiable at $x$.

Therefore, $f(x+h)\to f(x)$ as $h\to 0$ so $f$ is continuous at $x$.

Likewise, if the function is differentiable on an interval then it is continuous on that interval.

A basic theorem states that if a function is differentiable at a point, then it is continuous at that point. The function $f(x)=1/x$ is differentiable and continuous on its domain of definition $\mathbb R\setminus \{0\}$.