A second degree polynomial is generally expressed as below:
P(x) = a ∙ x2 + b ∙ x2 + c = 0, and a ≠ 0
P(x) can also be rewritten as: a(x - x1)(x - x2)
For any second degree polynomial that satisfies the conditions above we have:
x1 + x2 = - b/a
x1 ∙ x2 = c/a
x1 and x2 are the possible solutions for P(x)
The solutions of a second degree can be easily calculated using the quadratic formulas shown below:
x1 = (-b + √(b2 - 4ac)) / 2a
x2 = (-b - √(b2 - 4ac)) / 2a
b2 - 4ac is called the discriminant of the quadratic formula. By analyzing the discriminant it is possible to find out how many solutions P(x) has:
x1 = x2, if b2 - 4ac = 0, there exists only 1 solution
x1 ≠ x2, if b2 - 4ac > 0, there exists 2 solutions
there exists no solutions if b2 - 4ac < 0