The quadratic formula for the quadratic \(ax^2 + bx + c\) is
\[ x = \frac{-b \pm \sqrt{b^2 - 4ac} }{2a} \]The standard quadratic formula is a bit of a mess and has some instabilities. By rewriting the quadratic before going to the formula, we can create a more stable formula and better control the accuracy at the start.
Transform into \(x^2 - 2px + q\) (we can turn the \(x^2\) coefficient into 1 since it should be non-zero for a quadratic and in solving for when it is equal to 0, we can divide by \(a\) freely). Then the formula is
\[ x = p \pm \sqrt{p^2 -q} \]If \(q\) is near 0 relative to the size of \(p^2\), then the combination will be roughly 0 and \(2p\). The second one is fine, but that 0 is potentially a place for significant error. So we can use the fact that the product of the roots is \(q\) and thus the second root can be found by dividing \(q\) by the first root which will be stable as the approximate
\(2p\) root will be large relative to \(q\) in this situation.Let's try it on the quadratic:
Steps:
Geometric
Parabolic ball