Question: roblem 1 : Application of the Fixed - Point Iteration Method In class, we have presented the non - dimensional frequency equation, given below, whose

roblem 1: Application of the Fixed-Point Iteration Method
In class, we have presented the non-dimensional frequency equation, given below, whose roots are
related to the natural frequencies of vibration of a cantilever beam.
()=1+ cosh() cos()=0
The following iterative algorithm is proposed in an attempt to obtain the roots of the frequency
equation using the fixed-point iteration method
k+1=1/(cosh(k))+ cos(k )+k ,=1,2,3,...
(In your MATLAB programming, you may replace by for simplicity.)
In the pre-lab, you have already developed a numerical solver for the fixed-point iterative algorithm
which will terminate when the relative approximate error is smaller than a user-specified maximum
tolerance maxtol or when the number of iterations exceeds a user-specified maximum number of
iterations maxitr.
a) Show how the above algorithm is derived based on fixed point iteration concept. This is the template: function [x, er, n]= FixedPoint(g, x1, maxtol, maxitr)
%% Numerical solution of f(x)=0 by the fixed point iteration method
%
% Wayne State University / ME2500
% Copyrighted by: Chin An Tan and Heather L. Lai
% Numerical Methods & Programming Using MATLAB: Principles and Practice
% Revised 26 January 2016,19 Sept 2016,27 Jan 2017
%
% Inputs/Outputs:
% g = iterative function
% x1= initial estimate of the root
% maxtol = maximum error tolerance
% maxitr = maximum number of iterations allowed
% x = approximate solution (root) of the equation fun(x)=0
% er = final absolute relative approximate error
% n = number of iterations needed for convergence based on maxtol
%% Initializations and checks
% Check for missing input arguments (maxtol and maxitr) and set defaults
if nargin <4, maxitr =25; end
if nargin <3, maxtol =1e-3; end
x = x1; % Set the initial guess as the current estimate
er =1; % Initialize the approximate error to 1
k =0 ; % Initialize the iteration number
%% Implementation of fixed-point iteration algorithm
while er >= maxtol && k < maxitr
k=k+1;
xold = x;
x=g(x);
er=abs((x-xold)/x);
% Output the values of k, x and er at each iteration
fprintf('iter =%i,\t x =%e,\t er =%e
', k,x,er);
end
n=k;
%% Check results for no convergence
if n == maxitr && er >= maxtol
fprintf('
')
warning('Maximum number of iterations reached before convergence')
fprintf('
Solution not obtained in %d iterations.
',maxitr);
end
end

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!