You are on page 1of 2

CE305 Numerical Methods for Civil Engineers 2011 Fall

Handout #2



c
SOLUTION OF NON-LINEAR EQUATIONS
Bracketing Methods
Graphical Method
Open Methods
y
x
x
r
Bisection M. False Position M.
y
x
a
b
c
- must know an interval
(i.e. [a, b]) which
includes the root
- f(a).f(b)<0 usually
indicated there is a
root in [a, b]
- c= mid pt. of [a, b]
- if f(a).f(c)<0, let a=c
o/w let b=c

f(x)=0
f(x)=0
y
x
f(x)=0
a
b
- must know an interval
(i.e. [a, b]) which
includes the root
- f(a).f(b)<0 usually
indicated there is a
root in [a, b]
-
( )( )
( ) ( ) a f b f
a b b f
b c


=
- if f(a).f(c)<0, let a=c
o/w let b=c

Newton-Raphson M. Secant M. Fixed Pt. Iteration
y
x
f(x)=0
x
0
x
1
- one initial guess
(i.e. x
0
) is required.
-
( )
( )
i
i
i i
x f
x f
x x
'
1
=
+

- iteration is required

y
x
f(x)=0
x
0
x
1
x
2
f(x)=0

- reorganize f(x)
s.t. x
i+1
=g(x
i
)

- converges when
|g(x
r
)<1

- one initial guess is
required

- iteration is
required


- two initial guess (i.e. x
0

and x
1
) are required.
-
( )( )
( ) ( )
1
1
1


=
i i
i i i
i i
x f x f
x x x f
x x
- iteration is required

CE305 Numerical Methods for Civil Engineers 2011 Fall
Handout #2



SYSTEM OF LINEAR EQUATIONS
Direct Methods
Indirect Methods
Gauss-Jordan
Elimination M.
- Using elementary row
operations convert
into [ U|b*]
- U is an upper
triangular matrix
- Solve

- Partial pivoting
- Using elementary row
operations convert
into [ I|b*]
- U is an upper
triangular matrix
whose diagonal
elements are all 1
- Solve



| | b A|
- Partial pivoting
- Using elementary row
operations convert
into [ U|b*]
- U is an upper
triangular matrix
- Solve

Simpler methods
- Graphical (n=2)
- Cramers (n=3)
- Elimination of
unknowns
- Matrix inversion
X = A
-1
.b

Gauss Jacobi M.
- Apply elementary row
operations to obtain
all diagonal elements
of A as 1, call that A*
-


Gauss Seidel M.
- Similar to Gauss Jacobi
but use updated values
of currunt iteration.

( )
* 1
*
*
*
*
*
b BX X
b BX X
b BX X I
b BX X I
b X B I
B I A
b X A
i i
+ =
+ =
+ =
= +
= +
+ =
=
+
n i
a
x a b
x
ii
n
j i
j
k
j ij i
k
i
,..., 2 , 1
1
1
=

=

=
=
+
n i
a
x a x a b
x
ii
n
i j
k
j ij
i
j
k
j ij i
k
i
,..., 2 , 1
1
1
1
1
1
=

=

+ =

=
+
+
- or


Naive Gauss
Elimination M.
Gauss Elimination M.
LU Decomposition M.
| | b A|
| | b A|
- Decompose A into LU
where L and U are
lower and upper
triangular matrices,
respectively.
- Doolittles Algorithm
for decomposition:
diagonal elements of
L are all 1
-

b Y L
Y X U
b X LU
LU A
b X A
=
=
=
=
=

You might also like