How to prove $g$ is discontinuous at $x=2$ using definition of limit? Define $g: \mathbb{R} \to \mathbb{R}$ by
$$g(x) =\begin{cases}
5x-15 & \text{if } x \text{ is rational}, \\\\
   x^3-17       & \text{if } x \text{ is irrational}.
  \end{cases}$$
Prove that $g$ is discontinuous at $x=2$. 
So, here's what I got before I got stuck:
$g(x)$ is continuous at $2$ if $g(2)$ exists and $g(2) = \lim\limits_{x\to 2} g(x)$.
By definition of the limit, $\lim\limits_{x\to 2} g(x) = L$. 
So for all $\epsilon >0$, there exists a $\delta>0$ such that if $|g(x)-g(2)| < \epsilon$, then $|x-2|<\delta$.
And now I'm just not sure how to continue the problem from here. Can someone help me out please?
 A: Assume instead that g is continuous at 2.  Then since $g(2)=5(2)-15=-5$, $\;\;\displaystyle \lim_{x\to2}g(x)=-5$;
so taking $\epsilon=1$, there is a $\delta>0$ such that if $0<|x-2|<\delta$, then $\big|g(x)-(-5)\big|<1$.
Therefore if $x$ is irrational and $2-\delta<x<2$, then 
$\big|(x^3-17)+5\big|<1\implies\big|x^3-12\big|<1\implies11<x^3<13\implies x^3>8\implies x>2$,
which gives a contradiction.
Therefore g is discontinuous at 2.
A: Let sequence $\{x_n\}$ be that $\{x_n\}\to5$ and $\{x_n\}$ is in irrational numbers. Then $f(x_n)=x_n^3-17$. Then $\lim f(x_n)=\lim(x_n^3-17)=5^3-17=108$. $f(5)=25-15=10$. So $f$ is not continuous at $x=5$.
A: Let $\sqrt{n}\notin{\Bbb{N}}$.
So $2+\sqrt{n}$ is irrational, and we have:
\begin{align}
\lim_{x\to2^+}g(x)&=\lim_{n\to0}(2+\sqrt{n})^3-17\\&=\lim_{n\to0}8+12n^{1/2}+6n+n^{3/2}-17\\&=-9
\end{align}
\begin{align}
\lim_{x\to2^-}g(x)&=\lim_{n\to0}(2-\sqrt{n})^3-17\\&=\lim_{n\to0}8-12n^{1/2}+6n-n^{3/2}-17\\&=-9
\end{align}
While for $x=2$ (rational),
$g(2)=5\cdot2-15=-5\neq-9$
Therefore the function is discontinuous at $x=2$
