Given that f ( x ) = x 2 + 4 x and g ( x ) = x − 7 , calculate (a) ( f ∘ g ) ( x ) = , (b) ( g ∘ f ) ( x ) = , (c) ( f ∘ f ) ( x ) = , (d) ( g ∘ g ) ( x ) =

a)
The composite function f of g is defined as:
[tex](f\circ g)(x)=f(g(x))[/tex]This means that we need to plug function g(x) instead of x in the expression for f(x). Then we have:
[tex]\begin{gathered} (f\circ g)(x)=f(g(x)) \\ =f\mleft(x-7\mright) \\ =(x-7)\placeholder{⬚}^2+4(x-7) \\ =x^2-14x+49+4x-28 \\ =x^2-10x+21 \end{gathered}[/tex]Therefore:
[tex](f\circ g)(x)=x^2-10x+21[/tex]b)
In this case we are looking for the function:
[tex](g\circ f)(x)=g(f(x))[/tex]Which means that we need to plug f(x) instead of x in the expression for g(x). With this in mind we have:
[tex]\begin{gathered} (g\circ f)(x)=g(f(x)) \\ =g(x^2+4x) \\ =x^2+4x-7 \end{gathered}[/tex]Therefore:
[tex](g\circ f)(x)=x^2+4x-7[/tex]c)
Following similar steps as the previous questions we have:
[tex]\begin{gathered} (f\circ f)(x)=f(f(x)) \\ =f(x^2+4x) \\ =(x^2+4x)\placeholder{⬚}^2+4(x^2+4x) \\ =x^4+8x^3+16x^2+4x^2+16x \\ =x^4+8x^3+20x^2+16x \end{gathered}[/tex]Therefore:
[tex](f\circ f)(x)=x^4+8x^3+20x^2+16x[/tex]d)
In this case we have:
[tex]\begin{gathered} (g\circ g)(x)=g(g(x)) \\ =g(x-7) \\ =x-7-7 \\ =x-14 \end{gathered}[/tex]Therefore:
[tex](g\circ g)(x)=x-14[/tex]