Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a program that will allow the user to select an interval over which a root can be found such that the following equation will

image text in transcribed

Develop a program that will allow the user to select an interval over which a root can be found such that the following equation will hold. Equation 1 can be modified to give the following function f(x) Thus finding the root of f(x) from Equation 2 provides a solution for Equation 1. Note that x must be Equation1 /(x)-50-xcosVx Equation2 greater than zero. Find the first 3 roots Guidelines .The project IncrementalSearchPoly (in zip file IncrementalSearchPoly) is a complete program that shows the functions studied in class to implement the incremental search method for finding roots. This project has been provided for your review. Do take the time to review the program before you come to the lab o Compile and run the program to understand its operation. The function in the sample code has roots at -3.2, 0.05, 7.8 Run the software and experiment with selecting intervals. See how the selection of the interval affects the results. Try intervals that finds all three roots and intervals that finds 1 or 2 roots. * " To complete this part, start with the provided program (project IncrementalSearchFnc in the zip file IncrementalSearchFnc.zip). The program is similar to the one found in the project IncrementalSearchPoly Complete the following functions for finding roots . . void findAllRoots (double start, double end, double roots[]) double findRoot (double left, double right, double *root) double func (double x) Consult the notes, the sample program given to help with completing the above functions. Take the time to design the functions first before coding, that is, ensure you understand the logic of each function. The function func shall return the value for f(x) for the given x according to Equation 2 The plot of the function from 1 to 200 is shown (x10) to the right. Note the scale for the vertical axis (10). Start with the interval from 0 to 30 and find a proper interval to find the first three roots. . . Show your running program and modifications Develop a program that will allow the user to select an interval over which a root can be found such that the following equation will hold. Equation 1 can be modified to give the following function f(x) Thus finding the root of f(x) from Equation 2 provides a solution for Equation 1. Note that x must be Equation1 /(x)-50-xcosVx Equation2 greater than zero. Find the first 3 roots Guidelines .The project IncrementalSearchPoly (in zip file IncrementalSearchPoly) is a complete program that shows the functions studied in class to implement the incremental search method for finding roots. This project has been provided for your review. Do take the time to review the program before you come to the lab o Compile and run the program to understand its operation. The function in the sample code has roots at -3.2, 0.05, 7.8 Run the software and experiment with selecting intervals. See how the selection of the interval affects the results. Try intervals that finds all three roots and intervals that finds 1 or 2 roots. * " To complete this part, start with the provided program (project IncrementalSearchFnc in the zip file IncrementalSearchFnc.zip). The program is similar to the one found in the project IncrementalSearchPoly Complete the following functions for finding roots . . void findAllRoots (double start, double end, double roots[]) double findRoot (double left, double right, double *root) double func (double x) Consult the notes, the sample program given to help with completing the above functions. Take the time to design the functions first before coding, that is, ensure you understand the logic of each function. The function func shall return the value for f(x) for the given x according to Equation 2 The plot of the function from 1 to 200 is shown (x10) to the right. Note the scale for the vertical axis (10). Start with the interval from 0 to 30 and find a proper interval to find the first three roots. . . Show your running program and modifications

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

LO2 Distinguish among three types of performance information.

Answered: 1 week ago