Write a program to find all real roots

Assignment Help Programming Languages
Reference no: EM13192837

Roots of Polynomial

Write a program to find all real roots of a given polynomial f. Starting with 0.0, use step size of 0.25 to find a and b such that sign(f(a)) <> sign(f(b)). Run the false position method for 3 iterations, then change to the Newton's method, using the middle point of a and b as the starting point, until |f(Xn)| |Xn - Xn-1|/|Xn-1|

Divide out Xn, using the synthetic division, and repeat the process until the degree of polynomial is reduced to 2. Use the quadratic equation to find the last two roots.

Print out all roots and number of iterations in Newton's method.

input file name: Root.dat
input file format:

LINE 1: N 1 intger, the degree of polynomial

LINE 2: An An-1 An-2 ........A1 A0n+1 floats separated by one space, coefficients of polynomial

Output: (to terminal)

all real roots in scientific notation.

number of iterations in Newton's method.

Reference no: EM13192837

Questions Cloud

Compute the change in enthalpy of reaction for two moles : Calculate the change in enthalpy of reaction for two moles of CO(g) reacting with one mole of O2 (g) to form CO2(g). The molar heats of formation for each of these gases are CO -110.5 KJ/mol,
State shift reaction is important in hydrogen gas production : The water-gas shift reaction is important in hydrogen gas production. The balanced reaction shown below has a Kp of 9.48 at 700K. If 1.5 atm of H20 are placed in a container and heated to 700K, how much hydrogen gas
State what percentage of a serving of this sandwich : What percentage of a serving of this sandwich did Michael burn during his winning time of 1 minute 54 seconds in the 200-meter individual medley relay race?
Compute the partial pressure in atmospheres : Calculate the partial pressure in atmospheres of O2 in the air outside an airplane cruising at an altitude of 10km where the atmospheric pressure is 190.0 mmHg.
Write a program to find all real roots : Write a program to find all real roots of a given polynomial f. Starting with 0.0, use step size of 0.25 to find a and b such that sign(f(a)) sign(f(b)).
State glass bulb containing an unknown amount : Suppose you have a 250 mL glass bulb containing an unknown amount of PCl3 gas. If the bulb contains 1.5 atm of PCl3 at 25C
State the rate at which a metal alloy oxidizes in an oxygen : The rate at which a metal alloy oxidizes in an oxygen containing atmoshphere is a type of the Arrhenius equation (rate(k)=Ce^(-Q/RT)). For example, the rate og oxidation of a magnesium alloy is represented by a rate constant k.
Compute the total heat capacity of calorimeter : The temperature of the calorimeter increases from 19.7C to 20.6C. If under constant volme conditions the heat of combustion of glucose is -2805 kj/mol, calculate the total heat capacity of calorimeter.
State the high resolution mass of a compound : The high resolution mass of a compound was measured to be 187.0878, Determine a likely molecular formula for this compound and explain how you arrived

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd