Hi, since riemann sum is all about adding smaller divided rectangles below the graph. I developed a code which calculates the difference between present sum and previous sum, when the difference is greater than 1e-5, the code must store the number of rectangles(terms) added to reach the difference and store the number of terms in n. c is the final area, the problem is that my code is not giving me the number of divisions nor the difference between sums, please help me find the (1).difference between sums and (2).the number of rectangles/divisions when the difference is greater than 1e-5
format longGsyms xf = 2*pi*(0.16*(0.25-(x-1)^2)+44.52)*(1+(-0.32*x - 0.32)^2)^1/2;a = int(f,5,17.688);b = sym(a);c = double(b)if diff(c) > 0.00001 n = length(c)end
Best Answer