The Solution
求解根、公式和导出测度
立方图
Mathematical Instruments
仅求解三次方程。找到实根和复根,遵循基于卡尔达诺的步骤,并探索三次图。
输入多项式系数
求解根、公式和导出测度
立方图
The Method
We designed this solver to be intuitive. Follow these steps to get precise roots and step-by-step breakdowns for any cubic equation.
The Examples
Try these classic cubics with one click — each loads into the instrument above.
The Definition
三次方程是 ax3 + bx2 + cx + d = 0 形式的三次多项式,其系数 a 非零。立方体出现在几何、优化、控制系统、图形和许多工程模型中。
此页面遵循类似于实际求解器工作区的清晰路径:定义、公式、求解过程、计算器工具和验证检查。
如今,三次方程无处不在:工程优化、物理模拟、计算机图形学(贝塞尔曲线)、经济建模和科学研究。无论您是学习多项式理论的学生还是解决设计约束的工程师,理解三次方程都是至关重要的。本页提供了掌握它们所需的计算器、理论和示例。
三次曲线剖析
The Types
While every cubic equation shares the fundamental property of being a third-degree polynomial, they can be categorized into different types based on their coefficients and root properties. Understanding these types helps you choose the fastest solving method.
“a”非零的一般形式。所有其他类型都是该标准形式的特例。
首项系数 a=1 的三次方。如果 a≠1,您可以通过将整个方程除以“a”来创建三次三次方程。
A cubic with no x² term (b=0). This form is crucial because Cardano's formula requires the equation to be in depressed form first.
可以使用分组或综合除法轻松分解的三次方。一旦因式分解,剩下的二次方程就可以立即求解。
The Formulas
在求解任何三次方程之前,先确定已知系数,然后选择正确的符号路径。
替换
x = t - b/(3a)
压缩形式
t^3 + pt + q = 0
D
D = (q/2)^2 + (p/3)^3(卡尔达诺判别式)
Y 轴截距
f(0) = d
变形X
x = -b/(3a)
转折点
求解 f'(x) = 3ax^2 + 2bx + c = 0
The History
The quadratic formula solves any degree-2 equation. Cardano's formula is its degree-3 equivalent. Published by Girolamo Cardano in 1545 (based on work by Scipione del Ferro and Niccolò Tartaglia), it was the first general algebraic solution for cubic equations.
卡尔达诺的公式不能直接应用于 ax3 + bx2 + cx + d = 0。我们必须首先消除 x2 项。我们通过代入 x = t - b/(3a) 来实现这一点。这会将一般三次方转换为凹陷三次方:t³ + pt + q = 0。
使用降维三次方中的“p”和“q”,我们计算卡尔达诺的判别式 D = (q/2)² + (p/3)³。 (注意:这不是三次判别式 Δ = -(4p3 + 27q2);两者相差 -108 倍。)D 的符号决定了算法的其余部分:D > 0 给出一个实数根和两个复数根,D = 0 给出重复根,D < 0 给出三个不同的实数根。
The Theory
The behavior of cubic equations is governed by several elegant mathematical theorems. Understanding these principles helps explain why cubics always have three roots and why complex roots always appear in pairs.
This foundational theorem states that every polynomial of degree 'n' has exactly 'n' roots in the complex number system, provided you count repeated roots. Since a cubic is degree 3, it always has exactly three roots.
If a polynomial has real coefficients (which is true for all equations entered in this calculator), any complex roots must come in conjugate pairs. If (u + vi) is a root, then (u - vi) is also a root. Because cubics have three roots and complex roots require a pair, every cubic must have at least one real root.
Vieta's formulas describe the direct relationship between the polynomial's coefficients and its roots (r₁, r₂, r₃). For the equation ax³ + bx² + cx + d = 0:
The Process
每个三次方程都可以通过遵循系统的五步过程来求解。此方法适用于所有三次方,无论其系数如何、根是实数根还是复数根、以及它们是重复的还是不同的。第三步的判别式确定使用哪个数学分支进行最终计算。
以标准形式写出方程并验证 a != 0。
标准化并简化为凹陷立方形式。
评估判别式以选择数字分支。
计算根并变换回 x 空间。
通过替换和图形检查来验证根。
D > 0
1 实根
+ 2 个复合缀合物
→ 卡尔达诺分支
D = 0
重复实根
三根或双根
→ 重复根路径
D < 0
3个不同的实根
三角法
→ 余弦法
The Walkthrough
The best way to understand cubic equations is to see them solved. Here are common scenarios you will encounter, spanning different root types and coefficient structures.
步骤一: 请注意,x=1 使方程为零 (1 - 6 + 11 - 6 = 0)。
步骤2: 对 (x-1) 进行因式分解,得到 (x-1)(x² - 5x + 6) = 0。
步骤3: 将二次因式分解为 (x-2)(x-3)。
根源: x = 1, x = 2, x = 3
步骤一: 这是沮丧的(没有x²)。这里 p = -3,q = 2。
步骤2: 卡尔达诺判别式 D = (2/2)2 + (-3/3)3 = 1 - 1 = 0。
步骤3: 零 D 表示重根。
根源: x = 1(双根),x = -2
步骤一: 凹陷立方,p = 1,q = 2。
步骤2: D = (2/2)² + (1/3)³ = 1 + 1/27 ≈ 1.037 > 0.
步骤3: 曲线与 x 轴恰好相交一次。
根源: x = -1(实数),x = 0.5 ± 1.323i(复数)
步骤一: 请注意,这与 (x-1)³ 的展开完全匹配。
步骤2: 因此,方程为 (x-1)³ = 0。
步骤3: 该图在 x=1 处有一个水平拐点。
根源: x = 1(三次根)
The Graph
The graph of a cubic equation reveals its secrets at a glance. Our calculator generates this curve automatically, but knowing what to look for is essential.
曲线与水平轴相交的位置。一个立方体将穿过 1、2 或 3 次。
曲线与垂直轴相交的位置。这始终恰好等于常数项“d”。
The local maximum (peak) and local minimum (valley). A cubic has either exactly two turning points or zero.
The exact center of rotational symmetry where the curve changes concavity (from an arch to a bowl, or vice versa).
The Applications
Cubic equations aren't just abstract math — they describe the physical world. Any system involving volume, 3D space, or changing acceleration often results in a third-degree polynomial.
Used to calculate stress-strain curves in materials, optimizing structural loads, and designing aerodynamic profiles.
Essential for the van der Waals equation of state, which models the behavior of real, non-ideal gases.
Bézier curves, the foundation of vector graphics and 3D modeling, rely entirely on cubic polynomials to draw smooth lines.
Used to model cost, revenue, and profit functions where marginal rates fluctuate significantly over time.
对经历空气阻力、某些波动方程和流体动力学简化的抛射运动进行建模。
Polynomial regression models often use third-degree expansions to map complex, non-linear optimization landscapes.
The Pitfalls
即使是经验丰富的数学家在手工求解三次多项式时也可能出错。以下是最常见的陷阱以及如何避免它们。
If the leading coefficient 'a' is zero, the x³ term disappears and it becomes a quadratic equation. Always ensure a ≠ 0.
Forgetting to include the minus sign when substituting negative coefficients into Cardano's formula is the #1 source of manual errors.
For an equation like x³ - 8 = 0, you must explicitly account for b = 0 and c = 0. Failing to do so throws off the entire calculation.
A cubic always has three roots. If you find only one real root, you are not done — the other two exist as a complex conjugate pair.
在计算 p、q 和 D 过程中对数字进行舍入会导致最终根中出现大量级联错误。保持精确的分数直到最后。
假设一条接触 x 轴但不相交的曲线在那里没有根。实际上,它代表一个双(重复)根。
The Proof
在没有证明的情况下,永远不要假设你的根是正确的。这里有四种严格的数学方法来验证三次方程解。
Plug each calculated root back into the original equation f(x) = ax³ + bx² + cx + d. If the math is correct, the result should be exactly zero. Due to floating-point math, computers look for a result very close to zero (e.g., 1e-10).
Add all three of your roots together. The sum must exactly equal -b/a. Then, multiply all three roots together. The product must exactly equal -d/a. If either fails, your roots are wrong.
Plot the cubic curve. The real roots you calculated mathematically must align perfectly with the x-intercepts on the graph.
If you believe you have a double root at x=r, then substituting 'r' into the derivative f'(x) = 3ax² + 2bx + c must also equal zero.
The Collection
使用我们专用的三次多项式计算器标准化您的工作流程。
立即识别根的性质。了解您的三次方程是否有实数、复数或重复解。
通过消除平方项应用 Cardano 历史公式的分步计算器。
自动将标准三次方程转换为更简单的凹陷形式。
闪电般快速提取 x 截距,准确求解实数根和复数根
交互式曲线绘图工具,用于可视化根、转折点和斜率行为。
精确定位三次曲线变化处的精确旋转对称中心
确定多项式的精确峰值(局部最大值)和谷值(局部最小值)。
将三次方程优雅地分解为干净的二项式因式,完美无小数。
快速速记除法工具,用于检查因数并将三次分解为可解二次方程。
强大的经典除法工具,支持完全透明的二次除数。
为您的方程生成所有可能的干净分数和整数根的严格列表。
绕过全除法快速计算根,纯粹通过快速替换来检查因子。
直接从多项式系数分析立方根的和与乘积。
从三次曲线中严格提取虚共轭对的专用实用程序。
严格的高细节 SVG 绘图应用程序超级专注于深度三次绘图。
测量找到的多项式根之间的距离、散布和绝对差。
The Questions
当变量的最高指数(幂)为 3 时,方程为三次方程。例如,在 4x3 - 2x + 1 = 0 中,x3 项将其定义为三次多项式。
不会。因为复数根总是成对出现(共轭),并且三次方必须总共有 3 个根,所以总是至少有一个实根。从几何角度来看,曲线从负无穷大延伸到正无穷大,保证它至少与 x 轴相交一次。
卡尔达诺的判别式 D 的作用类似于诊断扫描。如果为正,则有 1 个实根和 2 个复根。如果它恰好为零,则说明您有重复的实根。如果为负,则有 3 个不同的实根。 (这个 D 与判别式计算器页面上使用的三次判别式 Δ 不同。)
当三次方有三个实根(负 D)时,卡尔达诺的代数公式在计算复数的立方根时就会陷入困境。为了绕过这个“不可约原因”,数学家使用三角恒等式(涉及余弦和反余弦)来干净地计算精确的实根。
Yes! The calculator's engine handles integers, negative numbers, and decimals seamlessly. It maintains extremely high floating-point precision throughout all intermediate steps to ensure the final output is accurate.
不完全是。三次方程计入重数时恒有 3 个根。看起来像 2 个根的情况,其实是其中一个根重复了两次(二重根)。例如 x³ - 3x + 2 = 0 可分解为 (x-1)²(x+2) = 0,所以 x=1 出现两次,x=-2 出现一次。这种情形下判别式恰好等于零。
有理根定理是个捷径:它列出所有可能的分式根(± d 的因数 / a 的因数)供你逐个检验。存在漂亮的有理根时它很快,但对无理根或复数根无能为力。卡尔达诺方法永远有效,它对每个三次方程都给出精确根,无需猜测。本求解器两者兼用:先试有理根以得到干净的答案,再退回卡尔达诺公式。