Академический Документы
Профессиональный Документы
Культура Документы
Orthogonal Polynomials
imrantalib@vu.edu.pk
Outline
1 Importance of orthogonal polynomials
Orthogonal Functions
Orthonormal Functions
Orthogonal Polynomials
Orthonormal Polynomials
Properties of Orthogonal Polynomials
2 Some Important Orthogonal Polynomials
Orthogonal Shifted Jacobi Polynomials
Exercise
Weight function
Exercise
Orthogonality Condition
Exercise
3 Function Approximation using Jacobi Polynomials
(α,β)
MATLAB code to determine the constant factor RT ,j , j = 0, 1, 2, ..., n, ...
Exercise
MATLAB code to determine the series coefficients Ci , i = 0, 1, 2, ...
4 Imran Talib VU Lecture NO.13 2
Importance of orthogonal polynomials
Some Important Orthogonal Polynomials
Function Approximation using Jacobi Polynomials
Exercise
Outline
1 Importance of orthogonal polynomials
Orthogonal Functions
Orthonormal Functions
Orthogonal Polynomials
Orthonormal Polynomials
Properties of Orthogonal Polynomials
2 Some Important Orthogonal Polynomials
Orthogonal Shifted Jacobi Polynomials
Exercise
Weight function
Exercise
Orthogonality Condition
Exercise
3 Function Approximation using Jacobi Polynomials
(α,β)
MATLAB code to determine the constant factor RT ,j , j = 0, 1, 2, ..., n, ...
Exercise
MATLAB code to determine the series coefficients Ci , i = 0, 1, 2, ...
4 Imran Talib VU Lecture NO.13 2
Importance of orthogonal polynomials
Some Important Orthogonal Polynomials
Function Approximation using Jacobi Polynomials
Exercise
Outline
1 Importance of orthogonal polynomials
Orthogonal Functions
Orthonormal Functions
Orthogonal Polynomials
Orthonormal Polynomials
Properties of Orthogonal Polynomials
2 Some Important Orthogonal Polynomials
Orthogonal Shifted Jacobi Polynomials
Exercise
Weight function
Exercise
Orthogonality Condition
Exercise
3 Function Approximation using Jacobi Polynomials
(α,β)
MATLAB code to determine the constant factor RT ,j , j = 0, 1, 2, ..., n, ...
Exercise
MATLAB code to determine the series coefficients Ci , i = 0, 1, 2, ...
4 Imran Talib VU Lecture NO.13 2
Importance of orthogonal polynomials
Some Important Orthogonal Polynomials
Function Approximation using Jacobi Polynomials
Exercise
Outline
1 Importance of orthogonal polynomials
Orthogonal Functions
Orthonormal Functions
Orthogonal Polynomials
Orthonormal Polynomials
Properties of Orthogonal Polynomials
2 Some Important Orthogonal Polynomials
Orthogonal Shifted Jacobi Polynomials
Exercise
Weight function
Exercise
Orthogonality Condition
Exercise
3 Function Approximation using Jacobi Polynomials
(α,β)
MATLAB code to determine the constant factor RT ,j , j = 0, 1, 2, ..., n, ...
Exercise
MATLAB code to determine the series coefficients Ci , i = 0, 1, 2, ...
4 Imran Talib VU Lecture NO.13 2
Orthogonal Functions
Importance of orthogonal polynomials
Orthonormal Functions
Some Important Orthogonal Polynomials
Orthogonal Polynomials
Function Approximation using Jacobi Polynomials
Orthonormal Polynomials
Exercise
Properties of Orthogonal Polynomials
Two functions fi (x) and fj (x) are orthogonal on an interval [a, b], if
Z b
fi (x)fj (x)dx = 0 (1.1)
a
Mathematically, we say that the inner product of the functions fi (x) and
fj (x) is zero.
δij = 1, i = j
(1.3)
= 0, i 6= j
Note:
The interval [a, b] is known as the interval of orthogonality and may be
infinite at one or both ends.
Any infinite sequence of polynomials pn , with pn having degree n forms a
basis for the infinite-dimensional vector space of all polynomials.
Solution Contd.
In matrix form (vector form), the required polynomials can be written as:
1
P0 (x)
2 x
T −1
P1 (x)
= 6 x2 6x
T 2 −2 T + 13
P2 (x)
P3 (x) 12 x 30 x 20 x
T − T2 + T3 − 1
Solution Contd.
(α,β)
The MATLAB code for the construction of function vector, Pn (x)
(Orthogonal Shifted Jacobi Polynomials) is as under:
function P=Jacobfunvec(M,alpha,beta)
clc;
clear all;
close all;
syms xTk
alpha=0;
beta=0;
M=4;
for i=0:M-1
a1 = (−1)( i − k);
a2 = gamma(i + beta + 1);
a3 = gamma(i + k + alpha + beta + 1);
Solution Contd.
Solution Contd.
Function vector generated by using orthogonal shifted Jacobi polynomial,
(α,β)
Pn (x).
1\. MATLAB 7.10.0 (R2010a)
File Edit Debug Parallel Desktop Window Help
'0 @ I d' ... ~ llf) (!o I ~ ~ ~ I ~ I Current Folder: IV:\ Siides_MatlabVU\ Script fi les
Shortcuts !!I How to Add !!I What's New
C.::
.:: u:.:
rr.::
en~t=-F~o::,ld=:e::r==========
''":::::C~=;
l ~~x
__. ® Editor- V·\ Siides-MatlabVU\ Script files\ fu nvec m ~• Cl ll X Workspace ~•ClliX
~ • Iii •fPioO· 'O @.Id' 1/:il ·I"' .. .. fr~ I IE • €J ~ <I- If Jl •1 Stack:l Base ·II !,. ID · I ~ • ~ r.ii 'll l~ sel. ..
- ~I "".;.~x 1 %~%~ 1 0.
« Scriptfiles (!o '&1 ~ X •
D Name • ."""" ~"""" I -~+ Name • Value
D adobediscussion.asv
fn adobediscussion.m
1
2 -
- f unct ion P=J acobfunvec
c l c;
( !:!_ ,alpha, ~ )
-0 ~T
~ ans
<lxl sym>
<4xl sym>
D adobetest.asv 3 - c l ear a l l ; €Jx <lxl sym>
~ adobetest.m 4 - c l ose a l l ;
D Assignmentlsol.asv 5 - syms X T k
l1 Assignmentlsol.m 6 - a l p ha=O;
D Assignmentlsolq2.asv 7 - beta=O;
~ AssignmenUsolq2.m 8 - !1= 4;
~ Eigenvaluesand eigenvectors.m 9 - - f o r i =O: H- 1
0 Eigenvaluesandeigenvectors.asv 10 - a 1= (- 1) A (i - k ) ;
~ Eigenvaluesandeigenvectors.m - a2=qamma (i+beta+ 1) ;
11
0 euler.asv
12 - a 3 =qamma (i+k+a l p ha+beta+ 1) ;
.@ euler.m <I Ill I •
0 fictorialfunction.asv
13 - d 1=qamma ( k+beta +1) ;
14 d2=qamma (i+a l p ha+beta+ 1) ; Command History ~•ClliX
~ fictorialfunction.m
15 d3=qamma (i - k+ 1) ;
~ funvec.m ·· f unvec
0 impeuler.asv
16 d4=qamma ( k+ 1) ; ·· c l c
® impeuler.m 17 d5=TA k;
B..·%-- 1/ 4/ 17 8 : 49 Al1 -
@il inputfunction.m 18 aa= (a 1•a2 • a 3)/( d 1*d2 *d 3*d4*d5 ) ;
·· c l c
~ Matrix algebra.m 19
·· J acobfunvec
~ Matrixmultiplication.m 20 ,R(i+ l) = symsum( aa f<'x " k,k, O, i) ;
0 picardinputfunc.asv 21 e nd ·· f unvec
~ picardinputfunc.m 22 P=tran spose ( P) ; ·· c l c
0 Picardmethod.asv "l atex ( (2 *x ) /T - 1)
~ Picardmethod.m ·· syrns x T
0 reducedechelonform.asv 1
"l atex ( (2 • x ) /T - 1)
~ reducedechelonform.m (2 *x ) /T - 1
·l atex ( ( 6 • x A2 ) /TA2 -
0 riemannsuml.asv ( 6*XA2 ) /TA2 - ( 6*X) /T + 11
.@ riemannsuml.m "l atex ( (12 • x ) /T - (~
e~ riemannsum2.m
(12 *X) /T - (3 0*XA2 ) /TA2 + (2 0*XA3 ) /TA3 - 1
·· l atex (an s )
=
>etails A T <( I Ill I to
~ ~~----------------------------------------------------------------------------~ L~~~=L--------~~
l ovR .::
(α,β)
The weight function WT (x) is defined as under:
(α,β)
WT (x) = (T − x)α x β , (2.3)
(α,β)
Construct the weight function, WT (x) defined in (2.3) on the
interval[0, 1] by taking α = 1, β = 2.
(α,β)
Construct the weight function, WT (x) defined in (2.3) on the
interval[0, 1] by taking α = 0, β = 0.
Exercise:
(α,β)
Check the orthogonality of orthogonal shifted Jacobi polynomial, Pn (x)
on [0, T ], by choosing α = 1, β = 1 with respect to the weight function
(α,β)
WT (x).
(α,β)
The constant factor RT ,j defined in (2.5) is computed in MATLAB as
function R=testcaseorthogonalitycheck(alpha,beta,T,M)
clc;
clear all;
close all;
syms i alpha beta T
M=4;
alpha=1;
beta=1;
T=1;
for i=0:M-1
a1 = T (alpha+beta+1) ;
a2=gamma(i+alpha+1);
a3=gamma(i+beta+1);
(α,β)
MATLAB code to determine the constant factor RT ,j
contd.
d1=(2*i+alpha+beta+1);
d2=gamma(i+1);
d3=gamma(i+alpha+beta+1);
R(i+1)=(a1*a2*a3)/(d1*d2*d3);
end
R=transpose(R)
J\ MATLAB 7.10.0
File Edit Debug Parallel Desktop Window Help
; '0 @ I d' - • ., (!" I ~ ~ §!:1 I ~ I Current Folder: IV:\ Siides_MatlabVU\ Script files
: Shortcuts !!I How to Add !!I What's New
... Cl ~ X Workspace ~· Cl ll X I
ID ·I ~ X ~. ~ Ill 'll l~ sel. .. •
Name • Value
A 10 - A
0 ~ ans [0.1667;0.133
11 -
12 -
'Kt 13 -
Testl.m 14 -
Testl.m 15 -
Taylororder2.m 16 -
Taylororder2.asv 17 -
taylororderl.m 18 -
taylor6.m 19 -
taylor4.m
20
taylor2.m
taylorQ.m :: coefvec.m x testcaseorthogonalitychec ... x (
I Ill
•
systemlineareqnsolvecommand.m
Surfaceplot.m Convnand Window Command History ... Cl ~ X
Surfaceplot.asv A '"·· c l c A
(α,β)
Figure: MATLAB code for generating the constant factor RT ,j .
0 Surfaceplot.asv
15 - e nd
1-
L.. c l c A
@n Simpsononethreeeight.m
0 Simpsononethreeeight.asv
Command W indow ... Cl ~ X
- S %--
L. c l c
1 / 23/ 1 7 1 : 19 Pl1
A
® Simpsononethird.m i .. c l c
0 Simpsononethird.asv an s = i ·· 0 . 1 667• 6
~ scriptfilel.m ; ·· c l c
D scriptfilel.asv ( f •garr~a (i + 1)•garr~a (i + 3)•( 2 •i + 3))/( 6 •garr~a (i + 2 )A2 ) I ; ·· (gamma (1) •gamma (3) '
@ RungeKutta.m
~
0
® riemannsum2.m 0 .. c l c
.@ riemannsuml.m 0 B %-- 1 / 2~ / 1 7 8 : 2 8 AH
n riemannsuml.asv ·· c l c
= T
Details fx..» T
'I Ill I '
1. . Start I I coefvec I Ln 10 Col 12 l ovR
Figure: MATLAB code with generated output to compute the series coefficients
Ci , i = 0, 1, 2, 3, 4.