Cohen's Christmas Integral
On 21 December 1993 Henri Cohen posted a puzzle to sci.math.symbolic titled “A Christmas present for your favorite CAS”: integrate x/√(x⁴+10x²−96x−71). The antiderivative is elementary:
−⅛ · log( (x⁶+15x⁴−80x³+27x²−528x+781)·√(x⁴+10x²−96x−71) − (x⁸+20x⁶−128x⁵+54x⁴−1408x³+3124x²+10001) )
If you change the −71 to −72, no elementary antiderivative exists. Thirty years later the pair is still the standard stress test on the Risch-algorithm page, which notes that Mathematica has only handled it since version 13. This essay started from a nice r/math post about Arnold’s complaint that calculus courses hide the geometry. You can tell which integrals are easy from the genus of the associated Riemann surface. A circle has genus 0, so it has a rational parametrisation and its integral is elementary. The curve y² = quartic is a torus, genus 1, so its integral should be “hard.” Cohen’s integral is genus 1 and comes out easy anyway. What follows is a portrait of that exception, because every number in the formula has a job.
The bracket is a Pell solution. Call the degree-8 polynomial P and the degree-6 one Q. I ran the continued-fraction expansion of √D over ℚ[x] myself, where D is the quartic. It closes after six steps, with P² − D·Q² equal to a constant. That is Pell’s equation with polynomials in place of integers, and Abel set up exactly this machine in the first volume of Crelle’s journal (1826). When Pell is solvable, ∫ρ dx/√D is a logarithm, and the numerator is forced to be ρ = P′/Q. For Cohen’s quartic, P′/Q comes out to exactly 8x. The 8 is the order of a group element. The torus y² = D has two points at infinity. Their difference is a point on an elliptic curve, and the polynomial Pell equation is solvable exactly when that point has finite order, with the minimal degree of P equal to that order. So the degree of P, the coefficient in 8x and the ⅛ in front of the log are one number. Abel’s own showcase, ∫(5x−1)dx/√(x⁴+2x²−4x+1), discussed by Masser and Zannier, behaves the same way: the expansion closes at degree 5, and P′/Q = 5x−1. The −72 failure shows up mod p. You can reduce the curve modulo a prime and compute the point’s order with the same continued fraction over 𝔽_p. For −71 the order is exactly 8 at every prime from 5 to 79. For −72 the orders scatter: 3 at p=7, 13 at p=11, 7 at p=13, 21 at p=17, 59 at p=59. A genuine torsion point of order N keeps order N at every good prime that doesn’t divide N, so the two primes 7 and 11 already prove that −72 is not elementary. That check costs far less than any attempt to integrate.
Chebyshev studied exactly these pseudo-elliptic integrals ∫(x+A)/√(quartic) in 1857 and 1864, and Zolotarev proved his method in 1872. Yet Hardy could still write in 1928 that no general method could decide “after a finite series of operations” whether an integral is elementary or elliptic. In this corner of the problem a finite procedure exists, and the finiteness comes from number theory rather than analysis. If D is a monic quartic with rational coefficients, the torsion point is a rational point on an elliptic curve over ℚ. Mazur’s 1977 theorem says such a point has order 1–10 or 12. So you run the continued fraction until the degree passes 12, and if it hasn’t closed by then, the integral is elliptic. The coefficient in front of the logarithm can only be 1/N for N in {2,…,10,12}, which means no rational quartic will ever give you a ⅟₁₁. Things get stranger once the quartic depends on a parameter. Davenport’s 1981 book claimed that a family that isn’t elementary in general becomes elementary for only finitely many parameter values. Masser and Zannier spent 85 pages of Acta Mathematica proving it, and at the end found it false. x/((x²−t²)√(x³−x)) is elementary for infinitely many t, beginning at t = i, and all their counterexamples live on curves with complex multiplication.
Genus tells you whether to expect a logarithm at all. For genus 1 over ℚ, the deciding fact is a single integer between 2 and 12, and you can read it off the front of the answer. The deeper question, whether the curve has complex multiplication, only matters once a parameter moves. My bet is that any future “Christmas present” of this type, with a rational monic quartic under the root, will carry a ⅟N with N in {5,…,10,12}. The small orders are too easy to spot by hand to make a good trap.