# Twice differentiable but not C^2

1. Nov 23, 2006

### mufq15

I need to find an example of such a function. I know that x^2sin(1/x) is differentiable but not C^1, but I'm having trouble extending this to C^2.

2. Nov 23, 2006

### arildno

Really?
What about an anti-derivative to the function you've posted?

3. Nov 23, 2006

### mufq15

Um, I understand that that would work, but I don't think I know how to take an antiderivative of that (or am I just being silly?) Are you suggesting I just write it as the integral of that?

4. Nov 23, 2006

### arildno

Yes, you won't be able to write your anti-derivative in terms of elementary functions, however the really important insight is that the anti-derivative of a function is always differentiable to a greater or equal extent as your original function. For functions finitely differentiable, the strict inequality holds, for infinitely differentiable functions, the "equality" holds.

Another choice should readily suggest itself by considering WHAT IS IT THAT MAKES YOUR FUNCTION ONCE DIFFERENTIABLE?
The answer is that the power of the x multiplied with the sine is big enough to kill off the crazy behaviour of the sine function!
(The amplitude of the function becomes so small that the pathological oscillation of the function becomes "irrelevant")

What if we make the power of the amplitude even bigger?
Might not this make also the derivative of our function not only continuous, but also differentiable?

Consider the function:
$$f(x)=x^{4}\sin(\frac{1}{x}), x\neq{0}, f(0)=0$$
Now, the DERIVATIVE of this function is readily found out to be:
$$f'(x)=4x^{3}\sin(\frac{1}{x})-x^{2}\cos(\frac{1}{x}), x\neq{0}, f'(0)=0$$
Now, see if you manage to differentiate this function everywhere, that is find the second derivative of f.

5. Nov 23, 2006

### mufq15

Oh, okay. The sin(1/x) in the second derivative makes it not continuous. Thanks for your help.