Hi, PF, sorry, I am a little bit boring:
¿Why ##f(x)=\begin{cases}{x^2}&\text{if}& x\in \mathbb Q\\6(x-3)+9 & \text{if}& x\in \mathbb R \setminus \mathbb Q\end{cases}## is differentiable only at ##x=3##?
1- ##\displaystyle\lim_{x \to{3}}{\dfrac{f(x)-f(3)}{x-3}}## (*)
##\displaystyle\lim_{x\in \Bbb Q,\,x \to 3}{}\dfrac{x^2-9}{x-3}##(**)
##\displaystyle\lim_{x\in \Bbb I,\,x \to 3}{}\dfrac{6(x-3)+9-9}{x-3}##(***)
For this limit (*), it exists iff (**) and (***) are equal.
(**)##\displaystyle\lim_{x\in \Bbb Q,\,x \to 3}{}\dfrac{x^2-9}{x-3}=6##
Proof:
For ##x \in\Bbb Q##, ##\forall{\varepsilon}## ##\exists\;{\delta_1}## such that if ##0<|x-3|<\delta_1\Rightarrow{\left |{\dfrac{x^2-9}{x-3}-6}\right |=|x+3-6|=|x-3|<\varepsilon}##. Hence, ##\delta_1=\varepsilon##(***)##\displaystyle\lim_{x\in \Bbb I,\,x \to 3}{}\dfrac{6(x-3)+9-9}{x-3}=6##
Proof:
For ##x \in\Bbb R\setminus{\Bbb Q}##, ##\forall{\varepsilon}## ##\exists\;{\delta_2}## such that if ##0<|x-3|<\delta_2\Rightarrow{\left |{\dfrac{(6(x-3)+9)-9}{x-3}-6}\right |=|6-6|=0<\varepsilon}##. Hence, ##\delta_2## can take any value, and the implication will be true.
Choose ##\delta_1=\varepsilon##, and ##f(x)## is differentiable at ##x=3##
2- ¿Why is it not continuous at ##x \neq 3##?
##\displaystyle\lim_{x \to x_0,x\in \Bbb Q}{}x^2=x_0^2##
Proof :
##|x^2-x_0^2|=|x-x_0||x+x_0|##
First restriction: ##|x-x_0|<1\Leftrightarrow{x_0-1<x<x_0+1}\rightarrow{|x+x_0|<2|x_0|+1}##
Hence, for ##\delta=\varepsilon/(2|x_0|+1)## this limit exists.
##\displaystyle\lim_{x \to x_0,x\in \Bbb I}{}(6(x-3)+9)=6x_0-9##
Proof:
If ##0<|x-x_0|<\delta\Rightarrow{|(6x-9)-(6x_0-9)|<\varepsilon}##
##|6x-9-6x_0+9|<\varepsilon\Rightarrow{6|x-x_0|<\varepsilon}##
For ##\delta=\varepsilon/6##
and ##x_0^2=6x_0-9## iff ##x_0=3##
Well, this was not really homework; I left aside my textbook when I met this exercise, which captivated me. I didn't know I was facing my absolute ignorance about concepts I had already passed on september. I actually passed with a 5,6 over 10.