Calculus – Composition of Two Real Piecewise Functions

calculusfunction-and-relation-compositionfunctions

I am trying to determine the function $f \circ g$ where

$$
f(x) =
\begin{cases}
x+2, & \text{if }x\ < -1 \\
-x, & \text{if }-1 \leqslant x\leqslant 1 \\
x-2,& \text{if }x > 1
\end{cases}
$$

and

$$
g(x) =
\begin{cases}
x-2, & \text{if }x\ < -1 \\
-x, & \text{if }-1 \leqslant x\leqslant 1 \\
x+2,& \text{if }x > 1
\end{cases}
$$

I understand function composition. The problem I am having here is that I don't know how to determine what happens to the input of $f$ from the output of $g$. I am not looking for the answer, I just need understand exactly how a composition of piecewise functions works. I haven not been able to obtain anything useful from other sources. I really don't know where to start solving this exercise. Is there anybody that has any valuable input they can give me?

Best Answer

You can do this with cases.

For example. Let's say we want $f(g(x))$ for $x<-1$, then we have $f(g(x)) = f(x-2)$ since $g(x) = x-2$ for $x<-1$. Now since $x<-1$, this means that $x-2<-3$ which means that $f(x-2) = (x-2)+2 = x$. Now proceed with the other cases.

Related Question