format long e a=0; b=1; n=65; h=(b-a)/n; g=@(x) a+h*x; f=@(x) exp(-x); s=0; for j=1:n-1 s=s+f(g(j)); end t=h/2*(f(0)+2*s+f(1)); t