Question: Create a C program that... 2.1 Newton-Raphson Algorithm: Write a program that prompts the user to input the coefficients c5, c4, C3c2 The 5th order
Create a C program that...




2.1 Newton-Raphson Algorithm: Write a program that prompts the user to input the coefficients c5, c4, C3c2 The 5th order polynomial has the form , co of a 5th-order polynomial We know that the first derivative of y with respect to x is dx We can use this information to find the roots of the polynomial. The basic idea, in the Newton-Raphson method, is as follows: (a) Given an initial guess x, and polynomial coefficients c, calculate y (b) Check to see if y is close enough to zero, i.e. within some small tolerance close to zero (i) If so then terminate. Algorithm has converged! (ii) If not then continue (c) Use the current value of x to calculate y' (d) Create a new guess for x using the update formula x-x- (e) Increment a counter to count the number of algorithm iterations (f) Check to see if the number of iterations has exceeded a predetermined count limit (say 500) (i) If so then terminate. Algorithm has failed! (ii) If not then return to step a We would like to use 7 different initial guesses to test the Newton-Raphson algorithm; XInitialGuess -10000,-1000,-100, 0, 100, 1000, 10000) Thus your code will need to loop around the Newton-Raphson algorithm 7 times, once for each initial guess This same information is described in the flow chart below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
