所有计算器
数学

一元二次方程

求 ax² + bx + c = 0 的根。

The quadratic equation ax² + bx + c = 0 shows up everywhere a curve meets a line — projectile motion, profit maximization, geometry. This solver returns both roots instantly, including complex roots when the parabola never touches the x-axis.

工作原理

Enter the coefficients a, b, and c. The calculator computes the discriminant b² − 4ac: if it's positive there are two real roots, zero gives one repeated root, and negative yields a complex conjugate pair, which the solver writes out in full.

公式

x = (−b ± √(b² − 4ac)) ÷ 2a

a, b, c are the coefficients of x², x, and the constant term; a must be nonzero (otherwise the equation is linear). The discriminant D = b² − 4ac decides the nature of the roots.

计算示例

x² − 3x + 2 = 0: D = 9 − 8 = 1, so x = (3 ± 1) ÷ 2, giving roots 2 and 1. Check: (x − 2)(x − 1) = x² − 3x + 2. ✓

常见问题

What does a negative discriminant mean?

The parabola never crosses the x-axis, so there are no real solutions — instead you get two complex roots of the form p ± qi. They're perfectly valid answers in engineering and physics contexts.

Is factoring or the formula better?

Factor when the roots are obvious integers; use the formula for everything else. The formula always works — factoring is just faster when it happens to be easy.

What do the roots' sum and product tell me?

By Vieta's formulas, the roots sum to −b/a and multiply to c/a. It's a fast sanity check: for x² − 3x + 2, the roots 2 and 1 indeed sum to 3 and multiply to 2.

相关计算器