New Member FAQ
|
Forums
|
Earn Revenue
|
Distance Education
|
Help Topics
|
Admissions 2013
Login
Register
Articles
Practice Tests
Ask Experts
Question Papers
Jobs
Universities
Colleges
Courses
Schools
Gift Shop
|
Bookmarks
|
Reviews
|
Learn English
|
Social Hub
|
Training
|
New Posts
|
My India
|
Members
|
Polls
|
Active Members
Today
Dushyant Joshi
(405)
Dhairya Khant
(140)
Chetan Markand...
(130)
Last 7 Days
R Pramod
(1156)
K Mohan
(719)
Dipak
(500)
more...
Resources
»
Articles/Knowledge Sharing
»
Computer & Technology
understanding simpsons 1/3rd rule using Fortran for integration
Posted Date:
12-Mar-2008
Category:
Computer & Technology
Author:
ashish singh
Member Level:
Gold
Points
: 4
Numerical integration using simpsons 1/3rd rule
The general problem of Numerical Integration may be stated as follows. Given a set of data points (x0,y0),(x1,y1),(x2,y2)……….(xn,yn) of a function y=f(x), where f(x) is not known explicitly, it is required to compute the value of the definite integral.
Simpson`s 1/3 Rule is also used for solving Numerical Integration problem and it is also same as the Trepezoisdal Rule including some differences.
In Simpson`s 1/3 Rule the value of dependent variable i.e. y0,y1,y2….. yn which are actually the functional value of independent variablex0,x1,x2……..xn which are increases by h in every step.
After creating table of using following formula we can solve the given Numerical Integation problem.
I=(h*(y0+4(y1+y3+y5…………)+2*(y2+y4+y6……….)+yn))/3
The required condirion for this rule is n must be multiple of 3 where n is number of strips.
Fortran Program for Simpson`s 1/3-Rule :
C PROGRAM FOR SIMPSON'S 1/3 RULE
FUNTION F(X)
F=1/(1+X)
RETURN
END
WRITE(*,*)'ENTER UPPER AND LOWER LIMIT'
READ(*,*)A,B
WRITE(*,*)'ENTER THE NUMBER OF INTERVALS'
READ(*,*)N
H=(B-A)/N
SUM=F(A)+F(B)
D=4
DO 5 I=1,N-1
X=A+I*H
SUM=SUM+D*F(X)
D=6-D
5 CONTINUE
S=H/3*SUM
WRITE(*,*)'INTEGRAL=',S
END
Output
SIMPSON’S 1/3 RULE
D:\FORTRAN\BINB>FL SIMP13.FOR
Microsoft (R) FORTRAN Optimizing Compiler Version 5.10
Copyright (c) Microsoft Corp 1982-1991. All rights reserved.
SIMP13.FOR
Microsoft (R) Segmented-Executable Linker Version 5.15
Copyright (C) Microsoft Corp 1984-1991. All rights reserved.
Object Modules [.OBJ]: SIMP13.OBJ
Run File [SIMP13.exe]: SIMP13.EXE
List File [NUL.MAP]: NUL
Libraries [.LIB]:
Definitions File [NUL.DEF]: ;
D:\FORTRAN\BINB>SIMP13
ENTER UPPER AND LOWER LIMIT
0
5
ENTER THE NUMBER OF INTERVALS
10
INTEGRAL= 1.793170
D:\FORTRAN\BINB>SIMP13
ENTER UPPER AND LOWER LIMIT
0
4
ENTER THE NUMBER OF INTERVALS
9
INTEGRAL= 1.579433
Did you like this resource? Share it with your friends and show your love!
Tweet
Responses to "understanding simpsons 1/3rd rule using Fortran for integration"
No responses found. Be the first to respond...
Feedbacks
Post Comment:
Notify me by email when others post comments to this article.
Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
No HTML formatting and links to other web sites are allowed.
This is a strictly moderated site. Absolutely no spam allowed.
Name:
Sign In
to fill automatically.
Email:
(Will not be published, but
required
to validate comment)
Type the numbers and letters shown on the left.
Next Resource:
understanding Trapezoidal Rule using Fortran
Previous Resource:
Uses of DBMS in different sectors:
Return to Resources
Post New Resource
Category:
Computer & Technology
Post resources and
earn money
!
More Resources
understanding Trapezoidal Rule using Fortran
understanding Lagranges Interpolation in Numerical Analysis
understanding interpolation using Fortran
Solving Regula Falsi Method using Fortran
solving Newton Raphson Method using Fortran
UNDERSTANDING BISECTION METHOD USING FORTRAN
Popular Tags
Tag posting guidelines
Search Tags
(No tags found.)
Subscribe to Email
Get Jobs by Email
Forum posts by Email
Articles by Email
Awards & Gifts
Online Members
prashant ingole
Hafeez
amit
sameer ahamed
ghanshyam krishn
indira priyadarsini
sajithsankar
Saumya Lakhotia
Hafeezur Rahman P
Adesola Adeyeye
satyendra
More...