Find the points where $f(x)=1-|x|$ is not differentiable in the interval $[-1,1]$ 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?
 A: 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).
A: 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.
