# Show f(x) = { x/2 if x rational , x if x irrational is not differentiable at 0

1. Jul 22, 2010

### kbgregory

1. The problem statement, all variables and given/known data

Show that the function

f(x)

= { x/2 if x is rational
{ x if x irrational

is not differentiable at 0

2. Relevant equations

If f is differentiable at 0 then for every e > 0 there exists some d > 0 such that when |x| < d, |(f(x)-f(0))/x - L | < e for some L, which is the derivative of f at 0.

3. The attempt at a solution

Thus far I have:

Choose e = 1/4. Suppose f is differentiable at 0 and let L be f'(0). Then there is some d such that whenever |x| < d,

|(f(x)-f(0))/x - L |

= {|(x/2-0)/x - L | = | .5 - L | if x is rational

{|(x-0)/x - L | = | 1 - L | if x is irrational

Thus we have these inequalities for L:

| .5- L | < .25 and | 1 - L | < .25

which together imply that -.25 < L < .75 as well as that .75 < L < 1.25 which is a contradiction. Therefore f is not differentiable at 0.

Is this correct?

2. Jul 22, 2010

### VeeEight

I have not looked through your work but the usual way to do this problem is to set up the slope at the point (in this case, 0), and show the limit does not exist. That is, work with f(x)/x as x tends to 0.

3. Jul 22, 2010

### Office_Shredder

Staff Emeritus
It looks good. You basically know that there are two slopes: one of .5, and one of 1, and use that information to prove that there cannot be a single slope

4. Jul 23, 2010

### HallsofIvy

You should be looking at (f(x)- f(0))/(x- 0)= f(x)/x. Now look at what happens if x is rational or irrational.

5. Jul 23, 2010

### GVAR717

I think HallsofIvy's process is easier but it seems that either method works. I think the necessary element is that 1/2 does not equal 1.