I'm trying to solve this problem from my homework a few hours now, I know how to do composition for regular functions, but can't seem to understand the composition of piecewise functions.
I have checked other solutions here, but didn't get it.
Here is the problem: $$ f(x) = \begin{cases} x+1, & \text{if $x<0$} \\ 3x+4, & \text{if $x\ge0$} \end{cases} $$ $$ g(x) = \begin{cases} 3x+2, & \text{if $x<3$} \\ 5x-8, & \text{if $x\ge3$} \end{cases} $$ find $f(g(x))$ and $g(f(x))$? thanks :)
Here is step-by-step hints to do it:
Then you have it! In the same way you can find $g(f(x))$ without much effort.