# Proving Differentiability of a Piece-wise Function

• UziStuNNa

#### UziStuNNa

1. Suppose f(x)=0 if x is irrational, and f(x)=x if x is rational. Is f differentiable at x=0?

2. the derivative= lim[h->0] [f(a+h)-f(a)]/h

3. I don't really know how to start, but I do know that between any two real numbers, there exists a rational and irrational number. So I'm guessing that has something to do with solving for the answer. f'(0)= lim[h->0] f(h)/h

Ok, so there are rational numbers as close as you want to 0. And irrational numbers. Pick h to be rational. What's f(h)/h? Same question for irrational.

For rational,
f'(0)= lim[h->0] f(h)/h= h/h=1

For irrational,
f'(0)= lim[h->0] f(h)/h= 0/h=0

Therefore, the two limits do not equal each other, meaning that f'(0) does not exist?
Was it that easy?

For rational,
f'(0)= lim[h->0] f(h)/h= h/h=1

For irrational,
f'(0)= lim[h->0] f(h)/h= 0/h=0

Therefore, the two limits do not equal each other, meaning that f'(0) does not exist?
Was it that easy?

Yes. If you are clear why you can pick h values arbitrarily close to zero that are both rational and irrational. And I think you are.

So its like doing the left-hand and right-hand limits, except we are using the piece-wise function to our advantage knowing that x can be rational and irrational, and since there are an infinite number of rational and irrational numbers approaching zero, those are our 'left' and 'right'.

Thanks a lot.

So its like doing the left-hand and right-hand limits, except we are using the piece-wise function to our advantage knowing that x can be rational and irrational, and since there are an infinite number of rational and irrational numbers approaching zero, those are our 'left' and 'right'.

Thanks a lot.

Exactly. Very welcome.