3

Find the points where $f(x)=1-|x|$ is not differentiable in the interval $[-1,1]$

My solution goes like this:

We claim that the function $f(x)=1-|x|$ is not differentiable at $x=0.$ Thus is true indeed, since $f'(0)=\lim_{\Delta x\to 0}\frac{f(\Delta x)-1}{\Delta x}=\lim_{\Delta x\to 0}\frac{1-|\Delta x|-1}{\Delta x}=\lim_{\Delta x\to 0}\frac{-|\Delta x|}{\Delta x}.$ Now, if $\Delta x>0$ then $f'(0)=-1$ and if $\Delta x>0$ then $f'(0)=1.$ Thus, $f'(0)$ does not exist. Next, we claim $x=1$ is also such a point where $f(x)$ is non-differentiable. Now, $$f'(1)=\lim_{\Delta x\to 0}\frac{f(1+\Delta x)-f(1)}{\Delta x}=\lim_{\Delta x\to 0}\frac{f(1+\Delta x)}{\Delta x}$$ If $1+\Delta x>0$, then $f(1+\Delta x)$ does not exist, since $1+\Delta x\notin [-1,1]$ and thus the Right -Hand Limit does not exist or rather can'tbe calculated. Thus, the limit $f'(1)$ doesnot exist at all. Hence, $f(x)$ is not differentiable at $1.$ Similarly, we can prove $f(x)$ is not differentiable at $x=1.$

Is the above solution correct? If not, where is it going wrong?

Arthur
  • 2,614

2 Answers2

6

First summarize some comments (now deleted, though useful).

  • The definition of derivative you are using is: $f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}h.$ (I will likewise write everywhere $h,$ it is shorter than $\Delta x.$)
  • This definition may very well be applied at endpoints $\pm1$ of the interval of definition of $f.$ (Hardy himself, in Pure Mathematics, has no problem with derivative at endpoints. And many authors, like Stewart in Calculus, define $\lim_{t\to a}g(t)=L,$ for a function $g$ defined on any domain $D$ of which $a$ is a limit point, by: $\forall\varepsilon>0\quad\exists\delta>0\quad\forall t\in D\quad(0<|t-a|<\delta\Rightarrow|g(t)-L|<\varepsilon).$

Now, a complete answer to your question "Is the above solution correct? If not, where is it going wrong?"

  • Your conclusion that $f'(0)$ does not exist and your intuition are correct but your proof is not perfectly written. Same remark as in one of @Théophile 's comments: keep everything before and after "if $\Delta x>0$ then $f'(0)=-1$ and if $\Delta x>0$ then $f'(0)=1$", but instead of that sentence, better write: "$\lim_{\Delta x\to0^+}\frac{-|\Delta x|}{\Delta x}=-1$ and $\lim_{\Delta x\to0^-}\frac{-|\Delta x|}{\Delta x}=1.$"
  • Depending on the authors, some people (including Wikipedia, YouTube, and may be your teacher) might agree with your conclusion that $f'(1)$ does not exist either, but for a very different reason from the previous one for $f'(0)$: the new reason you were encouraged to reproduce instead of your first version.
  • However, according to the (better sourced) definitions above, $f'(1)$ does exist. And this is what you were trying to examin in your first version, when considering $f'(1)=\lim_{h\to 0}\frac{f(1+h)-f(1)}h=\lim_{h\to 0^-}\frac{1-|1+h|}h.$ For $h$ close enough to $0,$ $1+h$ is positive, hence the absolute value may be dropped and we find $$f'(1)=\lim_{h\to 0^-}\frac{-h}h=-1.$$ (Note that you could prove similarly that $f'(x)=-1$ for every $x\in(0,1]$ and $f'(x)=1$ for every $x\in[-1,0),$ and that a simpler way is to derivate $x\mapsto1-x$ on the first interval and $x\mapsto1+x$ on the second one.)
  • Your main confusion (in that previous version) was to find also another limit (and concluding that the limit $f'(1)$ does not exist for the same reason as $f'(0)$) when you wrote "if $1+h<0,$ then $f'(1)=\lim_{h\to 0}\frac{1-|1+h|}h=\lim_{h\to 0}\frac{2+h}h$" (which you moreover evaluated to $2$ instead of $\infty$). It is true that if $1+h<0$ then $\frac{1-|1+h|}h=\frac{2+h}h,$ but taking the limit of this equality as $h$ tends to $0$ makes no sense because (again) for $h$ close to $0,$ $1+h>0$ (no matter the sign of $h$).

Edit, upon request per comments: My summary of the unfortunately deleted comments above was not complete. It should include a third point: your prefered definition of $\lim_{t\to a}g(t)=L$ (different from Hardy's and Stewart's one quoted in the second point) implicitely requires $g$ to be defined on both sides of $a$ (i.e. on $(a-\varepsilon,a)\cup(a,a+\varepsilon)$ for some $\varepsilon>0$). If you submit to this restriction, limits (hence also derivatives) at end points of a domain are not defined (better said than "cannot be calculated"), not in the sense "undefined" like an indeterminate form, but simply voluntarily excluded from the definitions. With this convention, the poor $f'(\pm1)$ in your example are de facto deprived of a definition, so that the correct answer to "is $f$ differentiable at $\pm1$?" is not "no" but "this question does not make sense, by lack of a definition". It is even a waste of time, for such an answer, to talk about left and right limits and derivatives (invoking the theorem that when you stick to functions $g$ defined on both sides of $a,$ $\lim_ag$ exists iff $\lim_{a^+}g$ and $\lim_{a^-}g$ exist and are equal).

Edit: related post: Differentiability at endpoints

Anne Bauval
  • 34,650
  • 1
    @Franklin it is really annoying that comments disappear like that. Please tell me if you need me to rewrite my last comment, which was a small criticism of your saying something like "if $\Delta x<0$ then $f'(1)=-1$ and if $\Delta x>0$ then $f'(1)$ is undefined" in your previous comment (if I remember well...). – Anne Bauval Feb 21 '23 at 20:33
  • 1
    I didn't even receive your comment in my notification! Strange! Of course, if you don't mind, you may write it. Not only will that help me when I stumble back after some time in this post, but also help other readers as well :) – Arthur Feb 22 '23 at 18:42
  • Well @Franklin it was something like: writing "if $\Delta x<0$ then $f'(1)=-1$" is not correct. Instead, write "$\lim_{\Delta x\to0^-}\frac{f(1+\Delta x)-f(1)}{\Delta x}=-1$", or as a shorthand: "$f'{\rm left}(1)=-1$". Similarly, don't write "if $\Delta x>0$ then $f'(1)$ does not exist", but "$f'{\rm right}(1)$ does not exist". It is the same incorrection as above when you write "if $\Delta x>0$ then $f'(0)=-1$ and if $\Delta x>0$ then $f'(0)=1$" instead of "$f'{\rm right}(0)=-1$ and $f'{\rm left}(0)=1$". – Anne Bauval Feb 22 '23 at 19:01
