Can anyone sohw me how to do Riemann Integrals Sums on matlab.
The question I have to do is this:
Using Matlab, calculate an approximation for the definite integral of
g(x)
= 2 − x^3 on the interval [0,4] using 100 equal subintervals.
What I do is use the command
rsums(2-x^3,0,4)
Then I move the bottom to 100 (so that there are 100 subintervals) And on the top it gives me -13.999200
Is this right? It doesnt seem right. Shouldnt the approximation be closer to -56 (which is what the exact signed area is)? And is there any other way to do it?