Epsilon delta for proving $x^2$ is continuous for $x<0$
This is a lab exercise i am unsure of.
I have this larger split function where the following holds.
$ f(x) = \begin{cases} x^2 &\quad\text{if } x<0 \\ x &\quad\text{if } x\in[0,2]\\ 5 &\quad\text{if } x>2 \\ \end{cases} $
I then need to prove where the function is continous and where it is not.
If I for instance look at the first part and need to prove that $g(x) = x^2$ is continuous for all $x<0$, is the following epsilon delta proof correct?
Pick an $\epsilon > 0$ and set $\delta = \sqrt{\epsilon}$.
$$ |g(x)-g(a)| = |x^2-a^2|< \delta^2 = \sqrt{\epsilon}^2 = \epsilon$$
Hence $g(x)$ is continuous for all $x < 0$.
Solution 1:
Here’s a starter shell for you to fill in, for the proof that $f$ is continuous on $(-\infty, 0)$:
$\forall a < 0, \forall \epsilon > 0$, let $\delta = $?
Then:
$$|x-a| < \delta \rightarrow |f(x)-f(a)| = |x^2 - a^2| = |x-a| |x+a| < \delta (\delta + 2|a|) < \epsilon$$
To fill in the proof, you need to find a correct $\delta$.
EDIT (2 years later):
Here's the rest of the derivation, to include the reasoning.
We want: $$\delta(\delta + 2|a|) = \delta^2 + 2\delta|a|< \epsilon$$
A common technique for these $\delta$, $\epsilon$ type problems, rather than try to do some overly complicated algebra to solve this inequality for $\delta$, is to choose a $\delta$ such that: $$\delta^2< \frac{\epsilon}{2} \qquad \textbf{ and } \qquad 2\delta|a|< \frac{\epsilon}{2}$$ Which is equivalent (since all quantities are non-negative) to: $$\delta< \sqrt{\frac{\epsilon}{2}} \qquad \textbf{ and } \qquad \delta < \frac{\epsilon}{4|a|}$$
This simplest way to do that is to use $\min$:
Let $$\delta = \frac{1}{2}\min\left\{ \sqrt{\frac{\epsilon}{2}}, \frac{\epsilon}{4|a|} \right\}$$
Where the $\frac{1}{2}$ in front of the $\min$ is to enforce a strict inequality.