# Thread: Composition of Two Functions

1. ## Composition of Two Functions

Given $\displaystyle f(x) = -5x + 2$ and $\displaystyle g(x) = -x^2 + 3$

Find $\displaystyle (g \circ f)(x)$:

$\displaystyle = g(f(x))$

$\displaystyle = g(-5x + 2)$

$\displaystyle = -(-5x + 2)^2 + 3$

$\displaystyle = - (25x^2 + 4) + 3$

$\displaystyle = -25x^2 - 4 + 3$

$\displaystyle = -25x^2 - 1$

And textbook answer is $\displaystyle (g \circ f)(x) = -25x^2 + 20x - 1$

I don't know how to get the $\displaystyle "20x"$ ? Please help me !

2. $\displaystyle - \left( { - 5x + 2} \right)^2 = - \left( {25x^2 - 20x + 4} \right)$