Category: Algebra Level: 201
x = (-b ± √(b2 - 4ac)) / 2a, D = b2 - 4ac
The part under the square root, D = b² − 4ac, decides how many times a parabola meets the x-axis: twice when D is positive, once when D is zero, never when D is negative.
The formula solves any ax² + bx + c = 0. The red part under the root is the discriminant D, and it runs the show.
x = (-b ± √(D)) / 2a, D = b2 - 4ac
With c = 3 the vertex dips below the x-axis, so the curve crosses it twice. D = 4 is positive, and ± √(4) gives two different answers.
D = (-4)2 - 4 · 1 · 3 = 4 > 0
With c = 4 the vertex just touches the axis. D = 0, so ± 0 adds nothing and both answers collapse into one.
D = 16 - 16 = 0
With c = 5 the whole cup floats above the axis. D = −4, and no real number squares to a negative, so the formula has nothing real to offer.
D = 16 - 20 = -4 < 0
All three cups share the axis x = 2. The vertex height is −D / 4a, so a positive D means the vertex sits below the axis and the curve must cross.
vertex y = -D / 4a: -1, 0, 1
cd svg-generator python3 -m svgmath render discriminant --out /tmp/discriminant
Source: svgmath/diagrams/quadratics.py