# Thread: Prove function is differentiable

1. ## Prove function is differentiable

Prove that the function

f(x) = x^2 * sin (1/x) if x!=0
= 0 if x=0

is differetiable in (-infinity, infinity), but has no second derivative at x=0

2. Originally Posted by jzellt
Prove that the function

f(x) = x^2 * sin (1/x) if x!=0
= 0 if x=0

is differetiable in (-infinity, infinity), but has no second derivative at x=0
This is not differentiable at x=0.

CB

3. Originally Posted by jzellt
Prove that the function

f(x) = x^2 * sin (1/x) if x!=0
= 0 if x=0

is differetiable in (-infinity, infinity), but has no second derivative at x=0
Sorry, Captain Black, but this function definitely is differentiable at x= 0.

Use the definition of the derivative: $\displaystyle \lim_{h\to 0}\frac{f(0+h)- f(0}{h}$

As long as h is not 0, $\displaystyle f(h)= h^2 sin(1/h)$ so $\displaystyle \frac{f(h)- f(0)}{h}= \frac{h^2 sin(1/h)}{h}= h sin(1/h)$.

$\displaystyle -1\le sin(1/h)\le 1$ for all non-zero h while h goes to 0 so the derivative at x= 0 is $\displaystyle f'(0)= \lim_{h\to 0} h sin(1/h)= 0$.

Notice that for x not 0, the derivative is given by the product rule:
$\displaystyle f'(x)= 2x sin(1/x)+ x^2 cos(1/x)(-1/x^2)= 2x sin(1/x)- cos(1/x)$.

Now, that has no limit as x goes to 0 so while f is differentiable for all x, its derivative is not continuous at x= 0. That means that f' is not differentiable at x= 0 and so f is not twice differentiable at x= 0.

4. Originally Posted by HallsofIvy
Sorry, Captain Black, but this function definitely is differentiable at x= 0.

Oppss.. I was looking at the limit of the derivative as $\displaystyle x \to 0$