Function composition problem

May 2010
4
1
I have two functions \(\displaystyle f,g:\Re \rightarrow \Re\)
\(\displaystyle f(x)=\left\{\begin{array}{cc}1 - x^2,&\mbox{ if }
x\geq 0\\5x + 1, & \mbox{ if } x<0\end{array}\right.\)
\(\displaystyle g(x)=\left\{\begin{array}{cc}x^2,&\mbox{ if }
x\leq -2\\2x - 1, & \mbox{ if } x>-2\end{array}\right.\)

and I have to find function \(\displaystyle h(x)=f \circ g\)
 

Soroban

MHF Hall of Honor
May 2006
12,028
6,341
Lexington, MA (USA)
Hello, cristian!

I have two functions \(\displaystyle f,g:\Re \rightarrow \Re\)

\(\displaystyle f(x)=\left\{\begin{array}{cc}5x+1 & \text{ if }
x < 0 \\ 1-x^2 & \text{ if } x\ge 0\end{array}\right.\)

\(\displaystyle g(x)=\left\{\begin{array}{cc}x^2 & \text{ if }
x\leq -2 \\ 2x - 1 & \text{ if } x>-2\end{array}\right.\)

and I have to find: .\(\displaystyle h(x)\:=\: f\circ g\)

We are concerned with three intervals: .\(\displaystyle (\text{-}\infty, \text{-}2),\;(\text{-}2,0),\;(0,\infty)\)


\(\displaystyle \text{On }(\text{-}\infty,\text{-}2): \;\begin{Bmatrix}f(x) &=& 5x-1 \\ g(x) &=& x^2\end{Bmatrix}\)

. . Hence: .\(\displaystyle f\circ g \;=\;5(x^2)-1 \;=\;5x^2-1\)


\(\displaystyle \text{On }(\text{-}2,0):\; \begin{Bmatrix}f(x) &=& 5x+1 \\ g(x) &=& 2x-1 \end{Bmatrix}\)

. . Hence: .\(\displaystyle f\circ g \;=\;5(2x-1) + 1 \;=\;10x - 4\)


\(\displaystyle \text{On }(0,\infty):\;\begin{Bmatrix}f(x) &=& 1-x^2 \\ g(x) &=& 2x-1 \end{Bmatrix}\)

. . Hence: .\(\displaystyle f\circ g \;=\;1 - (2x-1)^2 \;=\;4x - 4x^2\)


Therefore: .\(\displaystyle \left\{ \begin{array}{cc}
5x^2 + 1 & \text{ if }x \leq \text{-}2 \\ 10x-4 & \text{ if }\text{-}2 < x < 0 \\
4x - 4x^2 & \text{ if }x \ge 0 \end{array}\right. \)

 
May 2010
4
1
I tried that too, but the book says the correct answer is:
\(\displaystyle f(x) = \left\{ \begin{array}{cc}1 - x^4 & \text{ if }x \leq \text{-}2 \\ 4x(1 - x) & \text{ if } x \geq \frac{1}{2} \\2(5x - 2) & \text{ if } -2<x<\frac{1}{2} \end{array}\right.\)
 

Plato

MHF Helper
Aug 2006
22,458
8,632
I tried that too, but the book says the correct answer is:
\(\displaystyle f(x) = \left\{ \begin{array}{cc}1 - x^4 & \text{ if }x \leq \text{-}2 \\ 4x(1 - x) & \text{ if } x \geq \frac{1}{2} \\2(5x - 2) & \text{ if } -2<x<\frac{1}{2} \end{array}\right.\)
The textbbok is correct.
Notice that \(\displaystyle g(x)<0\) on \(\displaystyle \left(-2,\frac{1}{2}\right)\).
Otherwise it is not negative.
So use the corresponding definitions of \(\displaystyle f\) on those three intervals.
 
  • Like
Reactions: cristian