Find the constants a and b such that x = -1 and x = 1 are both solutions to the equation ax^2 + bx + 2 = 0.
Input x=1. a + b + 2 = 0.
Input x = -1. a - b + 2 = 0.
Add the equations: 2a+4=0 --> a=-2
-2 + b + 2 = 0, so b = 0.
Solutions are x = -1 and 1 means
(x+1)(x-1) = 0
x^2 +0x -1 = 0 multiply by -2 to get correct form
-2x^2 + 0x +2 = 0 a = -2 b= 0