Question: Write an M-file that implements the bisection method. But, instead of using using the maximum iterations and relative error, it uses the absolute error as

 Write an M-file that implements the bisection method. But, instead of

Write an M-file that implements the bisection method. But, instead of using using the maximum iterations and relative error, it uses the absolute error as the stopping criterion. Indeed, it identifies the minimum number of iterations to reach the predefined desired approximate absolute error Ead. That is: The first line of the function should be function [ root, Ea,ea,n]= YourName_Q1_bisect (func, xl,xu, Ead, varargin) Note that Ea= the approximate absolute error and ea = the approximate percent relative error. Test your code for the function (the velocity of water, v, discharged from a cylindrical tank through a long pipe) v=2gHtanh(LgHt) with v=5m/s,g=9.81m/s2,L=4m (pipe length), and t=2.5s (elapsed time) to find the initial head H in the interval [0,4]

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