Debian Codegraph @

reasoning/quadratic-equation/README

raw
1 ------------------
2 Quadratic equation
3 ------------------
4
5 For ax^2 + bx + c = 0 with a ≠ 0, let the discriminant be D = b^2 − 4ac.
6
7 If D > 0 there are two distinct real roots x = (−b ± √D) / (2a);
8 if D = 0 there is one real double root x = −b / (2a);
9 if D < 0 there are two complex conjugate roots x = (−b ± i√(−D)) / (2a).
10
11 A quick check is to substitute each root back into ax^2 + bx + c and
12 verify the residual is (numerically) 0.