1
STR 613: Advanced
Numerical Analysis
Instructor
Dr. Ahmed Amir Khalil
Website
www.egypteducation.org
Make your own username and password
Structural Engineering --- Numerical analysis
Enrolment key: nacairo
Has notes, Matlab notes, and assignment
Assignment has been delayed for one week
Due date: Nov 26, 2006
2
)
`
=
)
`
|
|
.
|
\
|
0001 . 6
3
0001 . 4 2
2 1
2
1
x
x
)
`
=
)
`
|
|
.
|
\
|
0001 . 6
3
4 2
2 1
2
1
x
x
)
`
=
)
`
|
|
.
|
\
|
6
3
4 2
2 1
2
1
x
x
)
`
=
)
`
|
|
.
|
\
|
6
3
0001 . 4 2
2 1
2
1
x
x
)
`
=
)
`
1
1
2
1
x
x
Infinite no. of solutions
Unique
)
`
=
)
`
0
3
2
1
x
x
Unique
No solution
)
`
=
)
`
|
|
.
|
\
|
0
0
4 2
2 1
2
1
x
x
Trivial solution or eigen value
For a system of linear equations,
there are four possibilities:
A unique solution (consistent set of
equations). Two intersecting lines
No solution (inconsistent set of equations).
Two parallel lines
Infinite number of solutions (consistent set
of equations). Two identical lines
The trivial solution (set of homogeneous
equations, [A]{x}=0) Two lines intersecting
at the origin
3
Direct Methods (continued)
Lower
|
|
|
|
|
.
|
\
|
?
0 ?
0 0 ?
0 0 0 ?
x x x
x x
x
Upper
|
|
|
|
|
.
|
\
|
? 0 0 0
? 0 0
? 0
?
x
x x
x x x
Solution is easy!
2 1 0 0
9 3 1 0
3 1 0 1
4
LU Decomposition
Ax=b
A=LU
LUx=b
Let Ux= y
Ly=b get y
Ux=y get x
L-U Decomposition
A=LU
|
|
|
.
|
\
|
|
|
|
.
|
\
|
=
|
|
|
.
|
\
|
? 0 0
? ? 0
? ? ?
? ? ?
0 ? ?
0 0 ?
33 32 31
23 22 21
13 12 11
c
b
a
c
b
a
a a a
a a a
a a a
Cholesky Method
Number of equations, Number of unknowns
What if A is symmetric?
5
L-U Decomposition
A=LU
|
|
|
.
|
\
|
|
|
|
.
|
\
|
=
|
|
|
.
|
\
|
? 0 0
? ? 0
? ? ?
1 ? ?
0 1 ?
0 0 1
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
|
|
|
.
|
\
|
|
|
|
.
|
\
|
=
|
|
|
.
|
\
|
1
? 1
? ? 1
? ? ?
? ?
?
33 32 31
23 22 21
13 12 11
a a a
a a a
a a a
|
|
|
.
|
\
|
|
|
|
.
|
\
|
=
|
|
|
.
|
\
|
?
? ?
? ? ?
? ? ?
? ?
?
33 32 31
23 22 21
13 12 11
c
b
a
c
b
a
a a a
a a a
a a a
Doolittle
Crout
Cholesky
Example using Doolittle
1 3
1 2
) 5 / 2 (
) 5 / 4 (
3 3 0
1 1 0
1 2 5
R R
R R
5 3 3 2
3 4
3 2 5
3 2 1
3 2 1
3 2 1
+ = +
= +
+ = + +
x x x
x x x
x x x
6
Example using Doolittle
2 3
) 3 / 19 ( 5 / 13 5 / 19 0
5 / 9 5 / 3 0
1 2 5
R R
14 0 0
5 / 9 5 / 3 0
1 2 5
= U
Example using Doolittle
14 0 0
5 / 9 5 / 3 0
1 2 5
= U
1 3 / 19 5 / 2
0 1 5 / 4
0 0 1
= L
7
Symmetric Matrix: A=A
T
Banded Symmetric Matrix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|
\
|
x x
x
x x
x x x x x
x x x x
x x x
x x x x
x x x
x x
x x
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
M
MS
Banded Symmetric Matrix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|
\
|
x
x
x
x x x
x x
x x x
x x
x x
x x
x x
0 0 0
0 0 0
0 0 0
0
0 0
0
0 0
0 0
0 0
0 0
MS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|
\
|
x x
x
x x
x x x x x
x x x x
x x x
x x x x
x x x
x x
x x
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
MS
(I, J-I+1) (I, J)
8
Banded NON-Symmetric Matrix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|
\
|
x x
x
x x
x x x x x
x x x x
x x x
x x x x
x x x
x x x
x x
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|
\
|
x x
x
x x
x x x x x
x x x x
x x x
x x x x
x x x
x x x
x x
0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0
0 0
0 0 0
0 0 0 0
0 0 0
0 0 0 0
0 0 0 0
0 0 0 0 0
M
(I, J) (I, MS+J-I)
Flow Chart
A diagram
that shows
a step-by-
step
progressio
n through a
procedure
or system
9
Algorithm
A fully-specified step-by-step procedure for
solving a mathematical problem in a finite
number of steps, often involving repetition of an
operation or more than one operation.
Clear, Detailed, Pseudo-code
Use
Read or Input
Write, Print, or Output
Decisions: If, Then, Else
Loops: Do, While; Repeat, Until, For i=1 to 10
Assignment Rules
Complete Cover-Sheet, Use A4 paper,
ELSE lose 20%
Deliver on due date ELSE lose 40%
No Plagiarism ELSE lose 100%
No Cheating ELSE lose 40%
Best solution(s) may be delivered in
electronic format for a bonus 100%