function y=fs(n,l)
x= ((1:n+1)-1)*l/n;
y=0;
for k=1:n
    y=y+x(k+1)^2*(x(k+1)-x(k));
end