(adsbygoogle = window.adsbygoogle || []).push({}); [SOLVED] Riemann Sum with Fortran 90

My assignment: Use Reimann Sums to estimate pi to 6 decimal places (ie: you can stop when successive iterations yield a change of less than 0.000001. For the Reimann Sums solution, an iteration equals 2X the number of segments as the trial before. Print out the results and number of iterations.

So, I'm trying the best way to do this. We're supposed to use a unit circle, so the equation for a circle will be 1 = (x^2+y^2)^.5

I'm not that good at Fortran, but I've started part of it. This assignment is really confusing me, I just don't know if the start I have is even going to work. If there's anyone that can point me in the right direction, that'd be great.

PROGRAM riemann

IMPLICIT NONE

REAL,PARAMETER::lower=0.0, upper=1.0

REAL::dx,x,y

integer::i

y=0.0

x=0.0

dx=(upper-lower)/i

DO i=1,i*2

y=(1-x**2)**.5

x=x+dx

?

?

END DO

END PROGRAM

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

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

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

# Riemann Sum with Fortran 90

Loading...

Similar Threads for Riemann Fortran | Date |
---|---|

If statement for Monte Carlo integration | Apr 15, 2018 |

C/++/# How to use C++ in studying calculus | Apr 3, 2018 |

Fortran How to buy Fortran Programming Software Commersial License | Jan 30, 2018 |

Fortran Fortran for Computational Fluid Dynamics Problems | Jan 11, 2018 |

Fortran Riemann Sum | Nov 16, 2009 |

**Physics Forums - The Fusion of Science and Community**