Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Polynomial root calculations Create a C program using an array. 2.1 Newton-Raphson Algorithm: Write a program that prompts the user to input the coefficients cs,

Polynomial root calculations

Create a C program using an array.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

2.1 Newton-Raphson Algorithm: Write a program that prompts the user to input the coefficients cs, c4, C3, c2, ci, co of a 5-order polynomial The 5ih order polynomial has the form We know that the first derivative of y with respect tois d.r We can use this information to find the roots of the polynomial. The basic idea, in the Newton-Raphson mcthod, is as follows: (a) Given an initial guess , and polynomial cocfficients c, calculate y (b) Check to see if y is close enough to zero, i.c. within some small tolerance close to zero (i) If so then terminate. Algorithm has converged! (ii) If not then continue (c) Usc the current value of a 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) y' (i) If so then terminatc. Algorith (ii) If not then return to step a has failed! We would like to use 7 different initial guesses to test the Newton-Raphson algorithm; XInitalGuess -10000, -1000,-100, 0, 100, 1000, 10000) Thus your code will need to loop around the Newton-Raphson algorithm 7 times, once for cach initial guess This same information is described in the flow chart below

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions