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