14

I am given the function

$$f(x)=\begin{cases} 0 \text{ ; when } x \text{ is irrational} \\\frac 1 q \text{ ; for } x=\frac p q \text{ irreducible fraction}\end{cases}$$

Spivak proved that for $a\in (0,1)$, we have $$\lim_{x\to a} f(x)=0$$

That is, this function is only continuous at the irrationals. I assume we consider $f$ for $x\geq 0$, since for negative $x$ it wouldn't be defined:

If $x=-\dfrac p q=\dfrac {-p }q=\dfrac {p }{-q}$ should we take $f(x)=-\dfrac 1 q $ or $f(x)=\dfrac 1q$?

Also, this function is periodic with period $1$, so we can just prove this on $(0,1)$ (as in the first case when proving continuity).

Now, Spivak wants me to prove this function is not differentiable at $a$, for any $a$. It is clear that, since it isn't continuous at the rationals, it is not differentiable there. Thus we need to prove the claim for $a$ irrational.

He gives the following hint.

Suppose $a=n,a_1a_2a_3\dots$. Consider the expression $$\frac{{f\left( {a + h} \right) - f\left( a \right)}}{h}$$ for $h$ rational, and also for $h=-0,0\dots0a_{n+1}a_{n+2}\dots$

I have been trying to work this out for a while, but I can't. I am not sure, also, if he meant to have the $n$ in the subindices match the $n$ of $a$, or if it is only a typo. The book has $$\frac{{f\left( {a + h} \right) - f\left( h \right)}}{h}$$ instead of $$\frac{{f\left( {a + h} \right) - f\left( a \right)}}{h}$$ which is (I guess) a typo, too.

For $h$ rational, one gets $$\frac{{f\left( {a + h} \right) - f\left( a \right)}}{h} = 0$$ and for $h=-0,0\dots0a_{n+1}a_{n+2}\dots$, you get,assuming $a+h=m/u$ $$\frac{{f\left( {a + h} \right) - f\left( a \right)}}{h} = \frac{{f\left( {a + h} \right)}}{h} = f\left( {\frac{m}{u}} \right)\frac{1}{h}$$

but I really don't know what to do with this. I know I have to show the limit $$\mathop {\lim }\limits_{h \to 0} \frac{{f\left( {a + h} \right) - f\left( a \right)}}{h} = \mathop {\lim }\limits_{h \to 0} \frac{{f\left( {a + h} \right)}}{h}$$ doesn't exist for any $a$, but I can't see how.

I'm looking for good hints rather than full solutions.

Pedro
  • 125,149
  • 19
  • 236
  • 403
  • 4
    I'm used to the convention that a "reduced fraction" always has positive denominator. (the numerator can be either positive, negative, or zero) –  Sep 16 '12 at 23:48
  • @Hurkyl Good to know. – Pedro Sep 17 '12 at 00:00
  • 1
    Without the hint: 1. Recall that another equivalent definition of differentiability of $f$ at $a$ is $f$ is diff. at $a$ iff $$\displaystyle{\lim{x\to a} \frac{f(x)-f(a)}{x-a}}\in\Bbb R$$._ 2. Use the fact that for any function $h$, $\lim_{x\to a}h(x)=l$ iff for each sequence $(x_n)$ with $x_n\to a$, $\lim_{n\to\infty}f(x_n)=l$. – leo Sep 17 '12 at 00:41
  • @leo See Brian's comment. I see what you mean now. I guess the proof of $2$ shouldn't be awfully difficult, right? – Pedro Sep 17 '12 at 00:51
  • Well it is a good exercise, just let flow the definitions of limit of a function and limit of a sequence. – leo Sep 17 '12 at 00:55
  • @leo Could you drop by the chat? – Pedro Sep 17 '12 at 01:09

2 Answers2

8

First, I agree with Hurkyl that you should understand the denominator to be positive.

In the hint the index $n$ in the expansion of $h$ is not the same as the $n$ before the comma in the expansion of $a$.

If $h=-0,0\dots0a_{n+1}a_{n+2}\dots$, then $a+h=n,a_1\dots a_n$, which can be written as a fraction with denominator $10^n$. In lowest terms, therefore, its denominator is at most $10^n$, and $f(a+h)\ge 10^{-n}$. On the other hand, $|h|<10^{-n}$. Can you finish it from there? Consider letting $n\to\infty$.

Brian M. Scott
  • 631,399
  • 1
    Hmm OK. Now, I should say that, for every $h$ of the form $-0,0\dots0a_{n+1}a_{n+2}\dots$ we'll have $f(a+h)/h>1$, thus, for any $\epsilon \geq 1$ no $\delta $ will work. That is, we can make $h$ as small as we want (keeping it of the desired form) but $f(a+h)/h>1$ in any case, while for $h$ rational $f(a+h)/h=0$, so the limit doesn't exist? Why would I want to let $n\to \infty$? – Pedro Sep 17 '12 at 00:43
  • @Peter: You’ve got it. There’s at least this one ‘bad’ sequence of $h$’s approaching $0$ for which the difference quotient is always greater than $1$, while there are other sequences for which it’s always $0$. – Brian M. Scott Sep 17 '12 at 00:45
  • So that's what @leo was saying! Great. – Pedro Sep 17 '12 at 00:52
  • @PeterTamaroff yes I was following those lines of thought – leo Sep 17 '12 at 00:58
  • So the difference quotient is greater than $1$. But is it bounded? (I know this doesn't matter for differentiability.) – mr_e_man May 03 '23 at 19:30
  • 1
    @mr_e_man: It definitely can be unbounded. Take $x=0.101001000100001000001…$, for instance. If the $k$-th $1$ is the $n$-th decimal place, and you take $h$ as in the answer, then $$a_{n+1}=a_{n+2}=\ldots=a_{n+k}=0,,$$ so $|h|<10^{-(n+k)}$, while $f(a+h)\ge 10^{-n}$. Take $k$ large enough, and you can make the difference quotient as large as you please. – Brian M. Scott May 03 '23 at 21:42
  • 1
    I wonder if it's always unbounded, for any $a$. – mr_e_man May 04 '23 at 00:01
7

Fix $\epsilon = 1$. We want to show that $\forall \delta > 0$, there exists $x + h = \dfrac{p}{q} \in (x - \delta, x + \delta)$ for which $\dfrac{f(x + h)}{h} > 1$.

Notice that if $x + h = \dfrac{p}{q}$, then $f(x + h) \ge \dfrac{1}{q}$.

Pick $q > \dfrac{1}{\delta}$. We can find an integer $p$ so that $p - 1 < qx < p$. Set $x + h = \dfrac{p}{q}$. We have:

$$ \dfrac{p}{q} - \dfrac{1}{q} < x \Rightarrow h < \dfrac{1}{q} $$

Finally:

$$ \dfrac{f(x + h)}{h} > \frac{1}{q} \cdot q = 1 $$

Ayman Hourieh
  • 40,828