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 lagrangian_polynomial
IMPLICIT NONE
REAL::x(4),y(4),s=0.0,p,k
INTEGER::i,j,n
PRINT *, "============================================"
PRINT *, "Program for Lagrange interpolation method - [BY - www.BottomScience.com]"
PRINT *, "============================================"
!POINTS
x = (/ 3.35,3.40,3.50,3.60 /)
y = (/ 0.2985,0.294118,0.285714,0.277778 /)
PRINT *,'LAGRANGE INTERPOLATION'
PRINT *,'Number of terms?'
READ(*,*)n
PRINT *,'ENTER THE DATA POINT TO CALCULATE THE VALUE OF POLYNOMIAL'
READ(*,*)k
DO i=1,n
p=1.0
DO j=1,n
IF(i .ne. j) THEN
p=p*((k-x(j))/(x(i)-x(j)))
END IF
END DO
s=s+(p*y(i))
END DO
PRINT *,"CALCULATED VALUE OF POLYNOMIAL - ",s
END PROGRAMFortran 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)