function [root, fx, ea, iter] -bisect (func, xl, xu, es, maxit, varargin) bisect: root location zeroes % [root, fx, ea, iter]=bisect (func, xl, xu, es, maxit, p1, p2,...): % uses bisection method to find the root of func % input: % func = name of function % x1, xu = lower and upper guesses % es = desired relative error (default = 0.0001%) % maxit = maximum allowable iterations (default = 50) p1, p2,... = additional parameters used by func % output: % root = real root % fx = function value at root % ea = approximate relative error (%) %iter = number of iterations if nargin<3, error('at least 3 input arguments required'), end test = func (x1, varargin{:}) *func (xu, varargin{:}); if test>0, error('no sign change'), end if nargin<4|isempty(es), es=0.0001; end if nargin<5|isempty (maxit), maxit=50; end iter = 0; xrxl; ea = 100; while (1) end xrold = xr; xr = (x1 + xu)/2; iter = iter + 1; if xr = 0,ea = abs ((xrxrold)/xr) * 100; end test = func(x1, varargin{:}) *func (xr, varargin{:}); if test < 0 xu = xr; elseif test > 0 else end x1 = xr; ea = 0; if ea <=es | iter >= maxit, break, end root = xr; fx = func(xr, varargin{:}); Problem 05.001 - Solving a root problem using bisection method Use bisection method to determine the drag coefficient needed so that a 95-kg bungee jumper has a velocity of 46 m/s after 9 s of free fall. Star with initial guesses of x = 0.2 and x = 0.5 and iterate until the approximate relative error falls below 5% Note: The acceleration of gravity is 9.81 m/s². (Round the final answer to four decimal places.) The required drag coefficient is cd 0.4062 ± 0.0001 kg/m. Explanation: The function to evaluate is gm f (ca) =V tanh | v(t) m On substituting the given values f(ca)=√ 981(35) tanh 9.81c49-46 95 The first iteration is 0.2+0.5 x = 2 = 0.35 f(0.2)f (0.35) 12.706474 (2.3387193) = 29.716876 Therefore, the root is in the second interval and the lower guess is redefined as x, = 0.35. The second iteration is x = 0.35+0.5 2 = 0.425 0.425-0.35 E₁ = 0.425 x 100% 17.65% f(0.35)f (0.425) = 2.3387193 (-1.2809449) = -2.99577 i 1(x₁) Xu f(x) xx 1(x1) |εal f(x)(x) 1 0.2 12.706474 0.5 2 0.35 2.338719 0.5 3 0.35 2.338719 0.425 4 0.3875 0.434088 0.425 -4.2485678 -4.2485678 -1.2809449 -1.2809449 0.35 0.425 0.3875 0.40625 2.3387193 -1.2809449 0.4340883 -0.4452446 29.716876 17.65% 9.68% -2.995770 1.015211 4.62% -0.193275 Thus, after four iterations, a root estimate of 0.40625 is obtained with an approximate error of 4.62%, which is below the desired estimate of 5%.
function [root, fx, ea, iter] -bisect (func, xl, xu, es, maxit, varargin) bisect: root location zeroes % [root, fx, ea, iter]=bisect (func, xl, xu, es, maxit, p1, p2,...): % uses bisection method to find the root of func % input: % func = name of function % x1, xu = lower and upper guesses % es = desired relative error (default = 0.0001%) % maxit = maximum allowable iterations (default = 50) p1, p2,... = additional parameters used by func % output: % root = real root % fx = function value at root % ea = approximate relative error (%) %iter = number of iterations if nargin<3, error('at least 3 input arguments required'), end test = func (x1, varargin{:}) *func (xu, varargin{:}); if test>0, error('no sign change'), end if nargin<4|isempty(es), es=0.0001; end if nargin<5|isempty (maxit), maxit=50; end iter = 0; xrxl; ea = 100; while (1) end xrold = xr; xr = (x1 + xu)/2; iter = iter + 1; if xr = 0,ea = abs ((xrxrold)/xr) * 100; end test = func(x1, varargin{:}) *func (xr, varargin{:}); if test < 0 xu = xr; elseif test > 0 else end x1 = xr; ea = 0; if ea <=es | iter >= maxit, break, end root = xr; fx = func(xr, varargin{:}); Problem 05.001 - Solving a root problem using bisection method Use bisection method to determine the drag coefficient needed so that a 95-kg bungee jumper has a velocity of 46 m/s after 9 s of free fall. Star with initial guesses of x = 0.2 and x = 0.5 and iterate until the approximate relative error falls below 5% Note: The acceleration of gravity is 9.81 m/s². (Round the final answer to four decimal places.) The required drag coefficient is cd 0.4062 ± 0.0001 kg/m. Explanation: The function to evaluate is gm f (ca) =V tanh | v(t) m On substituting the given values f(ca)=√ 981(35) tanh 9.81c49-46 95 The first iteration is 0.2+0.5 x = 2 = 0.35 f(0.2)f (0.35) 12.706474 (2.3387193) = 29.716876 Therefore, the root is in the second interval and the lower guess is redefined as x, = 0.35. The second iteration is x = 0.35+0.5 2 = 0.425 0.425-0.35 E₁ = 0.425 x 100% 17.65% f(0.35)f (0.425) = 2.3387193 (-1.2809449) = -2.99577 i 1(x₁) Xu f(x) xx 1(x1) |εal f(x)(x) 1 0.2 12.706474 0.5 2 0.35 2.338719 0.5 3 0.35 2.338719 0.425 4 0.3875 0.434088 0.425 -4.2485678 -4.2485678 -1.2809449 -1.2809449 0.35 0.425 0.3875 0.40625 2.3387193 -1.2809449 0.4340883 -0.4452446 29.716876 17.65% 9.68% -2.995770 1.015211 4.62% -0.193275 Thus, after four iterations, a root estimate of 0.40625 is obtained with an approximate error of 4.62%, which is below the desired estimate of 5%.
Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
Related questions
Question
This for Matlab
Please modify the script bisect.m to report/create the iteration table.
![function [root, fx, ea, iter] -bisect (func, xl, xu, es, maxit, varargin)
bisect: root location zeroes
% [root, fx, ea, iter]=bisect (func, xl, xu, es, maxit, p1, p2,...):
% uses bisection method to find the root of func
% input:
% func = name of function
% x1, xu = lower and upper guesses
% es = desired relative error (default
=
0.0001%)
% maxit = maximum allowable iterations (default = 50)
p1, p2,... = additional parameters used by func
% output:
% root = real root
% fx = function value at root
% ea = approximate relative error (%)
%iter = number of iterations
if nargin<3, error('at least 3 input arguments required'), end
test = func (x1, varargin{:}) *func (xu, varargin{:});
if test>0, error('no sign change'), end
if nargin<4|isempty(es), es=0.0001; end
if nargin<5|isempty (maxit), maxit=50; end
iter =
0; xrxl; ea = 100;
while (1)
end
xrold = xr;
xr = (x1 + xu)/2;
iter = iter + 1;
if xr = 0,ea = abs ((xrxrold)/xr) * 100; end
test = func(x1, varargin{:}) *func (xr, varargin{:});
if test < 0
xu = xr;
elseif test > 0
else
end
x1 = xr;
ea = 0;
if ea <=es | iter >= maxit, break, end
root = xr; fx = func(xr, varargin{:});](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F56f2bffd-1d3a-4b76-92a6-52fd8f44fbf4%2F90c82c05-6f9c-43f4-9f1b-56f7b227990b%2Fu4ub0j_processed.png&w=3840&q=75)
Transcribed Image Text:function [root, fx, ea, iter] -bisect (func, xl, xu, es, maxit, varargin)
bisect: root location zeroes
% [root, fx, ea, iter]=bisect (func, xl, xu, es, maxit, p1, p2,...):
% uses bisection method to find the root of func
% input:
% func = name of function
% x1, xu = lower and upper guesses
% es = desired relative error (default
=
0.0001%)
% maxit = maximum allowable iterations (default = 50)
p1, p2,... = additional parameters used by func
% output:
% root = real root
% fx = function value at root
% ea = approximate relative error (%)
%iter = number of iterations
if nargin<3, error('at least 3 input arguments required'), end
test = func (x1, varargin{:}) *func (xu, varargin{:});
if test>0, error('no sign change'), end
if nargin<4|isempty(es), es=0.0001; end
if nargin<5|isempty (maxit), maxit=50; end
iter =
0; xrxl; ea = 100;
while (1)
end
xrold = xr;
xr = (x1 + xu)/2;
iter = iter + 1;
if xr = 0,ea = abs ((xrxrold)/xr) * 100; end
test = func(x1, varargin{:}) *func (xr, varargin{:});
if test < 0
xu = xr;
elseif test > 0
else
end
x1 = xr;
ea = 0;
if ea <=es | iter >= maxit, break, end
root = xr; fx = func(xr, varargin{:});
![Problem 05.001 - Solving a root problem using bisection method
Use bisection method to determine the drag coefficient needed so that a 95-kg bungee jumper has a velocity of 46 m/s after 9 s of free fall. Star
with initial guesses of x = 0.2 and x = 0.5 and iterate until the approximate relative error falls below 5%
Note: The acceleration of gravity is 9.81 m/s². (Round the final answer to four decimal places.)
The required drag coefficient is cd
0.4062 ± 0.0001 kg/m.
Explanation:
The function to evaluate is
gm
f (ca) =V tanh |
v(t)
m
On substituting the given values
f(ca)=√
981(35) tanh
9.81c49-46
95
The first iteration is
0.2+0.5
x =
2
= 0.35
f(0.2)f (0.35) 12.706474 (2.3387193) = 29.716876
Therefore, the root is in the second interval and the lower guess is redefined as x, = 0.35.
The second iteration is
x =
0.35+0.5
2
= 0.425
0.425-0.35
E₁ =
0.425
x 100% 17.65%
f(0.35)f (0.425) = 2.3387193 (-1.2809449) = -2.99577
i
1(x₁)
Xu
f(x)
xx
1(x1)
|εal
f(x)(x)
1
0.2
12.706474
0.5
2
0.35
2.338719
0.5
3
0.35
2.338719
0.425
4
0.3875
0.434088
0.425
-4.2485678
-4.2485678
-1.2809449
-1.2809449
0.35
0.425
0.3875
0.40625
2.3387193
-1.2809449
0.4340883
-0.4452446
29.716876
17.65%
9.68%
-2.995770
1.015211
4.62%
-0.193275
Thus, after four iterations, a root estimate of 0.40625 is obtained with an approximate error of 4.62%, which is below the desired estimate of 5%.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F56f2bffd-1d3a-4b76-92a6-52fd8f44fbf4%2F90c82c05-6f9c-43f4-9f1b-56f7b227990b%2Fezr4t59_processed.png&w=3840&q=75)
Transcribed Image Text:Problem 05.001 - Solving a root problem using bisection method
Use bisection method to determine the drag coefficient needed so that a 95-kg bungee jumper has a velocity of 46 m/s after 9 s of free fall. Star
with initial guesses of x = 0.2 and x = 0.5 and iterate until the approximate relative error falls below 5%
Note: The acceleration of gravity is 9.81 m/s². (Round the final answer to four decimal places.)
The required drag coefficient is cd
0.4062 ± 0.0001 kg/m.
Explanation:
The function to evaluate is
gm
f (ca) =V tanh |
v(t)
m
On substituting the given values
f(ca)=√
981(35) tanh
9.81c49-46
95
The first iteration is
0.2+0.5
x =
2
= 0.35
f(0.2)f (0.35) 12.706474 (2.3387193) = 29.716876
Therefore, the root is in the second interval and the lower guess is redefined as x, = 0.35.
The second iteration is
x =
0.35+0.5
2
= 0.425
0.425-0.35
E₁ =
0.425
x 100% 17.65%
f(0.35)f (0.425) = 2.3387193 (-1.2809449) = -2.99577
i
1(x₁)
Xu
f(x)
xx
1(x1)
|εal
f(x)(x)
1
0.2
12.706474
0.5
2
0.35
2.338719
0.5
3
0.35
2.338719
0.425
4
0.3875
0.434088
0.425
-4.2485678
-4.2485678
-1.2809449
-1.2809449
0.35
0.425
0.3875
0.40625
2.3387193
-1.2809449
0.4340883
-0.4452446
29.716876
17.65%
9.68%
-2.995770
1.015211
4.62%
-0.193275
Thus, after four iterations, a root estimate of 0.40625 is obtained with an approximate error of 4.62%, which is below the desired estimate of 5%.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Elements Of Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
![Mechanics of Materials (10th Edition)](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
![Thermodynamics: An Engineering Approach](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
![Control Systems Engineering](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
![Mechanics of Materials (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
![Engineering Mechanics: Statics](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY