I'm trying to prove the continuity of $f(x)=x^2$ using my book's definition of continuity and the distance function $d(x,a)=|x-a|$.
In order to prove that, I must prove that given $\epsilon \gt 0$, there exists $\delta$ defined in terms of $\epsilon$ such that $$|x-a|\lt\delta$$ implies $$|x^2-a^2|\lt\epsilon$$ I got so far as to "unsimplify" the second inequality to get $$|x+a||x-a|\lt \epsilon$$ But I can't figure out how to define $\delta$ in order to complete the proof. I can't use $\delta=\sqrt\epsilon$, because $a$ could be arbitrarily large, meaning that $|x+a|$ could be much larger than $|x-a|$. And I'm not allowed to define $\delta$ in terms of $x$ or $a$, either.
Any ideas?