Cubic Equation Solver logo
Cubic Equation Solver

Mathematical Instruments

三次方程求解器

仅求解三次方程。找到实根和复根,遵循基于卡尔达诺的步骤,并探索三次图。

三次方程计算器

The Equation

输入多项式系数

f(x) = 0 = 0

输入系数并求解以查看根、公式、图形状态和分步说明。

The Solution

求解根、公式和导出测度

输入系数并求解以查看根、公式、图形状态和分步说明。

立方图

实 x 轴截距没有真正的 x 截距
Y 轴截距(0, 0)
拐点(0, 0)
转折点无局部最大/最小

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.

  1. 1
    Identify your coefficients. Format your equation as ax³ + bx² + cx + d = 0. Identify the numbers for a, b, c, and d. For example, in 2x³ - x + 5 = 0, a=2, b=0, c=-1, and d=5.
  2. 2
    Enter the values. Type the coefficients into the left panel. Use the minus sign for negative numbers and a decimal point for fractions. Remember, 'a' cannot be zero.
  3. 3
    Review the Roots. Click 'Solve Cubic'. The right panel instantly displays all three roots, labeling them as Real, Complex Conjugates, or Repeated Roots.
  4. 4
    Check the Graph. Scroll down to the interactive graph. It visually confirms the real roots (where the line crosses the x-axis) and shows turning points and the y-intercept.
  5. 5
    Open the Step-by-Step Details. Expand the details section to see the depressed cubic transformation, the discriminant calculation, and the mathematical reasoning behind the final answer.

The Examples

立方的例子

Try these classic cubics with one click — each loads into the instrument above.

The Definition

什么是三次方程?

三次方程是 ax3 + bx2 + cx + d = 0 形式的三次多项式,其系数 a 非零。立方体出现在几何、优化、控制系统、图形和许多工程模型中。

此页面遵循类似于实际求解器工作区的清晰路径:定义、公式、求解过程、计算器工具和验证检查。

如今,三次方程无处不在:工程优化、物理模拟、计算机图形学(贝塞尔曲线)、经济建模和科学研究。无论您是学习多项式理论的学生还是解决设计约束的工程师,理解三次方程都是至关重要的。本页提供了掌握它们所需的计算器、理论和示例。

三次曲线剖析

xy局部最大值局部最小值拐点x₁x₂x₃Y-int(0,d)
根
x1, x2, x3
转点
最大和最小
变形
b/(3a)
Y 轴截距
f(0) = d

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.

标准立方

ax³ + bx² + cx + d = 0

“a”非零的一般形式。所有其他类型都是该标准形式的特例。

莫尼克立方

x³ + bx² + cx + d = 0

首项系数 a=1 的三次方。如果 a≠1,您可以通过将整个方程除以“a”来创建三次三次方程。

压抑立方

t³ + pt + q = 0

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.

可因式分解的立方

(x - r)(ax² + bx + c) = 0

可以使用分组或综合除法轻松分解的三次方。一旦因式分解,剩下的二次方程就可以立即求解。

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

Cardano's Formula & The Depressed Cubic

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.

第一步:Tschirnhaus 改造

卡尔达诺的公式不能直接应用于 ax3 + bx2 + cx + d = 0。我们必须首先消除 x2 项。我们通过代入 x = t - b/(3a) 来实现这一点。这会将一般三次方转换为凹陷三次方:t³ + pt + q = 0。

步骤 2:卡尔达诺判别式 (D)

使用降维三次方中的“p”和“q”,我们计算卡尔达诺的判别式 D = (q/2)² + (p/3)³。 (注意:这不是三次判别式 Δ = -(4p3 + 27q2);两者相差 -108 倍。)D 的符号决定了算法的其余部分:D > 0 给出一个实数根和两个复数根,D = 0 给出重复根,D < 0 给出三个不同的实数根。

  • Δ > 0: 一个实根,两个复根。卡尔达诺公式直接使用立方根应用。
  • Δ = 0: 实根,至少有一个重复根。通过简化的代数极限求解。
  • Δ < 0 (Casus Irreducibilis): Three distinct real roots. Paradoxically, Cardano's formula requires computing the cube root of complex numbers to find these real answers. We bypass this using the Trigonometric Method.

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:

  • 根之和: r₁ + r₂ + r₃ = -b/a
  • 两两乘积之和: r₁r₂ + r₁r₃ + r₂r₃ = c/a
  • 根的产物: r₁r₂r₃ = -d/a

The Process

如何解三次方程(清晰过程)

每个三次方程都可以通过遵循系统的五步过程来求解。此方法适用于所有三次方,无论其系数如何、根是实数根还是复数根、以及它们是重复的还是不同的。第三步的判别式确定使用哪个数学分支进行最终计算。

01

以标准形式写出方程并验证 a != 0。

02

标准化并简化为凹陷立方形式。

03

评估判别式以选择数字分支。

04

计算根并变换回 x 空间。

05

通过替换和图形检查来验证根。

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.

