Yesterday, while giving the definition of n times differentiable function (of a real function of a single variable, although a generalization of it to R^n or more sophisticated spaces would be nice to consider too, so if this makes sense more generally please also consider it) at a point (which involves the existence of all the lower order derivatives in a neighborhood and only the nth derivative at that point) someone asked my teacher in class if there are functions that have nth derivative (n>1) at only one isolated point while the lower order derivatives exist at an entire neighborhood of it. This seems like a natural question after getting the definition he gave.
At first my teacher thought the matter was easy to resolve by exhibiting the Dirichlet function times the identity which only has a derivative at zero but this cannot be the derivative of any function since it has 1st order discontinuities (finite jumps).
Does there exist a function that has a derivative in an entire interval and second derivative at only one of its points? more generally, a function with 1, 2,... n-1 th derivatives defined at (probably nested) intervals and nth derivative only at one point inside?
I've been trying to figure it out myself to no avail... My teacher gave up too but he thinks he's seen it a long time ago and had to do with some class of functions for which the fundamental theorem of calculus does not hold (?)... I wouldn't trust him much