3

Let $$f(x) = \begin{cases} \dfrac{1}{q^2}, & \text{if $x=\dfrac{p}{q} $ is rational and in lowest terms;} \\[2ex] 0, & \text{if $x$ is irrational} \end{cases}$$ Where is f continuous? Is f differentiable anywhere?

My attempt: I can prove that $\lim_{x \to c}f(x)=0$ for any point real value c.

for each positive number $\epsilon$, the set $(c-1,c) \cup(c,c+1)$ contains only finitely many rational numbers p/q with $1/q^2 \geq \epsilon$ (namely , $q^2 \leq 1/\epsilon$). Then I let $\delta$ be the distance between $c$ and the closest such rational number. Then for all x satisfying $0<|x-c|<\delta$, we have $0\leq f(x)=f(p/q)=1/q^2 \leq \epsilon$.

Thus, I prove that $\lim_{x \to c}f(x)=0$ for any point real value c. So this means f(x) is continuous at every irrational number, and discontinuous at every rational number.

For differentiability, I only know f(x) is not differentiable at every rational number, because its discontinuous there. But how to prove f(x) also not differentiable at every irrational number?

Hint: For any irrational number c, there are infinitely many fractions p/q in lowest terms such that $|c-p/q|<1/q^2$. But I don't know this hint is is used in the continuous part ot differentiable part, since I already proved the continuous part.

Mariana
  • 1,253
  • Have you looked at the limit of the difference quotient? – saulspatz Jun 20 '21 at 14:30
  • I tried, but I didn't figure it out. – Mariana Jun 20 '21 at 14:32
  • Look at the proof for a related function here – saulspatz Jun 20 '21 at 14:38
  • Yes, I checked. But I didn't understand. The wiki used more advanced mathamtical tools, such as Hurwitz's theorem. I prefer to use the basic derivative knowledge. – Mariana Jun 20 '21 at 14:43
  • Is this a problem assigned for an introductory real analysis course? If so, then I'm not sure there is a proof showing that your function is nowhere differentiable that is appropriate for students to find on their own, since I believe all known proofs make nontrivial use of number-theoretic results involving the theory of approximation of irrationals by rationals. A fair amount of literature (up to 2003) on the differentiability properties of powers of the Thomae function is given in this 13 December 2003 sci.math post. – Dave L. Renfro Jun 20 '21 at 14:46
  • Yes, this is the problem assigned for my undergraduate analysis course. I add the hint for this question. – Mariana Jun 20 '21 at 14:53
  • @DaveLRenfro Exercises in introductory real analysis courses can be quite non-trivial. I was a TA in Germany for a freshman real analysis course for physicists where I could easily imagine this to be one of the weekly graded exercises (although one of the harder ones). – Vercassivelaunos Jun 20 '21 at 14:59
  • 1
    The hint is for differentiability. Use it instead of Hurwitz's theorem. – saulspatz Jun 20 '21 at 15:12
  • @saulspatz Thank you for telling me. Could you tell me how to do? – Mariana Jun 20 '21 at 15:19
  • Just use it in evaluating the difference quotient. Or look at Virtuoz's answer. – saulspatz Jun 20 '21 at 15:31

1 Answers1

2

Let's fix an irrational number $\gamma$ and a sequence of rationals $\frac{p_n}{q_n} \to \gamma$. Due to Dirichlet's theorem we can also satisfy the inequality $$ \left| \frac{p_n}{q_n} - \gamma \right| \le \frac{1}{q_n^2}. $$ Then we have $$ \left| \frac{f\left( \frac{p_n}{q_n} \right) - f(\gamma)}{\frac{p_n}{q_n} - \gamma} \right| = \left| \frac{\frac{1}{q_n^2}}{\frac{p_n}{q_n} - \gamma} \right| \ge 1. \;\;\;\;\;\;\;\; (1) $$

On the other side, if one chooses irrationals $\gamma_n \to \gamma $ $$ \frac{f(\gamma_n) - f(\gamma)}{\gamma_n - \gamma} = 0. $$ The last equality shows that the only possible value for the derivative is $0$, but this contradicts (1).

Virtuoz
  • 3,656