Continuity of piecewise functions: $h(x)=\begin{cases}f(x) & x\lt a\\ g(x) & x\ge a \\ \end{cases} $ is continuous iff $g(a)=f(a)$?

53 Views Asked by At

I have a generalized question about continuity. Considering a piecewise function $$h(x)=\begin{cases}f(x) & x\lt a\\ g(x) & x\ge a \\ \end{cases} $$ Where $f$ and $g$ are continuous on $\mathbb{R}$. Is it true that $h(x)$ is continuous iff $f(a) = g(a)$? If so how to prove it? My attempt at the forward direction: $$h(x)\text{ is continuous} \Rightarrow\space g(a)=f(a)$$ Assume $h$ is continuous at $x=a$. Take two sequences $S_n=\frac{1}{n}+a$ and $L_n=-\frac{1}{n}+a$ that both converge to a. Then say $h(S_n)\to g(a)$ since $h$ approaches a from above (note that $S_n\gt a \space\forall n\in\mathbb{N}$). We can also say that $h(L_n)\to f(a)$ since $L_n\lt a \space\forall n\in\mathbb{N}$. Then using alphas and deltas: $|a-a|=0\lt\delta\space\space\forall\delta\gt0$. Close inputs implies $|g(a)-f(a)|\lt\epsilon\space\forall\epsilon\gt0\Rightarrow g(a)= f(a).$ This doesn't seem rigorous enough, I have a feeling that there are some assumptions I'm making that I shouldn't be... For the backwards direction: $$g(a)=f(a)\Rightarrow h(x)\text{ is continuous} $$ I would argue that for $x\gt a$, and $\delta\gt 0$, $|x-a|<\delta\Rightarrow|g(x)-g(a)|<\epsilon\space\forall\epsilon\gt0$ and something similar for $x\lt a$ with $f(x)$ but I'm not sure where to use $g(a)=f(a)$... alternatively I had the idea to claim if we assume the left side, for any sequence that converges to a, $h(S_n)\to g(a)$ or $h(S_n)\to f(a)$ since it either approaches from below or above, but that's not considering an alternating sequences that "approach from both sides"... I feel like I'm on the right track but I can't quite clean up the details. Thoughts??

1

There are 1 best solutions below

0
On
  • If $h$ is continuous, then $$f(a)=\lim_{x\rightarrow a^-}f(x)=\lim_{x\rightarrow a^-}h(x)=h(a)=g(a).$$
  • If $f(a)=g(a)$, then $$\lim_{x\rightarrow a^-}h(x)=\lim_{x\rightarrow a^-}f(x)=f(a)=g(a)=h(a)$$ and $$\lim_{x\rightarrow a^+}h(x)=\lim_{x\rightarrow a^+}g(x)=g(a)=h(a).$$