Converting equations to Fortran code

  • Topic: Fortran 
  • Thread starter jf22901
  • Start date
  • Tags Tags
    Code Fortran
1 reply · 5K views · last reply
jf22901
Messages
55
Reaction score
1
Hi everyone

I've been doing maths for quite a while now, but have never done any programming until recently. What I'm finding difficult is how you go from an initial value/boundary value problem on a bit of paper to a piece of code that will approximate the equation. I've done a bit of book work on numerical methods (Euler’s midpoint/trapezoidal methods, Runge–Kutta methods) so understand the basics, but would like a more thorough knowledge.

Can anyone suggest any good sites/documents/books that give examples or explanations? Searching online brings up loads of pre-prepared Fortran codes to solve all sorts of things, but I want to know how these codes were created, why they chose the methods they did etc.

Thanks very much in advance. :smile:
 
Most numerical analysis books offer pretty easy sample programs and tutorials on how to program those exact problems. Finding the area under the curve via an integral is simply a do-loop in FORTRAN. If you narrow your step size, you should get a reasonably accurate result.