
f=@(x) sin(x);
a=-1;
b=1;

degree=4;
px = legendre_polynomials (n,x);