Bisection method in pascal 
Author Message
 Bisection method in pascal

        As I know the bisection is used to find the zero point of function. Generally it's based on checking of the sign (positive/negative) of function in specific place. Firstly You have to guess in what range a change of the sign may occur. Then check value of function with both of extreme values from this range. If the sign has changed (positive/negative) it means that the range is correct (if not then we must enlarge it). Now we it's time to bisect our range. If we do it we'll have two sections left and right. Now take the number from the middle of range, we check value of our function with middle digit. If the sign of value of function differs from left extreme sign of value it means that the change occured in left part of our range in other case it means that the change occured in the right part. Now You have to only bisect the range to decrease it to as little as You want.

Example:
1. our function is y=x^3
2. we take range from -1000 to  +1000
3 check both of them

left_x:=-1000;
y_left:=left_x*left_x*left_x;        { exp(3*ln(1000))     -  e^3*ln(1000)  }

and also

right_x:=-1000;
y_right:=exp(3*ln(right_x));

4. now check if the sign has changed
5. if it has, bisect the range

left_x:=(left_x+right_x)/2    { or  right_x:=(left_x+right_x)/2 }

6. check the value of function with new left range value

y_left:=exp(3*ln(left_x))

7. If sign differs from the right extem value of function bisect range left_x  - right_x otherwise bisect previous left - current left.

        Probably I could make some mistakes in mathematical nomenclature, but I hope You will understand it. If not mailme.

                                                Good luck

_________________________________________________________________

http://www.*-*-*.com/



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. -> Bisection Method In Pascal

2. -> Bisection Method In Pascal

3. Transaction Methods in Interbase using Delphi 3.0 -Problems in commit-rollback methods

4. Borland Turbo Pascal Numerical Method's Toolbox

5. Pascal & Formal Methods

6. A Web Site for Numerical Methods in Pascal

7. A Web Site for Numerical Methods in Pascal

8. Fastest method of multiple integration?

9. overiding static methods in Delphi 1.0

10. How to connect progress bar to addindex method

11. Need help: got error trying to override a virtual method

12. How to use Connect method in TReport?

 

 
Powered by phpBB® Forum Software