# Composition of Two Functions

• January 9th 2008, 04:47 PM
Macleef
Composition of Two Functions
Given $f(x) = -5x + 2$ and $g(x) = -x^2 + 3$

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

$= g(f(x))$

$= g(-5x + 2)$

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

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

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

$= -25x^2 - 1$

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

I don't know how to get the $"20x"$ ? Please help me !
• January 9th 2008, 04:53 PM
Plato
$- \left( { - 5x + 2} \right)^2 = - \left( {25x^2 - 20x + 4} \right)$