[Math] Composition of piecewise functions

algebra-precalculuscalculusfunction-and-relation-compositionfunctions

Let
$$f(x)=
\begin{cases}
2x &\text{, x > 3}\\
x^2 &\text{, x $\leq$ 3}
\end{cases}$$
and
$$g(x)=
\begin{cases}
x &\text{, x > 2}\\
5 &\text{, x $<$ 2}
\end{cases}$$

I'm asked to find $f(g(x))$, but I don't know how to do it. I handled combinations before, but never of piecewise functions and I don't know where to begin.

Best Answer

If $x>2$, then $g(x)=x>2$. Hence, $$ \begin{aligned} f(g(x))=f(x)= \begin{cases} 2x&\text{ if }x>3\\ x^{2}&\text{ if }2<x\leq 3 \end{cases} \end{aligned}. $$ If $x<2$, then $g(x)=5>3$. Hence, $$ \begin{aligned} f(g(x))=f(5)=2\cdot 5=10. \end{aligned} $$

In conclusion, we have $$ \begin{aligned} f(g(x))= \begin{cases} 2x&\text{ if }x>3\\ x^{2}&\text{ if }2<x\leq 3\\ 10&\text{ if }x<2 \end{cases} \end{aligned}. $$