Fortran Programming
Numerical Methods
- Bisection Method
- Regula Falsi (False Position)
- Newton Raphson Method
- Secant method
- Newton Raphson – Non-Linear Equations
- Gauss Elimination Method
- Gauss Elimination Method (With Pivoting)
- Gauss Jordan Method
- Gauss Elimination – Determinant
- Gauss Jordan – Inverse Matrix
- Lagrange Interpolation
- Newton Divided Interpolation
- Newton Forward Interpolation
- Least Square Fitting
- Trapezoidal Rule
- Simpson 1/3rd Rule
- Simpson 3/8 Rule
- Euler’s Method
- Euler’s Modified Method
- Runge Kutta’s (2nd Order)
- Runge Kutta’s (4th Order)
PROGRAM nr IMPLICIT NONE REAL::f,g,ea=6,es=1,x1,x0 INTEGER::c=0 PRINT *, "============================================" PRINT *, "PROGRAM TO FIND ROOTS USING - NEWTON RAPHSON METHOD [BY - www.BottomScience.com]" PRINT *, "============================================" PRINT *,'INITIAL APPROXIMATION?' READ(*,*)x0 DO WHILE(ea>es) x1=x0-((f(x0))/(g(x0))) ea=abs(((x1-x0)/x1)*100) x0=x1 c=c+1 IF(c>50) EXIT PRINT *,'CURRENT ROOT IS',X1 END DO PRINT *,'FINAL ROOT IS',X1 END PROGRAM REAL function f(x1) REAL::x1 f=(x1**2)-3 RETURN END FUNCTION REAL function g(x2) REAL::x2 g=2*x2 RETURN END FUNCTION
OUTPUT
============================================ PROGRAM TO FIND ROOTS USING - NEWTON RAPHSON METHOD [BY - www.BottomScience.com] ============================================ INITIAL APPROXIMATION? 1 CURRENT ROOT IS 2.00000000 CURRENT ROOT IS 1.75000000 CURRENT ROOT IS 1.73214281 CURRENT ROOT IS 1.73205078 FINAL ROOT IS 1.73205078 ------------------ (program exited with code: 0) Press any key to continue . . .
Fortran Programming
Numerical Methods
- Bisection Method
- Regula Falsi (False Position)
- Newton Raphson Method
- Secant method
- Newton Raphson – Non-Linear Equations
- Gauss Elimination Method
- Gauss Elimination Method (With Pivoting)
- Gauss Jordan Method
- Gauss Elimination – Determinant
- Gauss Jordan – Inverse Matrix
- Lagrange Interpolation
- Newton Divided Interpolation
- Newton Forward Interpolation
- Least Square Fitting
- Trapezoidal Rule
- Simpson 1/3rd Rule
- Simpson 3/8 Rule
- Euler’s Method
- Euler’s Modified Method
- Runge Kutta’s (2nd Order)
- Runge Kutta’s (4th Order)