Left to Solve
Problems / MathOverflow (not formalized)

Computing several Fourier terms to machine precision

Open, not yet stated in LeanMathOverflow (not formalized)Uncategoriseddifficulty55/100

Statement

For periodic not-necessarily smooth and a range of , say , I want to compute (and maybe the same integral with instead of ) to machine precision (or close-ish to it).

The obvious thing to do is to evaluate at an equispaced grid and take a DFT, but this is only giving me linear convergence, and getting enough precision will take a very fine grid.

The other obvious thing (which I haven't yet tried) would be to pre-compute for the Legendre weights and points (scaled to ), then at evaluation time compute and find all the integrals with a matvec. (All else being equal, I'd prefer not to have to have a bunch of pre-computed data to keep track of, but it's better than re-computing it every time if that's the only other option)

My only other idea (also not yet tried) was to figure out a closed-form solution for for the Chebyshev basis, then at evaluation time do a fast Chebyshev transform to get and use that to compute the integrals.

None of these seem particularly satisfying.

So my question …

Posed by JCK · na.numerical-analysis

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-326532.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-326532.lean

import Mathlib

/-!
# Computing several Fourier terms to machine precision

Source: https://mathoverflow.net/questions/326532
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_326532

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_326532