In general, a trigonometric polynomial is an element of a bivariate polynomial ring,

, subject to the following constraints:

,

,

,

which identify

,

. For

any trigonometric polynomial of degree

, we can obtain a normal form by reducing powers of

to write

,

or

.

arise in many contexts, including classical physics. Avoiding binomial coefficients and equations of motion, here we focus on cases in which

,

,

.

These conditions allow us to introduce integers

,

,

such that

,

,

.

If

in the limit when

, then clearly

goes to

simultaneously. These few easy examples are chosen to obviously satisfy the convergence criterion, as

while

diverges to

.

This recipe leads to an infinite set of integral approximations to

, which we would like to start ranking by quality. As in [1], the

*quality* of rational approximant

(with

) is determined by the equation

The function

behaves stochastically on the scale of small variations, but overall tends to a stable limit with some variance. We would like to find the value

,

but direct integration becomes prohibitively difficult when the degree of

is large. With

, integration time already reaches the 1(s) scale. Fortunately, we have a general solution to the problem of quickly computing high-order terms, which reduces iteration to a linear calculation.

Every trigonometric polynomial

contributes to an integral generating function

,

with formal parameter

. Period

is a rational integral, so satisfies a linear differential equation [3],

,

with

a matrix of integers.

The source code contains a degree-bounded algorithm

TrigPicardFuchs that must return a positive result with

. We omit details of the proof here, but emphasize that the top-left block of the check matrix is always nondegenerate, which guarantees solvability and halting on success for any trigonometric polynomial

. The outputs can be checked against

HolonomicFunctions`Annihilate** **[4]. In timing tests,

TrigPicardFuchs competes quite well against

Annihilate**. **Once the differential equation is known, we can rigorously derive nonlinear recurrences,

,

usually determining the integers

by validating guessed recursions against the Frobenius method (see

Frobenius Method).

Finally, if we redefine

as an integral over the interval

, the differential equation must be modified to nonhomogeneous form,

,

where the coefficients

account for the rational part of

, only up to a sign and scale given by the free parameter

. We call the

a

*checksum* of the integral approximation.

These calculations take us through some fun areas of mathematics, but we should not delay the data analysis. Iterating to

, it seems that our approximation

reaches a higher quality than

, which appears in Beukers's article and in the

*On-Line Encyclopedia of Integer Sequences* (cf. A006139 [5]).

To certainly reach

, we must work with a more complicated integral,

,

,

.

This integral is Beukers's final example, and also appears in the

*On-Line Encyclopedia of Integer Sequences* alongside the appropriate differential equations and linear recurrences (cf. A123178, A305997 and A305998 [6–8]). More work remains to be done. In particular, will a trigonometric polynomial ever lead to an approximation of

?

[2] S. B. Ekhad and D. Zeilberger, "Searching for Apery-Style Miracles [Using, Inter-Alia, the Amazing Almkvist-Zeilberger Algorithm]."

arxiv.org/abs/1405.4445.

[3] P. Lairez, "Computing Periods of Rational Integrals,"

*Mathematics of Computation*,

**85**, 2016 pp. 1719–1752.

doi:10.1090/mcom/3054.

[5] N. J. A. Sloane.

*The On-Line Encyclopedia of Integer Sequences*.

oeis.org/A006139.[6] N. J. A. Sloane.

*The On-Line Encyclopedia of Integer Sequences*.

oeis.org/A123178.

[7] N. J. A. Sloane.

*The On-Line Encyclopedia of Integer Sequences*.

oeis.org/A305997.[8] N. J. A. Sloane.

*The On-Line Encyclopedia of Integer Sequences*.

oeis.org/A305998.