1. Algorithm & Example-1 `f(x)=x^3-x-1`
Algorithm
False Position method (regula falsi method) Steps (Rule)
|
Step-1:
|
Find points `x_0` and `x_1` such that `x_0 < x_1` and `f(x_0) * f(x_1) < 0`.
|
Step-2:
|
Take the interval `[x_0, x_1]` and
find next value using
Formula-1 : `x_2=x_0-f(x_0)*(x_1-x_0)/(f(x_1)-f(x_0))`
or Formula-2 : `x_2=(x_0*f(x_1)-x_1*f(x_0))/(f(x_1)-f(x_0))`
or Formula-3 : `x_2=x_1-f(x_1)*(x_1-x_0)/(f(x_1)-f(x_0))`
(Using any of the formula, you will get same x2 value)
|
Step-3:
|
If `f(x_2) = 0` then `x_2` is an exact root,
else if `f(x_0) * f(x_2) < 0` then `x_1 = x_2`,
else if `f(x_2) * f(x_1) < 0` then `x_0 = x_2`.
|
Step-4:
|
Repeat steps 2 & 3 until `f(x_i) = 0` or `|f(x_i)| <= "Accuracy"`
|
Example-1
1. Find a root of an equation `f(x)=x^3-x-1` using False Position method
Solution: Here `x^3-x-1=0`
Let `f(x) = x^3-x-1`
Here
`1^(st)` iteration :
Here `f(1) = -1 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1` and `x_1 = 2`
`x_2 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_2 = 1 - (-1) * (2 - 1)/(5 - (-1))`
`x_2 = 1.16667`
`f(x_2) = f(1.16667) = -0.5787 < 0`
`2^(nd)` iteration :
Here `f(1.16667) = -0.5787 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.16667` and `x_1 = 2`
`x_3 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_3 = 1.16667 - (-0.5787) * (2 - 1.16667)/(5 - (-0.5787))`
`x_3 = 1.25311`
`f(x_3) = f(1.25311) = -0.28536 < 0`
`3^(rd)` iteration :
Here `f(1.25311) = -0.28536 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.25311` and `x_1 = 2`
`x_4 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_4 = 1.25311 - (-0.28536) * (2 - 1.25311)/(5 - (-0.28536))`
`x_4 = 1.29344`
`f(x_4) = f(1.29344) = -0.12954 < 0`
`4^(th)` iteration :
Here `f(1.29344) = -0.12954 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.29344` and `x_1 = 2`
`x_5 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_5 = 1.29344 - (-0.12954) * (2 - 1.29344)/(5 - (-0.12954))`
`x_5 = 1.31128`
`f(x_5) = f(1.31128) = -0.05659 < 0`
`5^(th)` iteration :
Here `f(1.31128) = -0.05659 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.31128` and `x_1 = 2`
`x_6 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_6 = 1.31128 - (-0.05659) * (2 - 1.31128)/(5 - (-0.05659))`
`x_6 = 1.31899`
`f(x_6) = f(1.31899) = -0.0243 < 0`
`6^(th)` iteration :
Here `f(1.31899) = -0.0243 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.31899` and `x_1 = 2`
`x_7 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_7 = 1.31899 - (-0.0243) * (2 - 1.31899)/(5 - (-0.0243))`
`x_7 = 1.32228`
`f(x_7) = f(1.32228) = -0.01036 < 0`
`7^(th)` iteration :
Here `f(1.32228) = -0.01036 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.32228` and `x_1 = 2`
`x_8 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_8 = 1.32228 - (-0.01036) * (2 - 1.32228)/(5 - (-0.01036))`
`x_8 = 1.32368`
`f(x_8) = f(1.32368) = -0.0044 < 0`
`8^(th)` iteration :
Here `f(1.32368) = -0.0044 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.32368` and `x_1 = 2`
`x_9 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_9 = 1.32368 - (-0.0044) * (2 - 1.32368)/(5 - (-0.0044))`
`x_9 = 1.32428`
`f(x_9) = f(1.32428) = -0.00187 < 0`
`9^(th)` iteration :
Here `f(1.32428) = -0.00187 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.32428` and `x_1 = 2`
`x_10 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_10 = 1.32428 - (-0.00187) * (2 - 1.32428)/(5 - (-0.00187))`
`x_10 = 1.32453`
`f(x_10) = f(1.32453) = -0.00079 < 0`
`10^(th)` iteration :
Here `f(1.32453) = -0.00079 < 0` and `f(2) = 5 > 0`
`:.` Now, Root lies between `x_0 = 1.32453` and `x_1 = 2`
`x_11 = x_0 - f(x_0) * (x_1 - x_0)/(f(x_1) - f(x_0))`
`x_11 = 1.32453 - (-0.00079) * (2 - 1.32453)/(5 - (-0.00079))`
`x_11 = 1.32464`
`f(x_11) = f(1.32464) = -0.00034 < 0`
Approximate root of the equation `x^3-x-1=0` using False Position method is `1.32464`
`n` | `x_0` | `f(x_0)` | `x_1` | `f(x_1)` | `x_2` | `f(x_2)` | Update | 1 | 1 | -1 | 2 | 5 | 1.16667 | -0.5787 | `x_0 = x_2` | 2 | 1.16667 | -0.5787 | 2 | 5 | 1.25311 | -0.28536 | `x_0 = x_2` | 3 | 1.25311 | -0.28536 | 2 | 5 | 1.29344 | -0.12954 | `x_0 = x_2` | 4 | 1.29344 | -0.12954 | 2 | 5 | 1.31128 | -0.05659 | `x_0 = x_2` | 5 | 1.31128 | -0.05659 | 2 | 5 | 1.31899 | -0.0243 | `x_0 = x_2` | 6 | 1.31899 | -0.0243 | 2 | 5 | 1.32228 | -0.01036 | `x_0 = x_2` | 7 | 1.32228 | -0.01036 | 2 | 5 | 1.32368 | -0.0044 | `x_0 = x_2` | 8 | 1.32368 | -0.0044 | 2 | 5 | 1.32428 | -0.00187 | `x_0 = x_2` | 9 | 1.32428 | -0.00187 | 2 | 5 | 1.32453 | -0.00079 | `x_0 = x_2` | 10 | 1.32453 | -0.00079 | 2 | 5 | 1.32464 | -0.00034 | `x_0 = x_2` |
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|