Login
Register
New Members

Earn Revenue

Help
Forum
Articles
Practice Tests
Ask Experts
Question Papers
Jobs
Universities
Colleges
Courses
Schools
Reviews

Learn English

Gift Shop

Social Hub

Training

New Posts

My India

Members

Post Content

Resources
»
Articles/Knowledge Sharing
»
Computer & Technology
UNDERSTANDING BISECTION METHOD USING FORTRAN
Posted Date: 12Mar2008
Last Updated:
12Mar2008
Category:
Computer & Technology
Author:
ashish singh
Member Level:
Gold
Points
: 4
BISECTION METHOD
Bisection Method is very simple and convenient method for solving all types of Algebric and Transcendental Equation.
Let us suppose the equation to be solved be f(x) =0. This is the general form of the equation. Here we have to find the value of x for which f(x) becomes zero. To understand the bisection method first of all we consider any two arbitrary point x1 & x2 such that f(x1) & f(x2) opposite signs. Clearly the solution will be in the range x1x2. To find the next approximation in the method we get the middle most point of the interval given by m=(x1+x2)/2. If f(m)~0 then m is the solution otherwise the sign of f(m) is compared with the sign of f(x2). If the sign of both is same then x1 is shifted to m otherwise x2 is shifted to m. By this the range is reduced the earlier range by half. This process is evaluating the middle point, comparing the sign of f(m) with f(x1) ….etc. is repeated until we get f(m)~0. This value of m is the solution of given Equation. For example
Fortran Programs for Bisection Method:
C SOLUTION OF BISECTION METHOD
FUNCTION F(X)
F=2*X*X4*X+1
RETURN
END
2 WRITE(*,*)'ENTER TWO NUMBERS'
READ(*,*) X1,X2
IF(F(X1)*F(X2)) 3,4,2
4 IF(F(X1).EQ.0) THEN
WRITE(*,*)'SOLUTION=',X1
ELSE
WRITE(*,*)'SOLUTION=',X2
ENDIF
3 WRITE(*,*)'ENTER TOL'
READ(*,*) TOL
5 AM=(X1+X2)/2
Y=F(AM)
IF(ABS(Y).LE.TOL) THEN
WRITE(*,*)'SOLUTION=',AM
STOP
ELSE
IF(Y*F(X1).GT.0) THEN
X1=AM
ELSE
X2=AM
ENDIF
ENDIF
GO TO 5
END
Output
BISEC.FOR
Microsoft (R) SegmentedExecutable Linker Version 5.15
Copyright (C) Microsoft Corp 19841991. All rights reserved.
Object Modules [.OBJ]: BISEC.OBJ
Run File [BISEC.exe]: BISEC.EXE
List File [NUL.MAP]: NUL
Libraries [.LIB]:
Definitions File [NUL.DEF]: ;
D:\FORTRAN\BINB>BISEC
ENTER TWO NUMBERS
2
3
ENTER TWO NUMBERS
2
1
ENTER TOL
.005
SOLUTION= 1.707031
Stop  Program terminated.
Did you like this resource? Share it with your friends and show your love!
Tweet
Responses to "UNDERSTANDING BISECTION METHOD USING FORTRAN"
Guest Author: ravi punniyakoti 27 Feb 2013
sample program in fortran for bisection method and Bisection Method is very simple and convenient method for solving all types of Algebric and Transcendental Equation is helpful for me, thanks
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.
Submit Article
Return to
Article Index
Subscribe to Email
Get Jobs by Email
Forum posts by Email
Articles by Email
Awards & Gifts
Active Members
Today
R Pramod
(49)
Neha
(36)
Gypsy
(31)
Last 7 Days
R Pramod
(931)
K Mohan
(426)
Ashutosh
(382)
more...
Online Members
Chaitali Ray Chaudhuri (Datta)
Hafeezur Rahman P
deepasree
More...