How can I prove this function is discontinuous or continuous similar to Drichlet function? Given a function 
$$F(x)= \begin{cases} x^2 & \text{when }x \in \mathbb Q \\3x & \text{when }x \in\mathbb Q^c \end{cases}$$
Show that $F$ is continuous or not on $x=3$ with $\epsilon-\delta$.
I tried to deal with problems just like doing on Dirichlet functions. Mistakenly or not, I couldn't. Can anyone help me, please?
 A: Let $\epsilon > 0$ , be a positive number 
To find a $\delta$ such that $|x-3|<\delta$ implies $|f(x)-f(3)|<\epsilon$.
Case-I if $x\in \mathbb Q$
Then $|f(x)-f(3)|=|x^2-9|=|(x-3)(x+3)|$
Therefore we choose our $\delta$ to be $<1$, then $|x-3|<1$ implies $-1<x-3<1$ , adding 6 on both sides we get  $
x+3<7$. 
$|f(x)-f(3)|=|x^2-9|=|(x-3)(x+3)|<|x-3|\cdot 7$
Therefore we can choose, $\delta $ to be $\dfrac{\epsilon}{7}$ for the case-I
Case-II , $ x $ is irrational number, 
$|f(x)-f(3)|=|3x-9|=|3(x-3)|$
Therefore we can choose, $\delta $ to be $\dfrac{\epsilon}{3}$ for the case-II
So, for all real $x$ we can choose $$\delta= min\{1,\frac{\epsilon}{7}, \frac{\epsilon}{3} \}$$ which ends the proof of $f$ being continuous at 3. 
Note: 1) For a better and clear understanding of  manipulation of $\delta $
 you can refer to this beautifully written answer which got 27 upvotes-How to show that $f(x)=x^2$ is continuous at $x=1$?
A: Hint: Note that $x^{2} \geq 3x$ for all $x \geq 3$ and that $x^{2} \leq 3x$ for all $0 \leq x \leq 3$;
now
$
|F(3+h) - F(3)| \leq (3+h)^{2} - 9 = 6h+h^{2} \to 0
$
as $h \to 0+$
and
$
|F(3+h) - F(3)| \leq |(3+h)^{2} - 9| = |6h+h^{2}| \to 0
$
as $h \to 0-$,
so $|F(3+h) - F(3)| \to 0$ as $h \to 0$.
A: let $\epsilon>0$,let $\delta = min(\frac{\epsilon}{7},1)$.
let $x$ satisfy $|x-3|<\delta$, if $x \in Q $, then we have:
$|F(x) - F(3)| = |x^2-9| = |x-3||x+3| \leq 7|x-3| < 7\delta \leq \epsilon$
if $x$ not in $Q$ we have:
$|F(x) - F(3)| = |3x-9| = 3|x-3| < 3\delta \leq 3 \frac{\epsilon}{7} < \epsilon$
so, for all x that satisfy $|x-3|<\delta$ we have $|F(x) - F(3)|<\epsilon$,
from here we see that $F(x)$ is continuous on x=3.
