{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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "Treibergs D ue Sept. 14, 2005." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 58 "In the first assignment, we shall explore some basic MAPL E" }}{PARA 0 "" 0 "" {TEXT -1 69 "capabilities in solving differential equations. If you are unfamiliar" }}{PARA 0 "" 0 "" {TEXT -1 58 "with MAPLE, you should work through Prof. Korevaar's MAPLE" }}{PARA 0 "" 0 "" {TEXT -1 13 "introduction " }}{PARA 0 "" 0 "" {TEXT -1 0 "" } {HYPERLNK 17 "http://www.math.utah.edu/~korevaar/2250fall04/2250falltu t.mws" 1 "K2250falltut.mws" "" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 31 "or download a text version from" }}{PARA 0 "" 0 "" {TEXT -1 61 "http://www.math.utah.edu/~korevaar/2250fall04/2250falltut.pdf" }} {PARA 0 "" 0 "" {TEXT -1 30 " Page numbers correspond to a " }}{PARA 0 "" 0 "" {TEXT -1 71 "different text than ours.) He develops enough t ools for doing the third" }}{PARA 0 "" 0 "" {TEXT -1 70 "exercise, abo ut the variation of the inside temperature of an unheated" }}{PARA 0 " " 0 "" {TEXT -1 68 "Salt Lake City apartment due to outside temperatur e variations. This" }}{PARA 0 "" 0 "" {TEXT -1 69 "follows the Computi ng Project 1.5 from the text by Edwards and Penney" }}{PARA 0 "" 0 "" {TEXT -1 18 "(p.56 in 3rd ed.) " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 62 "Please work the problems at the bottom of this page. These are" }}{PARA 0 "" 0 "" {TEXT -1 66 "different questi ons than for M2250, so you will not be able to use" }}{PARA 0 "" 0 "" {TEXT -1 43 "Korevaar's templates without some revision." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "We start by solvin g differential equations, following Computer Project" }}{PARA 0 "" 0 " " {TEXT -1 66 "1.6. (p. 73 in 3rd ed.) We illustrate some basic MAPLE \+ constructs." }}{PARA 0 "" 0 "" {TEXT -1 31 "Suppose we wished to check that" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 " y(x)= 5e^(3x) - 6e^(-4x) - x^3/12 - x^2/48 - 13 x^2/288 -25/3456" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 35 "satisfie s the differential equation" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 32 " y'' + y' - 12 y - x^3 = 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "Enter a function y( x). Recall that := is the assignment operator," }}{PARA 0 "" 0 "" {TEXT -1 30 "thus the function is named y." }}{PARA 0 "" 0 "" {TEXT -1 50 "It is always a good idea to clear your variables. " }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "y:= x->5*exp(3*x)-6*exp(-4*x )-x^3/12-x^2/48-13*x/288-25/3456;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "The value of the function along with the first derivative at zero \+ is" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "y(0);D(y)(0);# " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "We form the differential expression, wher e diff(y(x),x,x) means" }}{PARA 0 "" 0 "" {TEXT -1 60 "differentiate \+ the expression y(x) with respect to x twice." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "diff(y(x),x,x)+diff(y(x),x) - 12*y(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "The result is x^3, which is the desired \+ one. We'll see another way to" }}{PARA 0 "" 0 "" {TEXT -1 29 "check la ter, using odetest." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "Suppose that we wished to show that z(x)= x e^x sati sfies x^2 z'' -" }}{PARA 0 "" 0 "" {TEXT -1 19 "x(x+1)z' + z = 0 ," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "z:= x->x*exp(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "x^2*diff(z(x),x,x)-x*(x+1)*diff(z(x ),x)+z(x);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "This is too complic ated. MAPLE can simplify expressions in a number of" }}{PARA 0 "" 0 " " {TEXT -1 65 "ways. One way to try is to call the operation simplify( % ). % is" }}{PARA 0 "" 0 "" {TEXT -1 65 "MAPLE's way of referring to the previously displayed experession." }}{PARA 0 "" 0 "" {TEXT -1 60 "Simplification yields zero, so the expression is a solution." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "There are strong ODE specific tools. First the ODE l ibrary is loaded." }}{PARA 0 "" 0 "" {TEXT -1 68 "Then a variable eq1 \+ is stored with a differential equation involving" }}{PARA 0 "" 0 "" {TEXT -1 64 "the unknown expression u(x). I did not call the functio n y(x)" }}{PARA 0 "" 0 "" {TEXT -1 56 "because this already has a dif ferent meaning for MAPLE. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( DEtools):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "eq1:= diff(u(x ),x,x)+diff(u(x),x) - 12*u(x)-x^3=0;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "Now we see some of MAPLE'S power. Invoking the DE solver we loo k for" }}{PARA 0 "" 0 "" {TEXT -1 32 "the general solution of the ODE. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "dsolve(eq1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "WOW! This is the general solution, where _C1 an d _C2 are constants of" }}{PARA 0 "" 0 "" {TEXT -1 70 "integration. If we wish to add initial conditions, we can. Trying the" }}{PARA 0 "" 0 "" {TEXT -1 31 "initial conditions from before," }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 55 "sol1:=dsolve(\{eq1,u(0)=-3481/3456, D(u)(0)=11219/2 88\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Thus MAPLE finds the so lution from the ODE and IC. DEtools also has a" }}{PARA 0 "" 0 "" {TEXT -1 70 "routine that plugs functions into differential equations, which we did" }}{PARA 0 "" 0 "" {TEXT -1 61 "above in a more bare-han ds way. It is the procedure odetest. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "odetest(sol1,eq1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "From \+ page 71," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "dsolve(D(v)(x)-sin(x - \+ v(x)),v(x));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "Here is an illust ration of slope fields. this is problem 28[24]" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "eq3:= D(w)(x)=x+w(x)^2/2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "You can try : dsolve( eq3, w(0)=1); But the answer is exp ressed in" }}{PARA 0 "" 0 "" {TEXT -1 44 "terms of certain advanced sp ecial functions." }}{PARA 0 "" 0 "" {TEXT -1 59 "It is more meaningful to plot the slope fields with several" }}{PARA 0 "" 0 "" {TEXT -1 13 "trajectories." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "DEplot( eq3, w(x) , x=-1..0.5, \{seq([w(0)=k/2],k=-2..4)\}, color=black," }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 64 "linecolor=[red,magenta,blue,green,cyan,coral,n avy],arrows=LINE);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "M2280 - 1 FIRST MAPLE LAB QUESTIO NS." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "Be sure your name and student number are on your paper. Do not hand in" }}{PARA 0 "" 0 "" {TEXT -1 70 "your working through my example problem s. Write up solutions in a self" }}{PARA 0 "" 0 "" {TEXT -1 68 "contai ned manner. Use enough comments to explain your analysis. Have" }} {PARA 0 "" 0 "" {TEXT -1 62 "MAPLE produce the solutions and graphs. L abel these by hand if" }}{PARA 0 "" 0 "" {TEXT -1 58 "necessary. Hand \+ in a printed hard copy of your solutions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "1. Use MAPLE to solve any one o f the problems from section 1.6 page 71" }}{PARA 0 "" 0 "" {TEXT -1 61 "(all page numbers from text 3rd ed.) Check that MAPLES answer" }} {PARA 0 "" 0 "" {TEXT -1 18 "satisfies the ODE." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 "2. For one of the review problems 31-36 on p. 76, use MAPLE to plot" }}{PARA 0 "" 0 "" {TEXT -1 62 "the slope field and several trajectories. Be sure to pick your " }}{PARA 0 "" 0 "" {TEXT -1 70 "rectangle and initial points to inclu de some interesting trajectories." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 69 "3. (Taken from Korevaar's M2250 fall 200 3) You are to do the section" }}{PARA 0 "" 0 "" {TEXT -1 64 "1.5 compu ter project. A preliminary version, in which the text's" }}{PARA 0 "" 0 "" {TEXT -1 62 "discussion (pages 56-58, 3rd ed.) is expanded to inc lude Maple" }}{PARA 0 "" 0 "" {TEXT -1 64 "commands, is found at the e nd of Prof. Korevaar's tutorial which" }}{PARA 0 "" 0 "" {TEXT -1 69 " accompanies this project. It is assumed that you have already worked " }}{PARA 0 "" 0 "" {TEXT -1 15 "through that. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 9 "SCENARIO:" }}{PARA 0 "" 0 "" {TEXT -1 69 "It is not summer in Georgia. It is March in Salt Lake City. We will" }}{PARA 0 "" 0 "" {TEXT -1 69 "dream it is early wint er and that the 5-day forecast in the newspaper" }}{PARA 0 "" 0 "" {TEXT -1 68 "says the weather will be stable, with lows of 11 degrees, and highs" }}{PARA 0 "" 0 "" {TEXT -1 66 "of 51 degrees. As in the text and for the sake of simplicity, we" }}{PARA 0 "" 0 "" {TEXT -1 70 "will assume a sinusoidal daily temperature oscillation, except our low" }}{PARA 0 "" 0 "" {TEXT -1 57 "will be at 3:30 a.m, and our hig h will be at 3:30 p.m. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 67 "We must leave town for 3 days, and are deciding wh ether to turn off" }}{PARA 0 "" 0 "" {TEXT -1 70 "the heat while we ar e gone. The question we wonder about is, will the" }}{PARA 0 "" 0 "" {TEXT -1 62 "water pipes in the house freeze if we do turn off the hea t? " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 64 " a. Review the model which leads to equation (3) on page 57. Use" }} {PARA 0 "" 0 "" {TEXT -1 67 "integrals #49 and #50 (flyleaf) and the a lgorithm for solving first" }}{PARA 0 "" 0 "" {TEXT -1 70 "order linea r DE's in section 1.5 (p. 47) to solve (3) by hand, keeping" }}{PARA 0 "" 0 "" {TEXT -1 66 "all parameters as letters. Staple your work o nto the printout of" }}{PARA 0 "" 0 "" {TEXT -1 67 "your completed pro ject which you hand in. Your answer should agree" }}{PARA 0 "" 0 "" {TEXT -1 67 "with equation (4) on page 57. You will see that the cons tant c0 in" }}{PARA 0 "" 0 "" {TEXT -1 64 "that answer is the constant C of integration you obtain when you" }}{PARA 0 "" 0 "" {TEXT -1 66 " follow the solution recipe for linear DE's. You find its value in" }} {PARA 0 "" 0 "" {TEXT -1 67 "terms of the initial condition u(0)=u0 by plugging in u=u0, t=0, as" }}{PARA 0 "" 0 "" {TEXT -1 7 "usual. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 "b. Use d solve to have Maple find the solution to (3), with u(0)=u0." }}{PARA 0 "" 0 "" {TEXT -1 67 "You might have already done this in the tutoria l, in which case you" }}{PARA 0 "" 0 "" {TEXT -1 70 "can copy the appr opriate commands from there, paste them in here, and" }}{PARA 0 "" 0 "" {TEXT -1 69 "re-execute them. Check that your solution agrees with your hand work" }}{PARA 0 "" 0 "" {TEXT -1 34 "above, as well as with the text's." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 58 "c. Figure out the parameter values for the Salt Lake City" }} {PARA 0 "" 0 "" {TEXT -1 69 "temperature, as modeled above. Of course , omega will still be Pi/12," }}{PARA 0 "" 0 "" {TEXT -1 68 "but now y ou have different daily average temperature, amplitude, and" }}{PARA 0 "" 0 "" {TEXT -1 70 "phase than was used in equation (2) on page 57, when summer in Georgia" }}{PARA 0 "" 0 "" {TEXT -1 67 "was being mode led. Fill in the new values below. Then work out by" }}{PARA 0 "" 0 "" {TEXT -1 67 "hand, using the cosine addition formula, the values yo u should take" }}{PARA 0 "" 0 "" {TEXT -1 68 "for a0, a1, b1, so that \+ A(t) is given by (1) on page 57, and so that" }}{PARA 0 "" 0 "" {TEXT -1 69 "the differential equation (3) also has the correct parameter v alues." }}{PARA 0 "" 0 "" {TEXT -1 24 "Include in your writeup:" }} {PARA 0 "" 0 "" {TEXT -1 2 "# " }}{PARA 0 "" 0 "" {TEXT -1 23 "# Avera ge Temperature =" }}{PARA 0 "" 0 "" {TEXT -1 36 "# Temperature variati on amplitude = " }}{PARA 0 "" 0 "" {TEXT -1 48 "# Phase delay (was 4 h ours in Georgia example) =" }}{PARA 0 "" 0 "" {TEXT -1 2 "# " }}{PARA 0 "" 0 "" {TEXT -1 19 "> omega:=Pi/12.0; " }}{PARA 0 "" 0 "" {TEXT -1 7 "> a0:= " }}{PARA 0 "" 0 "" {TEXT -1 33 "> #don't forget the s emicolons" }}{PARA 0 "" 0 "" {TEXT -1 6 "> a1:=" }}{PARA 0 "" 0 "" {TEXT -1 6 "> b1:=" }}{PARA 0 "" 0 "" {TEXT -1 47 "> A:=t->a0 + a1*cos (omega*t) + b1*sin(omega*t);" }}{PARA 0 "" 0 "" {TEXT -1 2 "# " }} {PARA 0 "" 0 "" {TEXT -1 60 "We will assume your house is well-insulat ed, so that k=0.08:" }}{PARA 0 "" 0 "" {TEXT -1 10 "> k:=0.08;" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "d. Find \+ the solution to (3) with the particular parameter choices you" }} {PARA 0 "" 0 "" {TEXT -1 69 "made above. You should get a solution fu nction like (5) on page 57," }}{PARA 0 "" 0 "" {TEXT -1 69 "but refle cting the Salt Lake City temperatures and the new insulation" }}{PARA 0 "" 0 "" {TEXT -1 11 "parameter. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 69 "e. Identify the part of your solution wh ich persists as t approaches" }}{PARA 0 "" 0 "" {TEXT -1 70 "infinity, i.e. the steady periodic solution. Your formula should have" }} {PARA 0 "" 0 "" {TEXT -1 46 "the same character as equation (6) on pag e 57." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 " f. Write the steady periodic solution in the form of equation (7) on" }}{PARA 0 "" 0 "" {TEXT -1 58 "page 57, so that you can see the time d elay for the inside" }}{PARA 0 "" 0 "" {TEXT -1 68 "temperature. You \+ need to use the cosine addition formula. The text" }}{PARA 0 "" 0 "" {TEXT -1 67 "has a discussion on page 184 which may help you. It is s hown there" }}{PARA 0 "" 0 "" {TEXT -1 7 "that if" }}{PARA 0 "" 0 "" {TEXT -1 15 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "x(t ) := A*cos(omega*t)+B*sin(omega*t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "then also" }}{PARA 0 "" 0 "" {TEXT -1 40 " x(t) := C cos( w t \255 a )" }}{PARA 0 "" 0 "" {TEXT -1 9 " " }} {PARA 0 "" 0 "" {TEXT -1 64 "where the right triangle of Figure 3.4.4 \+ page 185 summarizes the" }}{PARA 0 "" 0 "" {TEXT -1 40 "relationships \+ between A,B, C, and alpha." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 65 "g. Assume that your heater shut off at midnight, with the inside" }}{PARA 0 "" 0 "" {TEXT -1 66 "temperature equal to \+ 72 degrees. Create a plot like Figure 1.5.11" }}{PARA 0 "" 0 "" {TEXT -1 61 "which displays the inside temperature and the outside amb ient" }}{PARA 0 "" 0 "" {TEXT -1 36 "temperature for the next three da ys." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "h. Create a picture like Figure 1.5.10, which also includes the slope" }}{PARA 0 "" 0 "" {TEXT -1 61 "field for this differential equation, w ith our Salt Lake City" }}{PARA 0 "" 0 "" {TEXT -1 70 "parameters. Ch oose initial temperatures between 50 and 80 degrees, in" }}{PARA 0 "" 0 "" {TEXT -1 70 " 5 degree increments. Label the maximum and minimum temperature times" }}{PARA 0 "" 0 "" {TEXT -1 65 "by hand, on the dis play printout, before you hand in the project." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "i. So, based on your wor k in this project, how likely do you think it" }}{PARA 0 "" 0 "" {TEXT -1 68 "is that the pipes will freeze if the heater is turned off for 3 days" }}{PARA 0 "" 0 "" {TEXT -1 46 "starting at midnight? Exp lain your reasoning." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 7 0" 31 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }