Critique the proof of $f(x) = x^2, x \in \mathbb{R}$ being continuous

solution-verification

Let $\epsilon > 0$ and $a \in \mathbb{R}$. Let $\delta > 0$ s.t $\delta < \frac{\epsilon}{\vert x + a \vert}$ and $\lvert x – a \rvert < \delta$. Thus, 
$$\lvert f(x) – f(a) \rvert = \lvert x^2 – a^2 \rvert = \lvert x + a \rvert \lvert x – a \rvert < \delta \lvert x + a \rvert$$$$ < \frac{\epsilon}{\lvert x + a\rvert} \lvert x + a \rvert = \epsilon.$$Hence, $\lvert x – a \rvert < \delta \Rightarrow \lvert f(x) – f(a) \rvert < \epsilon$. Because $a$ was arbitrary, we conclude that $f(x) = x^2, x \in \mathbb{R}$ is continuous. 

Best Answer

The error lies in the sentence

Let $\delta > 0$ s.t $\delta < \frac{\epsilon}{\vert x + a \vert}$ and $\lvert x - a \rvert < \delta$.

As I commented, the choice of $\delta$ cannot depend on $x$ because there is no variable $x$ in scope at this point.


Let's review the strategy for crafting an $\epsilon$-$\delta$ continuity proof. Given the function $$ f(x) = x^2, \quad x \in \mathbb{R}, $$ our goal is to show that

$f$ is continuous,

which is by definition equivalent to

for any $a \in \mathbb{R}$, $f$ is continuous at $a$.

Fix $a \in \mathbb{R}$. By the definition of continuity, we need to show that

for any $\epsilon > 0$, there exists a number $\delta > 0$ such that, for any $x$, $$ \lvert x - a \rvert < \delta \quad \implies \quad \lvert x^2 - a^2 \rvert < \epsilon. $$

Fix $\epsilon > 0$. To show that there exists a number $\delta > 0$ such that the aforementioned condition holds, we pick a value for $\delta$ based on quantities that are in scope (namely $a$ and $\epsilon$) and show that the desired condition holds for that value of $\delta$.

To do so, we observe that the desired relation $\lvert x^2 - a^2 \rvert < \epsilon$ is equivalent to $\lvert x - a \rvert \lvert x + a \rvert < \epsilon$, so we would like to bound both factors $\lvert x - a \rvert$ and $\lvert x + a \rvert$ from above. Automatically, the first factor $\lvert x - a \rvert$ is bound by whatever value of $\delta$ we choose. There is some freedom in how we choose to bound the second factor $\lvert x + a \rvert$; one possibility is to take advantage of the triangle inequality to get $$ \lvert x + a \rvert = \lvert (x - a) + 2a \rvert \le \lvert x - a \rvert + \lvert 2a \rvert < \delta + 2 \lvert a \rvert. $$ If we choose $\delta$ such that, for example, $$ \delta \le 1, \tag{1} \label{1} $$ then $$ \lvert x + a \rvert < 1 + 2 \lvert a \rvert, $$ so that in order to guarantee $\lvert x - a \rvert \lvert x + a \rvert < \epsilon$, it suffices to make $$ \lvert x - a \rvert < \frac{\epsilon}{1 + 2 \lvert a \rvert}. \tag{2} \label{2} $$ Therefore, we decide to pick $$ \delta = \min \Bigl\{ 1, \frac{\epsilon}{1 + 2 \lvert a \rvert} \Bigr\} $$ in order to guarantee both \eqref{1} and \eqref{2}.


This is, of course, not the only possible choice of $\delta$. For example, Thomas Andrews's answer mentions an alternative choice $$ \delta = \sqrt{\epsilon + a^2} - \lvert a \rvert. $$