Академический Документы
Профессиональный Документы
Культура Документы
Element Methods
Numerical Methods
- Introduction
Introduction
Problem solving procedure:
Identify problem
Generate models
Solve equations
Interpret results
Numerical methods
- methods that seek quantitative approximations
to the solutions of mathematical problems
- finite element method, boundary element method
finite difference method, finite volume method, etc.
Function Evaluation
Taylor expansion of a smooth function about a point
3
= + + 2+ 3
+
2! 3!
Truncating the series up to finite terms - Approximation!
Linear approximation :
+
Quadratic approximation
+ + 2
2!
N-order approximation
2
+ + + +
2! !
Calculate: 1 + + 2 +
Numerical Integration
b
Calculate: I f x dx
a
f (a) f (b)
b b
I f ( x)dx f1 ( x)dx (b a)
a a
2
h n 1
I f (a) 2 f ( xi ) f (b)
2 i 1
Numerical Integration
b
Calculate: I f x dx
a
( x x1 )( x x2 ) ( x x0 )( x x2 ) ( x x0 )( x x1 )
f ( x) f 2 ( x) f ( x0 ) f ( x1 ) f ( x2 )
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 ) ( x2 x0 )( x2 x1 )
f ( x0 ) 4 f ( x1 ) f ( x2 )
b b
I f ( x)dx f 2 ( x)dx ( x2 x0 )
a a
6
Numerical Integration
b
Calculate: I f x dx
a
Gauss Quadrature
Trapezoidal Rule: Gauss Quadrature:
f (a ) f (b)
I (b a )
2
I c0 f ( x0 ) c1 f ( x1 )
(b a ) (b a)
f (a ) f (b)
2 2
Calculate: I f x dx
a
Gauss Quadrature
I c0 f ( x0 ) c1 f ( x1 )
Criteria: The Gauss Quadrature should provide exact solutions if the integrand is a
0 + 1 = b + a
2 2
0 0 + 1 1 =
2 Find 0 , 1 , 0 , 1
3 3
0 02 + 1 12 =
3
3 3
4 4
0 0 + 1 1 =
4
Numerical Integration
b
Calculate: I f x dx
a
1
Gauss Quadrature I f x dx c0 f x0 c1 f x1 cn 1 f xn 1
1
2pt Gauss Quadrature
1 1
1
I f x dx f f
1 3 3
~ 2( x a)
Let: x 1
ba
1
b 1
1 1
a
f ( x)dx (b a) f (a b) (b a) ~
2 1
2 2
x d~
x
Numerical Integration - Example
1
Trapezoidal rule
1
e sin x e cos x
1 x x
Exact solution I e x sin xdx 0.90933
0
2 0
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination + back substitution
Example: 1 22 + 63 = 0 1 2 6 x1 0
2 x 3
2
21 + 22 + 33 = 3 2 3
1 3 0
1 + 32 =2
x3 2
1 2 6 x1 0
0 6 9 x 3
2
0 1 6
x3 2
1 2 6 x1 0
0 6 x 3
9 2
0 0 15 2 3 2
x3
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination
Example:
Linear System Solver
Solve: Ax b
Gauss Elimination: back substitution
Example:
Computer
3 3
3 = 3 =
33 33
2 23 3 2 23 3
2 = 2 = sum
22 22
1 12 2 13 3 1 12 2 13 3
1 = 1 =
11 11
Linear System Solver
Solve: Ax b
Gauss Elimination: forward elimination + back substitution
Pseudo code:
t dt t t1
0 1
du
u N u N 1 t u0 1 t
N
dt t tN 1
Selection of t :
1 0 1
t
N N
Finite Difference Method
Find u in 0,1
du
Example 2: 2u 5e-t u (0) u0
dt
t u0 2u0 5e 0 t u0 2u0 5 t
du
u1 u0
dt t 0
t u1 2u1 5e t1 t u1 2u1 5e t t
du
u2 u1
dt t t1
Finite Difference Method
du
Example 3: u2 t u (0) 1 Find u in 0,1
dt
t u0 u0 2 t0 t 1 1 t t
du
u1 u0
dt t 0
t u1 u12 t1 t
du
u2 u1
dt t t1
1 i
t ti i t
0 1 N N
t ui 1 ui 12 ti 1 t
du
ui ui 1
dt t ti 1