5
$\begingroup$

This is the function: $$f(x)=\begin{cases}x& \text{if $x$ is rational}\\0 &\text{if $x$ is irrational}\end{cases}$$

My attempt:

It's easy to verify that $f$ is continuous at $x=0$ using the sequential definition of continuity. I claim that $f$ is not differentiable at $x=0$. Assume the contrary and let $f'(0)=L$. Now, we pick an $\varepsilon$ such that $0<\varepsilon < |L|$. For this choice of $\varepsilon$ there is a $\delta >0$ such that if $0<|x-0|<\delta$ then we have $\left| \frac{f(x)-f(0)}{x-0} -L\right| < \varepsilon $. Now, pick $x' \in \mathbb{R}\setminus\mathbb{Q}$ with $0<|x'| <\delta$. Then we have $\left| \frac{f(x')-f(0)}{x'-0} -L\right| = |L| > \varepsilon$. A contradiction!

Is this proof correct?

$\endgroup$
8
6
$\begingroup$

EDIT: As @DanielWainfleet pointed out in the comments, your proof does not apply in the case $L=0$. The proof basically goes exactly like the one you have written: first you choose an $0<\varepsilon<1$ small enough, then you take $\delta$ as you please and look at the difference quotient for any $|x|<\delta$. If $f$ was differentiable, then it should hold that $$\left|\frac{f(x)-f(0)}{x-0}\right|<\varepsilon$$ but by density of the irrationals, you can find an irrational $x$ such that $|x|<\delta$ and for that one $$\left|\frac{f(x)-f(0)}{x-0}\right|=\left|\frac{x-0}{x-0}\right|=1>\varepsilon$$ contradicting the assumption.


Another working approach is showing that approaching $0$ via irrationals and via rationals leads to different difference quotients:

Indeed :

  • choose a sequence of irrational numbers ($a_n=\sqrt{2}/n$) tending to zero. Then $\frac{f(a_n)-0}{a_n-0}=0$ for all $n$
  • choose a sequence of rational numbers ($a_n=1/n$) tending to zero. Then $\frac{f(a_n)-0}{a_n-0}=1$ for all $n$
$\endgroup$
3
  • $\begingroup$ The flaw in the proposer's proof is assuming that if $L$ exists then $L\ne 0.$ If $L=0$ then we cannot take any $\epsilon$ such that $0<\epsilon <|L|.$ $\endgroup$ – DanielWainfleet Nov 17 '18 at 7:07
  • $\begingroup$ @DanielWainfleet You are indeed correct. My bad for missing it! I'll add the correction in my answer $\endgroup$ – b00n heT Nov 17 '18 at 8:08
  • $\begingroup$ Much of performance-magic depends on how easily we make or overlook unwarranted assumptions. $\endgroup$ – DanielWainfleet Nov 17 '18 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.