{VERSION 5 0 "IBM INTEL NT" "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 Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 256 13 "Wave equation" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 267 "Classical mechan ics texts discuss the wave equation as an example of continuous many-p article systems where the particles are connected by springs. One deri vation can be found in Cassiday and Fowles (6th ed., chapter 11.5/6) t he summary of which is given in the page " }{TEXT 19 11 "WaveEqn.jpg" }{TEXT -1 97 " . An example of a finite system of masses coupled by sp rings to simulate vibrations is given in " }{TEXT 19 9 "Glass.mws" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 110 "The wave equation conta ins a constant, namely the square of the propagation speed for the wav es which we call " }{TEXT 19 1 "c" }{TEXT -1 296 ". In classical mecha nics (transverse vibrations of a continuous string) the square of the \+ speed equals the string tension divided by the linear mass density. Th e wave equation plays an important role in electromagnetism, where it \+ is derived from Maxwell's equation for the electromagnetic fields." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 195 "Our inte rest is in applying the Fourier series to solve the wave equation in o ne dimension for a plucked string. We have used this technique in the \+ analysis of the one-dimensional heat equation (" }{TEXT 19 11 "HeatEqn .mws" }{TEXT -1 30 "), and explored it further in " }{TEXT 19 17 "Four ierSeries.mws" }{TEXT -1 2 ". " }{TEXT 19 6 "u(x,t)" }{TEXT -1 203 " d enotes the vertical (transverse) displacement of the string as a funct ion of location and time. The assumption is that no longitudinal motio n occurs, which can be achieved in the small-amplitude limit." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 365 "The equa tion (in mechanics) inherits the two time derivatives from Newton's eq uation. The two spatial derivatives arise as a consequence of the harm onic force experienced by a mass point from its two neighbours: the di fference of relative displacements can be expressed as a difference of first derivatives, and thus as a second derivative with respect to lo cation." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "WE:=diff(u(x,t),t$2) = c^2*d iff(u(x,t),x$2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "We choose a u nit system in which " }{TEXT 19 9 "0 < x < 1" }{TEXT -1 7 " , and " } {TEXT 19 3 "c=1" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "sol:=pdsolve(WE);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 "Maple 's " }{TEXT 19 7 "pdsolve" }{TEXT -1 315 " engine realizes that the so lutions to the wave equation can be expressed as a sum of a left-trave lling and a right-travelling wave solution. While this is interesting \+ in its own right (waves on the string can cross, standing wave solutio ns are possible) this is not necessarily directly useable to find the \+ answer." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "c:=1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "pdsolve(WE,HINT=f(x)*g(t));" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 284 "If we ask Maple for a solution in product form we are reminded of how separation of variables connects \+ the spatial and temporal parts in the solution. The structure of the O DEs is identical, but we usually have a boundary-value problem in spac e, and an initial-value problem in time. " }{TEXT 19 3 "_c1" }{TEXT -1 28 " is the separation constant." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 39 "Let us fix the string at the endpoints. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "ODE_x:=diff(f(x),x$2)=c 1*f(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 124 "This is a differentia l-equation eigenvalue problem which defines a Fourier basis. The condi tion that the string be fixed at " }{TEXT 19 3 "x=0" }{TEXT -1 135 " i s used to select sine-solutions only, i.e., it removes one integration constant. The other boundary condition selects the eigenvalue " } {TEXT 19 2 "c1" }{TEXT -1 252 ". The amplitude of the sine-wave soluti ons is arbitrary, because the problem is homogeneous (an eigenvalue pr oblem always is). The eigenvalues are negative (for sine/cosine type s olutions) and correspond to the negative of the square of the wavenumb er " }{TEXT 19 1 "k" }{TEXT -1 8 " in the " }{TEXT 19 8 "sin(k*x)" } {TEXT -1 29 " solutions. Let us find them." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 30 "sol_x:=dsolve(\{ODE_x,f(0)=0\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "This reminds us of the fact that the trig solu tions can be expressed as complex exponentials. Those are less intuiti ve." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "assume(c1<0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "sol_x:=dsolve(\{ODE_x,f(0)=0 \});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "Now demand that the solut ion vanish at the right boundary, i.e., at " }{TEXT 19 3 "x=1" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "solve(sin(k*1)=0 ,k);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "This solution is unintere sting, as it yields the trivial solution " }{TEXT 19 6 "f(x)=0" } {TEXT -1 57 ". How do we make Maple give us the interesting solutions? " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "_EnvAllSolutions := tru e:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "solve(sin(k*1)=0,k) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "OK, this we know from high s chool. Integer multiples of " }{TEXT 19 2 "Pi" }{TEXT -1 15 " will wor k for " }{TEXT 19 1 "k" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "k_n:=n->n*Pi;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "fB:=n->sin(k_n(n)*x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 25 " The separation constants:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "c_n:=n->-k_n(n)^2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "Are the se basis functions normalized?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "IP:=(f1,f2)->int(expand(f1*f2),x=0..1);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 16 "IP(fB(1),fB(1));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "IP(fB(2),fB(2));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "IP(fB(5),fB(5));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "This is no proof, but evidence that we should redefine our basis f unctions:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "fBn:=n->sqrt(2 )*sin(k_n(n)*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "IP(fBn( 1),fBn(3));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "IP(fBn(3),fB n(3));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 97 "Orthonormality of the b asis seems to be satisfied; check this out by trying different values \+ for " }{TEXT 19 2 "n1" }{TEXT -1 2 ", " }{TEXT 19 2 "n2" }{TEXT -1 1 " ." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 118 "The next question is: how do these basis states evolve in time? The separ ation constant specifies their time behavior:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "ODE_t:=diff(g(t),t$2)=c1*g(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "dsolve(ODE_t);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 143 "Two initial conditions are required to specify the tem poral behaviour of each mode (usually the initial displacement, and th e intial velocity)." }}{PARA 0 "" 0 "" {TEXT -1 558 "For the case of a plucked string we can argue that we have a known initial configuratio n of the string, and zero time derivative for this configuration at th e beginning. This would imply that we are interested in cosine-type te mporal solutions only. Another intial condition would be to be in the \+ equilibrium configuration with an intial velocity profile brought on b y, e.g., a hammer hitting the string at some time. This would call for sine-type solutions only. The general case would be covered by having a superposition of both types, as expressed above." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 35 "Each mode has a differe nt value of " }{TEXT 19 2 "c1" }{TEXT -1 54 ", and therefore oscillate s with a different frequency." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 189 "The actual superposition of modes requir ed is obtained by projecting the initial configuration onto the Fourie r basis. Suppose we displace the string at time zero such that it has \+ a height " }{TEXT 19 1 "a" }{TEXT -1 20 " in the middle (for " }{TEXT 19 5 "x=1/2" }{TEXT -1 28 "), and is linear in-between." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "a:=1/10;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 43 "f0:=piecewise(x<1/2,2*a*x,x>1/2,2*(a-a*x));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "plot(f0,x=0..1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "A Fourier representation for a finite bas is size:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "Nb:=9;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "b :=[seq(IP(f0,fBn(j)),j=1..Nb)];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "f0_ap:=add(b[j]*fBn(j),j=1..Nb);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "plot([f0,f0_ap],x=0..1,color=[red,blue]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 103 "The approximation of the intial configur ation is OK. Expand the basis size and observe how it improves!" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 55 "Now we as semble the full solution to the wave equation:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 54 "sol_WE:=add(b[j]*fBn(j)*cos(sqrt(-c_n(j))*t),j =1..Nb);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "plot3d(sol_WE,x =0..1,t=0..5,axes=boxed);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "A be tter presentation is given by an animation in 2d:" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "animate(sol_WE,x=0..1,t=0..5,frames=50);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT 257 11 "Exercise 1:" }}{PARA 0 "" 0 "" {TEXT -1 167 "Change the location at which the string is plucked away from the \+ midpoint. What observation do you make about the Fourier coefficients \+ as compared to the present case?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 258 11 "Exercise 2:" }}{PARA 0 "" 0 "" {TEXT -1 109 "Change the intial condition to represent a case where the string \+ is in equilibrium, but is hit with a hammer." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 259 11 "Exercise 3:" }}{PARA 0 "" 0 " " {TEXT -1 113 "Graph the time evolution of the first three modes. Fin d the relationship between the frequencies for these modes." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 13 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }