## Precalculus (6th Edition) Blitzer

The value of $\left( f\circ g \right)\left( x \right)=-{{x}^{2}}+2$ and $\left( g\circ f \right)\left( x \right)=-{{x}^{2}}-2x$.
We know that $\left( f\circ g \right)\left( x \right)$ is written as $f\left( g\left( x \right) \right)$: Therefore, $\left( f\circ g \right)\left( x \right)$ = $f\left( g\left( x \right) \right)$ and $\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)$. Now, for $\left( f\circ g \right)\left( x \right)$ \begin{align} & f\left( g\left( x \right) \right)=-{{\left\{ g\left( x \right) \right\}}^{2}}-2\left\{ g\left( x \right) \right\}+1 \\ & =-{{\left( x-1 \right)}^{2}}-2\left( x-1 \right)+1 \end{align} And simplify it further, to get \begin{align} & =-\left( {{x}^{2}}-2x+1 \right)-2x+2+1 \\ & =-{{x}^{2}}+2x-1-2x+2+1 \\ & =-{{x}^{2}}+2 \end{align} Similarly, for $\left( g\circ f \right)\left( x \right)=g\left( f\left( x \right) \right)$ \begin{align} & g\left( f\left( x \right) \right)=f\left( x \right)-1 \\ & =-{{x}^{2}}-2x+1-1 \\ & =-{{x}^{2}}-2x \end{align} Thus, the value of $\left( f\circ g \right)\left( x \right)=-{{x}^{2}}+2$ and $\left( g\circ f \right)\left( x \right)=-{{x}^{2}}-2x$.