
clc
div = 1000
x = linspace(0, 20, div+1)
area_tot = 0
for i = 1:div
disp("-----------")
xi = x(i)
xf = x(i+1)
xm = (xi+xf)/2
ym = -xm^2+15*xm+100
base = xf-xi
area_dov = base*ym
area_tot = area_dov + area_tot
end
clc
div = 1000
x = linspace(0, 20, div+1)
area_tot = 0
for i = 1:div
disp("-----------")
xi = x(i)
xf = x(i+1)
xm = (xi+xf)/2
ym = -xm^2+15*xm+100
base = xf-xi
area_dov = base*ym
area_tot = area_dov + area_tot
end