function [I] = rightsum(f,a,b,n)

dx = (b-a)/n;
x=linspace(a,b,n+1);
I=0;
for i=2:n+1
 I = I + feval(f,x(i))*dx;
end
