Professional Documents
Culture Documents
Manas Ku Mishra, Asst. Prof. of Comp. Sc., FM (A) College, BLS. Page 1 of 5
Update for
Iteration a b c = (a+ b)/2 f(c) the next
iteration
1 1 2 1.5 −0.125 a=c
2 1.5 2 1.75 1.6093750 b=c
3 1.5 1.75 1.625 0.6660156 b=c
4 1.5 1.625 1.5625 0.2521973 b=c
5 1.5 1.5625 1.53125 0.0591125 b=c
6 1.5 1.53125 1.515625 −0.0340538 a=c
7 1.515625 1.53125 1.5234375 0.0122504 b=c
8 1.515625 1.5234375 1.5195313 −0.0109712 a=c
9 1.5195313 1.5234375 1.5214844 0.0006222 b=c
10 1.5195313 1.5214844 1.5205078 −0.0051789 a=c
After 10 iterations, it becomes apparent that there is a convergence to about
1.52 which is a root for the polynomial.
Regula−Falsi method: This
method is also known as false
position method. The regula
falsi method calculates solution
by joining the line segment between
the endpoints (a, b) for which
f(a).f(b)<0.
f(b) - f(a)
Slope = ---------(1)
b-a
Equating (1) and (2) we get,
Using points (c, 0) and (b, f(b)) f(b) - f(a) f(b) - 0
= -----------------(3)
b-a b-c
f(b) - 0
Slope = ------------(2)
b-c
Manas Ku Mishra, Asst. Prof. of Comp. Sc., FM (A) College, BLS. Page 2 of 5
(b – c)(f(b) – f(a)) = bf(b) – af(b)
b(f(b) – f(a)) – c(f(b) – f(a)) = bf(b) – af(b)
–c(f(b) – f(a)) = bf(b) – af(b) – b(f(b) – f(a))
c(f(b) – f(a)) = –bf(b) + af(b) + b(f(b) – f(a))
c(f(b) – f(a)) = –bf(b) + af(b) + bf(b) - bf(a)
c(f(b) – f(a)) = af(b) – bf(a)
af(b) – bf(a)
c=
f(b) – f(a)
At iteration number k, the number ck is calculated as above and then,
if f (ak) and f (ck) have the same sign, set ak + 1 = ck and bk + 1 = bk, otherwise set ak +
1 = ak and bk + 1 = ck. This process is repeated until the root is approximated
sufficiently well.
Example: Find a root of an equation f(x) = 2x3 - 2x - 5 using Regula-Falsi method.
Solution: Now, f(1) = -5 which is -ve and f(2) = +7 which is +ve. So the root lies
between [1, 2].
Update
(af(b) – bf(a)) for the
iteration a f(a) b f(b) c = f(c)
(f(b) – f(a)) next
iteration
1 1 –5 2 7 1.41667 –2.14699 a=c
2 1.41667 –2.14699 2 7 1.55359 –0.60759 a=c
3 1.55359 –0.60759 2 7 1.58924 –0.15063 a=c
4 1.58924 –0.15063 2 7 1.59789 –0.0361 a=c
5 1.59789 –0.0361 2 7 1.59996 –0.00858 a=c
6 1.59996 –0.00858 2 7 1.60045 –0.00203 a=c
7 1.60045 –0.00203 2 7 1.60056 –0.00048 a=c
So the root of the equation using False Position mehtod is 1.60056
Newton−Raphson method (or Newton’s method):
Manas Ku Mishra, Asst. Prof. of Comp. Sc., FM (A) College, BLS. Page 3 of 5
Procedure:
Step-1: We find the interval (a, b) containing the solution (called root) of the equation
f(x) = 0 .
Step-2: Let x = x0 be initial guess or initial approximation to the equation f(x) = 0
Step-3: We use xn+1 = xn - [f(xn) / f΄(xn)] as the successive formula to find
approximate solution (root) of the equation f(x) = 0
Step-4: Then x1 , x2 , x3 ............ and so on are calculated and we will continue this
process till we get root of the equation f(x) = 0 up to desired accuracy.
Example: Use Newton−Raphson method to find the root of the function f(x) = x 2−10.
Solution: Now f(3) = -1 and f(4) = +6. So the root lies between [3, 4]
f’(x) = 2x;
f(x) / f’(x) = (x2−10) / (2*x)
Let x0 = 3;
We know xn+1 = xn − f(xn) / f΄(xn)
x1 = 3 – (9 – 10) / 6 = 3 + 1 / 6 = 3.166667
x2 = 3.166667−(3.1666672−10) / (2 * 3.166667) = 3.162281
x3 = 3.162281−(3.1622812−10) / (2 * 3.162281) = 3.162278
Manas Ku Mishra, Asst. Prof. of Comp. Sc., FM (A) College, BLS. Page 4 of 5
So the formula for Secant method can be written as
f(xn)
xn+1 = xn –
[f(xn) - f(xn-1) ] / (xn - xn-1)
xn+1 = xn - f(xn) * (xn - xn-1) / (f(xn) - f(xn-1))
xn+1 = (xn * (f(xn) - f(xn-1)) - f(xn) * (xn - xn-1)) / (f(xn) - f(xn-1))
xn+1 = (xn * f(xn) - xn * f(xn-1) - xn * f(xn) + xn-1 * f(xn)) / (f(xn) - f(xn-1))
xn+1 = (xn-1 * f(xn) - xn * f(xn-1)) / (f(xn) - f(xn-1))
af(b) – bf(a)
c= This formula is same as regula-falsi method.
f(b) – f(a)
Manas Ku Mishra, Asst. Prof. of Comp. Sc., FM (A) College, BLS. Page 5 of 5