i'm trying to learn the concept of continuity in a more or less formal basis. One definition of continuity (not the most general, but I better learn step by step) is that a function
$$f:X\subseteq\mathbb{R}\to Y\subseteq\mathbb{R}$$
is continuous at $x_0\in X$ if $$\lim_{x\to x_0}f(x)=f(x_0)$$
This is, $\forall \epsilon>0, \exists \delta>0$ such that $|f(x)-f(x_0)|<\epsilon$ if $x\in X$, $0<|x-x_0|<\delta$
So in order to test if I do understand this, decided to try a particular example, say $f(x)=x^2$, and $f(x_0)=x_0^2$. My first question is:
1) Is an assumption that $f(x_0)=x_0^2$ or do I need to prove it? I think I don't have to prove it because that equality follows from the definition of $f(x)$ but there may be any kind of subtlety that I don't see.
Assuming I can say $f(x_0)=x_0^2$ then the task is to show that there exists such a number $\delta$:
I'm given $\epsilon>0$ such that $|f(x)-f(x_0)|<\epsilon$ this is $|x^2-x_0^2|<\epsilon$, Rewriting $|x^2-x_0^2|=|x-x_0||x+x_0|<\epsilon$
2) Can I set
$$\delta<\frac{\epsilon}{|x+x_0|}?$$
what if $x=-x_0$?
Thanks for your time.