Basis and Orthogonal Functions
This is a generalization of the Fourier series. The orthogonality of the trignometric functions
(i.e.,
Sin[2 π n x] Sin[2 π m x]dx =
)
![]()
if n=m
0
if n≠m
was the key to the ``trick'' that permitted calculation of the Fourier coefficients.
This is a generalization of dot or scalar vector product, but for functions. The norm that is defined above for the trignometric functions is fairly simple, it is the l2-norm:
f(x) • g(x) ≡ ∫ f(x) g(x) dx (l2-norm)
However, there can be many other types of norms, for instance a Gaussian weighted l2-norm
f(x) • g(x) ≡ ∫ f(x) g(x)
dx (Gaussian weighted l2-norm)
and many many others.
Both the norm and the domain of integration must be defined.
To represent a function in terms of a sum of basis functions with coefficients, a orthogonality relation must be obtained for the basis functions.
We will do a few examples of orthogonality relations, the coefficients can be found as a straightforward extension of the Fourier method.
Establish by example the orthogonality relations for the Lengendre Polynomials
In[115]:=
Out[115]=
Calculate the norm as a function of the order of the Legendre polynomial
In[116]:=
Out[116]=
Make a guess at what the norm looks like
In[117]:=
Out[117]=
The orthogonality relation is plausibly:
LegendreP[i,x] LegendreP[j,x]dx =
![]()
if | i|=|j|
0
if |i |≠|j|
In fact, this is correct
Representation of a function in terms of the Legendre basis
This demonstrates how to take a specific set (basis) of orthogonal functions and represent an arbitrary function in terms of an infinite sum of terms involving the basis functions, each with its own coefficient. This is a direct analog to what we did with Fourier series.
A function to calculate the coefficients
In[118]:=
Use Legendre functions to represent the function
This is an example function:
In[119]:=
Calculate the first twenty coefficients
In[120]:=
Out[120]=
Construct a vector of the eigenfunctions
In[121]:=
Visualize the approximation of the first twenty terms
In[122]:=
Out[122]=
Try another function
In[123]:=
Coefficients out to 10 terms
In[124]:=
Out[124]=
In[125]:=
Visualize the approximation
In[126]:=
Out[126]=
| Created by Mathematica (November 26, 2005) |