Wednesday - June 7, 2023

Fortran ~ Simpson’s 1/3rd Rule

Fortran ~ Simpson’s 1/3rd Rule

simpsons 13rd rule example, simpsons 13 rule ppt, simpsons 13 rule in c, simpsons 13 rule formula derivation, simpsons 13 rule calculator, simpsons 13rd rule and direct integration gives same results if, composite simpson's rule example, limitations of simpson's rule, simpson's rule matlab, simpson's rule formula for volume, solved examples of numerical integration, simpson's 3/8 rule matlab, simpson 1/3 rule algorithm,
Image Source ~ Crafted With ©Ishwaranand – 2020 ~ Image by ©Ishwaranand


Remarks Simpson’s 1/3rd Rule

PROGRAM SIMPSON
C
C         PROGRAM TO DEMONSTRATE APPLICATION OF SIMPSONS 1/3rd RULE
C
C        THIS PROGRAM NUMERICALLY INTEGRATES GIVEN EXPRESSION WITHIN
C        SPECIFIED LIMITS OF INTEGRATION
C
           F(X)=3.12*X**3+1.54*X**2-6.23
C
           WRITE (*,*)’LIMITS OF INTEGRATION (A,B)’
           READ(*,*)A,B
           WRITE(*,*)’NUMBER OF STRIPES(Number must be Even)’
           READ(*,*)NS
           IF(NS/2*2.NE.NS)THEN
           WRITE(*,*)’NUMBER OF STRIPES (must be Even)’
           WRITE(*,*)’PROGRAM TERMINATED…’
           STOP
            ENDIF
C         STRIP SIZE
            H=(B-A)/NS
            AREA=F(A)+F(B)
            DO 100 X=A+H,B-H,2*H
                  AREA=AREA+4.0*F(X)
100      CONTINUE
            DO 200 X=A+2*H,B-2*H,2*H
                  AREA=AREA+2.0*F(X)
200      CONTINUE
            AREA=AREA*H/3.0
            WRITE(*,*)’AREA UNDER THE CURVE=’,AREA
            STOP
            END

#OUTPUT

LIMIT OF INTEGRATION (A, B)
1 2
NUMBER OF STRIPS (Number must be Even)
2
AREA UNDER THE CURVE = 54.546665

Crafted by ISHWARANAND | Distributed by ISHWARANAND

Fortran ~ Trapezoidal rule

.