A156744 Coefficients for estimation of derivative from equally spaced numerical data using the Lagrange interpolating polynomial.
-1, 0, 1, 1, -8, 0, 8, -1, -1, 9, -45, 0, 45, -9, 1, 3, -32, 168, -672, 0, 672, -168, 32, -3
Offset: 1
Examples
Irregular triangle begins: -1, 0, 1; 1, -8, 0, 8, -1; -1, 9, -45, 0, 45, -9, 1; 3, -32, 168, -672, 0, 672, -168, 32, -3; -2, 25, -150, 600, -2100, 0, 2100, -600, 150, -25, 2; ...
Crossrefs
Programs
-
Mathematica
facs[x_, j_, n_] := Product[If[k == j, 1, x - k], {k, -n, n}] coefs[x_, n_] := Table[facs[x, j, n]/facs[j, j, n], {j, -n, n}] d[n_] := Apply[LCM, Table[j, {j, 1, 2*n}]] dCoefs[x_, n_] := d[n] D[coefs[y, n], y] /. {y -> x} MatrixForm[Table[dCoefs[0, n], {n, 1, 5}]]
Comments