# F(x) differentiable at / near x=0?

1. Feb 21, 2009

### Redbelly98

Staff Emeritus
This came up in a recent discussion about l'Hopital's Rule.

Suppose f(x) has a derivative at x=0, that is f'(0) exists.
Is it necessarily true that f(x) is differentiable in some open interval containing x=0?
Others--who know calculus better than I--say no, f(x) is not necessarily differentiable for x≠0. So my question is, what is an example function where that is the case? That is,
f'(x) exists at x=0
f'(x) does not exist for x close to zero

2. Feb 21, 2009

### slider142

Similar to constructing the example of a function which is continuous at only a single point, have a look at the this construction which is differentiable at only a single point. It just takes the fact that everywhere else, the tangent line has two disparate values, but at 0, all the tangent lines approach the same tangent line.

3. Feb 21, 2009

### Redbelly98

Staff Emeritus
Thanks! By the way, one of the other people I was discussing this with came up with this example:

f(x) = x2 sin(1/x2) for x≠0,
f(0) = 0

4. Feb 21, 2009

### CompuChip

I cannot think of one immediately as well, so probably the counterexample is pretty pathological.

Maybe you can take the f(x) from this webpage and define g(x) by
g(x) = -f(x) if x < 0
g(x) = f(x) if x > 0
g(0) = 0.

I don't really feel like proving that that's differentiable at x = 0 though :tongue:
It might be a good example, because around x = 0 it just looks like x |--> -x for all partial sums.

Very nice example slider! And the other one from Dick RedBelly is even nicer because it is continuous everywhere :)[/edit]

5. Feb 21, 2009

### slider142

Hmm, this derivative is defined everywhere, though, not just at x=0. (Before I was looking at the second derivative at x=0. My bad. :D)

Last edited: Feb 21, 2009
6. Feb 21, 2009

### Redbelly98

Staff Emeritus
Aarrh, you're right. Hmmm.

The original discussion involved l'Hopital's Rule. Thinking about it some more, the actual conditions should be
f'(x) exists at x=0
lim[x→0] f'(x) does not exist​
That is, even though f'(0) exists, one cannot apply l'Hopital's Rule to problems involving f(x) that meets the above conditions.

slider, thanks for providing another example.