Problem 6.2.
Use (a) fixed-point iteration and (b) the Newton-Raphson method to determine a root of f(x) = -0.9x2 + 1.7x + 2.5 using x0 = 5. Perform the computation until εa is less than εs = 0.01%.
Solution:
(a) Firstly, rearrange the function so that x is on the left-hand side of the equation (x = g(x)). There are two ways to do so:
To identify which function results in convergence, we should check for the criterion |g'| < 1. For (i), |g'(5)| = 5.29. While for (ii), |g'(5)| = 0.27 < 1, where the error decreases with each iteration. Thus, function (ii) will result in convergence.
Starting with the initial guess of x0 = 5, the iterative equation (ii) can be applied to compute:
Therefore, after 9 iterations, the approximate error is reduced to less than 0.01% and the root estimate is 2.8602.
(b) Firstly, compute the first derivative of the function.
which can be substituted along with the original function to give
Starting with the initial guess of x0 = 5, the iterative equation can be applied to compute:
Hence, after 5 iterations, the approximate error falls below 0.01% and the root estimate is 2.8601.
Discussion:
As we can observe, the Newton-Raphson method rapidly converges on the true root. Note that the approximate percent relative error at each iteration decreases much faster than it does in simple fixed-point iteration. However, Newton-Raphson method is not recommended when there are functions whose derivatives are difficult to evaluate.
No comments:
Post a Comment