close

Вход

Забыли?

вход по аккаунту

код для вставкиСкачать
Legendre Polynomials
Dr. Ferri
ME6758
Orthogonal Polynomials
 Pi ( x ), P j ( x ) 
b
a
w ( x ) Pi ( x ) P j ( x ) dx
 0, i  j
 Pi ( x ), P j ( x )   
 i  0 , i  j
Expand function as
n
f ( x) 

a i Pi ( x )
i0
Take inner product of both sides with Pk
n
 n

 f ( x ), Pk ( x )     a i Pi ( x )  , Pk ( x )   a i  Pi , Pk 


i0
 i0

 f ( x ), Pk ( x )   a k  Pk , Pk 
 f , Pk 
ak 
 Pk , Pk 
w( x)  1
First few Legendre Polynomials:
a=-1, b=+1
3
P0 ( x )  1
P3 ( x )  x 
P1 ( x )  x
P4 ( x )  x 
2
4
P2 ( x )  x 
Consider
 f , Pk 
ak 
 Pk , Pk 
1
5
f ( x) 
5
10
3
x 
9
5
x
21
n
1
f ( x) 
x2
ak 
x
6 2
3
x 
7
35
P5 ( x )  x 
3
3

a i Pi ( x )
i0
 1 Pk ( x )
dx
1 x  2
1
2
Pk ( x ) dx
1


Numerical evaluation
a0 = 0.5493
a1 = -0.2958
a2 = 0.1590
a3 = -0.0856
a4 = 0.0480
a5 = -0.0284
Legendre Least-Squares, 1-term
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares, 2-terms
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
0.2
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares, 3-terms
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares, 4-terms
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares, 5-terms
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares, 6-terms
1
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Legendre Least-Squares
1
3-term
4-term
5-term
6-term
exact
0.9
0.8
f
0.7
0.6
0.5
0.4
0.3
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
Max errors
1-term = 4.5069e-001
2-terms = 1.5485e-001
3-terms =0.16
4.8852e-002
4-terms = 1.4629e-002
5-terms =0.14
3.6620e-003
6-terms = 7.4189e-004
Legendre Least-Squares
2-term
3-term
4-term
5-term
0.12
error
0.1
0.08
0.06
0.04
0.02
0
-1
-0.8
-0.6
-0.4
-0.2
0
x
0.2
0.4
0.6
0.8
1
1/--страниц
Пожаловаться на содержимое документа