Show continuity using epsilon delta definition for piecewise function [closed]

Using epsilon delta definition, show that $g$ is continuous on the whole of $\mathbb R$

$$g(x)=\cases{x^2 & \text{ if } x<1\\ \sqrt{x} & \text{ if } x≥1.}$$

• Are you sure? What happens at $x=1$? – preferred_anon Jul 21 '15 at 19:29
• @Dr.MV Isn’t $\lim_{x \uparrow 1} g(x) = \lim_{x \uparrow 1} x^2 = 1 = \sqrt{1} = g(1)$? – molarmass Jul 21 '15 at 19:43
• @Dr.MV,@molarmass: The confusion is my fault. I made a typo while editing. I have fixed it. – Alex S Jul 21 '15 at 19:45
• @AlexS Well i'm working on the first part which is the x^2, and this is what i have but im not sure if I'm even on the right track |x^2 -1| < ε <--- Ix-1| < δ |x+1| |x-1| < ε * i know i have to bound the x-1 somehow ... constant |x-1| < ε = |x-1| < ε/c so... |x-1| < 1 -1<|x-1|<1 -1+(-1) < |x-1| < 1+(-1) -2 <|x-1| <0 2 > |x-1| ... so |x-1| < ε/2 ε/2 = δ to prove the continuity of x^2 – Dana Jul 21 '15 at 19:45
• @molarmass I had commented on the pre-edited question. – Mark Viola Jul 21 '15 at 20:02

We observe that $f$ is continuous for both $x>1$ and $x<1$ given that both the square root and the quadratic functions are continuous in their domains of definition. We need to test the continuity of $f$ at $x=1$.

For right-side continuity at $1$, we have for $x>1$

$$|f(x)-f(1)|=|\sqrt{x}-1|=\frac{x-1}{\sqrt{x}+1}$$

Now, let's take $\delta=1$ and $0<x-1<\delta=1$. Then, $\frac{1}{\sqrt{x}+1}<1/2$ and

$$|f(x)-f(1)|<\frac12 (x-1)$$

Thus, for $x>1$given $\epsilon>0$, $|f(x)-f(1)|<\epsilon$ when $x-1=\min(1,\epsilon/2)$. Thus, $f$ is continuous from the right.

For left-side continuity at $1$, we have for $x<1$

$$|f(x)-f(1)|=|x^2-1|=|x-1||x+1|$$

Now, let's take $\delta'=1$ and $-1=-\delta'<x-1<0$. Then, $|x+1|<2$ and

$$|f(x)-f(1)|<2 |x-1|$$

Thus, for $x<1$given $\epsilon>0$, $|f(x)-f(1)|<\epsilon$ when $|x-1|=\min(-1,2\epsilon)$. Thus, $f$ is continuous from the left.

Since $f$ is both left and right continuous at $x=1$, then $f$ is continuous at $x=1$.

• How does one get $\frac{1}{\sqrt{x}+1} <\frac{1}{2}\ \text{(for x >1)}$ in the above proof? – Rick Jul 31 '19 at 14:13
• @Rick For $1<x<2$, $\sqrt{x}>1$. Does that clarify? – Mark Viola Jul 31 '19 at 15:30
• oh I didn't see the condition above, I just saw $0 < x <2$. – Rick Jul 31 '19 at 16:24