Computer Programming for Mechanical Engineers essay

Computer Programming for Mechanical Engineers essay

The problem that is supposed to be solved is the creation of the application in Excel that will provide users with the solution of an n by n matrix system of equations with x unknown. The application will be capable to read the values in different formats and convert them to Excel. After that the application will calculate and compute the solution on the ground of using the Gauss-Seidel’s iteration. The next step will be converting the solutions back on to the Excel spreadsheet. After that the solution for the given value will be given. On the other hand, it will be necessary to determine the number of iterations to control their converging ability within 0,1, 0,001 and 0,00001. In such a way, users will be able to obtain the calculated data after they enter the value given without making complex computations and calculations. Instead, the application will do all those computations and calculations.

Mathematical description

To implement the Gauss-Seidel’s iteration successfully to solve the matrix equations, users will have to begin with making their initial assumptions and enter their values to solve equations. To solve the equation, the user will have just to enter the value given, i.e. the value which the user wants to compute and calculate to find out the unknown x. The entered value and equation comprising the formula will be repeated several times to make each x converging. In such a way, the accuracy of the equations will be checked and the target unknown x converged. However, these may change as the converging factor changes. In such a way, depending on the value given and entered by the user the results of the convergence will change respectively.

Alternatively, users can do all the computation and calculations manually. However, the manual approach will require the creation of a large matrix which has multiple unknown xs. Obviously, such matrix will be inefficient because the computation will be time consuming, while the risk of errors increases substantially because manual calculations are more vulnerable to errors than automatic ones. Therefore, the matrix becomes ineffective, while the computation and calculation time consuming and tiresome. In such a situation, the use of the suggested application and Excel will help to make all the computation and calculation fast and easy to the extent that the given value entering and obtaining the results of computations and calculations will be the matter of seconds.

Numerical Algorithm

The Gauss-Seidel method is the method of solving n equation of the linear system of equations  one at a time in sequence and uses previously computed results as soon as they are available. The process is then iterated until it converges.

There are two important characteristics of the Gauss-Seidel method should be noted. Firstly, the computations appear to be serial. Since each component of the new iterate depends upon all previously computed components, the updates cannot be done simultaneously as in the Jacobi method. Secondly, the new iterate  depends upon the order in which the equations are examined. If this ordering is changed, the components of the new iterates (and not just their order) will also change.

In terms of matrices, the definition of the Gauss-Seidel method can be expressed as

where the matrices , , and  represent the diagonal, strictly lower triangular and strictly upper triangular  parts of , respectively.

The Gauss-Seidel method is applicable to strictly diagonally dominant, or symmetric positive definite matrices .

Gauss-Seidel Method

The Gauss-Seidel method is an iterative method used to solve a linear system of equations. This method can be applied to any matrix with non-zero elements on the diagonal. The convergence is only guaranteed if the matrix is either diagonally dominant or symmetric and positive definite.

Convergence Criteria

The convergence criteria can by any the user prefers to choose. However, to test the application three criteria will be used, including 0.1, 0.001, and 0.00001. These criteria are chosen because they show how lose the new and old x(i) are. In such a way, it is possible to determine the convergence. The decreasing difference will indicate to the high probability of their convergence, while the large difference will indicate to the fact that they will not converge. To prove the effectiveness of the system, the difference should be less than the convergence criteria.

Result

The result reveals the fact that the application runs as instructed. The difference between the three criteria was small that proves the eventual convergence of the process. Therefore, the application can function according to its instruction and users can enter the given values to obtain results fast, while the application will do all the computation and calculations needed for the specific task.

Terms Definition Convergence- the characteristic of a series or sequence of numbers in which the difference between each term and the following term remains constant or increases

Iteration- an instance or the act of doing something again

Gauss-Seidel method – iterative method used to solve a linear system of equations