1

I was confused by your proof as it was hard to follow the chain of equalities. I'd suggest laying it out a little more explicitly

For $x>0$, we have $f(x) = 1-x \implies f'(x) = -1 = \lim_{x\to 0^+}f'(x)$

For $x<0$ we have $f(x) = 1+x \implies f'(x) = 1 = \lim_{x\to 0^-}f'(x)$

The two limits are not equal so the derivative does not exist $x=0$.

The other two places we could argue $f(x)$ has no derivative is $x\in\{-1,1\}$ since these will only have one-sided derivatives.

Annika
  • 6,873
  • 1
  • 9
  • 20
  • 1
    The statement “if $\lim_{x\to a^+}f'(x) \neq \lim_{x\to a^-} f'(x)$, then $f$ is not differentiable at $a$” is true, but it's a subtle truth that requires the Mean Value Theorem. Speaking as a professor, I would prefer an argument on the level of the definition of the derivative. In this case, it is just as easy to show that $\lim_{x\to} \frac{f(x)-f(0)}{x}$ does not exist. – Matthew Leingang Feb 20 '23 at 20:43
  • @MatthewLeingang -- good suggestion -- the above answer is just where my mind went first -- can you spell out how you'd show the derivative-as-limit doesn't exist without referring to left and right limits of the derivative? – Annika Feb 20 '23 at 20:47
  • Sure. If $x>0$, then $\frac{f(x)-f(0)}{x-0} = -1$, so $\lim_{x\to 0^+} \frac{f(x) - f(0)}{x-0} = -1$. On the other hand, if $x<0$, then $\frac{f(x)-f(0)}{x-0} = 1$, so $\lim_{x\to 0^-} \frac{f(x) - f(0)}{x-0} = 1$. Since these two one-sided limit disagree, $\lim_{x\to 0} \frac{f(x) - f(0)}{x-0}$ does not exist, which means that $f$ is not differentiable at $0$. – Matthew Leingang Feb 20 '23 at 20:52
  • @MatthewLeingang how is that different than what I wrote? Not challenging, but asking. – Annika Feb 20 '23 at 20:53
  • 2
    It's the difference between $\lim_{x \to a} \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}$ and $\lim_{h\to 0} \lim_{x\to a} \frac{f(x+h) - f(x)}{h}$. – Matthew Leingang Feb 20 '23 at 20:53
  • @MatthewLeingang gotcha! – Annika Feb 20 '23 at 20:56
  • I told you it was subtle! :-) – Matthew Leingang Feb 20 '23 at 20:56
  • @MatthewLeingang lol — No kidding!! – Annika Feb 21 '23 at 01:18