1. ## differentiability question

My question is twofold:
The first one is this:
I need a function which is continuous at only one point and differentiable at only one point.
I claim f(x)={x^2 if x is rational, 0 if x is irrational} is such a function. Is this true?
The second part is, I need a function which is differentiable at only two points and continuous at only one point. This seems impossible to me, unless I am missing something. I have been operating under the assumption that a function must be continuous at a point to be differentiable at that point... any suggestions?

2. Originally Posted by dannyboycurtis
My question is twofold:
The first one is this:
I need a function which is continuous at only one point and differentiable at only one point.
I claim f(x)={x^2 if x is rational, 0 if x is irrational} is such a function. Is this true?
The second part is, I need a function which is differentiable at only two points and continuous at only one point. This seems impossible to me, unless I am missing something. I have been operating under the assumption that a function must be continuous at a point to be differentiable at that point... any suggestions?
The function you have supplied is fine.

Another alternative is

$\displaystyle f(x) = x$ if $\displaystyle x$ is rational and $\displaystyle 0$ if $\displaystyle x$ is irrational.

As for the second, logic would say that it would be impossible, as a function needs to be continuous at a point for it to be differentiable at that point...

3. Originally Posted by Prove It
Another alternative is

$\displaystyle f(x) = x$ if $\displaystyle x$ is rational and $\displaystyle 0$ if $\displaystyle x$ is irrational.
That function is not differentiable at zero.

$\displaystyle \lim_{x\to0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to0}\frac{f(x)}{x}=$

1.) $\displaystyle \lim_{x\to0}\frac{x}{x}=1$

or

2.) $\displaystyle \lim_{x\to0}\frac{0}{x}=0$

So the derivative doesn't exist because the subsequential limits are not the same.

You need the $\displaystyle x^2$ to make it work.

4. can you be more clear