[Math] Suppose $f(x) = \begin{cases} 0, & \text{if x is rational},\\ x^2, & \text{if x is irrational} \end{cases}$. Prove that $\lim_{x\to 0} f(x) = 0$

calculusreal-analysis

Suppose $f(x) = \begin{cases}
0, & \text{if x is rational},\\
x^2, & \text{if x is irrational}
\end{cases}$

Prove that $\lim_{x\to 0} f(x) = 0$

Edit:

My attempt below, though I'm not sure if this approach is correct from the on-set.

For irrational $x$:

$\lim_{\delta x\to 0} f(x) = \frac{d}{dx} x^2 = 2x$

Hence, at $x=0$,

$\lim_{x\to 0} f(x) = \lim_{\delta x\to 0} f(0) = 2(0) = 0$ (proved?)

What about for rational $x$? o.O

My background: I don't have a degree in math, just an undergrad training in engineering. Not sure where the question was referenced from exactly too, but I would peg it at around high school AP/freshmen level. I'm asking this out of an interest in the topic.

Best Answer

Simply: compare $f(x)$ to $g(x) = 0$ and $h(x) = x^2$ and use the Squeeze Theorem.

Related Question