A ball is thrown upward from a platform 15 metres above the ground. Ignoring air resistance, its height after t seconds is h(t) = −5t² + 20t + 15 metres. To find when it lands, set h(t) = 0 and enter a = −5, b = 20, c = 15 above. The discriminant is b² − 4ac = 400 − 4(−5)(15) = 400 + 300 = 700, and √700 ≈ 26.46. The formula gives t = (−20 ± 26.46) / −10, so the two roots are t ≈ −0.65 seconds and t ≈ 4.65 seconds. Both are correct algebra, but only one is a real event: the negative root describes where the parabola would have crossed ground level before the throw happened, so you discard it. The ball lands about 4.65 seconds after release. The same three coefficients also locate the peak without extra work: the vertex sits at t = −b / 2a = 2 seconds, where h(2) = −20 + 40 + 15 = 35 metres.
Checking roots with the sum and product
Every pair of roots obeys two shortcuts, often called Vieta's relations: the roots add to −b/a and multiply to c/a. Try a = 2, b = 3, c = −2 in the solver. The discriminant is 9 + 16 = 25, √25 = 5, and the roots are (−3 − 5) / 4 = −2 and (−3 + 5) / 4 = 0.5. Now check: −2 + 0.5 = −1.5, which equals −b/a = −3/2, and −2 × 0.5 = −1, which equals c/a = −2/2. If your hand calculation of a root fails either check, the error is in the arithmetic, not the method — a ten-second test that catches most sign slips before they cost marks. The vertex of this parabola is at x = −0.75, where y = −3.125, so the curve dips below the axis between its two crossings, exactly as two real roots require.
Edge cases in this solver's logic
Enter a = 1, b = 2, c = 5 and the discriminant is 4 − 20 = −16. This solver reports "No real roots" and stops there: it works in real numbers only, even though the equation does have complex solutions, −1 + 2i and −1 − 2i. If a physics or engineering problem expects complex roots, treat the solver's message as "no real crossing" rather than "no solution." At the other boundary, setting a = 0 quietly changes the problem — the solver falls back to the linear root x = −c/b, so a = 0, b = 4, c = −8 returns x = 2, the answer to 4x − 8 = 0, not to any quadratic. If a and b are both 0 there is nothing left to solve and the solver says so. Finally, roots are displayed rounded to four decimal places, so a root shown as 4.6458 is the exact value 4.645751… trimmed — fine for homework answers, but substitute the unrounded value if you chain the result into a further calculation.