

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: Linear Algebra; Subject: Mathematics; University: University of Utah; Term: Spring 2002;
Typology: Study Guides, Projects, Research
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Computer Project II Math 2270-1, April 2002
In the first part of this project, you will compute have MAPLE (or whichever computing environment you prefer) compute some Fourier coefficients for various functions. This could be quite useful, for instance, if you ever want to do some signal proccessing. Below I have the an inner product suited to Fourier series and some of the appropriate functions typed in. You should fill in the blanks where they occur.
restart:with(plots): dotprod := (f,g) -> int(f(t) * g(t), t = -Pi..Pi); Warning, the name changecoords has been redefined
dotprod :=( f g , )โ d
โฯ
ฯ f t ( ) g t ( ) t
f_1 := t ->(1/sqrt (Pi)) * cos (t): f_2 := t ->(1/sqrt (Pi)) * cos (2t): f_3 := t ->(1/sqrt (Pi)) * cos (3t): f_4 := t ->(1/sqrt (Pi)) * cos (4t): f_5 := t ->(1/sqrt (Pi)) * cos (5t): f_0 := t ->1/sqrt(2Pi): g_1 := t ->(1/sqrt(Pi)) * sin (t): g_2 := t ->(1/sqrt(Pi)) * sin (2t): g_3 := t ->(1/sqrt(Pi)) * sin (3t): g_4 := t ->(1/sqrt(Pi)) * sin (4t): g_5 := t ->(1/sqrt(Pi)) * sin (5*t): These functions above are the first 11 elements of the orthonormal basis we found for this inner product we are using.
(1) Have MAPLE (or whichever program you are using) verify that f_1 and g_1 are perpendicular.
(2) Have MAPLE (or whatever) verify that f_1 and f_2 are perpendicular.
(3) Have MAPLE (or whatever) verify that f_1 and g_1 are unit length.
(4) Have MAPLE (or whatever) plot f_1, f_2, g_1 and g_2 on the same set of axes so you can look at them.
h := t -> t^2;
h := t โ t^2
Now we will compute a truncated Fourier series for this function h. Below you will do the same thing for other functions.
a_0 := dotprod (f_0,h); a_1 := dotprod (f_1,h); a_2 := dotprod (f_2, h); a_3 := dotprod (f_3,h); a_4 := dotprod (f_4,h); a_5 := dotprod (f_5, h);
a_0 :=
2 ฯ
( 5 / 2 )
a_1 :=โ 4 ฯ a_2 := ฯ
a_3 :=โ
ฯ
a_4 :=
ฯ
a_5 :=โ
ฯ
These are the first six even Fourier coefficients for h.
b_1 := dotprod (g_1,h); b_2 := dotprod (g_2,h); b_3 := dotprod(g_3,h); b_4 := dotprod (g_4,h); b_5 := dotprod (g_5,h); b_1 := 0 b_2 := 0 b_3 := 0 b_4 := 0 b_5 := 0 These are the first five odd Fourier coefficients for h. You could have predicted that they would all be zero (why?). H := t -> a_0* f_0(t) + a_1f_1(t) + a_2f_2(t) + a_3f_3(t) + a_4f_4(t) + a_5f_5(t) + b_1g_1(t) + b_2g_2(t) + b_3g_3(t) + b_4g_4(t) + b_5g_5(t) ;
H := t โ a_0 f_0( ) t + a_1 f_1( ) t + a_2 f_2( ) t + a_3 f_3( ) t + a_4 f_4( ) t + a_5 f_5( ) t + b_1 g_1( ) t
plot1 := plot (h(t), t = -Pi..Pi, color = black): plot2 := plot (H(t), t = -Pi..Pi, color = red): display ({plot1,plot2});