$ \lim x^2 = a^2$ as $x$ goes to $a$

Prove that $\displaystyle \lim_{x \to a} x^2 = a^2$

Let $\varepsilon > 0$, and let $\delta = \min(\frac{\varepsilon}{2|a|+1}, 1)$. Suppose $x \in\mathbb{R} – \left\{a\right\} $ and $|x-a| < \delta.$ Then $|x-a| < 1$ hence $ -1 < x-a <1 $ hence $ a-1 < x < a+1$ therefore $2a-1< x+a <2a+1.$ Thus $ |x+a| < 2|a|+1.$ So $|x^2-a^2| = |x-a||x+a|$ $ \displaystyle < (2|a|+1)\delta =(2|a|+1)\frac{\varepsilon}{(2|a|+1)} = \varepsilon. $

Is this correct? Is there another choice of delta we could have chosen?

Solutions Collecting From Web of "$ \lim x^2 = a^2$ as $x$ goes to $a$"

Overall it is correct; but a better arrangement of proof can be done; I provide one such for your reference:

Let $a \in \Bbb{R}$. If $x \in \Bbb{R}$, then
$$
|x^{2}-a^{2}| = |x-a||x+a|;
$$
if in addition $|x-a| < 1$ (we can use many other reasonable choices replacing “$1$”, say $|a| + 1$; but these other choices may result in unnecessarily messy bounds), then $|x| – |a| \leq |x-a| < 1$, implying $|x+a| \leq |x|+|a| < 2|a|+1$, implying $|x-a||x+a| < |x-a|(2|a|+1)$; given any $\varepsilon > 0$, we have $|x-a|(2|a|+1) < \varepsilon$ if in addition $|x-a| < \varepsilon/(2|a|+1)$. All in all, for every $a \in \Bbb{R}$ and every $\varepsilon > 0$ it holds that $|x-a| < \min \{ 1, \varepsilon/(2|a|+1) \}$ implies $|x^{2}-a^{2}| < \varepsilon$; this completes the proof.

Up to the comment, your proof is correct and probably the best way to go about doing this. That’s certainly what I’d do.