DiscussionNotice we are using CAPITAL LETTERS now for the orthonormal set.
In[109]:=
U[x_,T_]:=Table[Cos[(k Pi/T) x],{k,10}]
In[110]:=
ColumnForm[U[x,T]]
Out[110]=
Pi x
Cos[----]
T
2 Pi x
Cos[------]
T
3 Pi x
Cos[------]
T
4 Pi x
Cos[------]
T
5 Pi x
Cos[------]
T
6 Pi x
Cos[------]
T
7 Pi x
Cos[------]
T
8 Pi x
Cos[------]
T
9 Pi x
Cos[------]
T
10 Pi x
Cos[-------]
T
In[111]:=
V[x_,T_]:=Table[Sin[(k Pi/T) x],{k,10}]
In[112]:=
ColumnForm[V[x,T]]
Out[112]=
Pi x
Sin[----]
T
2 Pi x
Sin[------]
T
3 Pi x
Sin[------]
T
4 Pi x
Sin[------]
T
5 Pi x
Sin[------]
T
6 Pi x
Sin[------]
T
7 Pi x
Sin[------]
T
8 Pi x
Sin[------]
T
9 Pi x
Sin[------]
T
10 Pi x
Sin[-------]
T
Skeptical?
These functions have period 2T. Let's just test a few, otherwise
Mathematica might compute all day. We test if V[x,T]=V[x+2T,T] by
subtracting and checking if we get zero. We need a special command for
Mathematica to recognize trigonometric identites:
In[113]:=
Simplify[Factor[U[x,T][[3]]-U[x+2 T,T][[3]],Trig->True]]
Out[113]=
0
In[114]:=
Simplify[Factor[U[x,T][[8]]-U[x+2 T,T][[8]],Trig->True]]
Out[114]=
0
These functions are orthogonal. Test a few:
In[115]:=
Integrate[U[x,T][[4]] V[x,T][[6]],{x,-T,T}]
Out[115]=
0
In[116]:=
Integrate[U[x,T][[2]] U[x,T][[7]],{x,-T,T}]
Out[116]=
0
In[117]:=
Integrate[U[x,T][[1]] V[x,T][[9]],{x,-T,T}]
Out[117]=
0
This is not an orthonormal set.
Each of these have norm Sqrt[T].
Recall that cos(kx) and sin(kx) had norm Sqrt[Pi]!
Test a few:
In[118]:=
Sqrt[Integrate[U[x,T][[9]] U[x,T][[9]],{x,-T,T}]]
Out[118]=
Sqrt[T]
In[119]:=
Sqrt[Integrate[V[x,T][[3]] V[x,T][[3]],{x,-T,T}]]
Out[119]=
Sqrt[T]
By complete analogy with what we did before, the Fourier coefficients are given
by:
a0=(1/2T) Integral from -T to T of f(x)
ak=(1/T) Integral from -T to T of f(x)cos[(kPi/T) x]
bk=(1/T) Integral from -T to T of f(x)sin[(kPi/T) x]
If you need the cosine series of the even periodic extension:
a0=(1/T) Integral from 0 to T of f(x)
ak=(2/T) Integral from 0 to T of f(x)cos[(kPi/T) x]
bk=0
If you need the sine series of the odd periodic extension:
ak=0
bk=(2/T) Integral from 0 to T of f(x)sin[(kPi/T) x]
Up to Periods Other than 2Pi