Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5) Automated root bracketing If a given bracket contains more than one root, the bisection method will converge to one root but may miss other

image text in transcribed
5) Automated root bracketing If a given bracket contains more than one root, the bisection method will converge to one root but may miss other roots. One way to automatically find brackets for roots is to test an evenly spaced set of z values to find sign changes. Write a function called find-brackets that takes arguments f and x Here f should be a function, and x should be an array of x values. This function should evaluate f at each of the given x values, and return a list of tuples (pairs) of adjacent x values that consist of all adjacent x values where the function changes sign. Note, to generate a list of tuples you may first create an empty list, and then repeatedly append values to the list, as in the following code mylist mylist.append ((1.0,1.2)) mylist.append ((1.4,1.6)) which would create a list containing the two tuples ii) Use this function to automatically find brackets for all of the roots of the function f(x) sin(25z)- /20 for x between -4 and 4 ili) Once these are bracketed, compute all of these roots to 10 d.p. of accuracy

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

14.1 Describe five types of informative speeches.

Answered: 1 week ago

Question

=+derived from the assignment will balance the costs?

Answered: 1 week ago

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago