100 likes | 305 Views
Example of Fortran Use. Derivative , Integral and others. Andrzej Bartkowski (236584). Sieve of Eratosthenes. First we need to create array of N elements and fill it with zeros ( or false )
E N D
Example of Fortran Use Derivative,Integral and others Andrzej Bartkowski (236584)
Sieveof Eratosthenes First we need to createarray of N elements and fillit with zeros (orfalse) Next we need to do loop from i=2 to i= . In thisLoop We need to createanother one to removemuliplenumbers to changeit to ones. Last We need to printnumberswhere element of arraysarezeros
Derivative Mathematic formula: Two-Pointednumericalmethod: Three-Pointednumericalmethod
Derivative - plot Compare 2P and 3P for H=0.001 for polymal
Derivative - conclusion • Three Pointedmethodis much morebetterthanTwopointedmethodIf we use big h. WhenH issmallerthan 0.001 the difrenceissmaller. • Both methodsaredepends of H. Somtemies 2P isenoughtsometimesnote
NumericalIntegrate • Trapezemethod • Rectanglemethod