The below code is for Q1, does anybody know how I could possible edit it so that it could apply to Q2?
" clear all;
n = 80;
a = 0; b = 1;
h = (b-a)/n;
x = linspace(a,b,(n+1));
integral = h.*sum(exp(x(1:n))) "
This is for e^x between 0 and 1
Are you going to achieve yours?