Suppose $f, g$ are two functions that $f(x) = \begin {cases} 1 & |x|\leq 1 \\ 0 & |x|>1\end {cases}$ and $g(x) = \begin {cases} 2-x^2 & |x|\leq 2 \\ 2 & |x|>2\end {cases}$
How can I find $f(g(x))$ and $g(f(x))$?
Suppose $f, g$ are two functions that $f(x) = \begin {cases} 1 & |x|\leq 1 \\ 0 & |x|>1\end {cases}$ and $g(x) = \begin {cases} 2-x^2 & |x|\leq 2 \\ 2 & |x|>2\end {cases}$
How can I find $f(g(x))$ and $g(f(x))$?
Either $|x|\le 2$ or $|x|>2$.
In summary, $f(g(x))=\begin{cases}1&\mathrm{if\ }1\le|x|\le\sqrt 3\\0&\mathrm{otherwise.}\end{cases}$
Thecases for $g(f(x))$ are les involved and one obtaines straightfowardly $g(f(x))=\begin{cases}1&\mathrm{if\ }|x|\le1\\2&\mathrm{otherwise.}\end{cases}$
Just plug one function into the other. We have that $f(g(x))=f(2-x^2)$ if $|x| \leq 2$ and $f(g(x))=f(2)=0$ if $|x|>2$. Similarly, we have $g(f(x))=g(1)=2-1^2=1$ if $|x| \leq 1$ and $g(f(x))=g(0)=2-0^2=2$ if $|x|>1$.