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 15:10
Heat is added to a piston-cylinder device filled with 2 kg of air to raise its temperature 400 c from an initial temperature of t1 27 cand pressure of pi 1 mpa. the process is isobaric process. find a)-the final pressure p2 b)-the heat transfer to the air.
Answers: 1
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:20
Ahe-xe mixture containing a 0.75 mole fraction of helium is used for cooling electronics in an avionics application. at a temperature of 300 k and atmospheric pressure, calculate the mass fraction of helium and the mass density, molar concentration and molecular weight of the mixture. if the cooling capacity is 10 l, what is the mass of the coolant?
Answers: 3
question
Engineering, 04.07.2019 19:20
Liquid flows at steady state at a rate of 2 lb/'s through a pump, which operates to raise the elevation of the liquid 100 ft from control volume inlet to exit. the liquid specific enthalpy at the inlet is 40.09 btu/lb and at the exit is 40.94 btub. the pump requires 3 btu/s of power to operate. if kinetic energy effects are negligible and gravitational acceleration is 32.174 tt/s, the heat transfer rate associated with this steady state process is most closely 1)-2,02 btu/s from the liquid to the surroundings 2)-3.98 btu/s from the surroundings to the liquid. 3)-4.96 btu/s from the surroundings to the liquid. 4)-1.04 btu/s from the liquid to the surroundings.
Answers: 2
You know the right answer?
Problem 2: Polynomial Root Calculation Problem Description:

Engineers often need to calc...
Questions
question
Mathematics, 23.04.2020 01:16
question
Mathematics, 23.04.2020 01:16
question
Mathematics, 23.04.2020 01:16
question
Mathematics, 23.04.2020 01:16
Questions on the website: 13722363