Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE WRITE IN C Code PLEASE WRITE IN C Code Finding Roots of Equations This assignment is designed to teach you how to solve two

PLEASE WRITE IN C Code

image text in transcribed

image text in transcribed

PLEASE WRITE IN C Code

Finding Roots of Equations This assignment is designed to teach you how to solve two of the most common problems in numerical methods: (1) evaluating polynomial functions and (2) optimization. The problem Your application will take a series of command-line arguments Cn, Cn-1,Cn-2.",c1,co, a, b] as floating point values. The values co through cn will be the coefficients of a degree n polynomial p(x). The coefficients are specified in the order of decreasing power. For example, co is a constant and Cn is the coefficient of x". The last two values, a and b, will specify the interval over which your application will search for a root and display the following a) The polynomial (make it as readable as possible) b) The root rb = |p(x) 0 according to the bisection method c) The number of iterations required to locate the root using the bisection method d) The root xlp(x) 0 according to Newton's method e) The number of iterations required to locate the root using Newton's method Your code will operate under the following constraints 1) 2) Use Horner's algorithm to calculate p(x) and p'(x) as necessary Evaluate the root to the best possible precision (using 64-bit floating point values) the exact root may not be representable how will you find the value closest to the root? a. b. a+b 3) Newton's method will start with x0-- 4) Return an error if no root is found within the interval [a, b

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

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions