Sloppy monomials

(Sethna, )
© 2024, James P. Sethna, all rights reserved.

f[x_] := Sin[π (2x)]
M := 5
fTaylor[x_] = Series[...] // Normal // N // Chop
fChebyshev[x_] = 0.0066+5.652 x+9.701 (x^2)-95.455 (x^3)+133.48 (x^4)-53.39 (x^5)
fLegendre[x_] = 0.016 +5.410 x+11.304 (x^2)-99.637 (x^3)+138.15 (x^4)-55.26 (x^5)

Plot[{f[x],fChebyshev[x], ...},{x,0,1}]
Plot[{...},{x,0,1}]
Plot[{...},...]

H[n_,m_]:=...
Ham[M_] = Table[H[n,m]//N, ...];
{vals5,vecs5} = Eigensystem[Ham[M]];
conditionNumber = ...
ratios = ...

sloppiest = ...;   (* Is it the first row or the first column? *)
sloppyPolynomial[x_]:= Sum[... x^n,{n,0,M}]
sloppyPolynomial[x]
Plot[...]