{VERSION 7 1 "Windows XP" "7.1" } {USTYLETAB {PSTYLE "Heading 4" -1 20 1 {CSTYLE "" -1 -1 "Times" 1 10 0 0 0 1 1 1 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Ord ered List 5" -1 200 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 144 2 0 2 2 -1 1 }{PSTYLE "Ordered List 1" -1 201 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Bullet Item" -1 15 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Lef t Justified Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Help" -1 10 1 {CSTYLE "" -1 -1 "Courier" 1 9 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Author" -1 19 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 8 8 2 0 2 0 2 2 -1 1 }{PSTYLE "Diagnostic" -1 9 1 {CSTYLE "" -1 -1 "Courier" 1 10 64 128 64 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Headi ng 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 2 2 0 2 0 2 2 -1 1 }{PSTYLE "Ordered List 3" -1 202 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 72 2 0 2 2 -1 1 }{PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Dash Item" -1 16 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times " 1 12 0 0 0 1 1 1 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 } {PSTYLE "Ordered List 4" -1 203 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 108 2 0 2 2 -1 1 }{PSTYLE "Maple \+ Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Line Printed Output" -1 6 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "List Item" -1 14 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 0 2 0 2 2 -1 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Courier" 1 10 255 0 255 1 2 2 2 2 2 1 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Fixed Width" -1 17 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }3 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{PSTYLE "Title " -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 0 0 1 }3 1 0 0 12 12 2 0 2 0 2 2 -1 1 }{PSTYLE "Ordered List 2" -1 204 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 3 3 2 36 2 0 2 2 -1 1 }{CSTYLE "Help Variable" -1 25 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Text" -1 200 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Bold" -1 39 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Page Number" -1 33 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "2D Math Italic Small" -1 201 "Times" 1 1 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Nonterminal" -1 24 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Default" -1 38 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Comment" -1 21 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Input" -1 0 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "2D Math Small" -1 7 "Times " 1 1 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Fixed" -1 23 "Courier " 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Popup" -1 31 "Times" 1 12 0 128 128 1 1 2 1 2 2 2 0 0 0 1 }{CSTYLE "Plot Title" -1 27 "Times" 1 10 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Input" -1 19 "Times" 1 12 255 0 0 1 2 2 2 2 1 2 0 0 0 1 }{CSTYLE "Copyright" -1 34 "Times" 1 10 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Maple Input Placeholder" -1 202 "Courier" 1 12 200 0 200 1 2 1 2 2 1 2 0 0 0 1 }{CSTYLE "2D Math Bold Small" -1 10 "Times" 1 1 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Mat h" -1 2 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Notes" -1 37 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Help Underli ned Bold" -1 41 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 0 0 0 1 }{CSTYLE "Hyp erlink" -1 17 "Times" 1 12 0 128 128 1 2 2 1 2 2 2 0 0 0 1 }{CSTYLE "2 D Math Symbol 2" -1 16 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "Plot Text" -1 28 "Times" 1 8 0 0 0 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "Help Italic" -1 42 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 } {CSTYLE "Output Labels" -1 29 "Times" 1 8 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Heading" -1 26 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Help Normal" -1 30 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "2D Comment" -1 18 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Maple Name" -1 35 "Times" 1 12 104 64 92 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Output" -1 20 "Times" 1 12 0 0 255 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Dictionary Hyperlink" -1 45 "Times" 1 12 147 0 15 1 2 2 1 2 2 2 0 0 0 1 }{CSTYLE "Help Emphasized" -1 22 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Italic Bold" -1 40 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "Help Menus" -1 36 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "LaTeX" -1 32 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "Prompt" -1 1 "Courier" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "Help Underlined" -1 44 "Times" 1 12 0 0 0 1 2 2 1 2 2 2 0 0 0 1 }{CSTYLE "Help Underlined Italic" -1 43 "Times" 1 12 0 0 0 1 1 2 1 2 2 2 0 0 0 1 }{CSTYLE "2D Math Bold" -1 5 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "2D Math Italic" -1 3 "Times " 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 205 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }3 1 0 0 8 4 2 0 2 0 2 2 -1 1 }{CSTYLE "" -1 203 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 204 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 205 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 206 "T imes" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 207 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 208 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 209 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 210 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 211 "Times" 1 12 128 0 128 1 2 2 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 212 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 206 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 207 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 1 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 } {CSTYLE "" -1 213 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 214 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 215 "T imes" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 216 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 217 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 218 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 219 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 220 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 221 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 222 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 223 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 224 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 225 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 226 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 208 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{CSTYLE "" -1 227 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 228 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 229 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 230 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 231 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 232 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 233 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 234 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 209 1 {CSTYLE "" -1 -1 "Times" 1 12 0 128 0 1 1 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 210 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 255 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 211 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 255 1 2 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{CSTYLE "" -1 235 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 236 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 237 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 238 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{PSTYLE "" -1 212 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }{PSTYLE "" -1 213 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 1 2 2 2 2 2 1 0 0 1 }1 1 0 0 0 0 2 0 2 0 2 2 -1 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 205 "" 0 "" {TEXT 200 30 "Fourier Polynomials and Series" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 4 "" 0 "" {TEXT 239 19 "Fourier Polynomials" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }} {PARA 0 "" 0 "" {TEXT 240 245 " Fourier polynomials provide a w ay of approximating general periodic functions by sums of very simpl e periodic functions, namely the familiar sine and cosine functions, s hifted and scaled. We will consider functions, f(x), that are 2" } {XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT 240 25 "-periodic, so that f(x + \+ " }{XPPEDIT 18 0 "2*pi;" "6#*&\"\"#\"\"\"%#piGF%" }{TEXT 240 50 ") = f (x). For example, any function of the form " }{XPPEDIT 18 0 "f(x) = \+ b[k]*sin(k*x);" "6#/-%\"fG6#%\"xG*&&%\"bG6#%\"kG\"\"\"-%$sinG6#*&F,F-F 'F-F-" }{TEXT 240 4 " or " }{XPPEDIT 18 0 "g(x) = a[k]*cos(k*x);" "6#/ -%\"gG6#%\"xG*&&%\"aG6#%\"kG\"\"\"-%$cosG6#*&F,F-F'F-F-" }{TEXT 240 41 ", where k is a positive integer while " }{XPPEDIT 18 0 "a[k];" "6#&%\"aG6#%\"kG" }{TEXT 240 6 " and " }{XPPEDIT 18 0 "b[k];" "6#&%\" bG6#%\"kG" }{TEXT 240 20 " are constants, is 2" }{XPPEDIT 18 0 "Pi;" " 6#%#PiG" }{TEXT 240 42 "-periodic, although it may have a smaller " } {TEXT 203 9 "period. " }{TEXT 240 31 "That is, the period of , say, \+ " }{XPPEDIT 18 0 "sin(k*x);" "6#-%$sinG6#*&%\"kG\"\"\"%\"xGF(" }{TEXT 240 4 " is " }{XPPEDIT 18 0 "2*pi/k;" "6#*(\"\"#\"\"\"%#piGF%%\"kG!\" \"" }{TEXT 240 55 " , so that it repeats after every interval of leng th " }{XPPEDIT 18 0 "2*pi/k;" "6#*(\"\"#\"\"\"%#piGF%%\"kG!\"\"" } {TEXT 240 66 " , but then of course it repeats after every interval o f length 2" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT 240 28 ". The integ er k gives the " }{TEXT 204 9 "frequency" }{TEXT 240 103 " of the si ne or cosine function, so large values of k correspond to very wiggl y graphs. The numbers " }{XPPEDIT 18 0 "a[k];" "6#&%\"aG6#%\"kG" } {TEXT 240 6 " and " }{XPPEDIT 18 0 "b[k];" "6#&%\"bG6#%\"kG" }{TEXT 240 12 " give the " }{TEXT 205 10 "amplitudes" }{TEXT 240 105 ". R ecall also that the graph of cos(x) is obtained from the graph of sin (x) by a horizontal shift of " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT 240 111 "/2, and the graph of Acos(kx) is likewise obtained from the \+ graph of Asin(kx) by a horizontal shift of length " }{XPPEDIT 18 0 "Pi ;" "6#%#PiG" }{TEXT 240 187 "/(2k). What do you get if you shift the graph of Asin(kx) horizontally by some other distance? It turns ou t that any such horizontal shift of Asin(kx) can be represented in the form " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 46 " (1) " }{XPPEDIT 18 0 "a[ k]*cos(k*x)+b[k]*sin(k*x);" "6#,&*&&%\"aG6#%\"kG\"\"\"-%$cosG6#*&F(F)% \"xGF)F)F)*&&%\"bGF'F)-%$sinGF,F)F)" }{TEXT 240 2 " " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 34 "where the amplitude \+ A is equal to " }{XPPEDIT 18 0 "sqrt(a[k]^2+b[k]^2);" "6#-%%sqrtG6#,&* $)&%\"aG6#%\"kG\"\"#\"\"\"F.*$)&%\"bGF+F-F.F." }{TEXT 240 137 ". Fu nctions of the form (1) are convenient to work with. Sums of such fu nctions, with possibly an added constant which we denote by " } {XPPEDIT 18 0 "a[0];" "6#&%\"aG6#\"\"!" }{TEXT 240 15 ", are called \+ " }{TEXT 206 20 "Fourier polynomials." }{TEXT 240 31 " Thus a Fourier polynomial of " }{TEXT 207 8 "degree n" }{TEXT 240 36 " is a functio n of the form F(x) = " }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "a[0]+(Sum(a[k ]*cos(k*x)+b[k]*sin(k*x), k = 1 .. n)) = a[0]+(Sum(a[k]*cos(k*x), k = \+ 1 .. n))+(Sum(b[k]*sin(k*x), k = 1 .. n));" "6#/,&&%\"aG6#\"\"!\"\"\"- %$SumG6$,&*&&F&6#%\"kGF)-%$cosG6#*&F1F)%\"xGF)F)F)*&&%\"bGF0F)-%$sinGF 4F)F)/F1;F)%\"nGF),(F%F)-F+6$F.F " 0 "" {MPLTEXT 1 0 112 "plot([1+cos(x)/2,cos(8*x)/8+sin(8*x)/8,1+cos(x)/2+co s(8*x)/8+sin(8*x)/8], x=-Pi..Pi, color=[blue, green,black]);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 34 "Note that we only graphed be tween " }{XPPEDIT 18 0 "-pi;" "6#,$%#piG!\"\"" }{TEXT 240 6 " and " } {XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 128 ", a practice we will co ntinue throughout the worksheet. Observe that the high frequency term is a shifted sine with amplitude " }{XPPEDIT 18 0 "sqrt((1/8)^2+(1/8) ^2);" "6#-%%sqrtG6#,&*$)*&\"\"\"F*\"\")!\"\"\"\"#F*F*F'F*" }{TEXT 240 134 " ~ 0.177 and that the graph of F(x) is the superposition of thi s high frequency graph with that of the vertically shifted cos(x)/2." }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 2 " " }}{PARA 0 "" 0 "" {TEXT 240 89 " It will be convenient to specify the Fourier coefficients b y giving the constant term " }{XPPEDIT 18 0 "a[0];" "6#&%\"aG6#\"\"!" }{TEXT 240 16 ", and then two " }{TEXT 209 5 "lists" }{TEXT 240 21 " \+ for the coefficents " }{XPPEDIT 18 0 "a[1] .. a[n];" "6#;&%\"aG6#\"\" \"&F%6#%\"nG" }{TEXT 240 7 ", and " }{XPPEDIT 18 0 "b[1] .. b[n];" "6 #;&%\"bG6#\"\"\"&F%6#%\"nG" }{TEXT 240 18 ". The procedure " }{TEXT 210 6 "FPoly " }{TEXT 200 272 "defined below, takes the constant term \+ , the two lists and the degree and returns the Fourier polynomial as a n expression. For our example, the coefficient list for the a's is [ 1/2,0,0,0,0,0,0,0,0,1/8] while the coefficient list for the b's is [0, 0,0,0,0,0,0,0,0,1/8]. " }{TEXT 211 42 " Be sure to execute the next c ommand line." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "FPoly:=proc(a0,a,b,n) local k; \n" }{MPLTEXT 1 0 54 "a0+sum('a[k]*cos(k*x)+b[k]*sin(k*x)','k'=1..n); end;\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&FPolyGf*6&%#a0G%\"aG%\"bG%\"nG6#%\"kG6\"F -,&F'\"\"\"-%$sumG6$.,&*&&F(F+F/-%$cosG6#*&F,F/%\"xGF/F/F/*&&F)F+F/-%$ sinGF9F/F//.F,;F/F*F/F-F-F-" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 65 "As an example let's plot the degree 9 \+ Fourier polynomial F(x) = " }{XPPEDIT 18 0 "Float(25, -2)+Float(5, -1 )*cos(3*x)+Float(25, -2)*cos(5*x)+Float(125, -3)*cos(9*x);" "6#,*-%&Fl oatG6$\"#D!\"#\"\"\"*&-F%6$\"\"&!\"\"F)-%$cosG6#*&\"\"$F)%\"xGF)F)F)*& F$F)-F06#*&F-F)F4F)F)F)*&-F%6$\"$D\"!\"$F)-F06#*&\"\"*F)F4F)F)F)" } {TEXT 240 1 "." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 7 "plot(\n" }{MPLTEXT 1 0 72 " FPoly(.25, [0,0,.5, 0,.25,0,0,0,.125],[0,0,0,0,0,0,0,0,0],9),x=-Pi..Pi);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 240 35 "Note that this is the graph of an " }{TEXT 212 4 "even" }{TEXT 240 133 " function of x, and that all \+ the sine coefficients were 0. This is an example of the following ge neral fact you will find useful." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }} {PARA 206 "" 0 "" {TEXT 200 14 "Odd and Even: " }}{PARA 207 "" 0 "" {TEXT 200 193 " A Fourier polynomial is an even function when all its \+ sine coefficients are 0. A Fourier polynomial with its constant term \+ removed is an odd function when all the cosine coefficients are 0. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT 213 11 "Problem 1. " }{TEXT 240 146 " By trial and error, es timate the Fourier coefficients of the degree 4 Fourier polynomials \+ whose graphs are shown below. All plots are from " }{XPPEDIT 18 0 "- pi;" "6#,$%#piG!\"\"" }{TEXT 240 4 " to " }{XPPEDIT 18 0 "pi;" "6#%#pi G" }{TEXT 240 58 " and (hint) each has no more than 3 nonzero coeffici ents. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 3 " a)" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 3 " b)" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 2 "c)" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 4 "" 0 "" {TEXT 239 37 "The Fourier \+ Polynomials of a Function" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 24 " If f(x) is a 2" }{XPPEDIT 18 0 "pi;" " 6#%#piG" }{TEXT 240 34 " periodic function, we define the " }{TEXT 214 27 "Fourier coefficients of f " }{TEXT 240 7 " to be " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "a[0] = int(f(x ), x = -pi .. pi)/(2*pi), a[k] = int(f(x)*cos(k*x), x = -pi .. pi)/pi, b[k] = int(f(x)*sin(k*x), x = -pi .. pi)/pi;" "6%/&%\"aG6#\"\"!*&-%$i ntG6$-%\"fG6#%\"xG/F/;,$%#piG!\"\"F3\"\"\"*&\"\"#F5F3F5F4/&F%6#%\"kG*& -F*6$*&F,F5-%$cosG6#*&F;F5F/F5F5F0F5F3F4/&%\"bGF:*&-F*6$*&F,F5-%$sinGF BF5F0F5F3F4" }{TEXT 240 20 ", for k = 1,2,...n." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 70 "The degree n Fourier po lynomial with these coefficients is called the " }{TEXT 215 37 "degree n Fourier polynomial of f . " }{TEXT 240 86 "The infinite series wh ose partial sums are the Fourier polynomials of f is called the " } {TEXT 216 25 "Fourier series of f . " }{TEXT 240 141 "The degree n \+ Fourier polynomial of f is the Fourier polynomial of degree n that b est approximates the function f over the whole interval [-" }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 1 "," }{XPPEDIT 18 0 "pi;" "6#%#piG" } {TEXT 240 56 "] in a certain technical sense we won't go into here. \+ " }}{PARA 0 "" 0 "" {TEXT 240 1 " " }}{PARA 0 "" 0 "" {TEXT 240 169 " \+ The calculation of the integrals that give the Fourier coefficient s is usually very tedious. We provide Maple procedures to do these ca lculations. The procedures " }{TEXT 217 6 "acoefs" }{TEXT 240 5 " and " }{TEXT 218 6 "bcoefs" }{TEXT 240 1 " " }{TEXT 200 19 " take the fun ction " }{TEXT 219 2 "f " }{TEXT 200 15 "and the degree " }{TEXT 220 1 "n" }{TEXT 200 38 " and return lists of the coefficients " } {XPPEDIT 18 0 "a[k];" "6#&%\"aG6#%\"kG" }{TEXT 240 8 ", resp. " } {XPPEDIT 18 0 "b[k];" "6#&%\"bG6#%\"kG" }{TEXT 240 6 " for " }{TEXT 221 9 "k = 1..n." }{TEXT 240 30 " A separate procedure called " } {TEXT 222 6 "azero " }{TEXT 200 32 "returns to constant coefficient " }{XPPEDIT 18 0 "a[0];" "6#&%\"aG6#\"\"!" }{TEXT 240 45 ". We also pro vide similar procedures called " }{TEXT 223 25 "Nacoefs, Nbcoefs, Naze ro " }{TEXT 200 167 "that do the same things with all integrals comput ed numerically. You may find it useful to try both kinds on the probl ems. Be sure to execute the following commands." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "acoefs:=pr oc(f,n) local k;\n" }{MPLTEXT 1 0 51 " [seq(int(f(x)*cos(k*x),x=-Pi.. Pi)/Pi,k =1..n)];\n" }{MPLTEXT 1 0 8 " end;\n" }{MPLTEXT 1 0 76 "bcoe fs:=proc(f,n) local k; [seq(int(f(x)*sin(k*x),x=-Pi..Pi)/Pi,k=1..n)]; \n" }{MPLTEXT 1 0 8 " end;\n" }{MPLTEXT 1 0 49 "azero:=proc(f) int(f( x),x=-Pi..Pi)/(2*Pi); end;\n" }{TEXT 240 59 "Here are the purely numer ical versions of these procedures " }{MPLTEXT 1 0 2 "\n" }{MPLTEXT 1 0 29 "Nacoefs:=proc(f,n) local k;\n" }{MPLTEXT 1 0 64 " [seq(evalf(In t(f(x)*cos(k*x),x=-Pi..Pi))/evalf(Pi),k=1..n)];\n" }{MPLTEXT 1 0 8 " \+ end;\n" }{MPLTEXT 1 0 29 "Nbcoefs:=proc(f,n) local k;\n" }{MPLTEXT 1 0 64 " [seq(evalf(Int(f(x)*sin(k*x),x=-Pi..Pi))/evalf(Pi),k=1..n)];\n " }{MPLTEXT 1 0 8 " end;\n" }{MPLTEXT 1 0 62 "Nazero:=proc(f) evalf(I nt(f(x),x=-Pi..Pi))/evalf(2*Pi); end;\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'acoefsGf*6$%\"fG%\"nG6#%\"kG6\"F+7#-%$seqG6$*&-%$intG6$*&-F'6 #%\"xG\"\"\"-%$cosG6#*&F*F8F7F8F8/F7;,$%#PiG!\"\"F@F8F@FA/F*;F8F(F+F+F +" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'bcoefsGf*6$%\"fG%\"nG6#%\"kG6 \"F+7#-%$seqG6$*&-%$intG6$*&-F'6#%\"xG\"\"\"-%$sinG6#*&F*F8F7F8F8/F7;, $%#PiG!\"\"F@F8F@FA/F*;F8F(F+F+F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %&azeroGf*6#%\"fG6\"F(F(,$*(#\"\"\"\"\"#F,-%$intG6$-F'6#%\"xG/F3;,$%#P iG!\"\"F7F,F7F8F,F(F(F(" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%(NacoefsG f*6$%\"fG%\"nG6#%\"kG6\"F+7#-%$seqG6$*&-%&evalfG6#-%$IntG6$*&-F'6#%\"x G\"\"\"-%$cosG6#*&F*F;F:F;F;/F:;,$%#PiG!\"\"FCF;-F26#FCFD/F*;F;F(F+F+F +" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%(NbcoefsGf*6$%\"fG%\"nG6#%\"kG6 \"F+7#-%$seqG6$*&-%&evalfG6#-%$IntG6$*&-F'6#%\"xG\"\"\"-%$sinG6#*&F*F; F:F;F;/F:;,$%#PiG!\"\"FCF;-F26#FCFD/F*;F;F(F+F+F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'NazeroGf*6#%\"fG6\"F(F(*&-%&evalfG6#-%$IntG6$-F'6#% \"xG/F2;,$%#PiG!\"\"F6\"\"\"-F+6#,$*&\"\"#F8F6F8F8F7F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 71 "Let's t ry this out on the simple function below, whose graph is shown. " }} {PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "f:=x->piecewise(x>0,1,0); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% \"fGf*6#%\"xG6\"6$%)operatorG%&arrowGF(-%*piecewiseG6%2\"\"!F'\"\"\"F0 F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "plot(f(x),x=-3..3 );" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 262 "The part of the graph of f between -3 and 0 does not show as the function is zero there. We compute the Fourier coefficients up to degree 20. We will \+ call the coefficient lists a and b. We print out the Fourier polynomi al of degree 9 and we plot the graph of " }{TEXT 224 2 "f " }{TEXT 240 91 " together with the graphs of the Fourier polynomials of degree s 5,10,15 and 20. Note that " }{XPPEDIT 18 0 "a[k] = 0;" "6#/&%\"aG6# %\"kG\"\"!" }{TEXT 240 6 " for " }{TEXT 225 1 "k" }{TEXT 240 10 "'s e xcept " }{TEXT 226 5 "k = 0" }{TEXT 240 80 ". This illustrates an ext ension of the odd/even principle we discussed above. " }}{PARA 208 "" 0 "" {TEXT 200 179 "If a function is even, all its sine coefficient s will be 0. If a function can be made into an odd function by some v ertical shift, then all its cosine coefficients will be 0. " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 25 "For our prese nt function " }{TEXT 227 1 "f" }{TEXT 240 263 ", shifting vertically d own by 1/2 produces an odd function. It is often very useful to obser ve even or odd symmetry of the function you are dealing with and to si mply set the appropriate coefficient list equal to a list of zeros wit hout doing any calculation. " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "a:=acoefs(f,20): b:=bcoefs(f ,20): a0:=azero(f):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "FPol y(a0,a,b,9);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,.#\"\"\"\"\"#F%*(F&F% -%$sinG6#%\"xGF%%#PiG!\"\"F%*(#F&\"\"$F%-F)6#,$*&F0F%F+F%F%F%F,F-F%*(# F&\"\"&F%-F)6#,$*&F7F%F+F%F%F%F,F-F%*(#F&\"\"(F%-F)6#,$*&F>F%F+F%F%F%F ,F-F%*(#F&\"\"*F%-F)6#,$*&FEF%F+F%F%F%F,F-F%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "plot([f(x),seq(FPoly(a0,a,b,5*n),n=1..4)],x=-Pi.. Pi);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 228 11 "Problem 2 " }{TEXT 240 29 "Consider the function g(x) = " }{XPPEDIT 18 0 "x^2/4;" "6#*&)%\"xG\"\"#\"\"\"\"\"%!\"\"" }{TEXT 240 17 " for x between " } {XPPEDIT 18 0 "-pi;" "6#,$%#piG!\"\"" }{TEXT 240 5 " and " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 23 " repeated periodically." }}{PARA 0 "" 0 "" {TEXT 240 82 "a) Compute and have Maple print the Fourier po lynomials of degrees 5,10, and 15." }}{PARA 0 "" 0 "" {TEXT 240 65 "b ) Plot them together with the graph of g(x) on the interval [-" } {XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 1 "," }{XPPEDIT 18 0 "pi;" "6 #%#piG" }{TEXT 240 5 "] . " }}{PARA 0 "" 0 "" {TEXT 240 135 "c) Write a paragraph discussing the Fourier coefficients and your results are \+ to be expected in view of the symmetry of the function g." }}{PARA 0 " " 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 4 "" 0 "" {TEXT 239 19 "The Energy Spectrum" }}{PARA 0 " " 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 107 " We have se en above that the Fourier series of the function f, is a sum of func tions of the form " }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "a[k]*cos(k*x) +b[k]*sin(k*x);" "6#,&*&&%\"aG6#%\"kG\"\"\"-%$cosG6#*&F(F)%\"xGF)F)F)* &&%\"bGF'F)-%$sinGF,F)F)" }{TEXT 240 25 ", where the coefficients " } {XPPEDIT 18 0 "a[k], b[k];" "6$&%\"aG6#%\"kG&%\"bGF%" }{TEXT 240 88 " \+ are computed as integrals of cosines and sines times f(x). We call \+ this function, " }{XPPEDIT 18 0 "a[k]*cos(k*x)+b[k]*sin(k*x);" "6#,& *&&%\"aG6#%\"kG\"\"\"-%$cosG6#*&F(F)%\"xGF)F)F)*&&%\"bGF'F)-%$sinGF,F) F)" }{TEXT 240 6 ", the " }{TEXT 229 18 "k-th harmonic of f" }{TEXT 240 111 ". As noted in the introductory discussion the k-th harmonic is a shifted sine with frequency k and amplitude " }{XPPEDIT 18 0 "A[ k] = sqrt(a[k]^2+b[k]^2);" "6#/&%\"AG6#%\"kG-%%sqrtG6#,&*$)&%\"aGF&\" \"#\"\"\"F1*$)&%\"bGF&F0F1F1" }{TEXT 240 57 ", for k >0. We will ca ll the square of the amplitude, " }{XPPEDIT 18 0 "A[k]^2;" "6#*$)&%\"A G6#%\"kG\"\"#\"\"\"" }{TEXT 240 6 ", the " }{TEXT 230 34 "energy of th e k-th harmonic of f, " }{TEXT 240 24 "if k > 0, and we define " } {XPPEDIT 18 0 "A[0] = sqrt(2)*a[0];" "6#/&%\"AG6#\"\"!*&-%%sqrtG6#\"\" #\"\"\"&%\"aGF&F-" }{TEXT 240 59 ". By analogy with some ideas from \+ physics, we say that a " }{XPPEDIT 18 0 "2*pi;" "6#*&\"\"#\"\"\"%#piGF %" }{TEXT 240 24 " -periodic function has " }{TEXT 231 6 "energy" } {TEXT 240 11 " given by " }{XPPEDIT 18 0 "E = int(f(x)^2, x = -pi .. \+ pi)/pi;" "6#/%\"EG*&-%$intG6$*$)-%\"fG6#%\"xG\"\"#\"\"\"/F.;,$%#piG!\" \"F4F0F4F5" }{TEXT 240 53 ". For functions f(x) with just a finite \+ number of " }}{PARA 0 "" 0 "" {TEXT 240 88 "points of discontinuity, \+ we have the Energy Theorem, whose proof is beyond this course:" }} {PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 232 17 " Energy Theorem. " }{TEXT 240 2 " " }{XPPEDIT 18 0 "E = sum(A[k]^2, k = 0 .. infinity);" "6#/%\"EG-%$sumG6$*$)&%\"AG6#%\"kG\"\"#\"\"\"/F-;\"\"!%)i nfinityG" }{TEXT 240 1 "." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 166 "If we interpret the function f as a wave or a s ignal, this says that the total energy of the wave or signal is the s um of the energies of its harmonics. A graph of " }{XPPEDIT 18 0 "A[k ]^2;" "6#*$)&%\"AG6#%\"kG\"\"#\"\"\"" }{TEXT 240 37 " as a function o f k, is called the " }{TEXT 233 21 "energy spectrum of f." }{TEXT 240 2 " " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{PARA 11 "" 0 "" {TEXT 242 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 240 87 "Let's apply this to a \+ new function, h(x), defined as follows. (Execute the next line.)" }} {PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "h:=x->x-floor(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hGf*6#% \"xG6\"6$%)operatorG%&arrowGF(,&F'\"\"\"-%&floorGF&!\"\"F(F(F(" }}} {PARA 13 "" 0 "" {TEXT 241 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 240 23 "Here is the graph of " }{TEXT 234 1 "h" }{TEXT 240 16 ", as usual f rom " }{XPPEDIT 18 0 "-pi .. pi;" "6#;,$%#piG!\"\"F%" }{TEXT 240 3 ". \+ " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "plot(h(x), x=-Pi..Pi);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{PARA 13 "" 0 "" {TEXT 241 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 206 "Let's compu te the coefficients of the degree 20 Fourier polynomial for this funct ion. We will use a0, a, and b as the names of the constant term, the \+ cosine coefficient list, and the sine coefficient list." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 209 "" 0 "" {TEXT 200 287 "Warning: a0, a , and b will now have values throughout the worksheet associated with \+ our specific function h, i.e. a0, a and b are GLOBAL variables. When finished with this section it's a good idea to restore them to being \+ just letters again, by the commands a0:='a0', a:='a', b:='b'. " }} {PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 116 " This time, we will use the numerical integration versions of the procedure s to calculate the Fourier coefficients." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 51 "a0:=Nazero(h); a:=Nacoefs(h, 20); b:=Nbcoefs (h,20);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#a0G$\"+++++]!#5" }} {PARA 210 "" 1 "" {XPPMATH 20 "6#>%\"aG76$!+^zdHd!#B$\"+!Hvdd(F($!+TN \\voF($\"+!>F61&F($!+eGN&y)F($\"+.:!46\"!#A$!+k'zkK*F($\"+$R'H*G(F($!+ Yd`-jF($\"+k'zkK*F($!+_DmVoF($\"+uSc!=)F($!+@J6__F($\"+=b:RpF($!+2l)4( pF($\"+6(G!)R'F($!+Kc%3i'F($\"+y(p\"3!*F($!+\"z6_<'F($\"+dZqqiF(" }} {PARA 211 "" 1 "" {XPPMATH 20 "6#>%\"bG76$\"+W<))HZ!#7$!+Pdr<5!#6$\"+l >m^ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 31 "Look at the results. The list " }{TEXT 235 2 "a " } {TEXT 240 193 "has entries that are 0 except for numerical integration error. Do you see why this makes sense? We now plot the energy sp ectrum using the listplot command as follows. (Note:We are plotting " }{XPPEDIT 18 0 "A[k]^2;" "6#*$)&%\"AG6#%\"kG\"\"#\"\"\"" }{TEXT 240 45 " against k for k = 1..20. We don't plot " }{XPPEDIT 18 0 "A[0 ]^2;" "6#*$)&%\"AG6#\"\"!\"\"#\"\"\"" }{TEXT 240 2 ".)" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "with(p lots): listplot([seq(a[k]^2+b[k]^2,k=1..20)],style=POINT,symbol=BOX);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 124 "The spectru m tells us that there is a strong harmonic at k=6, with strong, but l ess energetic harmonics at k=7,13 and 19. " }}{PARA 0 "" 0 "" {TEXT 240 68 "Let's plot the function h(x) and the degree 20 Fourier polyno mial. " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "plot([h(x), FPoly(a0,a,b,20)],x=-Pi..Pi, color = [red ,black]);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{PARA 13 "" 0 "" {TEXT 241 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 119 "Now let's plot h(x) and just the consta nt term with the four dominant harmonics we identified from the energy spectrum." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 171 "plot([h(x), a0+ a[6]*cos(6*x)+b[6]*sin(6*x) + a[7 ]*cos(7*x)+b[7]*sin(7*x)+ a[13]*cos(13*x) + b[13]*sin(13*x)+a[19]*cos( 19*x)+b[19]*sin(19*x)],x=-Pi..Pi, color=[red,blue]);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 240 162 "These harmonics captured some of the shape, but of course didn't do as well as the full Fourier polyno mial, which, on the other hand, requires more computation. " }}} {PARA 13 "" 0 "" {TEXT 241 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT 240 57 "Let us see how much of the total energy of the function " }{TEXT 236 1 "h" }{TEXT 240 303 " is contained in these harmonics. We calcul ate the total energy, E, in the function and then the total energy, EH , in the harmonics from k=0 to 20 (remember that k=0 is a special cas e), and finally, the total energy, DHE contained in the dominant k-th harmonics, namely those with k=0, k=6,7,13,19." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "E:= evalf( Int(h(x)^2,x=-Pi..Pi)/Pi);\n" }{MPLTEXT 1 0 44 "EH:= 2.0*a0^2+sum(a[k] ^2+b[k]^2, k=1..20);\n" }{MPLTEXT 1 0 79 "DHE:= 2.0*a0^2 +a[6]^2+b[6]^ 2+a[7]^2+b[7]^2+a[13]^2+b[13]^2+a[19]^2+b[19]^2; \n" }{MPLTEXT 1 0 12 "EH/E; DHE/E;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"EG$\"+*y3\"fn!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#EHG$\"+iuE%Q'!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$DHEG$\"+?5\"*4i!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+$)yUX%*!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+W ,Z(=*!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 165 "Thus we see that in this case, about 91 .9% of the total energy is contained in the constant term and the 4 do minant harmonics we identified from the energy spectrum." }}}{EXCHG {PARA 13 "" 1 "" {TEXT 241 0 "" }}{PARA 0 "" 0 "" {TEXT 237 11 "Proble m 3. " }{TEXT 240 98 " Consider the function Sq defined below, with gr aph as shown. (Sq is short for \"square wave.\") " }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "Sq:=x-> si gnum(sin(Pi*(x-1/4)));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#SqGf*6#% \"xG6\"6$%)operatorG%&arrowGF(-%'signumG6#-%$sinG6#*&%#PiG\"\"\",&F'F4 #F4\"\"%!\"\"F4F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "pl ot(Sq(x),x=-Pi..Pi);" }}{PARA 13 "" 1 "" {TEXT 241 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 185 "a) Using the numerical versions of the functions to find coe fficients e.g. Nacoefs, plot the 10th and the 20th degree Fourier poly nomials for Sq together with the graph of Sq itself. " }}{PARA 0 "" 0 "" {TEXT 240 147 "b) Use the energy spectrum to identify the 3 most \+ energetic harmonics and plot the sum of these and the constant term al ong with the graph of Sq. " }}{PARA 0 "" 0 "" {TEXT 240 136 "c) Find t he percentage of the total energy of Sq contained in the constant term and the 3 most energetic harmonics you found in part b)." }}{PARA 0 " " 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 238 13 "Problem \+ 4. " }{TEXT 240 29 "Consider the function q(x) = " }{XPPEDIT 18 0 "x /2;" "6#*&%\"xG\"\"\"\"\"#!\"\"" }{TEXT 240 24 " for x in the interva l " }{XPPEDIT 18 0 "[-Pi, Pi];" "6#7$,$%#PiG!\"\"F%" }{TEXT 240 3 ". \+ " }}{PARA 0 "" 0 "" {TEXT 240 110 "a) Compute the 10th degree Fourier polynomial and display it. (Use the acoefs, bcoefs procedures for t his.)" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 65 "b) Use a) to guess a formula for the energy of the k-th harmonic." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 145 "c) \+ * Verify your guess in part b) either by hand calculation or by using Maple. If you use Maple you should execute the following command fir st" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "assume(k, integer); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 240 134 "d) Apply th e Energy Theorem to this function and your guess for the energy in the k-th harmonic to find a formula, which will involve " }{XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 36 ", for the sum of the infinite series" } }{PARA 0 "" 0 "" {TEXT 240 5 " " }{XPPEDIT 18 0 "1+1/(2^2)+1/(3^2) +1/(4^2);" "6#,*\"\"\"F$*&F$F$*$)\"\"#F(F$!\"\"F$*&F$F$*$)\"\"$F(F$F)F $*&F$F$*$)\"\"%F(F$F)F$" }{TEXT 240 12 " + ....... " }}{PARA 0 "" 0 " " {TEXT 240 51 "e) Use your result in d) to find an estimate for " } {XPPEDIT 18 0 "pi;" "6#%#piG" }{TEXT 240 200 " using only simple arit hmetic and a single square root. You should, of course, have Maple do all the arithmetic! How could you get a better estimate, using only the same kind of simple arithmetic?" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 4 "" 0 "" {TEXT 239 17 "Homework Problems" }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}{PARA 0 "" 0 "" {TEXT 240 64 "Your homework f or this worksheet consists of Problems 1-4 above." }}{PARA 0 "" 0 "" {TEXT 240 0 "" }}}{EXCHG {PARA 212 "" 0 "" {TEXT 200 79 "MTH 142 Maple Worksheets written by B. Kaskosz and L. Pakula, Copyright 1999. " }} }{EXCHG {PARA 213 "" 0 "" {TEXT 200 26 "Last modified August 1999." }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}} {MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }