{VERSION 3 0 "APPLE_PPC_MAC" "3.0" } {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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 0 1 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 "Headi ng 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 } {PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "" 18 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }0 0 0 -1 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "" 18 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }0 0 0 -1 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "" 18 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 6 6 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 12 "MTHSC 434/63" }}{PARA 258 "" 0 "" {TEXT 256 26 "Second Summer Session 1998" }}{PARA 257 "" 0 "" {TEXT -1 24 "Final Exam Answser Sheet" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 128 "This answer sheet uses Maple t o handle the integrations, plotting, and other tedious bookkeeping, wh ich are items that were not " }{TEXT 257 7 "heavily" }{TEXT -1 8 " gra ded." }}{PARA 0 "" 0 "" {TEXT -1 116 "The problem setup cannot be done by Maple or any other computer assistance and was counted much more i n the grading." }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Problem 1" }} {PARA 0 "" 0 "" {TEXT -1 49 "Find the Fourier Cosine series for the fu nction, " }{XPPEDIT 18 0 "f(x) = x*(Pi-x);" "6#/-%\"fG6#%\"xG*&F'\"\" \",&%#PiGF)F'!\"\"F)" }{TEXT -1 17 " on the interval " }{XPPEDIT 18 0 "0 <= x;" "6#1\"\"!%\"xG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "x <= Pi; " "6#1%\"xG%#PiG" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "First, clear the workspace and define " }{XPPEDIT 18 0 "f(x);" "6# -%\"fG6#%\"xG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "restart: f := x -> x*(Pi - x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "Next, compute " }{XPPEDIT 18 0 "a[0] = 2*Int(f(x),x = 0 .. Pi)/ (2*Pi);" "6#/&%\"aG6#\"\"!*(\"\"#\"\"\"-%$IntG6$-%\"fG6#%\"xG/F1;F'%#P iGF**&\"\"#F*F4F*!\"\"" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "a[0] := (2/(2*Pi))*int(f(x),x=0..Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Then compute the general coefficient, " } {XPPEDIT 18 0 "a[k] = 2*Int(f(x)*cos(k*x),x = 0 .. Pi)/Pi;" "6#/&%\"aG 6#%\"kG*(\"\"#\"\"\"-%$IntG6$*&-%\"fG6#%\"xGF*-%$cosG6#*&F'F*F2F*F*/F2 ;\"\"!%#PiGF*F:!\"\"" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "a[k] := (2/Pi)*int(f(x)*cos(k*x),x=0..Pi);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "Note that if " }{XPPEDIT 18 0 "k; " "6#%\"kG" }{TEXT -1 40 " is an integer, then the term involving " } {XPPEDIT 18 0 "sin(k*Pi);" "6#-%$sinG6#*&%\"kG\"\"\"%#PiGF(" }{TEXT -1 21 " will be zero. Also, " }{XPPEDIT 18 0 "cos(k*Pi) = (-1)^k;" "6# /-%$cosG6#*&%\"kG\"\"\"%#PiGF)),$\"\"\"!\"\"F(" }{TEXT -1 2 ". " }} {PARA 0 "" 0 "" {TEXT -1 83 "To use this coefficient expression in the series, we need to make it a function of " }{XPPEDIT 18 0 "k;" "6#%\" kG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "coef \+ := unapply(a[k],k);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "It is easy to see the pattern for the coefficients." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 96 "a[1] := coef(1);a[2] := coef(2);a[3] := coef(3);a[4 ] := coef(4);a[5] := coef(5);a[6] := coef(6);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "The series - actually an arbitrary partial sum of the \+ series - can be simply defined by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "CF := (x,N) -> a[0]+sum(coef(k)*cos(k*x),k=1..N);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "We can verify the convergence of \+ the series by looking a the first few approximations." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "plot([f(x),CF(x,0),CF(x,2),CF(x,4), CF(x,6)],x=0..Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "A more info rmative plot for higher order approximations is a plot of the error." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "plot((f(x)-CF(x,50)),x=0. .Pi);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Problem 2" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "Find the Fourier S ine series for the function, " }{XPPEDIT 18 0 "f(x) = x*(Pi-x);" "6#/- %\"fG6#%\"xG*&F'\"\"\",&%#PiGF)F'!\"\"F)" }{TEXT -1 17 " on the interv al " }{XPPEDIT 18 0 "0 <= x;" "6#1\"\"!%\"xG" }{TEXT -1 5 " and " } {XPPEDIT 18 0 "x <= Pi;" "6#1%\"xG%#PiG" }{TEXT -1 1 "." }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "First, clear the workspace and define " } {XPPEDIT 18 0 "f(x);" "6#-%\"fG6#%\"xG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "restart: f := x -> x*(Pi - x);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Next compute the general coefficie nt, " }{XPPEDIT 18 0 "b[k] = 2*Int(f(x)*sin(k*x),x = 0 .. Pi)/Pi;" "6# /&%\"bG6#%\"kG*(\"\"#\"\"\"-%$IntG6$*&-%\"fG6#%\"xGF*-%$sinG6#*&F'F*F2 F*F*/F2;\"\"!%#PiGF*F:!\"\"" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "b[k] := (2/Pi)*int(f(x)*sin(k*x),x=0..Pi);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "Note that if " }{XPPEDIT 18 0 "k; " "6#%\"kG" }{TEXT -1 40 " is an integer, then the term involving " } {XPPEDIT 18 0 "sin(k*Pi);" "6#-%$sinG6#*&%\"kG\"\"\"%#PiGF(" }{TEXT -1 21 " will be zero. Also, " }{XPPEDIT 18 0 "cos(k*Pi) = (-1)^k;" "6# /-%$cosG6#*&%\"kG\"\"\"%#PiGF)),$\"\"\"!\"\"F(" }{TEXT -1 2 ". " }} {PARA 0 "" 0 "" {TEXT -1 83 "To use this coefficient expression in the series, we need to make it a function of " }{XPPEDIT 18 0 "k;" "6#%\" kG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "coef \+ := unapply(b[k],k);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "It is easy to see the pattern for the coefficients." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 96 "b[1] := coef(1);b[2] := coef(2);b[3] := coef(3);b[4 ] := coef(4);b[5] := coef(5);b[6] := coef(6);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "The series - actually an arbitrary partial sum of the \+ series - can be simply defined by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "SF := (x,N) -> sum(coef(k)*sin(k*x),k=1..N);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "We can verify the convergence of t he series by looking a the first few approximations." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "plot([f(x),SF(x,1),SF(x,3),SF(x,5)],x=0.. Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "A more informative plot f or higher order approximations is a plot of the error." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "plot((f(x)-SF(x,25)),x=0..Pi);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "One immediate observation is that the Sine series converges much more quickly than the Cosine series." }}{PARA 0 "" 0 "" {TEXT -1 108 "The maximum error is almost 100 times \+ smaller with only half as many terms. This is because the function and " }}{PARA 0 "" 0 "" {TEXT -1 60 "the first derivative are continuous u nder the odd extension." }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Probl em 3" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 19 "F ind the solution, " }{XPPEDIT 18 0 "u(x,t);" "6#-%\"uG6$%\"xG%\"tG" } {TEXT -1 83 ", to the heat equation on a bar where one end is insulate d, the temperature is held" }}{PARA 0 "" 0 "" {TEXT -1 108 "constant a t the other end, and the initial temperature distribution is specified . More specifically, solve " }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(u, t) = Diff(u,`$`(x,2));" "6#/-%%DiffG6$%\"uG%\"tG-F%6$F'-%\"$G6$%\"xG\" \"#" }{TEXT -1 11 " with " }{XPPEDIT 18 0 "Diff(u(0,t),x) = 0;" " 6#/-%%DiffG6$-%\"uG6$\"\"!%\"tG%\"xGF*" }{TEXT -1 4 ", " }{XPPEDIT 18 0 "u(Pi,t) = 0;" "6#/-%\"uG6$%#PiG%\"tG\"\"!" }{TEXT -1 10 ", and " }{XPPEDIT 18 0 "u(x,0) = x*(Pi-x);" "6#/-%\"uG6$%\"xG\"\"!*&F'\" \"\",&%#PiGF*F'!\"\"F*" }{TEXT -1 1 "," }}{PARA 0 "" 0 "" {TEXT -1 7 " where " }{XPPEDIT 18 0 "0 <= x;" "6#1\"\"!%\"xG" }{TEXT -1 3 ", " } {XPPEDIT 18 0 "x <= Pi;" "6#1%\"xG%#PiG" }{TEXT -1 8 ", and " } {XPPEDIT 18 0 "0 <= t;" "6#1\"\"!%\"tG" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "First, clear \+ the workspace and define " }{XPPEDIT 18 0 "f(x);" "6#-%\"fG6#%\"xG" } {TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "restart: f := x -> x*(Pi - x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "Start by \+ assuming a separable solution of the form " }{XPPEDIT 18 0 "G(t)*H(t); " "6#*&-%\"GG6#%\"tG\"\"\"-%\"HG6#F'F(" }{TEXT -1 43 ". Then we can c onclude that if there is a " }}{PARA 0 "" 0 "" {TEXT -1 28 "solution o f this form, then " }{XPPEDIT 18 0 "G(t);" "6#-%\"GG6#%\"tG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "H(x);" "6#-%\"HG6#%\"xG" }{TEXT -1 61 " m ust satisfy two ordinary differential equations of the form" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(G,t) = lambda*G;" "6#/-%%DiffG6$%\"GG%\" tG*&%'lambdaG\"\"\"F'F+" }{TEXT -1 9 " and " }{XPPEDIT 18 0 "Diff( H,`$`(x,2)) = lambda*H;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#*&%'lamb daG\"\"\"F'F/" }{TEXT -1 35 ", where the separation constant, " } {XPPEDIT 18 0 "lambda;" "6#%'lambdaG" }{TEXT -1 33 ", is the same for \+ both equations." }}{PARA 0 "" 0 "" {TEXT -1 35 "We consider the possib le values of " }{XPPEDIT 18 0 "lambda;" "6#%'lambdaG" }{TEXT -1 37 ", \+ and their role in the equation for " }{XPPEDIT 18 0 "H(x);" "6#-%\"HG6 #%\"xG" }{TEXT -1 24 ". Note that the boundary" }}{PARA 0 "" 0 "" {TEXT -1 23 "conditions imply that " }{XPPEDIT 18 0 "Diff(H(0),x) = 0 ;" "6#/-%%DiffG6$-%\"HG6#\"\"!%\"xGF*" }{TEXT -1 8 " and " } {XPPEDIT 18 0 "H(Pi) = 0;" "6#/-%\"HG6#%#PiG\"\"!" }{TEXT -1 1 "." }}} {SECT 1 {PARA 4 "" 0 "" {XPPEDIT 18 0 "lambda = 0;" "6#/%'lambdaG\"\"! " }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "In this case, we have \+ " }{XPPEDIT 18 0 "Diff(H,`$`(x,2)) = 0;" "6#/-%%DiffG6$%\"HG-%\"$G6$% \"xG\"\"#\"\"!" }{TEXT -1 42 ", and the general solution is of the for m " }{XPPEDIT 18 0 "H(x) = A*x+B;" "6#/-%\"HG6#%\"xG,&*&%\"AG\"\"\"F'F +F+%\"BGF+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 "The conditi on " }{XPPEDIT 18 0 "Diff(H(0),x) = 0;" "6#/-%%DiffG6$-%\"HG6#\"\"!%\" xGF*" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "A = 0;" "6#/%\"AG \"\"!" }{TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi) = 0; " "6#/-%\"HG6#%#PiG\"\"!" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6#/%\"BG\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 58 "We can instruct Maple to verify this reasoning as follows:" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "de0 := diff(H(x),x$2)=0;" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol0 := dsolve(de0,H(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unapply(rhs(sol0),x); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "solve(\{D(H)(0)=0,H(Pi) =0\},\{_C1,_C2\});" }}}}{SECT 1 {PARA 4 "" 0 "" {XPPEDIT 18 0 "lambda \+ = omega^2;" "6#/%'lambdaG*$%&omegaG\"\"#" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "In this case, we have " }{XPPEDIT 18 0 "Diff(H,`$`(x ,2)) = omega^2*H;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#*&%&omegaG\"\" #F'\"\"\"" }{TEXT -1 42 ", and the general solution is of the form " } {XPPEDIT 18 0 "H(x) = A*cosh(omega*x)+B*sinh(omega*x);" "6#/-%\"HG6#% \"xG,&*&%\"AG\"\"\"-%%coshG6#*&%&omegaGF+F'F+F+F+*&%\"BGF+-%%sinhG6#*& F0F+F'F+F+F+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 "The condi tion " }{XPPEDIT 18 0 "Diff(H(0),x) = 0;" "6#/-%%DiffG6$-%\"HG6#\"\"!% \"xGF*" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6#/%\"B G\"\"!" }{TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi) = 0; " "6#/-%\"HG6#%#PiG\"\"!" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "A = 0;" "6#/%\"AG\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 58 "We can instruct Maple to verify this reasoning as follows:" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "H:='H';de1 := diff(H(x),x$2) =omega^2*H(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol1 := d solve(de1,H(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unap ply(rhs(sol1),x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "solve( \{D(H)(0)=0,H(Pi)=0\},\{_C1,_C2\});" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 0 "" }{XPPEDIT 18 0 "lambda = -ome ga^2;" "6#/%'lambdaG,$*$%&omegaG\"\"#!\"\"" }{TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 22 "In this case, we have " }{XPPEDIT 18 0 "Diff(H,`$` (x,2)) = -omega^2*H;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#,$*&%&omega G\"\"#F'\"\"\"!\"\"" }{TEXT -1 42 ", and the general solution is of th e form " }{XPPEDIT 18 0 "H(x) = A*cos(omega*x)+B*sin(omega*x);" "6#/-% \"HG6#%\"xG,&*&%\"AG\"\"\"-%$cosG6#*&%&omegaGF+F'F+F+F+*&%\"BGF+-%$sin G6#*&F0F+F'F+F+F+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 "The \+ condition " }{XPPEDIT 18 0 "Diff(H(0),x) = 0;" "6#/-%%DiffG6$-%\"HG6# \"\"!%\"xGF*" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6 #/%\"BG\"\"!" }{TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi ) = 0;" "6#/-%\"HG6#%#PiG\"\"!" }{TEXT -1 14 " implies that " } {XPPEDIT 18 0 "A = 0;" "6#/%\"AG\"\"!" }{TEXT -1 4 " or " }{XPPEDIT 18 0 "cos(omega*Pi) = 0;" "6#/-%$cosG6#*&%&omegaG\"\"\"%#PiGF)\"\"!" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 43 "This last condition will be true whenever " }{XPPEDIT 18 0 "omega = (2*k-1)/2;" "6#/%&omegaG* &,&*&\"\"#\"\"\"%\"kGF)F)\"\"\"!\"\"F)\"\"#F," }{TEXT -1 6 " for " } {XPPEDIT 18 0 "k;" "6#%\"kG" }{TEXT -1 16 " = 1, 2, 3, ...." }}{PARA 0 "" 0 "" {TEXT -1 58 "We can instruct Maple to verify this reasoning \+ as follows:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "H:='H';de2 := diff(H(x),x$2)=-omega^2*H(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol2 := dsolve(de2,H(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unapply(rhs(sol2),x);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 39 "solve(\{D(H)(0)=0,H(Pi)=0\},\{omega,_C2\});" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Note that it is up to us to notice that other values of " }{XPPEDIT 18 0 "omega;" "6#%&omegaG" }{TEXT -1 11 " also work." }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "With these values of " }{XPPEDIT 18 0 "omega;" "6#%&omegaG" }{TEXT -1 41 " we se e that there are solutions for the " }{XPPEDIT 18 0 "G(t);" "6#-%\"GG6 #%\"tG" }{TEXT -1 27 " equation that are given by" }}{PARA 0 "" 0 "" {TEXT -1 8 " " }{XPPEDIT 18 0 "G(t) = C*exp(-((2*k-1)/2)^2*t); " "6#/-%\"GG6#%\"tG*&%\"CG\"\"\"-%$expG6#,$*&*&,&*&\"\"#F*%\"kGF*F*\" \"\"!\"\"F*\"\"#F6\"\"#F'F*F6F*" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 57 "Thus there are solutions to the heat equation of the form " }}{PARA 0 "" 0 "" {TEXT -1 6 " " }{XPPEDIT 18 0 "G(t)*H(x) = c[ k]*exp(-((2*k-1)/2)^2*t)*cos((2*k-1)*x/2);" "6#/*&-%\"GG6#%\"tG\"\"\"- %\"HG6#%\"xGF)*(&%\"cG6#%\"kGF)-%$expG6#,$*&*&,&*&\"\"#F)F2F)F)\"\"\"! \"\"F)\"\"#F=\"\"#F(F)F=F)-%$cosG6#*(,&*&\"\"#F)F2F)F)\"\"\"F=F)F-F)\" \"#F=F)" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 48 "We can instruc t Maple to verify this as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "u[k] := (x,t) -> c[k]*exp(-((2*k-1)/2)^2*t)*cos((2*k- 1)*x/2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "D[2](u[k])(x,t) - D[1,1](u[k])(x,t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "We have \+ one remaining condition to satisfy, namely " }{XPPEDIT 18 0 "u(x,0) \+ = x*(Pi-x);" "6#/-%\"uG6$%\"xG\"\"!*&F'\"\"\",&%#PiGF*F'!\"\"F*" } {TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 82 "Since we have an infini te set of solutions, each with an unspecified coefficient, " } {XPPEDIT 18 0 "c[k];" "6#&%\"cG6#%\"kG" }{TEXT -1 22 ", can we find a \+ linear" }}{PARA 0 "" 0 "" {TEXT -1 64 "combination, which yields the s olution? That is, can we write " }{XPPEDIT 18 0 "u(x,t) = sum(u[k](x ,t),k = 1 .. infinity);" "6#/-%\"uG6$%\"xG%\"tG-%$sumG6$-&F%6#%\"kG6$F 'F(/F/;\"\"\"%)infinityG" }{TEXT -1 3 " ? " }}{PARA 0 "" 0 "" {TEXT -1 14 "The answer is " }{TEXT 258 3 "yes" }{TEXT -1 36 ", provided we \+ can find coefficients " }{XPPEDIT 18 0 "c[k];" "6#&%\"cG6#%\"kG" } {TEXT -1 11 ", such that" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "u(x,0) = su m(c[k]*cos((2*k-1)*x/2),k = 1 .. infinity);" "6#/-%\"uG6$%\"xG\"\"!-%$ sumG6$*&&%\"cG6#%\"kG\"\"\"-%$cosG6#*(,&*&\"\"#F1F0F1F1\"\"\"!\"\"F1F' F1\"\"#F:F1/F0;\"\"\"%)infinityG" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "But this is just the answ er to Problem 1 " }{TEXT 259 11 "- or is it?" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 260 82 "Unfortunately, the answer to Problem 1 does NOT give us the answer to this problem" }}{PARA 0 "" 0 "" {TEXT 261 49 "because the frequency t erm in Problem 1 is simply" }{TEXT -1 1 " " }{XPPEDIT 18 0 "k;" "6#%\" kG" }{TEXT -1 1 " " }{TEXT 262 32 "while the frequency term here is" } {TEXT -1 1 " " }{XPPEDIT 18 0 "(2*k-1)/2;" "6#*&,&*&\"\"#\"\"\"%\"kGF' F'\"\"\"!\"\"F'\"\"#F*" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 98 "The preceding work constitutes the answer I was looking f or on the test. Curiosity demands that we" }}{PARA 0 "" 0 "" {TEXT -1 97 "say something about the coefficients of the series that we just de rived. As the book mentions in" }}{PARA 0 "" 0 "" {TEXT -1 99 "Sectio n 16.1 on page 791, the Sturm-Liouville theorem (Section 6.1) asserts \+ that this will work and" }}{PARA 0 "" 0 "" {TEXT -1 45 "that the coeff icients can be calculated from " }}{PARA 0 "" 0 "" {TEXT -1 5 " " }{XPPEDIT 18 0 "c[k] = Int(f(x)*cos((2*k-1)*x/2),x = 0 .. Pi)/Int(cos( (2*k-1)*x/2)^2,x = 0 .. Pi);" "6#/&%\"cG6#%\"kG*&-%$IntG6$*&-%\"fG6#% \"xG\"\"\"-%$cosG6#*(,&*&\"\"#F1F'F1F1\"\"\"!\"\"F1F0F1\"\"#F:F1/F0;\" \"!%#PiGF1-F*6$*$-F36#*(,&*&\"\"#F1F'F1F1\"\"\"F:F1F0F1\"\"#F:\"\"#/F0 ;F>F?F:" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 102 "Note that the \+ term in the denominator is exactly what we need if we want to reproduc e a single term of" }}{PARA 0 "" 0 "" {TEXT -1 11 "the series." }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "One immediate observation is that the Sine series converges much more quickly than the Cosine series." }}{PARA 0 "" 0 "" {TEXT -1 108 "The maximum error is almost 100 times \+ smaller with only half as many terms. This is because the function and " }}{PARA 0 "" 0 "" {TEXT -1 60 "the first derivative are continuous u nder the odd extension." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 " d[k] := int((cos((2*k-1)*x/2))^2,x=0..Pi);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 52 "c[k] := (1/d[k])*int(f(x)*cos((2*k-1)*x/2),x=0..Pi) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "ccoef := unapply(c[k], k);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "c[1] := ccoef(1);c[2 ] := ccoef(2);c[3] := ccoef(3);c[4] := ccoef(4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "HF := (x,N) -> sum(ccoef(k)*cos((2*k-1)*x/2), k=1..N);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "plot([f(x),HF(x ,1),HF(x,2),HF(x,3),HF(x,4)],x=0..Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Notice that each of the partial sums has a zero derivativ e at " }{XPPEDIT 18 0 "x = 0;" "6#/%\"xG\"\"!" }{TEXT -1 51 ", which i s one of the requirements of the solution." }}{PARA 0 "" 0 "" {TEXT -1 15 "However, since " }{XPPEDIT 18 0 "f(x);" "6#-%\"fG6#%\"xG" } {TEXT -1 21 " has a derivative of " }{XPPEDIT 18 0 "Pi;" "6#%#PiG" } {TEXT -1 4 " at " }{XPPEDIT 18 0 "x = 0;" "6#/%\"xG\"\"!" }{TEXT -1 33 ", the series converges slowly at " }{XPPEDIT 18 0 "x = 0;" "6#/%\" xG\"\"!" }{TEXT -1 22 ". On the other hand it" }}{PARA 0 "" 0 "" {TEXT -1 93 "definitely seems to be converging. This is further suppo rted by the error plot for 25 terms." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "plot(f(x)-HF(x,25),x=0..Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "An approximation to the solultion using 25 terms is th us" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "u[25] := (x,t) -> sum (ccoef(k)*exp(-((2*k-1)/2)^2*t)*cos((2*k-1)*x/2),k=1..25);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 125 "We can get a plot of this approximate so lution. It shows the temperature rising at the insulated end with a z ero derivative." }}{PARA 0 "" 0 "" {TEXT -1 123 "It also shows that th e total heat in the rod is decreasing as the temperature in the rod de cays to zero, the temperature at" }}{PARA 0 "" 0 "" {TEXT -1 12 "the f ar end." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "plot3d(u[25],0.. Pi,0..1,axes=BOXED,labels=['x','t','u']);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "We can also use Maple's plot package to show this solutio n in a movie." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "with(plots ): animate(u[25](x,t), x=0..Pi, t=0..4);" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Problem 4" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 19 "Find the solution, \+ " }{XPPEDIT 18 0 "u(x,t);" "6#-%\"uG6$%\"xG%\"tG" }{TEXT -1 79 ", to t he wave equation for a vibrating string which is initially flat but ha s a" }}{PARA 0 "" 0 "" {TEXT -1 54 "specified initial velocity. More \+ specifically, solve " }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(u,`$`(t,2) ) = Diff(u,`$`(x,2));" "6#/-%%DiffG6$%\"uG-%\"$G6$%\"tG\"\"#-F%6$F'-F) 6$%\"xG\"\"#" }{TEXT -1 11 " with " }{XPPEDIT 18 0 "Diff(u(0,t),x ) = 0;" "6#/-%%DiffG6$-%\"uG6$\"\"!%\"tG%\"xGF*" }{TEXT -1 4 ", " } {XPPEDIT 18 0 "u(Pi,t) = 0;" "6#/-%\"uG6$%#PiG%\"tG\"\"!" }{TEXT -1 4 ", " }{XPPEDIT 18 0 "u(x,0) = 0;" "6#/-%\"uG6$%\"xG\"\"!F(" }{TEXT -1 11 ", and " }{XPPEDIT 18 0 "Diff(u(x,0),x) = x*(Pi-x);" "6#/-% %DiffG6$-%\"uG6$%\"xG\"\"!F**&F*\"\"\",&%#PiGF-F*!\"\"F-" }{TEXT -1 1 "," }}{PARA 0 "" 0 "" {TEXT -1 7 "where " }{XPPEDIT 18 0 "0 <= x;" "6 #1\"\"!%\"xG" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "x <= Pi;" "6#1%\"xG%#P iG" }{TEXT -1 8 ", and " }{XPPEDIT 18 0 "0 <= t;" "6#1\"\"!%\"tG" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 38 "First c lear the workspace and define " }{XPPEDIT 18 0 "f(x);" "6#-%\"fG6#%\"xG" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "restart: f := x -> x*(Pi-x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "First note that the specific conditions do not exact ly match the verbal description. The derivative condition" }}{PARA 0 " " 0 "" {TEXT -1 3 "at " }{XPPEDIT 18 0 "x = 0;" "6#/%\"xG\"\"!" } {TEXT -1 103 " implies that we have a sliding connection at that end s o that the string always has a zero derivative." }}{PARA 0 "" 0 "" {TEXT -1 107 "If we keep this condition, then the problem is essential ly identical to Problem 3. Let's consider the case" }}{PARA 0 "" 0 " " {TEXT -1 6 "where " }{XPPEDIT 18 0 "u(0,t) = 0;" "6#/-%\"uG6$\"\"!% \"tGF'" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "Start by assuming a separable solution of the form \+ " }{XPPEDIT 18 0 "G(t)*H(t);" "6#*&-%\"GG6#%\"tG\"\"\"-%\"HG6#F'F(" } {TEXT -1 43 ". Then we can conclude that if there is a " }}{PARA 0 " " 0 "" {TEXT -1 28 "solution of this form, then " }{XPPEDIT 18 0 "G(t) ;" "6#-%\"GG6#%\"tG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "H(x);" "6#-% \"HG6#%\"xG" }{TEXT -1 61 " must satisfy two ordinary differential equ ations of the form" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "Diff(G,`$`(t,2)) \+ = lambda*G;" "6#/-%%DiffG6$%\"GG-%\"$G6$%\"tG\"\"#*&%'lambdaG\"\"\"F'F /" }{TEXT -1 9 " and " }{XPPEDIT 18 0 "Diff(H,`$`(x,2)) = lambda*H ;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#*&%'lambdaG\"\"\"F'F/" }{TEXT -1 35 ", where the separation constant, " }{XPPEDIT 18 0 "lambda;" " 6#%'lambdaG" }{TEXT -1 33 ", is the same for both equations." }}{PARA 0 "" 0 "" {TEXT -1 35 "We consider the possible values of " }{XPPEDIT 18 0 "lambda;" "6#%'lambdaG" }{TEXT -1 37 ", and their role in the equ ation for " }{XPPEDIT 18 0 "H(x);" "6#-%\"HG6#%\"xG" }{TEXT -1 24 ". N ote that the boundary" }}{PARA 0 "" 0 "" {TEXT -1 23 "conditions imply that " }{XPPEDIT 18 0 "H(0) = 0;" "6#/-%\"HG6#\"\"!F'" }{TEXT -1 8 " and " }{XPPEDIT 18 0 "H(Pi) = 0;" "6#/-%\"HG6#%#PiG\"\"!" }{TEXT -1 1 "." }}}{SECT 1 {PARA 4 "" 0 "" {XPPEDIT 18 0 "lambda = 0;" "6#/%' lambdaG\"\"!" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "In this ca se, we have " }{XPPEDIT 18 0 "Diff(H,`$`(x,2)) = 0;" "6#/-%%DiffG6$%\" HG-%\"$G6$%\"xG\"\"#\"\"!" }{TEXT -1 42 ", and the general solution is of the form " }{XPPEDIT 18 0 "H(x) = A*x+B;" "6#/-%\"HG6#%\"xG,&*&%\" AG\"\"\"F'F+F+%\"BGF+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 " The condition " }{XPPEDIT 18 0 "H(x) = 0;" "6#/-%\"HG6#%\"xG\"\"!" } {TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6#/%\"BG\"\"!" } {TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi) = 0;" "6#/-% \"HG6#%#PiG\"\"!" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "A = 0; " "6#/%\"AG\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 58 "We ca n instruct Maple to verify this reasoning as follows:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "de0 := diff(H(x),x$2)=0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol0 := dsolve(de0,H(x));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unapply(rhs(sol0),x);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "solve(\{H(0)=0,H(Pi)=0\},\{ _C1,_C2\});" }}}}{SECT 1 {PARA 4 "" 0 "" {XPPEDIT 18 0 "lambda = omega ^2;" "6#/%'lambdaG*$%&omegaG\"\"#" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "In this case, we have " }{XPPEDIT 18 0 "Diff(H,`$`(x,2)) \+ = omega^2*H;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#*&%&omegaG\"\"#F'\" \"\"" }{TEXT -1 42 ", and the general solution is of the form " } {XPPEDIT 18 0 "H(x) = A*cosh(omega*x)+B*sinh(omega*x);" "6#/-%\"HG6#% \"xG,&*&%\"AG\"\"\"-%%coshG6#*&%&omegaGF+F'F+F+F+*&%\"BGF+-%%sinhG6#*& F0F+F'F+F+F+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 "The condi tion " }{XPPEDIT 18 0 "H(0) = 0;" "6#/-%\"HG6#\"\"!F'" }{TEXT -1 14 " \+ implies that " }{XPPEDIT 18 0 "A = 0;" "6#/%\"AG\"\"!" }{TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi) = 0;" "6#/-%\"HG6#%#PiG\"\" !" }{TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6#/%\"BG\"\" !" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 58 "We can instruct Mapl e to verify this reasoning as follows:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "H:='H': de1 := diff(H(x),x$2)=omega^2*H(x);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol1 := dsolve(de1,H(x));" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unapply(rhs(sol1),x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "solve(\{D(H)(0)=0,H(Pi)=0 \},\{_C1,_C2\});" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 0 "" }{XPPEDIT 18 0 "lambda = -omega^2;" "6#/%'lambda G,$*$%&omegaG\"\"#!\"\"" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "In this case, we have " }{XPPEDIT 18 0 "Diff(H,`$`(x,2)) = -omega^2*H ;" "6#/-%%DiffG6$%\"HG-%\"$G6$%\"xG\"\"#,$*&%&omegaG\"\"#F'\"\"\"!\"\" " }{TEXT -1 42 ", and the general solution is of the form " }{XPPEDIT 18 0 "H(x) = A*cos(omega*x)+B*sin(omega*x);" "6#/-%\"HG6#%\"xG,&*&%\"A G\"\"\"-%$cosG6#*&%&omegaGF+F'F+F+F+*&%\"BGF+-%$sinG6#*&F0F+F'F+F+F+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 14 "The condition " } {XPPEDIT 18 0 "H(0) = 0;" "6#/-%\"HG6#\"\"!F'" }{TEXT -1 14 " implies \+ that " }{XPPEDIT 18 0 "A = 0;" "6#/%\"AG\"\"!" }{TEXT -1 20 ", and the condition " }{XPPEDIT 18 0 "H(Pi) = 0;" "6#/-%\"HG6#%#PiG\"\"!" } {TEXT -1 14 " implies that " }{XPPEDIT 18 0 "B = 0;" "6#/%\"BG\"\"!" } {TEXT -1 4 " or " }{XPPEDIT 18 0 "sin(omega*Pi) = 0;" "6#/-%$sinG6#*&% &omegaG\"\"\"%#PiGF)\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 43 "This last condition will be true whenever " }{XPPEDIT 18 0 "omega = k;" "6#/%&omegaG%\"kG" }{TEXT -1 6 " for " }{XPPEDIT 18 0 "k;" "6# %\"kG" }{TEXT -1 16 " = 1, 2, 3, ...." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 58 "We can instruct Maple to verify this \+ reasoning as follows:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "H:= 'H': de2 := diff(H(x),x$2)=-omega^2*H(x);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 25 "sol2 := dsolve(de2,H(x));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "H:=unapply(rhs(sol2),x);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 36 "solve(\{H(0)=0,H(Pi)=0\},\{omega,_C2\});" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Note that it is up to us to notice that other values of " }{XPPEDIT 18 0 "omega;" "6#%&omegaG" }{TEXT -1 11 " also work." }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "With these values of " }{XPPEDIT 18 0 "omega;" "6#%&omegaG" }{TEXT -1 42 " we se e that the general solution for the " }{XPPEDIT 18 0 "G(t);" "6#-%\"GG 6#%\"tG" }{TEXT -1 26 " equation that is given by" }}{PARA 0 "" 0 "" {TEXT -1 8 " " }{XPPEDIT 18 0 "G(t) = C*cos(k*t)+D*sin(k*t);" " 6#/-%\"GG6#%\"tG,&*&%\"CG\"\"\"-%$cosG6#*&%\"kGF+F'F+F+F+*&%\"DGF+-%$s inG6#*&F0F+F'F+F+F+" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 57 "Thus there are solutions to the heat equ ation of the form" }}{PARA 0 "" 0 "" {TEXT -1 6 " " }{XPPEDIT 18 0 "G(t)*H(x) = (c[k]*cos(k*t)+d[k]*sin(k*t))*sin(k*x);" "6#/*&-%\"GG6# %\"tG\"\"\"-%\"HG6#%\"xGF)*&,&*&&%\"cG6#%\"kGF)-%$cosG6#*&F4F)F(F)F)F) *&&%\"dG6#F4F)-%$sinG6#*&F4F)F(F)F)F)F)-F>6#*&F4F)F-F)F)" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 48 "We \+ can instruct Maple to verify this as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "u[k] := (x,t) -> (c[k]*cos(k*t)+d[k]*sin(k*t))*s in(k*x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "D[2,2](u[k])(x, t) - D[1,1](u[k])(x,t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 " simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "We have two remai ning conditions to satisfy, namely " }{XPPEDIT 18 0 "u(x,0) = 0;" "6# /-%\"uG6$%\"xG\"\"!F(" }{TEXT -1 9 ", and " }{XPPEDIT 18 0 "Diff(u( x,0),x) = x*(Pi-x);" "6#/-%%DiffG6$-%\"uG6$%\"xG\"\"!F**&F*\"\"\",&%#P iGF-F*!\"\"F-" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 83 "Since we have an infinite set of solutions, each with an unspecified coefficie nts, " }{XPPEDIT 18 0 "c[k];" "6#&%\"cG6#%\"kG" }{TEXT -1 6 ", and " } {XPPEDIT 18 0 "d[k];" "6#&%\"dG6#%\"kG" }{TEXT -1 22 ", can we find a \+ linear" }}{PARA 0 "" 0 "" {TEXT -1 40 "combination, which yields the s olution? " }}{PARA 0 "" 0 "" {TEXT -1 22 "That is, can we write " } {XPPEDIT 18 0 "u(x,t) = sum(u[k](x,t),k = 1 .. infinity);" "6#/-%\"uG6 $%\"xG%\"tG-%$sumG6$-&F%6#%\"kG6$F'F(/F/;\"\"\"%)infinityG" }{TEXT -1 3 " ? " }}{PARA 0 "" 0 "" {TEXT -1 11 "First, set " }{XPPEDIT 18 0 "t \+ = 0;" "6#/%\"tG\"\"!" }{TEXT -1 38 " and plug this into the series to \+ get " }}{PARA 0 "" 0 "" {TEXT -1 7 " " }{XPPEDIT 18 0 "u(x,0) = \+ sum(c[k]*sin(k*x),k = 1 .. infinity);" "6#/-%\"uG6$%\"xG\"\"!-%$sumG6$ *&&%\"cG6#%\"kG\"\"\"-%$sinG6#*&F0F1F'F1F1/F0;\"\"\"%)infinityG" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "But this can only be true for all " }{XPPEDIT 18 0 "x;" " 6#%\"xG" }{TEXT -1 5 " if " }{XPPEDIT 18 0 "c[k] = 0;" "6#/&%\"cG6#% \"kG\"\"!" }{TEXT -1 28 ". This leaves the condition" }}{PARA 0 "" 0 "" {TEXT -1 5 " " }{XPPEDIT 18 0 "Diff(u(x,0),x) = sum(d[k]*(-k)*s in(k*x),k = a .. infinity);" "6#/-%%DiffG6$-%\"uG6$%\"xG\"\"!F*-%$sumG 6$*(&%\"dG6#%\"kG\"\"\",$F3!\"\"F4-%$sinG6#*&F3F4F*F4F4/F3;%\"aG%)infi nityG" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 48 "This is the answe r to Problem 2 provided we set " }{XPPEDIT 18 0 "d[k] = -b[k]/k;" "6#/ &%\"dG6#%\"kG,$*&&%\"bG6#F'\"\"\"F'!\"\"F." }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "d[k] := (2/(k*Pi))*int(f(x)*sin(k*x ),x=0..Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dcoef := una pply(d[k],k);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "d[1] := dc oef(1);d[2] := dcoef(2);d[3] := dcoef(3);d[4] := dcoef(4);d[5] := dcoe f(5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "An approximation to the \+ solultion using 25 terms is thus" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "u[25] := (x,t) -> sum(dcoef(k)*sin(k*t)*sin(k*x),k=1. .25);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 118 "We can get a plot of th is approximate solution. It shows the string starting out flat and th en vibrating periodically" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "plot3d(u[25],0..Pi,0..10,axes=BOXED,labels=['x','t','u']);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "We can also use Maple's plot packa ge to view this solution as a movie." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "with(plots): animate(u[25](x,t), x=0..Pi, t=0..10); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{MARK "1" 0 } {VIEWOPTS 1 1 0 1 1 1803 }