# Given two graphs of piecewise functions f(x) and g(x), how do you know whether f[g(x)] and g[f(x)] are continuous at 0?

Oct 17, 2015

#### Explanation:

For $f \left(g \left(x\right)\right)$:

Find $f \left(g \left(0\right)\right)$

Examine the graphs to find the one-sided limits, ${\lim}_{x \rightarrow {0}^{-}} f \left(g \left(x\right)\right)$ and ${\lim}_{x \rightarrow {0}^{+}} f \left(g \left(x\right)\right)$

If they are equal and are the same as $f \left(g \left(0\right)\right)$, then $f \left(g \left(x\right)\right)$ is continuous at $0$

Examples

${g}_{1} \left(x\right) = \left\{\begin{matrix}x - 1 & x < 0 \\ x + 1 & x \ge 0\end{matrix}\right.$ ${f}_{1} \left(x\right) = \left\{\begin{matrix}- x + 2 & x < 0 \\ {x}^{2} + 2 & x \ge 0\end{matrix}\right.$ ${f}_{1} \left({g}_{1} \left(x\right)\right)$ is continuous at $0$

But for ${f}_{2} \left(x\right)$ shown below: ${f}_{2} \left({g}_{1} \left(x\right)\right)$ is not continuous at $0$.

Here is another function I'll call ${g}_{2}$

${g}_{2} \left(x\right) = \left\{\begin{matrix}- x + 1 & x \le 0 \\ \frac{1}{x} & x > 0\end{matrix}\right.$ Neither ${f}_{1} \left({g}_{2} \left(x\right)\right)$ nor ${f}_{1} \left({g}_{2} \left(x\right)\right)$ is continuous at $0$, but for ${f}_{3}$ below, we have ${f}_{3} \left({g}_{2} \left(x\right)\right)$ is continuous at $0$. ${f}_{3} \left(x\right) = \left\{\begin{matrix}{x}^{2} & x \le 1 \\ 1 + \frac{1}{x} & x > 1\end{matrix}\right.$

Perhaps someone else can summarize a method for this.