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, 03.07.2019 14:10
If the thermal strain developed in polyimide film during deposition is given as 0.0044. assume room temperature is kept at 17.3 c, and thermal coefficient of expansion for the film and the substrate are 54 x 10^-6c^-1 and 3.3 x 10^-6c^-1respectively. calculate the deposition temperature.
Answers: 3
question
Engineering, 04.07.2019 18:10
Hydraulic fluid with a sg. of 0.78 is flowing through a 1.5 in. i.d. pipe at 58 gal/min. the fluid has an absolute viscosity of 11.8 x 105 lbf-sec/ft2. is the flow laminar, turbulent or within the critical range? give both a numerical reynolds number and a term answer.
Answers: 3
question
Engineering, 04.07.2019 18:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
question
Engineering, 04.07.2019 19:10
The sum of the normal stresses does not change as the stress state rotates through an angle. a)-trune b)- false
Answers: 2
You know the right answer?
Problem 2: Polynomial Root Calculation Problem Description:

Engineers often need to calc...
Questions
question
Mathematics, 12.12.2019 23:31
Questions on the website: 13722367