{VERSION 5 0 "SUN SPARC SOLARIS" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 " " 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 522 " \+ Computer Project II\n Math 2270-1, April 2002\n\n In the first part of this project, you will compute h ave MAPLE (or whichever computing environment you prefer) compute some Fourier coefficients for various functions. This could be quite usefu l, 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 th ey occur. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "restart:with( plots):\ndotprod := (f,g) -> int(f(t) * g(t), t = -Pi..Pi);" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefin ed\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%(dotprodGf*6$%\"fG%\"gG6\"6$ %)operatorG%&arrowGF)-%$intG6$*&-9$6#%\"tG\"\"\"-9%F3F5/F4;,$%#PiG!\" \"F;F)F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 213 "f_1 := t ->( 1/sqrt (Pi)) * cos (t): \nf_2 := t ->(1/sqrt (Pi)) * cos (2*t):\nf_3 : = t ->(1/sqrt (Pi)) * cos (3*t):\nf_4 := t ->(1/sqrt (Pi)) * cos (4*t) :\nf_5 := t ->(1/sqrt (Pi)) * cos (5*t):\nf_0 := t ->1/sqrt(2*Pi):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 182 "g_1 := t ->(1/sqrt(Pi)) * \+ sin (t):\ng_2 := t ->(1/sqrt(Pi)) * sin (2*t):\ng_3 := t ->(1/sqrt(Pi) ) * sin (3*t):\ng_4 := t ->(1/sqrt(Pi)) * sin (4*t):\ng_5 := t ->(1/sq rt(Pi)) * sin (5*t):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 468 " These \+ functions above are the first 11 elements of the orthonormal basis we \+ found for this inner product we are using. \n\n(1) Have MAPLE (or whic hever program you are using) verify that f_1 and g_1 are perpendicular .\n\n(2) Have MAPLE (or whatever) verify that f_1 and f_2 are perpendi cular.\n\n(3) Have MAPLE (or whatever) verify that f_1 and g_1 are uni t length.\n\n(4) Have MAPLE (or whatever) plot f_1, f_2, g_1 and g_2 o n the same set of axes so you can look at them. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "h := t -> t^2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hGf*6#%\"tG6\"6$%)operatorG%&arrowGF(*$)9$\"\"#\"\"\"F(F(F( " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "\n" }{TEXT -1 121 "Now we will compute a truncated Fou rier series for this function h. Below you will do the same thing for \+ other functions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 145 "a_0 := dotprod (f_0,h);\na_1 := dotprod (f_1,h);\na_2 := dotprod (f_2, h);\n a_3 := dotprod (f_3,h);\na_4 := dotprod (f_4,h);\na_5 := dotprod (f_5, h);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$a_0G,$*&-%%sqrtG6#\"\"#\"\" \")%#PiG#\"\"&F*F+#F+\"\"$" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$a_1G, $*$-%%sqrtG6#%#PiG\"\"\"!\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$a_2 G*$-%%sqrtG6#%#PiG\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$a_3G,$* $-%%sqrtG6#%#PiG\"\"\"#!\"%\"\"*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% $a_4G,$*$-%%sqrtG6#%#PiG\"\"\"#F+\"\"%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$a_5G,$*$-%%sqrtG6#%#PiG\"\"\"#!\"%\"#D" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "These are the first six even Fourier coefficients fo r h." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 118 "b_1 := dotprod (g_ 1,h);\nb_2 := dotprod (g_2,h);\nb_3 := dotprod(g_3,h);\nb_4 := dotprod (g_4,h);\nb_5 := dotprod (g_5,h);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# >%$b_1G\"\"!" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$b_2G\"\"!" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$b_3G\"\"!" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$b_4G\"\"!" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$b_5G\"\"!" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 118 "These are the first five odd Fou rier coefficients for h. You could have predicted that they would all \+ be zero (why?). " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 153 "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) + b_2*g_2(t) + b_3*g_3(t) + b_4*g_4(t) + b_5*g _5(t) ;" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%\"HGf*6#%\"tG6\"6$%)opera torG%&arrowGF(,8*&%$a_0G\"\"\"-%$f_0G6#9$F/F/*&%$a_1GF/-%$f_1GF2F/F/*& %$a_2GF/-%$f_2GF2F/F/*&%$a_3GF/-%$f_3GF2F/F/*&%$a_4GF/-%$f_4GF2F/F/*&% $a_5GF/-%$f_5GF2F/F/*&%$b_1GF/-%$g_1GF2F/F/*&%$b_2GF/-%$g_2GF2F/F/*&%$ b_3GF/-%$g_3GF2F/F/*&%$b_4GF/-%$g_4GF2F/F/*&%$b_5GF/-%$g_5GF2F/F/F(F(F (" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 122 "plot1 := plot (h(t), \+ t = -Pi..Pi, color = black):\nplot2 := plot (H(t), t = -Pi..Pi, color \+ = red):\ndisplay (\{plot1,plot2\});" }}{PARA 13 "" 1 "" {GLPLOT2D 382 286 286 {PLOTDATA 2 "6&-%'CURVESG6$7S7$$!3)****4tk#fTJ!#<$\"3t`AjhVgp) *F*7$$!3w\"*pr)3PY+$F*$\"3*)>P*[.Wy-*F*7$$!3?3E[*ysa)GF*$\"3UWX%)=K&fK )F*7$$!3fX&))>2g9v#F*$\"3>7suFD`qvF*7$$!3)4577.flh#F*$\"3T3w\"Q;\"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d,gFfr7$Fhr$!3^n')yd=@=GFfr7$ $!3b.@Z/\"\\$ypFfr$!312pC\"p%e*[&Ffr7$F]s$!36x(f\"puqbkFfr7$$\"3p0t!3) GF;mFfr$!3(\\#=m^,!pe&Ffr7$Fds$!39UE3w//*F*7$$\"3.')[UXCLtIF*$\"3#o;8>[; z4*F*7$$\"3[k6o'\\(R!4$F*$\"34LyU3g;=\"*F*7$$\"3#HWPzaiu5$F*$\"3oXkvmj nK\"*F*7$$\"3O@P>*fFX7$F*$\"3f**oe%>,99*F*7$FgzFd[l-F\\[l6&F^[l$\"*+++ +\"!\")$F_[lF_[lF_il-%+AXESLABELSG6%Q\"t6\"Q!Fdil-%%FONTG6#%(DEFAULTG- %%VIEWG6$;$!+aEfTJ!\"*$\"+aEfTJF`jlFiil" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 275 "This plot shopws the orginal function h (in bl ack) and its truncated Fourier series H (in red) on the same plot. Not ice that they are very close. Also notice that they agree very well ne ar zero, but not so well near the endpoints. This phenomenom is called Gibbs' phenomenom." }{TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "h_1 := \+ t -> t:\nh_2 := t -> abs(t):\nh_3 := t ->(abs(t))/t:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 372 " Here are some functions. You are probably fa miliar with h_1; h_2 looks something like a sawtooth wave (near t = 0) and h_3 looks something like a block wave (again, near t = 0). The se cond two represent functions which occur frequently in wave analysis a nd signal proccessing.\n\n(5) Have MAPLE (or whatever) plot these thre e functions so you can see what they look like. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 647 "(6) Have MAPLE (or whate ver) compute the first 11 Fourier coefficients for h_1 by computing th e inner product of h_1 with f_0,...,f_5 and with g_1,...,g_5. \n\n(7) \+ Have MAPLE (or whatever) compute the truncated Fourier series of h_1 ( i.e. have it compute the orthogonal projection of h_1 onto the span of f_0,...f_5 and g_1,...g_5). \n\n(8) Have MAPLE (or whatever) plot h_1 and the truncated Fourier series you just computed on the same axes s o you can compare them. You might want to also compare h_1 with a furt her truncated Fourier series (say, the projection onto f_0,f_1,f_2, g_ 1,g_2) in the same manner.\n\n(9) Do the same thing for h_2 and h_3. \+ " }}}}{MARK "17 2 0" 362 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }