Question: Given an approximation xn 1 to a root of a function f ( x ) , the Newton - Raphson method tries to find a

Given an approximation xn1 to a root of a function f (x), the Newton-Raphson method
tries to find a better approximation to the root by computing
xn = xn1
f (xn1)
f (xn1)
where f (x) is the derivative of f (x).
The Newton-Raphson method computes an approximation to a root as follows:
1. An appropriate initial extimate of the root x0 and error tolerance \epsi are selected.
2. If the current estimate xi is within the preselected error tolerance of the root, this is returned
as the final estimate. This can be checked by seeing if the function changes sign in the interval
[xi \epsi , xi \epsi ].
3. A revised estimate of the root is calculated using the above formula and step 2 is repeated, using the
revised estimate.
In a new worksheet and module, within the same workbook complete the following steps.
Use Excel to graph the function f (x)=(x 1)5(x 2)3 over an appropriate interval using
200 steps.
Write code to implement the Newton-Raphson method.
You should use \epsi =105 as your tolerance.
Your code should ask the user for values of x0 and \epsi (either from the spreadsheet or using input
boxes) and display the final approximation and the number of iterations computed (either on the
spreadsheet or using a message box).
Use your code to estimate the root of the function.
Note f (x)=5(x 1)43(x 2)2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!