Question: question s: sonving a set on ninear equations ( In this question, you are supposed to use array structures. ) As industrial engineers, we often
question s: sonving a set on ninear equations
In this question, you are supposed to use array structures.
As industrial engineers, we often deal with a set of linear equations. Although there are
exact methods to solve them, they require too much computational effort. Therefore, some
approximation methods have been developed. This question addresses one of them and gives a
small example.
Suppose that you have the following set of linear equations:
dots
dots
dots
In this set s correspond to the coefficients of the variables s of the equation, and
to the righthand side constants, where dots, and dots,
The linear equations are rewritten so that the first equation is solved for the second for
and so on In other words, the followings are obtained:
vdots
The method starts with an initial solution, say dots, One may take
any value to start note that changing the initial solution only affects the number of iterations
needed to approximate the solution
In each iteration, current value of is used to calculate the new solution For
example, dots, are substituted in the equations given in and the lefthand side
gives the new solution as Continuing in this manner, approximate the real solution.
Consider the numerical example below with the application of the iterative approximation
method.
When we rearrange the equations we get,
Taking the initial solution as we get at the end
of the first iteration. With the obtained we continue the procedure. We substitute the
values in the formulations in and get as The method
iterates until the stopping criterion is reached.
Your task is to write a MATLAB script that works on the following set of linear equations:
with three different initial solutions:
Take the stopping criterion as the error between the current and previous solution. In other
words, if you are at iteration the error is
Error
Continue until the error is less than the stopping criterion. In this homework, consider three
different stopping criteria as and Report your results as given in the output
format and comment on your results by putting your explanations as comment lines at the end
of your script.
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
