-1
$\begingroup$

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))$?

2 Answers 2

0

Either $|x|\le 2$ or $|x|>2$.

  • If $|x|\le 2$, then $g(x)=2-x^2$. Either $|x|< 1$ or $1\le |x|\le \sqrt 3$ or $\sqrt 3<|x|$.
    • If $|x|< 1$, then $2-x^2>1$, hence $f(g(x))=f(2-x^2)=0$.
    • If $1\le|x|\le\sqrt 3$, then $-1\le2-x^2\le1$, hence $f(g(x))=f(2-x^2)=1$.
    • If $\sqrt 3<|x|$, then $2-x^2<-1$, hence $f(g(x))=f(2-x^2)=0$.
  • If $|x|> 2$, then $g(x)=2$ and $f(g(x))=f(2)=0$.

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}$

1

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$.