function y=simp(a,b,N)
h=(b-a)/N;
y=f(a)+f(b);
x=a-h;
for i=2:2:N
   x=x+2*h;
   y=y+4*f(x);
end
x=a;
for i=3:2:N-1
   x=x+2*h;
   y=y+2*f(x);
end
y=y*h/3;

