{VERSION 2 3 "SUN SPARC SOLARIS" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{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 -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 }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 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 " " 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 " " 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "This maple worksheet prod uce Fourier sine expansions, plots, and approximations of functions in two var" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots);" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#7S%(animateG%*animate3dG%-changecoords G%,complexplotG%.complexplot3dG%*conformalG%,contourplotG%.contourplot 3dG%*coordplotG%,coordplot3dG%-cylinderplotG%,densityplotG%(displayG%* display3dG%*fieldplotG%,fieldplot3dG%)gradplotG%+gradplot3dG%-implicit plotG%/implicitplot3dG%(inequalG%-listcontplotG%/listcontplot3dG%0list densityplotG%)listplotG%+listplot3dG%+loglogplotG%(logplotG%+matrixplo tG%(odeplotG%'paretoG%*pointplotG%,pointplot3dG%*polarplotG%,polygonpl otG%.polygonplot3dG%.polyhedraplotG%'replotG%*rootlocusG%,semilogplotG %+setoptionsG%-setoptions3dG%+spacecurveG%1sparsematrixplotG%+spherepl otG%)surfdataG%)textplotG%+textplot3dG%)tubeplotG" }}}{EXCHG {PARA 0 " " 0 "" {TEXT 262 47 "visualize the mode corresponding to m=K and n=L" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "K:=2;" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 5 "L:=2;" }}{PARA 11 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "plot3d(sin(K*x)*sin(L*y),x=0..Pi,y=0..Pi);" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "animate3d(sin(sqrt(K^2+L^2)*t)*sin (K*x)*sin(L*y),x=0..Pi,y=0..Pi,t=0..2*Pi,frames=20);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"KG\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"L G\"\"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 256 68 "input the numbers N a nd M of terms to be used in the partial sums" }{TEXT -1 1 " " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "M:=5;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"MG\"\"&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "N:=3;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"NG\"\"$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 257 63 "input the initial position f(x,y) and \+ initial velocity g(x,y)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " f:=(x,y)->(x-Pi)*sin(x/2)*sin(y);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "g:=(x,y)->0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG:6$%\"xG%\"y G6\"6$%)operatorG%&arrowGF)*(,&9$\"\"\"%#PiG!\"\"F0-%$sinG6#,$F/#F0\" \"#F0-F46#9%F0F)F)" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gG\"\"!" }}} {EXCHG {PARA 0 "" 0 "" {TEXT 258 35 "define two matrix of coefficient s " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "a:=array(1..M,1..N); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "b:=array(1..M,1..N);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG-%&arrayG6%;\"\"\"\"\"&;F)\"\"$7\"" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG-%&arrayG6%;\"\"\"\"\"&;F)\"\"$7 \"" }}}{EXCHG {PARA 256 "" 0 "" {TEXT -1 88 "compute the Fourier coeff icients of the function f(x,y) and print the result as a matrix" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "for n to N do for m to M do a[m,n]:=2/Pi*int(sin(n*y)*2/Pi*int(sin(m*x)*f(x,y),x=0..Pi),y=0..Pi) \+ od: od:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "print(a);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7'7%,$*$%#PiG!\"\"#!#K\"\"*\"\"!F/7%,$ F)#!#k\"$D#F/F/7%,$F)#!#'*\"%D7F/F/7%,$F)#!$G\"\"%pRF/F/7%,$F)#!$g\"\" %,)*F/F/" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 260 88 "compute the Fourier \+ coefficients of the function g(x,y) and print the result as a matrix" }{TEXT -1 1 "\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 104 "for n t o N do for m to M do b[m,n]:=2/Pi*int(sin(n*y)*2/Pi*int(sin(m*x)*g(x,y ),x=0..Pi),y=0..Pi) od: od:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "print (b);" }}{PARA 11 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'MATRIXG6#7'7%\"\"!F(F(F'F'F'F' " }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 51 "write a double Fourier seri es for f(x,y) and g(x,y)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "sf:=(x,y)->sum('sum('a[j,k]*sin(j*x)','j'=1..M)*sin(k*y)','k'=1..N); " }}{PARA 11 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "sg:=(x,y)->sum('sum('b[j,k]*sin(j*x)','j'=1..M)*sin(k*y)','k'=1..N );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#sfG:6$%\"xG%\"yG6\"6$%)operat orG%&arrowGF)-%$sumG6$.*&-F.6$.*&&%\"aG6$%\"jG%\"kG\"\"\"-%$sinG6#*&F9 F;9$F;F;/.F9;F;%\"MGF;-F=6#*&F:F;9%F;F;/.F:;F;%\"NGF)F)" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%#sgG:6$%\"xG%\"yG6\"6$%)operatorG%&arrowGF)-%$ sumG6$.*&-F.6$.*&&%\"bG6$%\"jG%\"kG\"\"\"-%$sinG6#*&F9F;9$F;F;/.F9;F;% \"MGF;-F=6#*&F:F;9%F;F;/.F:;F;%\"NGF)F)" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 259 61 "plot the function f(x,y) and its Fourier series approxim ation" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "plot3d(f(x,y),x=0. .Pi,y=0..Pi,title=`f(x,y)`);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "plo t3d(sf(x,y),x=0..Pi,y=0..Pi,title=`Partial sum approximation of f(x,y) `);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 261 61 "plot the function g(x,y) \+ and its Fourier series approximation" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "plot3d(g(x,y),x=0..Pi,y=0..Pi,title=`g(x,y)`);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "plot3d(sg(x,y),x=0..Pi,y=0..Pi,titl e=`Partial sum approximation of g(x,y)`);" }}}{EXCHG {PARA 258 "" 0 " " {TEXT -1 43 "write the (partial) Fourier series solution" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 137 "u:=(x,y,t)->sum('sum('(a[m,n]*cos( sqrt(m^2+n^2)*t)+b[m,n]*(n^2+m^2)^(-1/2)*sin(sqrt(m^2+n^2)*t))*sin(m*x )','m'=1..M)*sin(n*y)','n'=1..N);" }}{PARA 11 "" 0 "" {TEXT -1 0 "" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"uG:6%%\"xG%\"yG%\"tG6\"6$%)operato rG%&arrowGF*-%$sumG6$.*&-F/6$.*&,&*&&%\"aG6$%\"mG%\"nG\"\"\"-%$cosG6#* &-%%sqrtG6#,&*$F<\"\"#F>*$F=FHF>F>9&F>F>F>*(&%\"bGF;F>FF#!\"\"FH-%$sin GFAF>F>F>-FQ6#*&F9$F>F>/.F<;F>%\"MGF>-FQ6#*&F=F>9%F>F>/.F=;F>%\"NGF *F*" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 89 "plot the solution for a \+ particular value of t (for example t=Pi) and animate the solution" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "plot3d(u(x,y,Pi),x=0..Pi, y= 0..Pi,title=`Solution at t=Pi`);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "animate3d(u(x,y,t),x=0..Pi, y=0..Pi, t=0..2*Pi, frames=20);" }}} {EXCHG {PARA 260 "" 0 "" {TEXT -1 41 "the solution to a problem we did in class" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "p:=(x,y,t)->1/ 2*t-1/4*sin(2*t)*cos(2*x);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "anima te3d(p(x,y,t),x=0..Pi, y=0..Pi, t=0..2*Pi, frames=20);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG:6%%\"xG%\"yG%\"tG6\"6$%)operatorG%&arrowGF* ,&9&#\"\"\"\"\"#*&-%$sinG6#,$F/F2F1-%$cosG6#,$9$F2F1#!\"\"\"\"%F*F*" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 1 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 }