Question: Specific requirements for your implementation of the bisection method: Function Naming: Your final code must have a function named bisect ( f , a ,

Specific requirements for your implementation of the bisection method:
Function Naming: Your final code must have a function named bisect(f,a,b, maxlter, yError) and the inputs must be ordered/named as shown.
The variable f should be the function for a user to look for a root in and defined external to your bisection function.
The variables a and b should be the endpoints of the range that bisection looks for a root within. Note, these may not be input by a user in order (b may or may not be less than a), and thus, your code should order them if you are to make later assumptions about their relative position.
The variable maxlter should be the maximum number of times the loop within the bisection function will run before your code should display a message to the user which says: "Error, the maximum number of bisection evaluations has been reached, returning the average of the last estimates." Then, your code should return the average of the last estimates a and b for the root, along with the other outputs defined below.
The variable yError should be the maximum difference between the function evaluation output (f) and zero. Simply put, how close to f(x)=0 does the function need to be before you call it close enough?
Function Outputs: the estimated root of f, the value of f at the identified root, and a list of the intervals you used (i.e.,[[a1,b1],[a2,b2],...[an,bn]].
Good Practice: try running each step of this process one at a time in an individual function. Check intermediate answers with the answer you know is right from your plan and when you are sure your individual functions intended, add them to the larger main function and confirm each sub-function still works as intended.
Good Practice 2: Comment your code thoroughly in a manner that someone else could read what you have written and understand what each line/section does.
Deliverables:
A .pdf containing a brief description of the student's plan for each function written, which includes a flowchart(s) and/or pseudocode, prepared in a word processing format or by hand which is reflected in the student's code.
A code which follows the naming convention
A3_1LastName.py and when called by the instructor using [root,fRoot,intervals], maxlter, y Error) and a given f(x), returns the estimate of the root, the function evaluation at the root estimate, and a list of intervals identified (list of lists) according to the bisection method and the prescribed variables.
Specific requirements for your implementation of

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 Accounting Questions!