2

So I'm starting to learn about continuity and I'm having a slight problem. I've had a look around online but can't really find the explanation I'm looking for. I've been looking at the classic example of a derivative which is not continuous:

$$f(x) = \begin{cases} x^2\sin(\frac{1}{x}) & \quad x\ne0 \\ 0 & \quad x=0 \end{cases} $$

I understand the process of using limits to check that $f(x)$ is continuous and differentiable, how to get to the conclusion that $f'(0) = 0$, and that the $\lim\limits_{x \to 0} (-\cos(\frac{1}{x})+2x \sin(\frac{1}{x}))$ does not exist.

What I don't understand is that if $f'(x)$ has no limit as $x$ appoaches $0$, then how can it be the case that we can calculate that $f'(0) = 0$? How have we managed to calculate the derivative at a point of discontinuity? Is the limit of the difference quotient used only to determine that $f(x)$ has a derivative at $0$ and is this result completely overruled by the fact that we have calculated there is a discontinuity at $x=0$. I thought the point of a discontinuity was that you couldn't do things like come up with an expression for its derivative.

androyd
  • 31
  • "How have we managed to calculate the derivative at a point of discontinuity?" That's not what we have done. You are confusing points of continuity of $f$ with points of continuity of $f'$. We haven't calculated the derivative "at a point of discontinuity" of $f$. Indeed, $f$ is continuous at $x=0$. We have calculated the derivative at a point of continuity and found that $f'$, not $f$, is discontinuous there. – symplectomorphic Aug 24 '20 at 22:10
  • @symplectomorphic Sorry I don't think I've worded my question particularly well. If it helps, what I mean is that I struggle to understand how the derivative can have a value of 0 ($f'(0) = 0$) while also being discontinuous at that point. – androyd Aug 25 '20 at 00:02
  • Look at the picture in my answer. Maybe it helps. – Stephen Montgomery-Smith Aug 25 '20 at 00:26
  • @androyd: so you are struggling to understanding how a function can have a discontinuity even where it is defined? Consider the function $f(x)=0$ when $x=0$ and $f(x)=1$ when $x\neq0$. This function is defined at $x=0$ and yet has a discontinuity there. (This is called a removable discontinuity, whereas the discontinuity that $f'$ has is a non-removable discontinuity. But still the general point stands: a function can be defined at a point where it is discontinuous.) – symplectomorphic Aug 25 '20 at 16:27

2 Answers2

1

Using MVT, you can prove easily that if $ f $ is continuous at $ [a,b] $ and differentiable at $ (a,b] $ with $$\lim_{x\to a^+}f'(x)= L \in \Bbb R $$ Then, $ f $ is differentiable at $ [a,b] $ and

$$f'(a)=L$$

Your counterexample simply proves that the Converse is not always true.

1

Suppose the derivative were defined as $$ f^\dagger(x) = \lim_{y,z \to x} \frac{f(y) - f(z)}{y-z} ,$$ then $f(x) = x^2 \sin(\frac1x)$ wouldn't be differentiable at $x = 0$. That is, you could find a sequence of points $y_n,z_n \to 0$ such that the slope between these points oscillates. You could do this, for example, by making the distance between $x_n$ and $y_n$ much smaller than the distance between $x_n$ and $0$. I think this definition would have been very reasonable, but that wasn't the one they chose.

I think this picture illustrated what is happening. See that there is a sequence of points going to zero such that the slope between those points is definitely not close to 0. But the derivative at 0 definitely is zero.

Picture of x^2 sin(1/x) with two points highlighted

Stephen Montgomery-Smith
  • 26,430
  • 2
  • 35
  • 64
  • Thanks Stephen the diagram helps a lot. So the $x^2$ term sort of imparts a "minimum" at $x=0$ despite the fact that the frequency of the oscillations is increasing. In a different scenario, what if we're just given the equation $g(x) = -\cos(\frac{1}{x})+2x \sin(\frac{1}{x})$. How might I go about calculating that $g(0) = 0$? – androyd Aug 25 '20 at 01:28
  • The only way I can think of is to compute $\lim_{x\to 0} \frac1x \int_0^x g(y) , dy $. – Stephen Montgomery-Smith Aug 25 '20 at 01:53
  • @androyd: you are confused when you write "what if we're just given the equation $()=−\cos(1/x)+2\sin(1/x)$. How might I go about calculating that $(0)=0$?" If all you know is that $g(x)=−\cos(1/x)+2\sin(1/x)$, then $g(0)$ simply isn't defined; zero is not in the domain of the function $g$, and it doesn't make sense to ask "what is $g(0)$?" However, it does make sense to ask "can I extend the function $g(x)$ to a domain including $x=0$ so that the new function is continuous?" The answer to this question is NO, because $g(x)$ has a "non-removable discontinuity" at $x=0$. – symplectomorphic Aug 25 '20 at 16:31
  • @symplectomorphic Okay I've done some more reading and I think I understand what you're saying. So the reason that we can calculate that $f'(0)=0$ is because $f$ is a piecewise function which has $f(0)=0$. $g(x)$ is not a piecewise function and while $g(0)$ has a discontinuity at $x=0$, it does not have a value. $f'(x)$ IS a piecewise function and has a discontinuity at $x=0$ which has the value $0$. Does this make sense? – androyd Aug 25 '20 at 18:38
  • @androyd: close. certainly $f(0)=0$ by definition: it literally says so right in the piecewise definition. moreover, we can calculate $f'(0)$ from the definition of the derivative, taking the limit of the difference quotient (not the limit of $f'(x)$). it's not correct to say "$g(0)$ has a discontinuity at $x=0$" for two reasons. for one thing, $g(0)$ doesn't even exist. for another thing, a function can only have discontinuities at points where it is defined (in the usual definition). the correct thing to say is that $g(x)$ isn't even defined at $x=0$, and it's not continuously extendable. – symplectomorphic Aug 25 '20 at 19:09
  • @symplectomorphic Taking the limit of the difference quotient ($f'(0) = \lim\limits_{h \to 0} (\frac{f(h) - f(0)}{h})$) relies on us having the knowledge that $f(0) = 0$, right? So if $f$ wasn't a piecewise function then we couldn't calculate its derivative at $x=0$? What I meant to say is that $g(x)$ has a discontinuity at $x=0$, but this isn't correct either because $x=0$ is not within the domain of $g(x)$. To summarise, $f'(x)$ is defined at $x=0$ and has a discontinuity there whereas $g(x)$ is undefined at $x=0$ and so you cannot say it has a discontinuity? – androyd Aug 25 '20 at 19:42