TITLE: What function can be differentiated twice, but not 3 times?
QUESTION [46 upvotes]: In complex analysis class professor said that in complex analysis if a function is differentiable once, it can be differentiated infinite number of times. In real analysis there are cases where a function can be differentiated twice, but not 3 times.
Do anyone have idea what he had in mind? I mean specific example where function can be differentiated two times but not three?
EDIT. Thank you for answers!
but if we replace $x\to z$ and treat it as a complex function. Why are we not getting in the same problem? Why according to my professor it is still differentiable at $0$?

REPLY [9 votes]: Idea. Take a continuous and not differentiable function and integrate it twice. Then you get such a function.
Examples:

$f(x)=|x|^a$, where $a\in[3,4)$.
$f(x)=\max\{0,x^3\}$.
$f(x)=x^a\sin x^{-b}$, for $x\ne 0$, and $f(0)=0$, where $3b+3>a>2b+2$.