# Functions not differentiable but continuous

So I have another question about functions:

Question: If neither $f$ nor $g$ is differentiable at $a$, but both are continuous at $a$, then $f+g$ is not differentiable at $a$.

I know that we could have a function $f(a)=|a|$ and $g(a)=|a|$, where $a=0$, so this means $f$ and $g$ are both continuous but not differentiable at $a=0$.

But how do I show that $f+g$ is not differentiable now? How would I go about this?

• You can't -- the (rather unsatisfying) counterexample is that $|x|$ and $-|x|$ are continuous every, nondifferentiable at the origin, but their sum is differentiable everywhere. – Rellek Dec 16 '17 at 19:22

## 1 Answer

Let $f=|x|$ and $g=-|x|$.

The statement is not true.

• Thank you, would it still work if I used f(x) = |x| and g(x) = |x|? or does it have to be f(x) = |x| and g(x) = -|x|?? – The Statistician Dec 16 '17 at 19:27
• $f(x)+g(x)=2|x|$ it is still not differentiable at $x=0$ hence it can't be a counter example. – Siong Thye Goh Dec 16 '17 at 19:28
• Okay, thank you for the help. – The Statistician Dec 16 '17 at 19:30