Composition of Two Real Piecewise Functions

15.1k Views Asked by At

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?

2

There are 2 best solutions below

2
On 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.

0
On

First split up the inputs to the composite function according the the cases for $g$. Within each case, look at the outputs: are they all in one of $f$’s cases, or not? If they are, life is simple: $f\circ g$ will have the same cases as $g$. If not, you’ll have to subdivide $g$’s cases.

Here, for instance, consider the case $x<-1$: $g(x)=x-2$, so $g(x)<-1$ for all $x<-1$, and calculating $(f\circ g)(x)$ will require using the first case of $f$. Something similar happens in the other cases, so with this pair of functions you won’t actually have to do and subdividing.