This might seem as a weird and straight forward to answer question, but it really confuses me. As the title states, I'm wondering whether
$$f(x)=\frac{x^2}{x}$$
is continuous. To be more precise, I'm wondering whether it's continuous at $x=0$. That question arose because I kind of have two contradicting ideas regarding that situation.
Contiuity definition
In university, one of the definitions we got was that a function is continuous in $x_0$ (here $0$) if (and only if) the following is true: $$\lim\limits_{x\searrow x_0}f(x)=\lim\limits_{x\nearrow x_0}f(x)=f(x_0)$$ The first two parts are obvious - of course they both approach $0$. But the last part is what's causing me trouble here - because it would yield to $\frac{0^2}{0}=\frac{0}{0}$ which is known not to be defined. So $f(x)$ wouldn't be continuous in $x_0=0$, right?
Arithmetic
The obvious thing to do though would be to rewrite $f(x)$ as $$\widetilde f(x)=x$$ Now it'd be perfectly clear that $f(0)=0$ just as well. So is the function continuous or is it not?
My approach
So I have an idea of what's probably happening here, but I'm really not sure about it, so I'd be happy for your help. In my understanding, $f(x)$ is defined as $f:\mathbb{R}\setminus\{0\}\rightarrow\mathbb R,\ x\mapsto\frac{x^2}{x}$, whereas $\widetilde f(x)$ is defined as $\widetilde f:\mathbb R\rightarrow\mathbb R,\ x\mapsto x$. So both functions would be continuous, but on another domain. However, that's still weird, isn't it? I mean, didn't we only make equivalence transformations, meaning that all parts of the following would be true? $$f(x)=\widetilde f(x)\qquad\Longleftrightarrow\qquad \frac{x^2}{x}=x$$
$\varepsilon-\delta$ criteria
And then there's another criteria of continuity, called the $\varepsilon-\delta$ criteria. I'm not sure if I can explain it well in english, so I'll just write it down in predicate logic: $$\forall\varepsilon>0\exists\delta>0\forall x\in D,|x-x_0|<\delta:|f(x)-f(x_0)|<\varepsilon$$ So this would once again apply for $\widetilde f(x)$ and not for $f(x)$. But then again we learned a visualisation of this criteria, with a rectangle of dimensions $2\delta\times2\varepsilon$ closing in around $x_0$ - this would work quite fine with both variations.