INTRODUCTION:
THEORY:
Note::Theorem (Bolzano) : If the function f(x) is continuous in [a, b] and f(a)f(b) < 0 (i.e. f(x) has opposite signs signs at a and b) then a value c ∈ (a, b) exists such that f(c) = 0.
Now after this bisection method used the midpoint of the interval [a, b] as the next iterate to converge towards the root of f(x).
A better approximation is obtained if we find the point (c, 0) where the secant line L joining the points (a, f (a)) and (b, f (b)) crosses the x-axis (see the image below). To find the value c, we write down two versions of the
slope m of the line L:
We first use points (a, f (a)) and (b, f (b)) to get equation 1 (below), and then use the points (c, 0) and (b, f (b)) to get equation 2 (below). Equating these two equation we get equation 3 (below) which is easily solved for c to get equation 4 (below):
The three possibilities are the same as before in the bisection method:
- If f (a) and f (c) have opposite signs, a zero lies in [a, c].
- If f (c) and f (b) have opposite signs, a zero lies in [c, b].
- If f (c) = 0, then the zero is c.
Working Rules:
- Find Points x0 and x1such that x0< x1and f(x0).f( x1) < 0
- Take the interval [x0, x1] and find next value x2= x0-f( x0).(( x1- x0)/f( x1)-f( x0))
- If f(x2)=0 then x2is an exact root.
- If f(x1).f(x2) < 0 then x1= x2
- If f(x0).f(x2) <0 then x0= x2
- Repeat the step 2-5 until f(xi)=0 or f(x0)≤ Accuracy
Solution:
Here x3-x-1=0
Let f(x)=x3-x-1
x | 0 | 1 | 2 |
---|---|---|---|
f(x) | -1 | -1 | 5 |
Here f(1)=-1<0 and f(2)=5>0
∴ Now, Root lies between x0=1 and x1=2
x2=1-(-1)⋅(2-1)/(5-(-1))
x2=1.16667
f(x2)=f(1.16667)=-0.5787<0
Approximate root of the equation x3-x-1=0 using False Position method is 1.32464