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 maxlter, yError and the inputs must be orderednamed as shown.
The variable should be the function for a user to look for a root in and defined external to your bisection function.
The variables a and 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 for the root, along with the other outputs defined below.
The variable yError should be the maximum difference between the function evaluation output and zero. Simply put, how close to does the function need to be before you call it close enough?
Function Outputs: the estimated root of the value of at the identified root, and a list of the intervals you used ieababanbn
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 subfunction still works as intended.
Good Practice : Comment your code thoroughly in a manner that someone else could read what you have written and understand what each linesection does.
Deliverables:
A pdf containing a brief description of the student's plan for each function written, which includes a flowcharts andor 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
ALastName.py and when called by the instructor using rootfRoot,intervals maxlter, Error and a given 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.
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
