Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions