subject
Engineering, 21.02.2020 20:45 deniseelyons15

Problem 2: Polynomial Root Calculation Problem Description:

Engineers often need to calculate the roots to a given polynomial. For low order polynomials these computations can be done by hand. For higher order polynomials these calculations can be cumbersome, if not impossible, without a computer. One method of finding real roots of a polynomial is the Newton-Raphson algorithm.

In this homework we will write a program that uses the Newton-Raphson method for calculating the roots of a polynomial. Although our program will not be able to solve for complex roots, it will be able to calculate real roots; maybe later we will upgrade the routine to include complex roots. Since it is possible that the polynomial roots are all complex, i. e. no real roots at all, or it may be that the Newton-Raphson routine fails to converge.

(a) Newton-Raphson Algorithm:

Write a C program that prompts the user to input a set of 5th-order polynomial coefficients, of the form c5; c4; c3; c2; c1; c0. Also, the user will need to submit an initial value of x which serves as the starting condition of the Newton-Raphson algorithm.

The 5th-order polynomial has the form
y = c5 x5 + c4 x 4 + c3 x 3 + c2 x 2 + c1 x + c0

We know that the first derivative of y with respect to x is
5 c5 x 4 + 4 c4 x 3 + 3 c3 x 2 + 2 c2 x + c1

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 (or the updated value) 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

(d) Create a new guess for x using the update formulate x = x

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Shafts are machine elements that are used to a) carry axial loads b) direct shear loads c) transmit power d) rotate at constant speed e) none of the above circular and square shafts subjected to the same torque under the same circum behave a) the same way b) almost the same way
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
You know the right answer?
Problem 2: Polynomial Root Calculation Problem Description:

Engineers often need to calc...
Questions
question
History, 02.10.2021 06:50
question
Mathematics, 02.10.2021 06:50
question
Mathematics, 02.10.2021 06:50
Questions on the website: 13722367