
File RectangleRule.m
function [ I ] = RectangleRule ( Fun, a, b, N )
dx = ( b ā a ) / ( N ā 1 );
I = 0.0;
for i = 1 : Nā1
x = a + ( i ā 0.5 ) * dx ;
I = I + Fun ( x );
end
I = I * dx ;
end
Problem 4: Find the value of the integral
PayPal Gateway not configured
PayPal Gateway not configured