Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
55 views

Numerical Solution of Ordinary Differential Equations Part 3 - System of Equations

This document provides information about solving systems of linear equations numerically using MATLAB. It discusses representing systems of linear equations in matrix form and using matrix algebra to solve them. Specifically, it shows how to multiply each side of the matrix equation by the inverse of the coefficient matrix A to solve for the unknown variables. It then provides an example problem and shows the MATLAB code used to set up the coefficient matrix and right hand side vector and solve the system. The document also discusses solving systems of nonlinear equations using the Newton-Raphson method.

Uploaded by

Melih Tecer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Numerical Solution of Ordinary Differential Equations Part 3 - System of Equations

This document provides information about solving systems of linear equations numerically using MATLAB. It discusses representing systems of linear equations in matrix form and using matrix algebra to solve them. Specifically, it shows how to multiply each side of the matrix equation by the inverse of the coefficient matrix A to solve for the unknown variables. It then provides an example problem and shows the MATLAB code used to set up the coefficient matrix and right hand side vector and solve the system. The document also discusses solving systems of nonlinear equations using the Newton-Raphson method.

Uploaded by

Melih Tecer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

MIDDLE EAST TECHNICAL UNIVERSITY

FACULTY OF ENGINEERING
Department of Engineering Sciences

Course Code and Title:


ES 510 Numerical Solution of Ordinary Differential Equations (3-0) 3

SOLUTION SIMULTANEOUS LINEAR EQUATIONS

1
If all constants 𝑏𝑖 are zero, Ax=0, equation is called set of homogeneous equations.
In this case, trivial solution is given by x=0, non-trivial solution exists only if
determinant of the coefficient matrix is zero, |𝐴| = 0.

If at least one 𝑏𝑖 is non zero then equation is called a set of non-homogeneous


equations.

Existence of solutions:

The system of equations has a solution if and only if the rank of augmented matrix is
equal to the rank of the coefficient matrix A. the solution is unique if the rank (r) is
equal to n (=total number of unknowns). If the rank (r) is less than n, then no unique
solution exists, implying that the equations are either inconsistent or one or more
equations are redundant.

The rank of a matrix is the maximum number of independent row (or maximum
number of independent columns).

A square matrix A (n× 𝒏) is non-singular only if its rank is equal to n.

What is the rank of following matrix?


1 2 0 3
1 −2 3 0
[ ]
0 0 4 8
2 4 0 6
2
Rank is 3. The last row is multiple of the first row.

 Ax=b is inconsistent (i.e. no solution exists) if and only if rank A < rank [A|b]
 Ax=b has a unique solution if and only if rank A = rank [A|b]
 Ax=b has infinitely many solutions if and only if rank A = rank [A|b] < n

Consider the following equations:

𝑥1 + 2𝑥2 = 1
3𝑥1 + 𝑥2 = −2

1 2 1 2 1
𝑨=[ ] , [𝑨|𝒃] = [ ] , rank A=2, rank [𝑨|𝒃] = 𝟐 , unique solution
3 1 3 1 −2

3𝑥1 + 2𝑥2 = 3
−6𝑥1 − 4𝑥2 = 0

3 2 3 2 3
𝑨=[ ] , [𝑨|𝒃] = [ ] , rank A=1, rank [𝑨|𝒃] = 𝟐 ,
−6 −4 −6 −4 0

Inconsistent solution (no solution exits)

3𝑥1 + 2𝑥2 = 3
−6𝑥1 − 4𝑥2 = −6

3 2 3 2 3
𝑨=[ ] , [𝑨|𝒃] = [ ] , rank A=1, rank [𝑨|𝒃] = 𝟏 , infinite number of
−6 −4 −6 −4 −6
solutions exists.

3
4
5
Example: Given the following equation

0.5𝑥1 − 𝑥2 = 9.5
6
1.02𝑥1 − 2𝑥2 = −18.8

a) Determine the condition of the system.


b) Solve and obtain the values of unknowns.
c) Solve again, but with slightly changed value of 𝑎11 = 0.52.

Solution:

0.5 −1
a) |𝐴| = | | = 0.02 close to zero. This shows that system is ill-
1.02 −2
conditioned.
b) Using elimination procedure 𝑥1 = 1890 𝑎𝑛𝑑 𝑥2 = −954.5
c) Once more applying the elimination procedure after changing 𝑎11 𝑡𝑜 0.52 .
𝑖𝑛𝑠𝑡𝑒𝑎𝑑 𝑜𝑓 0.50 the values of unknowns are found to be 𝑥1 = 1844.04
𝑎𝑛𝑑 𝑥2 = 949.4 very big change compare to part (b).

7
It is apparent that slight changes in the value of k causes large variations in the values
of unknowns. Therefore, the solution of ill-conditioned equations is not trustworthy
and should not be solved. In real life problems they do not occur until unless one makes
mistakes in the modeling of the engineering problem.

Solution of system of linear equation is very simple in MATLAB. But before we


explain how this could be done in MATLAB, it is appropriate to give some information
about handling of matrices in MATLAB.

8
9
10
Representing Linear Algebraic Equations in Matrix form

11
To obtain the solution of equation (7.5) using matrix algebra is to multiply each side
of the equation by the invers of A matrix.

Solving Linear algebraic equations with MATLAB

12
EXAMPLE:

13
Thus, the problem reduces to solving a system of three simultaneous equations for three
unknown displacements.

Consider the following parameters for the problem and obtain the displacements using
MATLAB.

Substituting these parameters into equation (8.2) gives.

14
15
SYSTEM OF NONLINEAR EQUATIONS

NEWTON-RAPHSON METHOD

16
17
EXAMPLE 1:

18
19
20
EXAMPLE 2:

21
22
23
24

You might also like