Fields

Solving by radicals

The quadratic formula has cousins for cubics and quartics, and none for the general quintic. Galois explained why: a polynomial has a formula in radicals exactly when its Galois group is solvable. This page decides the question for a given polynomial and, when the answer is yes, writes the roots out, then checks each formula against the root it claims to be.

The theorem

A number is expressible by radicals if it can be reached from the rationals by the four operations and taking nn-th roots. A group GG is solvable if it has a chain of subgroups

G=G0⊳G1⊳⋯⊳Gm=1 G = G_0 \rhd G_1 \rhd \dots \rhd G_m = 1

with each Gi+1G_{i+1} normal in GiG_i and each index [Gi:Gi+1][G_i : G_{i+1}] a prime. Galois's theorem: the roots of an irreducible ff are expressible by radicals if and only if the Galois group of ff is solvable. Every group of order below 60 is solvable, and so are all subgroups of S4S_4, which is why degrees up to 4 always have formulas. A5A_5 and S5S_5 are not, and most quintics have one of those two as their group.

import { solveByRadicals } from "@ratmath/structures";

const r = solveByRadicals("x^5 - x - 1");
r.solvable;               // false
r.factors[0].group;       // "S5"
r.reason;                 // "the Galois group S5 of x⁵ − x − 1, of order 120, is not solvable: …"

const q = solveByRadicals("x^5 - 5x + 12");
q.factors[0].group;       // "D5", of order 10
q.factors[0].chain;       // [2, 5]: a square root, then a fifth root

One step: Lagrange resolvents

The chain turns into a tower of fields by the Galois correspondence, each step of prime degree pp with a cyclic group generated by some σ\sigma. Let ω\omega be a primitive pp-th root of unity. For xx in the upper field, the Lagrange resolvents are

rj=∑k=0p−1ωjk σk(x),j=0,…,p−1. r_j = \sum_{k=0}^{p-1} \omega^{jk}\, \sigma^k(x), \qquad j = 0, \dots, p-1 .

Applying σ\sigma multiplies rjr_j by ω−j\omega^{-j}, so rj pr_j^{\,p} is unchanged by σ\sigma: it lies in the lower field (with ω\omega adjoined). Hence each rjr_j is a pp-th root of something already known, and xx is recovered from them:

x=1p (r0+r1+⋯+rp−1). x = \frac{1}{p}\,(r_0 + r_1 + \dots + r_{p-1}) .

For p=2p = 2 this is the quadratic formula, and for a cubic it is Cardano's. Climbing the tower one prime at a time expresses the roots of ff by nested radicals.

How the formulas are made exact

The work is carried out on the roots themselves. Every quantity in the tower is held as its full set of conjugates, each a small box in the complex plane known to hold the true value, with the Galois group permuting them. Arithmetic on boxes can never prove that two things are equal; what makes the results exact is algebra: a quantity fixed by the whole group is rational, its denominator is bounded in advance, and a box containing a single fraction with such a denominator identifies it. Zero is recognised the same way, through norms. So the integers appearing under the radicals are proved, not rounded.

Which of the pp possible pp-th roots is meant matters. A radical zn\sqrt[n]{z} here always means the real root when zz is real and one exists (positive for even nn), and otherwise the principal root, the one with the smallest angle. Where the resolvent is a different root, the needed root of unity is written in.

const { roots } = solveByRadicals("x^3 + x + 1").factors[0];
const e = roots[0].expression;
e.inline();               // "(−∛(108 + 12·√93) − ∛(108 − 12·√93))/6"
e.toTeX();                // the same for typesetting
e.approx();               // −0.6823278038280193
e.check(50);              // { agrees: true, digits: 50 }: recomputed from the formula alone
e.indices;                // [2, 3]: square and cube roots

Long answers are given in steps: text uses names r1,r2,…r_1, r_2, \dots and definitions says what each is. check(digits) evaluates the formula from the inside out with certified complex arithmetic and compares with the root located independently, so a wrong branch anywhere would show.

Solvable quintics

An irreducible quintic is solvable exactly when its group is C5C_5, D5D_5 or the Frobenius group F20F_{20}. All three occur:

  • x5−2x^5 - 2 has group F20F_{20} and roots ζk25\zeta^k \sqrt[5]{2};
  • x5−5x+12x^5 - 5x + 12 has group D5D_5; its real root needs 5\sqrt 5, a square root of −10−25-10 - 2\sqrt5 and four fifth roots;
  • x5+x4−4x3−3x2+3x+1x^5 + x^4 - 4x^3 - 3x^2 + 3x + 1, whose roots are 2cos⁡(2πk/11)2\cos(2\pi k/11), has group C5C_5.

Irreducible factors up to degree 7 are handled; x7−7x+3x^7 - 7x + 3 has the simple group of order 168 and no formula.

Roots of unity

The cyclotomic polynomials have abelian Galois groups, so every root of unity is expressible by radicals: a real surprise for ζ7\zeta_7 or ζ11\zeta_{11}, and Gauss's first great discovery for ζ17\zeta_{17}, where square roots suffice. rootOfUnityByRadicals(n) gives e2πi/ne^{2\pi i/n}. The formulas above use ζ3\zeta_3 and ζ5\zeta_5 written out, and name larger ones.

import { rootOfUnityByRadicals } from "@ratmath/structures";
rootOfUnityByRadicals(5).inline();    // "(−1 + √5 + √(−10 − 2·√5))/4"
rootOfUnityByRadicals(12).inline();   // "(i + √3)/2"
rootOfUnityByRadicals(7).text;        // "ζ₇", with definitions r₁ = ∛(28 − 84·i·√3), …
Try itEdit the code and run it with @ratmath/structures and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs