Real Analysis – Composition of Continuous and Discontinuous Functions

real-analysis

Okay, I think I found an example of a continuous function $f$ composed with a discontinuous function $g$, that make a continuous function $h$. Okay let:

  1. $f:[0,1]\to [0,1)$ where $f(x)=\begin{cases}x \quad \textrm{if} \quad x\in[0,1)\\ 0 \quad \textrm{if} \quad x=1\end{cases}$

  2. $g:[0,1)\to \mathbb{R^2}$ where $g(x)= (\cos(2\pi x),\sin(2\pi x))$

I am thinking the $h(x)=g(f(x))$ is continuous because, the only discontinuity that could occur is at $x=1$ which doesn't because $\lim\limits_{x\to 1}h(x)=(1,0)=h(1)$. But, I am sort of confused as to if my justification is correct or not.

Best Answer

Your answer is correct: if $a≠1$, then $\lim\limits_{x \to a} g(f(x))=g(f(a))$ because $g$ is continuous at any point and $f$ is continuous at $a$.

You can create another example by taking $f$ to be any discontinuous function, and $g : x \mapsto c$ any constant function, so that $g \circ f$ is constant and, in particular, is continuous.


In general, if $y_0 = \lim\limits_{x \to x_0} f(x)$ and $l = \lim\limits_{y \to y_0}g(y)$ exist and if there exists some $\epsilon>0$ such that $f(x)≠y_0$ for all $x$ with $0<|x-x_0|<\epsilon$, then $l=\lim\limits_{x \to x_0} (g \circ f)(x)=:L$.

The second hypothesis is important. For instance, if you consider the constant function $f \equiv 1$, $g = \mathbb 1_{\{1\}}$ and $x_0=0$, then $y_0=1,l=0$ but $L=1$.