Question: IN MATLAB: 3 0 pts ) If a function has multiple roots on an interval, one strategy to find them is to scan across the

IN MATLAB: 30 pts) If a function has multiple roots on an interval, one strategy to find them is to scan across the interval using small subintervals looking for sign changes in the function that would indicate a root. When a subinterval is located that contains a sign change a root finding technique could be applied to find it.
a. Write a script that for a function f , an interval [a , b], and a minimum distance between possible roots, implements the strategy above. For the root finding technique, use the bisection method. Once each root is found, the program should print it along with a message and then continue to scan the interval.
b. Test your code on the function f ( x )=x +cos (10\pi x ) between x=0 and x=1.
Experiment with the minimum distance between roots until you are confident that you
have found all the roots.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!