Share Brilliantly
fourier analysis
let fo = await import('/lib/fourier/v1.0.0/series.mjs');
//function acoeff(f, n, range, mesh, integrate)
let a0 = fo.acoeff(f,0);
let a1 = fo.acoeff(f,1);
//or, specify the range and the mesh
let a1 = fo.acoeff(f,1, [-1*Math.PI, Math.PI], 1000);
let b1 = fo.bcoeff(f,1);
let fo = await import('/lib/fourier/v1.0.0/series.mjs');
//approximate(f, n, mesh, range, integrate)
let f = x => x*x;
let approx = fo.approximate(f,5,[0,5]);