Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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...

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 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

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

Students also viewed these Databases questions

Question

List and describe each of the components in the data hierarchy.

Answered: 1 week ago

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago