Question regarding the choice for $\delta$ on proving the continuity of $f(x)=x^2$ 
Prove that $f(x)= x^2$ is continuous using $(\varepsilon,\delta)$.

I need to show that $|f(x)-f(y)| = |x^2-y^2| < \varepsilon$ whenever $|x-y|< \delta$. Now $$|x^2-y^2|=|x-y||x+y| \leqslant |x+y|\delta$$
If I assume that $\delta  =1$ I have that $|x-y|<1 \implies -1<x-y<1 \implies -1+2y<x+y<1+2y$  so $$|x^2-y^2|\leqslant (1+2y)\delta.$$ So letting $\varepsilon>0$ and pick $\delta = \frac{\varepsilon}{1+2y}$ I have that $$|f(x)-f(y)|=|x^2-y^²|=|x-y||x+y| <(1+2y)\delta = (1+2y)\frac{\varepsilon}{1+2y} = \varepsilon.$$
My question is that how can I make the assumption that $\delta = 1$? This doesn't seem intuitive to me at all. It seems that often times when doing $(\varepsilon, \delta)$ I have to manipulate $\delta$ to control some leftover term. Same thing with proving for example that $\lim_{x\to2} x^2 = 4$. I have $$|x^2-4|=|x-2||x+2|$$ and would have to do pretty much same thing here to control $|x+2|$.
 A: You can't assume that $\delta=1$ because if you take $x-y=0.9$ then $|x^2-y^2|=|1.8y+0.81|$, which can very well exceed $\epsilon$. Except for constant functions $\delta$ must get smaller and smaller with $\epsilon$.
A rigorous reasoning is that $x^2$ is a growing function, so that (restricting to $x>0$),
$$-\epsilon<x^2-y^2<\epsilon\iff\sqrt{y^2-\epsilon}<x<\sqrt{y^2+\epsilon}$$ and
$$|x-y|<\min(\sqrt{y^2+\epsilon}-y,y-\sqrt{y^2-\epsilon})=\sqrt{y^2+\epsilon}-y.$$ This is tight (but any smaller value can do).
A more expedite method is to consider
$$|x^2-y^2|<\epsilon\iff|x-y|<\frac{\epsilon}{|x+y|}$$ and set an upper bound to the denominator. We can constrain $\delta<\dfrac y2$ to achieve $|x+y|>\left|\dfrac y2\right|$. Now,
$$\delta=\min\left(\frac y2,\frac{2\epsilon}{y}\right)$$ will work.
A: Let $\varepsilon>0$ be given. If we choose $$
\delta  = \sqrt {\left| {x_0 } \right|^2  + \varepsilon }  - \left| {x_0 } \right|,
$$
then
$$
\left| {x^2  - x_0^2 } \right| = \left| {x + x_0 } \right|\left| {x - x_0 } \right| \le (\left| x \right| + \left| {x_0 } \right|)\left| {x - x_0 } \right| \le (\delta+2\left| {x_0 } \right| )\delta  = \varepsilon 
$$
provided $\left| {x - x_0 } \right| \le \delta$. Note that $$
\left| x \right| + \left| {x_0 } \right| = \left| {x - x_0  + x_0 } \right| + \left| {x_0 } \right| \le \left| {x - x_0 } \right| + 2\left| {x_0 } \right| \le \delta  + 2\left| {x_0 } \right|.$$
A: You're right. It is quite strange because what we are asked to do in general is given any $\epsilon$ we need to find a $\delta$ which has certain properties. We can't just pick 1 arbitrarily for $\delta$ it might not work. On the other hand, if it is possible to pick such a $\delta$ there could be more than one choice of $\delta$. In fact, if such a $\delta$ does exist, then there is always one which is less than or equal to 1. To see this, let $\epsilon > 0$ and suppose we have some $\delta_0$ such that $|x-y|<\delta$ implies that $|x^2 - y^2| < \epsilon$. We want to find some $\delta_1$ with $\delta_1\leq 1$ which also satisfies this property. Note that if we have any number $a \leq \delta_0$, then if $|x-y|< a$, then $|x-y| < \delta_0$ and so $a$ will also work as a choice of $\delta$. With this in mind, we can just pick $\delta_1 = \min(1, \delta_0)$, and by the previous argument if $|x-y|<\delta_1 \leq 1$ then $|x^2-y^2|<\epsilon$.
What does this mean in the context of the above? It means that we are perfectly fine assuming that $\delta\leq 1$ and so we know that $|x-y|< 1$ (and the rest of the proof continues. More generally, if $r$ is some number we can always pick $\delta$ to be less than $r$ in any $\epsilon$ $\delta$ proof(if we can find such a $\delta$ at all) by the same reasoning.
