# 多項式の根を求める計算機

> All real and complex roots of a polynomial up to degree 6, such as a cubic or quartic equation, with repeated roots found exactly and 30-digit accuracy.

操作できるページ：https://www.calcopenly.com/ja/math/polynomial-root-finder
分野：数学の計算機

A polynomial of degree n has exactly n roots among the complex numbers, counted with multiplicity; this is the fundamental theorem of algebra. The calculator first splits off repeated factors exactly with Yun's square-free algorithm, then finds all remaining roots at once with the Durand–Kerner (Weierstrass) iteration, which refines n guesses together until each correction is below 10⁻³⁰ of the root. Rational roots are confirmed by exact substitution.

Cubic and quartic equations from engineering, physics and algebra courses are typical inputs. The default, 1, −6, 11, −6, is x³ − 6x² + 11x − 6 = (x − 1)(x − 2)(x − 3), so the roots are 1, 2 and 3; they sum to 6 and multiply to 6, as Vieta's formulas require.

Enter coefficients from the highest power down, with zeros for missing powers: x³ − 2 is 1, 0, 0, −2. Degrees 1 to 6 are accepted.

## 入力

- **Coefficients, highest power first**: 1, -6, 11, -6 means x³ − 6x² + 11x − 6. Include zeros for missing powers.

## 結果

- Roots — 主な結果
- Real roots (counted with multiplicity)
- Largest real root
- Smallest real root
- Degree

## 計算式

$$
z_k \leftarrow z_k - \frac{p(z_k)}{\prod_{j \ne k} (z_k - z_j)}
$$

## 計算例

### x³ − 6x² + 11x − 6

- Coefficients, highest power first: 1, -6, 11, -6
- **Roots: 1, 2, 3**
- **Real roots (counted with multiplicity): 3**
- **Largest real root: 3**
- **Smallest real root: 1**
- 照合元：(x − 1)(x − 2)(x − 3) expanded by hand

### x³ − 2 (one real, two complex)

- Coefficients, highest power first: 1, 0, 0, -2
- **Roots: 1.25992105, −0.6299605249 ± 1.091123636i**
- **Real roots (counted with multiplicity): 1**
- **Largest real root: 1.2599210499**
- 照合元：Python decimal: 2^(1/3) and 2^(1/3)·(−1/2 ± i√3/2)

### x⁴ − 1

- Coefficients, highest power first: 1, 0, 0, 0, -1
- **Roots: −1, 1, ±i**
- **Real roots (counted with multiplicity): 2**
- 照合元：Fourth roots of unity: ±1, ±i

### Repeated root (x − 1)³(x + 2)

- Coefficients, highest power first: 1, -1, -3, 5, -2
- **Roots: −2, 1 (×3)**
- **Real roots (counted with multiplicity): 4**
- **Smallest real root: -2**
- 照合元：(x − 1)³(x + 2) = x⁴ − x³ − 3x² + 5x − 2 (expanded with Python fractions)

### Quintic x⁵ − x − 1

- Coefficients, highest power first: 1, 0, 0, 0, -1, -1
- **Real roots (counted with multiplicity): 1**
- **Largest real root: 1.1673039783**
- 照合元：Python decimal Newton iteration on x⁵ − x − 1 (60 digits)

### Degree 6: x⁶ − 1

- Coefficients, highest power first: 1, 0, 0, 0, 0, 0, -1
- **Real roots (counted with multiplicity): 2**
- **Largest real root: 1**
- **Smallest real root: -1**
- 照合元：Sixth roots of unity: ±1, ±1/2 ± i√3/2

## よくある質問

### How many roots does a polynomial have?

Exactly as many as its degree, counted with multiplicity, once complex roots are included; this is the fundamental theorem of algebra. x⁴ − 1 has four roots: −1, 1, i and −i. The number of real roots can be smaller: x³ − 2 has one real root, ∛2 ≈ 1.259921, and two complex ones. A root of multiplicity 3, such as x = 1 in (x − 1)³(x + 2), counts three times.

### How do you solve a cubic equation?

Look for a rational root first. By the rational root theorem, any rational root p/q of a polynomial with integer coefficients has p dividing the constant term and q dividing the leading coefficient. For x³ − 6x² + 11x − 6, trying divisors of 6 finds x = 1, and dividing by (x − 1) leaves x² − 5x + 6 = (x − 2)(x − 3). Without a rational root, Cardano's formula or a numerical method is needed.

### Is there a formula for the roots of a quintic?

No general formula using radicals exists for degree 5 or higher. The Abel–Ruffini theorem, proved by Abel in 1824, shows this, and Galois theory explains which equations can be solved that way. x⁵ − x − 1 is a standard example whose roots cannot be written with radicals. Numerical methods still find them: its only real root is about 1.167304.

### What are Vieta's formulas?

They link the roots to the coefficients. For aₙxⁿ + aₙ₋₁xⁿ⁻¹ + … + a₀, the roots add up to −aₙ₋₁/aₙ and multiply to (−1)ⁿa₀/aₙ. For x³ − 6x² + 11x − 6 the roots 1, 2 and 3 sum to 6 and multiply to 6, matching −(−6)/1 and (−1)³ × (−6)/1. The calculator uses both as a check on the roots it finds.

### Why do complex roots come in conjugate pairs?

When every coefficient is real, conjugating the equation p(z) = 0 gives p(z̄) = 0, so the conjugate of a root is also a root. x³ − 2 therefore has the pair −0.629961 ± 1.091124i alongside its real root. It follows that a polynomial of odd degree with real coefficients always has at least one real root.

### 「多項式の根を求める計算機」の精度はどのくらいですか？

精度は入力値と計算方法の前提に依存します。十進演算には有効数字50桁を使いますが、推定、数値計算手法、元データの精度はそれより低い場合があります。表示の丸め処理でこれらの制約がなくなるわけではありません。 独立した出典の解答と照合した計算例：7。 例えば、「x³ − 6x² + 11x − 6」は(x − 1)(x − 2)(x − 3) expanded by handと照合しています。

### この計算方法の出典は何ですか？

Wolfram MathWorld — Durand-Kerner Method (Weierstrass iteration); D. Y. Y. Yun, On square-free decomposition algorithms, SYMSAC 1976.

## 出典

- [Wolfram MathWorld — Durand-Kerner Method (Weierstrass iteration)](https://mathworld.wolfram.com/Durand-KernerMethod.html)
- [D. Y. Y. Yun, On square-free decomposition algorithms, SYMSAC 1976](https://doi.org/10.1145/800205.806320)
