Professional Documents
Culture Documents
21 22112007 PDF
21 22112007 PDF
Lets consider the O.D.E. on the interval t ∈ ∆ = [0; 1] Consider an equation (O.D.E.) f ( t, y, y′ ) = 0 of a function y( t) defined on the
interval t ∈ ∆:
f ( t, y, y′ ) = y′ ( t) + y( t) = 0 1 Define a trial solution of the form:
n
with the initial condition y(0) = 1. ỹ( t) = φ0 +
X
a i φ i ( t)
i =1
We can solve this O.D.E.:
where the functions {φ i ( t)} are basis functions, and φ0 refers to a constant
analytically giving the exact solution:
that usually can be inferred from initial conditions.
′
y( t) = exp(− t) 2 Replace y( t) by ỹ( t) in the O.D.E. f ( t, ỹ( t), ỹ ( t)) = R ( t, a) (R is called the
residual) and solve the coefficients {a i } i=1···n .
numerically giving an approximate solution using:
The estimated ỹ( t) gives a numerical solution to the O.D.E. defined on the
Ï Finite Difference Method,
interval ∆.
Ï Finite Element Method.
The collocation method imposes that the residual vanishes at n points i.e. Lets take t1 = 31 and t2 = 32 such that we impose R ( t1 , a) = R ( t2 , a) = 0. This gives
R ( t i ; a) = 0 for t i ∈ ∆ and i = 1, · · · , n. us 2 equations: ³ ¡ ¢2 ´
1 + 1 + 31 a 1 + 23 + 13
¡ ¢
a2 = 0
Example ³ ¡ ¢2 ´
1 + 1 + 32 a 1 + 43 + 23
¡ ¢
a2 = 0
i
We choose the basis φ i ( t) = t and n = 2 so:
Solving in a 1 and a 2 gives:
ỹ( t) = 1 + a 1 φ1 ( t) + a 2 φ2 ( t) = 1 + a 1 t + a 2 t2
27 9 2
ỹ( t) = 1 − t+ t
29 29
and
R ( t, a) = 1 + (1 + t) a 1 + (2 t + t2 ) a 2 Compare that with the true function y( t) = exp(− t).
Example
We choose ∆1 = 0; 21 and ∆2 =
£ ¤ £1 ¤
2;1 and :
· ¸
Definition (subdomain method) 1 1 5 7
Z
R ( t; a) dt = 2 + a1 + a2 = 0
∆1 ∆1 2 8 24
Divide the interval ∆ of definition of the O.D.E. into subdomains {∆ i } i=1,··· ,n , and
and
solve a such that : 1
Z ·
1 7 25
¸
1
Z
R ( t; a) dt = 2 + a1 + a2 = 0
R ( t; a) dt = 0 ∀ i = 0, · · · , n ∆2 ∆2 2 8 24
∆i ∆i
Solving this system gives the solution
18 6 2
ỹ( t) = 1 − t+ t
19 19
Compare ỹ( t) estimated using subdomain method, with the exact solution y( t).
Least-Squares Method I Least-Squares Method II
Amongst the methods of weighted residuals, the Galerkin method is the most
Finite Difference Method: FDM Finite Element Method: FEM uses commonly used.
approximates an operator (e.g., the exact operators but approximates
derivative) and solves a problem on a the solution basis functions. Also,
set of points (the grid). FE solves a problem on the interiors MWR apply equally well to any family of basis functions {φ i }. However to be
of grid cells (and optionally on the sucessful, the basis functions need to be chosen with care
gridpoints as well). Ï Global basis functions perform badly in fitting local behaviour, e.g.:
φ i (t) = t i
Ï More local basis functions can be defined so that there are non-zero only on
small regions, e.g. piecewise linear (or hat) functions:
t− t i−1
t i − t i−1 t i−1 ≤ t < t i
t i+1 − t
φ i (t) = t i+1 − t i t i ≤ t < t i+1
0 otherwise