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 secant IMPLICIT NONE REAL::f,ea=6,es=1,x0,x1,x2 INTEGER::c=0 PRINT *, "============================================" PRINT *, "PROGRAM TO FIND ROOTS USING - SECANT METHOD [BY - www.BottomScience.com]" PRINT *, "============================================" PRINT *,'Initial approximation?' read(*,*)x0,x1 DO WHILE(ea>es) x2=x1-((x1-x0)/((f(x1))-(f(x0))))*f(x1) ea=abs(((x1-x0)/x1)*100) x0=x1 x1=x2 c=c+1 IF(c>50) EXIT PRINT *,'Current root is',x1 WRITE(1,*) x1 END DO IF(x1 > 3E+38 .OR. x1 < -3E+38) THEN PRINT *,'WRONG INTIAL APPROXIMATION' ELSE PRINT *,'FINAL ROOT IS',x1 END IF END PROGRAM REAL function f(x1) REAL::x1 f=(x1**2)-3 RETURN END FUNCTION
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)