# Differentiable function with no second derivative at $0$?

What is an example of a function that is differentiable, concave up everywhere, and $$f''(0)$$ does not exist?

• $f(x)=x^2$ for $x<0$ and $f(x)=x^3$ else. – Michael Hoppe Dec 6 at 16:57
• @Eric Maybe only integral of absolute value? – Юрій Ярош Dec 6 at 17:01
• @ЮрійЯрош No, I just messed up. The first integral isn't concave up. You can take the first integral of something like$g(x)=0$ for $x<0$ and $g(x)=x$ for $x \geq 0$ – Eric Dec 6 at 17:04

So you need a continuous function, and the first derivative at $$0$$ must be the same for both $$x>0$$ and $$x<0$$, but the second derivative must be different. Start with $$f(x)=x^2$$ for $$x>0$$. You have $$f(0+)=0$$, $$f'(0+)=0$$, and $$f''(0+)=2$$. You now need $$f(0-)=0$$, $$f'(0-)=0$$, and you can choose $$f''(0-)=0$$. For example $$f(x)=x^4$$ for $$x<0$$
• Not sure why you mention continuity. The desired function should be differentiable, hence it will be continuous. You wrote "the first derivative at $0$ must be the same for both $x>0$ and $x<0$" What does that mean? – zhw. Dec 6 at 17:32
• I've started from scratch. So in order to find a differentiable function, the first requirement is that is continuous. In order to be differentiable, the derivative must be continuous, including at $0$. Since I choose to define my function differently for $x>0$ and for $x<0$, I just need $$\lim_{x\to 0}f(x<0)=\lim_{x\to 0}f(x>0)$$ – Andrei Dec 6 at 19:22