Question: Polynomial Root - Finding Numerical Method Implementation using multiple source code and header files Instructions: You are to create a project that uses the secant
Polynomial RootFinding Numerical Method Implementation using multiple source code and header files
Instructions:
You are to create a project that uses the secant method to solve for the roots of a polynomial equation:
fxab xc xd xe xf x
The main program will ask the user to specify the values of a b c d e and f The program will respond by finding all the roots for the polynomial equation using the secant method. The source code files that need to be written for this program are:
projectc
secant.h
secant.c
myfunc.h
myfunc.c
The "secant.h file is the header file for "secant.c The "secant.c file will contain the source code for a function secant that calculates the secant method steps to locate a solution a root for the polynomial function defined in myfunc The myfunc function will be defined in the "myfunc.c file with its accompanying header file "myfunc.h Note that the coefficients for this polynomial function are entered in "projectc and must be passed through to the "myfunc.c file.
The "projectc file will contain the main function that will be used to run your project. This function and file will handle the input from the user, as well as the display of results back to the user. These results include an initial table of x and y values within the given range of x values, but it should also flag any sign changes in the table for y values If a sign change is identified, the secant function must be called in order to locate the root.
The secant function should have parameters, two for the guesses and the other six for the values for a b c d e and f The secant function should return the estimate for the answer. The myfunc function should have parameters, one for the value of x and the other six for the values a b c d e and f The myfunc function should just return the value of the function evaluated at x
Variables List starting point:
xmin double starting value for table input by user
xmax double ending value for table input by user
steps integer number of intervals into which we need to break the range of x values user input
xincr double increment between x values in table, from one row to the next calculated
x double first value for secant algorithm
x double second value for secant algorithm
xnew double newcalculated value using secant algorithm equation.
Please extend this list as necessary... it is graded
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
