Hello, for my FORTRAN class it wants me to use the method of Riemann's sums to find the area under the curve for the function f(x) = -(x-3)**2 +9, and stop when successive iterations yield a change of less than 0.0000001. I know im going to have to used double precision. Im just confused on how to set it up. This is what I am thinking...(adsbygoogle = window.adsbygoogle || []).push({});

Im going to need a loop from 1 to count, then my deltaX will be upperbound-lowerbound/count.

Then Inside that do loop im going to need another one that does from 1 to 6 by iterations of deltaX. Then I am going to need to compute the Area(where I am stumped). After that I am going to want to say if the area after minus the area before is greater then 0.0000001 then count=count + 1. So far this is what my do loops look like. Im just wondering if i am headed in the correct direction of not? Can anyone help me please?!?!

DO I=1,COUNT,1

deltaX = (upperBOUND-lowerBOUND)/COUNT

DO J = 0,6,deltaX

F_X=-(J-3)**2 + 9

ENDDO

ENDDO

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Riemann Sum

**Physics Forums | Science Articles, Homework Help, Discussion**