.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0
.
.
0
.
.
nn
nn
n
n
n
n
n
n
n
n
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
k=1(after first
iteration)
i1
ij
ij
1j
11
a
a
= a
- a
×
a
Where
i = 2, n ; j = 1, n+1
1
3
1
3
3
33
1
2
2
23
22
1
1
1
13
12
11
.
.
0
0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0
0
.
.
0
.
.
nn
nn
n
n
n
n
n
n
n
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
k=2 (after second
iteration)
i2
ij
ij
2j
22
a
a
= a
- a
×
a
Where
i = 3, n ; j = 2, n+1

Forward Elimination:
Algorithm
June 21, 2016
ME262
Numerical Analysis Sessional
12
where
i = 2, n ; j=1, n+1
k=
1
ik
ij
ij
kj
kk
a
a
= a
- a
×
a
where
k = 1, n-1
i = k+1, n ; j=k, n+1
i1
ij
ij
1j
11
a
a
= a
- a
×
a
i2
ij
ij
2j
22
a
a
= a
- a
×
a
i3
ij
ij
3j
33
a
a
= a
- a
×
a
k=1,2, 3 … n-
1
k=
2
where
i = 3, n ; j=2, n+1
k=
3
where
i = 4, n ; j=3, n+1

Forward Elimination: Code
June 21, 2016
ME262
Numerical Analysis Sessional
13
where
k = 1, n-1 (iteration index)
i = k+1, n (row index)
j = k, n+1 (column index)
for
k=1:n-1
for
i=k+1:n
factor=a
ik
/ a
kk
;
for
j=k:n+1
a
ij
=a
ij
-factor × a
kj
;
end
end
end
ik
ij
ij
kj
kk
a
a
= a
- a
×
a

Backward Substitution
June 21, 2016
ME262
Numerical Analysis Sessional
14
3
33
2233
2
22
1122133
1
11
11121311
222322
3333

Backward Substitution
June 21, 2016
ME262
Numerical Analysis Sessional
15
Perform back substitution to get
{X}
{X} by simple division
Substitute this into (n-1)
th
equation
Solve for
x
n-1
Repeat the process to solve for
x
n-2
,
x
n-3
,
….
x
2
, x
1
)
(
)
(
,
)
(
,
2
n
1
n
n
2
n
n
1
n
1
n
2
n
1
n
1
n
b
x
a
x
a
)
(
)
(
1
n
nn
1
n
n
n
a
b
x

Backward Substitution
June 21, 2016
ME262
Numerical Analysis Sessional
16
j
n
i
j
ij
in
ii
i
x
a
a
a
x
1
1
1
11
12
13
14
1
1
1
22
23
24
2
2
1
33
34
3
3
1
44
4
4
1
1
1
1
.
0
.
0
0
.
0
0
0
.
.
.
.
.
.
.
.
0
0
0
0
.
n
n
n
n
n
n
n
n
n
n
nn
nn
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a

Problem
June 21, 2016
ME262
Numerical Analysis Sessional
17
By using
gauss elimination
method find the augmented upper triangular
matrix of the following equations:
0
2
2
2
3
2
2
7
3
4
6
5
6
6
4
2
4
3
2
1
4
2
1
4
3
2
1
x
x
x
x
x
x
x
x
x
x
x
x
x
0

#### You've reached the end of your free preview.

Want to read all 29 pages?

- Summer '19
- Mechanical Engineering, Numerical Analysis, Howard Staunton, Numerical Analysis Sessional