0% found this document useful (0 votes)
16 views6 pages

Lab 7

The document discusses the Gauss-Seidel method for solving systems of linear equations. [1] It is an iterative method used to approximate the solution of a linear system by successively updating the estimates of the solution variables. [2] The student is expected to use GNU Octave to code the Gauss-Seidel method to solve a system of equations derived from rocket velocity data. [3] By choosing different initial guesses, the student arrives at the true solution values of a1 = 2, a2 = -5, and a3 = 100 for the polynomial approximation of the rocket velocity data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

Lab 7

The document discusses the Gauss-Seidel method for solving systems of linear equations. [1] It is an iterative method used to approximate the solution of a linear system by successively updating the estimates of the solution variables. [2] The student is expected to use GNU Octave to code the Gauss-Seidel method to solve a system of equations derived from rocket velocity data. [3] By choosing different initial guesses, the student arrives at the true solution values of a1 = 2, a2 = -5, and a3 = 100 for the polynomial approximation of the rocket velocity data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Laboratory Exercise 7

Gauss-Seidel Method – A Review

I. Introduction

The other term for Gauss-Seidel method is Liebmenn method or method of successive
displacement. It is an iterative method that is used to solve linear system of equations.
Its name is from Carl Friedrich Gauss and Philipp Ludwig von Seidel, both German
mathematicians. It is similar to the Jacobi method.

Using this method, the convergence is only guaranteed if the matrix is symmetric and
positive definite it is diagonally dominant. However, this can be applied to any matrix
given that the elements in the diagonal are non-zero. It is the most commonly used
iterative method. Iteration is defined as the process of constructing a sequence that
solves a system of linear equations through approximate methods. This is done to
obtain the values of the roots system with the specified accuracy being the limits of the
sequence of some vectors [7]. It is an alternative to elimination methods.

Here the system[A]{X}={B} is reshaped by solving the first equation for x1, the
second equation for x2, and the third for x3, … and nth equation for xn. We will limit
ourselves to a 3x3 set of equations.

Now we can start the solution process by choosing guesses for the x’s. A simple way
to obtain initial guesses is to assume that they are zero. These zeros can be
substituted into x1 equation to calculate a new x1=b1/a11.

New x1 is substituted to calculate x2 and x3. The procedure is repeated until the
convergence criterion is satisfied:

II. Objectives
At the end of the activity, the students are expected to:
1. Recall the Gauss-Seidel Method in solving system of linear equations; and
2. Demonstrate on how to use GNU Octave in solving problems using Gauss-Seidel
Method.

III. Materials/Equipment
Computer with a full version of GNU Octave installed

IV. Procedure

TIME TO ACT Gauss-Seidel Method

1. Start the GNU Octave as instructed at the start of Laboratory Exercise 1 Part IV.

P a g e 51 | 70
2. Given the following problem [8], create an m-file to solve for the required values using
Gauss-Seidel Method. Write the code in Part V.1.

Problem: The upward velocity of a rocket is given at three different times:

Time t (s) Velocity v (m/s)


5 106.8
8 177.2
12 279.2

The velocity data us approximated by a polynomial as

𝑣(𝑡) = 𝑎1 𝑡 2 + 𝑎2 𝑡 + 𝑎3 , 5 ≤ 𝑡 ≤ 12

Solution:
Using a matrix template of the form:

The system of equation becomes:

Initial Guess: Assume an initial guess:

Rewriting each equation:

Applying the initial guess and solving for ai:

To find the absolute relative approximate error, use this:

P a g e 52 | 70
At the end of first iteration, the values of a1, a2 and a3 are 3.6720, -7.8510 and -155.36,
respectively. The maximum absolute relative approximate error is 125.47%.

Repeating the process will give you the following values:

Notice that the solution is not converging to the true solution.

Try different initial guess to arrive at the true solution. Write the true values of a1, a2
and a3 in Part V.2.

P a g e 53 | 70
V. Observation Matrix

Instructions: Put your observations and calculated values in the space provided
1.
Gauss-Seidel Method

P a g e 54 | 70
Gauss-Seidel Method (Cont.)

2.
Gauss-Seidel Method

P a g e 55 | 70
VI. Guide Questions
In this part, please provide your answers to the guide questions in the space provided.

1. What are the advantages of using Gauss-Seidel Method among other


approximation methods?

P a g e 56 | 70

You might also like