We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9
CSE 325
Numerical Methods
Sadia Tasnim Barsha
Lecturer, CSE, SU Newton-Raphson Method Let x0 be an approximate root of f (x) = 0 and let x1 = x0 + h be the correct root so that f (x1) = 0. Expanding f (x0 + h) by Taylor’s series, we obtain f (x0) + h f ’(x0) + h2/2! f ’’(x0) + ….. = 0 Neglecting the second and higher order derivatives, we have f (x0) + h f ’(x0) = 0 which gives h = - f (x0) / f ’(x0) A better approximation than x0 is therefore given by x1, where x1 = x0 - f (x0) / f ’(x0) Successive approximations are given by x2, x3, x4, …., xn+1, where Xn+1 = xn - f (xn) / f ’(xn) which is called the Newton-Raphson formula. The process will be continued till the absolute difference between two successive approximations is less than the specified error E i,e, | Newton-Raphson Method ■ Algorithm: Newton-Raphson Method 1.Assign an initial value for x, say x0 and stopping criterion E. 2.Compute f (x0) and f ‘(x0). 3.Find the improved estimate of x0 4.x1 = x0 – f (x0) / f ’(x0) 5.Check for accuracy of the latest estimate. 6.If | x1-x0 | < E then stop; otherwise continue. 7.Replace x0 by x1 and repeat steps 3 and 4. Newton-Raphson Method Example: Find the root of the equation f (x) = x2 – 3x + 2 using Newton-Raphson method. Solution: Here, f ’(x) = 2x – 3 Let x1 = 0 (First approximation) x2 = x1 – f (x1) / f ’(x1) = 0 – 2 / (-3) = 2/3 = 0.6667 Similarly, x3 = 0.6667 – 0.4444/-1.6667 = 0.9333 x4 = 0.9333 – 0.071/-1.334= 0.9959 x5 = 0.6667 – 0.0041/-1.0082 = 0.9999 x6 = 0.6667 – 0.0001/-1.0002 = 1.0000 Since f (1.0) = 0, The root closer to the point x = 0 is Newton-Raphson Method Limitations of Newton-Raphson method The Newton-Raphson method has certain limitations and pitfalls. The method will fail in the following situations. ■ Division by zero may occur if f ’(xi) is zero or very close to zero. ■ If the initial guess is too far away from the required root, the process may converge to some other root. ■ A particular value in the iteration sequence may repeat, resulting in an infinite loop. This occurs when the tangent to the curve f (x) at x = xi+1 cuts the x-axis again at x = xi. End