Write an equation for the quadratic graphed below:

x-intercepts: (-2,0) and (1,0); y-intercept: (0,2)

Equation of quadratic function is:

y = a x² + b x + c = a ( x - x1 ) ( x - x2 )

where

a is leading coefficient

x1 an x2 are roots of this function

You know two roots:

x = - 2 , y = 0

and

x = 1 , y = 0

You function is:

y = a ( x - x1 ) ( x - x2 )

Since x1 = - 2 , x2= 1

y = a [ x - ( - 2 ) ] ( x - 1 )

y = a ( x + 2 ) ( x - 1 )

Now in this equation put value:

( 0 , 2 )

x = 0 , y = 2

y = a ( x + 2 ) ( x - 1 )

2 = a ( 0 + 2 ) ( 0 - 1 )

2 = a • 2 • ( - 1 )

2 = - 2 a

Divide both sides by - 2

- 1 = a

a = - 1

Your function is:

y = - ( x + 2 ) ( x - 1 )

Since ( x + 2 ) • ( x - 1 ) = x² + x - 2

y = - ( x + 2 ) ( x - 1) = - ( x² + x - 2 )

y = - x² - x + 2