cbe250 lecture 6 f15
DESCRIPTION
CBE 250 Computer ApplicationsTRANSCRIPT
CBE 250 Lecture 6Monday Sept. 14, 2015
Reminders: this is the only class this week.Homework 2 (last lecture) due 9/18 to my mailbox or email
Amended to delete 5.1 and add the class example PM soln(slide 5 of Lecture 5)
Exam 1 review – in class exercises on 9/23Exam 1 scheduled for 9/25
Naive Gauss Elimination (Ch. 9.2)
Extension of method of elimination to large sets of equations by developing a systematic scheme or algorithm
1. Forward elimination of unknowns2. Back substitution
11313212111 bxaxaxaxa nn
22323222121 bxaxaxaxa nn
nnnnnnn bxaxaxaxa 332211
11313212111 bxaxaxaxa nn
)1()1( n
n
n
nnnbxa
''
3
'
232
'
2222bxaxaxa nn
''
3
''
3
''
33 3bxaxa nn
11
2111313212111 *
a
abxaxaxaxa nn
1
11
211
11
21313
11
21212
11
21121 b
a
axa
a
axa
a
axa
a
axa nn
22323222121 bxaxaxaxa nn
1
11
2121
11
212313
11
2123212
11
2122 )()()( b
a
abxa
a
aaxa
a
aaxa
a
aa nnn
''
3
'
232
'
2222bxaxaxa nn
Eq. #1
Eq. #1new
Eq. #2
Subtract Eq. #2 from Eq.#1new:
Define new coefficients in your new Eq.#2
)1(
)1(
n
nn
n
nn a
bx
11313212111 bxaxaxaxa nn
)1()1( n
n
n
nnnbxa
''
3
'
232
'
2222bxaxaxa nn
''
3
''
3
''
33 3bxaxa nn
1,,2,1)1(
1
)1()1(
nnifor
a
xabx
i
ii
n
ijj
i
ij
i
i
i
Pivot Equation
Pivot element
EXAMPLE:Use Naive Gauss elimination method to solve the following set of linear equations:
x1 + 5·x2 + 6·x3 = 1 7·x1 + 4·x2 + 2·x3 = -1 -3·x1 + 6·x2 + 7·x3 = 3
Drawbacks of Eliminations
• Division by zero• Round off errors • Ill conditioned systems• Singular systems
Techniques for Improving Solutions
1. Use of more significant figures2. Scaling3. Pivoting.
i. Partial pivoting. ii. Complete pivoting
Chapter 11.2:GAUSS SEIDEL ITERATIVE METHOD FOR THE SOLUTION OF LINEAR EQUATIONS
[A]{X} = {B}
Suppose we have:
33
23213133
22
32312122
11
31321211
a
xaxabx
a
xaxabx
a
xaxabx
Solve first equation for x1, second equation for x2, third for x3:
3
2
1
3
2
1
333231
232221
131211
b
b
b
x
x
x
aaa
aaa
aaa
GAUSS SEIDEL ITERATIVE METHOD FOR THE SOLUTION OF LINEAR EQUATIONS
3.0x1 + 0.1·x2 - 0.2·x3 = 7.85 0.1·x1 + 7.0·x2 – 0.3·x3 = -19.3 0.3·x1 - 0.2·x2 + 10.·x3 = 71.4
Example:
10
2.03.04.71
7
3.01.03.19
3
2.01.085.7
213
312
321
newnewnew
previousnewnew
previouspreviousnew
xxx
xxx
xxx
Guess x2 = x3 = 0
Rearrange:
Check if: 3,2,1iforx
xxinew
i
previousi
newi
33
23213133
22
32312122
11
31321211
a
xaxabx
a
xaxabx
a
xaxabx