Examples of functions $f$ and $g$ such that one of them is not differentiable but $f+g$ is differentiable

658 Views Asked by At

I'm searching for counterexamples of functions $f$ and $g$ such that one of them is not differentiable but $f+g$ is differentiable. I've already found counterexamples of the product case ($f(x)=|x|$ and $g(x)=-|x|$) but I couldn't find examples of the sum case.

4

There are 4 best solutions below

0
On BEST ANSWER

Choose your favourite non-derivable function $f$, and let $g = h - f$, where $h$ is your favourite derivable function.

$g$ cannot be derivable, either, otherwise $f = h - g$ would.

1
On

Have you tried the same example as in multiplication? In general $f+(-f)$ is derivable.

1
On

Let $f:\mathbb R\to \mathbb R$, $f(x)=1$ if $x\in \mathbb Q$ and $f(x)=0$ if $x\not\in \mathbb Q$.

Let $g:\mathbb R\to \mathbb R$, $g(x)=0$ if $x\in \mathbb Q$ and $g(x)=1$ if $x\not\in \mathbb Q$.

Then $f$ and $g$ are continuous nowhere but $f+g=1$ and $f\times g=0$ are differentiable everywhere.

0
On

For a little less trivial example you can take the functions

$$f(x)=|x|\;\;,\;\;g(x)=\begin{cases}x&,\;\;\;x\le 0\\{}\\x^2-x&,\;\;\;x>0\end{cases}\Longrightarrow (f+g)(x)=f(x)+g(x)=\begin{cases}0&,\;\;\;x\le 0\\{}\\x^2&,\;\;\;x>0\end{cases}$$

Check that none is derivable at $\,x=0\,$ , yet their sum is.