function integral = Hw5Num1f(a, b, N)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Returns the approximate integral of sin(x^2)
% from a to b with N steps, using the left hand rule.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% calculate the discretization step, assuming N is an integer
dx = (b - a)/N;
% create our result variable
integral = 0;
% loop over the elements in the sum
for k=0:(N - 1)
% calculate the location for our function evaluation
x = a + dx*k;
% add
integral = integral + sin(x^2)*dx;
end
return