1. 简单因式分解三次

x³ - 6x² + 11x - 6 = 0

步骤一: 请注意,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

2. 凹陷立方 (D = 0)

x³ - 3x + 2 = 0

步骤一: 这是沮丧的(没有x²)。这里 p = -3,q = 2。

步骤2: 卡尔达诺判别式 D = (2/2)2 + (-3/3)3 = 1 - 1 = 0。

步骤3: 零 D 表示重根。

根源: x = 1(双根),x = -2

3. 一实数,二复数 (D > 0)

x³ + x + 2 = 0

步骤一: 凹陷立方,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(复数)

4. 三重根

x³ - 3x² + 3x - 1 = 0

步骤一: 请注意,这与 (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.

X 截距(根)

曲线与水平轴相交的位置。一个立方体将穿过 1、2 或 3 次。

Y 轴截距

曲线与垂直轴相交的位置。这始终恰好等于常数项“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

解三次方程时的常见错误

即使是经验丰富的数学家在手工求解三次多项式时也可能出错。以下是最常见的陷阱以及如何避免它们。

1. Setting a = 0

If the leading coefficient 'a' is zero, the x³ term disappears and it becomes a quadratic equation. Always ensure a ≠ 0.

2. Dropping Negative Signs

Forgetting to include the minus sign when substituting negative coefficients into Cardano's formula is the #1 source of manual errors.

3. Missing Zero Coefficients

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.

4. Ignoring Complex Roots

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.

5. 过早舍入

在计算 p、q 和 D 过程中对数字进行舍入会导致最终根中出现大量级联错误。保持精确的分数直到最后。

6. 误解图表

假设一条接触 x 轴但不相交的曲线在那里没有根。实际上,它代表一个双(重复)根。

The Proof

如何验证您的解决方案

在没有证明的情况下,永远不要假设你的根是正确的。这里有四种严格的数学方法来验证三次方程解。

1. 直接替换(剩余检查)

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).

2.Vieta 的公式检查

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.

3. 视觉图确认

Plot the cubic curve. The real roots you calculated mathematically must align perfectly with the x-intercepts on the graph.

4. 重根的导数检查

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

所有三次计算器

使用我们专用的三次多项式计算器标准化您的工作流程。

01

三次判别计算器

立即识别根的性质。了解您的三次方程是否有实数、复数或重复解。

打开工具→
02

Cardano 方法计算器

通过消除平方项应用 Cardano 历史公式的分步计算器。

打开工具→
03

凹陷三次计算器

自动将标准三次方程转换为更简单的凹陷形式。

打开工具→
04

三次根计算器

闪电般快速提取 x 截距,准确求解实数根和复数根

打开工具→
05

三次函数图形生成器

交互式曲线绘图工具,用于可视化根、转折点和斜率行为。

打开工具→
06

拐点计算器

精确定位三次曲线变化处的精确旋转对称中心

打开工具→
07

转折点计算器

确定多项式的精确峰值(局部最大值)和谷值(局部最小值)。

打开工具→
08

多项式因式分解计算器

将三次方程优雅地分解为干净的二项式因式,完美无小数。

打开工具→
09

综合除法计算器

快速速记除法工具,用于检查因数并将三次分解为可解二次方程。

打开工具→
10

多项式长除法计算器

强大的经典除法工具,支持完全透明的二次除数。

打开工具→
11

有理根定理计算器

为您的方程生成所有可能的干净分数和整数根的严格列表。

打开工具→
12

余数定理计算器

绕过全除法快速计算根,纯粹通过快速替换来检查因子。

打开工具→
13

Vieta 公式计算器

直接从多项式系数分析立方根的和与乘积。

打开工具→
14

复数根计算器

从三次曲线中严格提取虚共轭对的专用实用程序。

打开工具→
15

多项式图形绘图仪

严格的高细节 SVG 绘图应用程序超级专注于深度三次绘图。

打开工具→
16

根关系计算器

测量找到的多项式根之间的距离、散布和绝对差。

打开工具→

The Questions

Frequently Asked Questions about Cubic Equations

是什么使方程成为“三次”方程?

当变量的最高指数(幂)为 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.

三次方程可以恰好有 2 个根吗?

不完全是。三次方程计入重数时恒有 3 个根。看起来像 2 个根的情况,其实是其中一个根重复了两次(二重根)。例如 x³ - 3x + 2 = 0 可分解为 (x-1)²(x+2) = 0,所以 x=1 出现两次,x=-2 出现一次。这种情形下判别式恰好等于零。

卡尔达诺方法和有理根定理有什么区别?

有理根定理是个捷径:它列出所有可能的分式根(± d 的因数 / a 的因数)供你逐个检验。存在漂亮的有理根时它很快,但对无理根或复数根无能为力。卡尔达诺方法永远有效,它对每个三次方程都给出精确根,无需猜测。本求解器两者兼用:先试有理根以得到干净的答案,再退回卡尔达诺公式。