How It Works
The quadratic equation is given by:
ax2 + bx + c = 0
The roots are calculated using the formula:
x = (-b ± √(b2 - 4ac)) / 2a
The vertex is given by:
(-b / 2a, f(-b / 2a))
Example 1
a = 1, b = -3, c = 2
Roots: x = 1, x = 2
Vertex: (1.5, -0.25)
Example 2
a = 1, b = 0, c = -4
Roots: x = -2, x = 2
Vertex: (0, -4)