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 -th roots. A group is solvable if it has a chain of subgroups
with each normal in and each index a prime. Galois's theorem: the roots of an irreducible are expressible by radicals if and only if the Galois group of is solvable. Every group of order below 60 is solvable, and so are all subgroups of , which is why degrees up to 4 always have formulas. and 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 with a cyclic group generated by some . Let be a primitive -th root of unity. For in the upper field, the Lagrange resolvents are
Applying multiplies by , so is unchanged by : it lies in the lower field (with adjoined). Hence each is a -th root of something already known, and is recovered from them:
For 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 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 possible -th roots is meant matters. A radical here always means the real root when is real and one exists (positive for even ), 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 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 , or the Frobenius group . All three occur:
- has group and roots ;
- has group ; its real root needs , a square root of and four fifth roots;
- , whose roots are , has group .
Irreducible factors up to degree 7 are handled; 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 or , and Gauss's first great discovery for , where square roots suffice. rootOfUnityByRadicals(n) gives . The formulas above use and 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), …
@ratmath/structures and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.