{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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 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 "2 D Input" 2 19 "" 0 1 255 0 0 1 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 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 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 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 0 0 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Heading 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 6 6 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 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 3" 4 5 1 {CSTYLE "" -1 -1 "" 1 12 0 0 0 0 1 0 0 0 0 0 0 0 0 }0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 }{PSTYLE "Bullet \+ Item" 0 15 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 3 3 0 0 0 0 0 0 15 2 }{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 "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 0 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 0 2 2 2 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 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 18 "" 0 "" {TEXT -1 15 "Mixing Problems" }}{PARA 18 "" 0 "" {TEXT 256 7 " mix.mws" }}{PARA 19 "" 0 "" {TEXT -1 36 "Douglas B. Meade\n(meade@math .sc.edu)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 "Overview" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 434 "Mixing problems provide a simple application of linear differe ntial equations. The problems considered in this worksheet concentrate on the modelling and interpretation of the solution more than the mec hanics of the solution techniques for first-order linear ODEs and IVPs . Graphical and symbolic solutions will be examined, and the problems \+ will be extended to illuminate other interested, and accessible, featu res of these problems." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 117 "The majority of the effort will be spent on problem s with discontinuous coefficients (as introduced in the worksheet " } {HYPERLNK 17 "discont.mws" 1 "discont.mws" "" }{TEXT -1 212 ", which e xamined Problems 31 and 32 in Section 2.3, pp. 53-54). Another problem to which the same techniques can be applied is the parachute problem \+ (Example 3, pp. 112-113) and several Problems from Section 3.4." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 161 "In order for you to work through this worksheet, it will be necessary for you \+ to fill in missing pieces of some of the Maple commands. A pair of que stion marks (" }{TEXT 19 2 "??" }{TEXT -1 61 ") marks each place where the Maple code needs to be modified." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 10 "Objectives " }}{EXCHG {PARA 15 "" 0 "" {TEXT -1 64 "to gain experience working wi th first-order linear ODEs and IVPs" }}{PARA 15 "" 0 "" {TEXT -1 54 "t o be introduced to problems that have discontinuities" }}{PARA 15 "" 0 "" {TEXT -1 42 "to collect more practice using graphical (" } {HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" }{TEXT -1 16 ") and symbol ic (" }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 35 ") methods to \+ solve and analyze IVPs" }}{PARA 15 "" 0 "" {TEXT -1 84 "to gain experi ence using solutions generated by Maple to answer subsequent questions " }}{PARA 15 "" 0 "" {TEXT -1 24 "to be introduced to the " } {HYPERLNK 17 "piecewise" 2 "piecewise" "" }{TEXT -1 8 " command" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 " " {TEXT -1 18 "New Maple Commands" }}{EXCHG {PARA 15 "" 0 "" {HYPERLNK 17 "piecewise" 2 "piecewise" "" }{TEXT -1 45 " creates a piecewise-defined function, " }{TEXT 257 4 "i.e." }{TEXT -1 73 ", a function defined by different rules for different parts of its domain " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 " " 0 "" {TEXT -1 31 "Problem 33 (Section 2.2, p. 45)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 320 "Suppose a brine solution containing 3 kg of salt per liter (L) runs into a tank initially filled with 400 L of water c ontaining 20 kg of salt. If the brine enters at 10 L/min, the mixture \+ is kept uniform by stirring, and the mixture flows out at the same rat e, find the mass of salt in the tank after 10 min. [Hint: Let " } {XPPEDIT 18 0 "A" "I\"AG6\"" }{TEXT -1 55 " denote the number of kilog rams of salt in the tank at " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 56 " minutes after the process begins, and use the fact that" }}} {EXCHG {PARA 258 "" 0 "" {TEXT -1 52 "rate of increase in A = rate of \+ input - rate of exit" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "wi th( DEtools ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 38 "The relevant data for this problem is:" }}}{EXCHG {PARA 15 "" 0 "" {TEXT -1 91 "inflow: salt concentration wit h 3 kg of salt per liter at a flow rate of 10 L/min" }}{PARA 15 "" 0 " " {TEXT -1 38 "outflow: flow rate of 10 L/min" }}{PARA 15 "" 0 "" {TEXT -1 46 "initial state: 20 kg of salt in 400 L of water" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "The corresponding differential equation and initial condi tion are:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "ODE := diff( A (t), t ) = 30 - 10/400 * A(t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "I C := A(0) = 20;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {SECT 1 {PARA 5 "" 0 "" {TEXT -1 16 "Points to Ponder" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 153 "Before computing any solutions, look at this p roblem and develop a rough picture about what the solution should look like. Questions to consider include:" }}}{EXCHG {PARA 15 "" 0 "" {TEXT -1 65 "Does the amount of salt increase, decrease, or stay the s ame for " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 29 " just a little l arger than 0?" }}{PARA 15 "" 0 "" {TEXT -1 72 "What will the amount of salt be after a long period of time has passed (" }{TEXT 258 4 "i.e. " }{TEXT -1 5 ", as " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 4 " -> \+ " }{XPPEDIT 18 0 "infinity" "I)infinityG6\"" }{TEXT -1 2 ")?" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 276 "A graphical solution provides a simple means of confirmi ng your intuition, and to verify that the model is reasonable. Replace the question marks (??) in the following Maple commands to create an \+ informative view of the solution to this problem, including the direct ion field." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "DEplot( ??, ? ?, t=0..??, \{ [??,??] \}," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 " \+ title=`Problem 33 (p.45) -- Graphical Solution` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "The specific question that is asked in this problem is: how mu ch salt is in the tank after 10 minutes?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 309 "The graphical solution yields an estimate of approximate ly 275 kg. To determine the exact amount, a symbolic solution is neede d. This can be easily determined by hand (what is the appropriate inte grating factor?), or by Maple. Modify the following command so that it returns the exact solution to this problem" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "SOLN := dsolve( \{ ??, ?? \}, A(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "SOLN := simplify( SOLN );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "The amount of salt in the tank after 10 minutes is " } {XPPEDIT 18 0 "A(10)" "-%\"AG6#\"#5" }{TEXT -1 41 ", which can be eval uated by substituting " }{XPPEDIT 18 0 "t=10" "/%\"tG\"#5" }{TEXT -1 19 " into the solution:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 " simplify( subs( t=10, SOLN ) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Which is, using floating point arithmetic, approximately" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 201 " Note that this is consistent with the estimate obtained from the graph ical solution. The qualitative behavior of the solution is easily obse rved from the solution: the amount of salt increases for all " } {XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 46 ">0 and tends towards the eq uilibrium solution " }{XPPEDIT 18 0 "A=1200" "/%\"AG\"%+7" }{TEXT -1 1 "." }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 15 "Point to Ponder" }} {EXCHG {PARA 15 "" 0 "" {TEXT -1 80 "How long does it take the solutio n to get within 1% of the equilibrium solution?" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 31 "Problem 35 (Section 2.3, p . 54)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 253 "Suppose a birne containi ng 2 kg of salt per liter runs into a tank initially filled with 500 L of water containing 50 kg of salt. The brine enters the tank at a rat e of 5 L/min. The mixture, kept uniform by stirring, is flowing out at a rate of 5 L/min." }}}{EXCHG {PARA 0 "" 0 "" {TEXT 259 3 "(a)" } {TEXT -1 82 " Find the concentration, in kilograms per liter, of salt \+ in the tank after 10 min." }}}{EXCHG {PARA 0 "" 0 "" {TEXT 260 3 "(b) " }{TEXT -1 219 " After 10 min, a leak develops in the tank and an add itional liter per minute of mixture flows out of the tank. What will b e the concentration, in kilograms per liter, of salt in the tank 20 mi n after the leak develops?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 281 "This problem is like the previous example, exc ept that after 10 minutes the tank springs a leak and an extra 1 L of \+ the brine solution is drained each minute. This has two effects on the problem, first it introduces a discontinuity in the the differential \+ equation and second, for " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 172 ">10, the volume is not constant. The specific questions asked in \+ the problem will be augmented with other questions that provide qualit ative information about the solution." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 269 "Two different approaches to this pro blem will be considered. The first, which parallels that in the text, \+ is to define two separate IVPs, using the solution from the first IVP \+ to determine the initial condition for the second IVP. The second appr oach is to use Maple's " }{TEXT 19 9 "piecewise" }{TEXT -1 138 " comma nd to write a single IVP, with a discontinuous coefficient. In each ca se, both the graphical and symbolic solution will be examined." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "For " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 93 "<10 minu tes, the differential equation and initial condition associated with t his problem are" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "ODE1 := \+ diff( A(t), t ) = 10 - 5/500*A(t);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "IC1 := A(0) = 50;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "For " } {XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 245 ">10 the differential equat ion is significantly different, the volume of solution in the tank is \+ no longer a constant 500 L -- each minute the volume decreases by one \+ liter. This ``rate equation'' sounds like a differential equation -- a nd it is!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ODEv := diff( \+ v(t), t ) = -1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "ICv := v(10)=500 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "This IVP is so simple that it would be foolish to u se Maple to solve it. The general solution to the ODE is: " } {XPPEDIT 18 0 "v(t) = C - t" "/-%\"vG6#%\"tG,&%\"CG\"\"\"F&!\"\"" } {TEXT -1 30 "; the initial condition (at " }{XPPEDIT 18 0 "t=10" "/% \"tG\"#5" }{TEXT -1 15 ") shows that " }{XPPEDIT 18 0 "C=510" "/%\"C G\"$5&" }{TEXT -1 14 " and, thus, " }{XPPEDIT 18 0 "v(t)=510-t" "/-% \"vG6#%\"tG,&\"$5&\"\"\"F&!\"\"" }{TEXT -1 11 " for all " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 74 ">10. Thus, the concentration of sol ution being drained from the tank is " }{XPPEDIT 18 0 "A(t)/v(t) = A( t)/(510-t)" "/*&-%\"AG6#%\"tG\"\"\"-%\"vG6#F'!\"\"*&-F%6#F'F(,&\"$5&F( F'F,F," }{TEXT -1 7 " for " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 101 ">10. Combined with the other information for this problem, the d ifferential equation that results is" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "ODE2 := diff( A(t), t ) = 10 - 6/(510-t)*A(t);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "The ``initial condition'' for the second stage of the pro cess (" }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 58 ">10) is the amount of salt at the end of the first stage, " }{XPPEDIT 18 0 "A(10)" "-%\" AG6#\"#5" }{TEXT -1 50 ". To estimate this amount, complete the follow ing " }{TEXT 19 6 "DEplot" }{TEXT -1 57 " command to generate a graphi cal solution of the problem." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "p1 := DEplot( ??, ??, ??, ??, ?? ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "display( p1, title=`Problem 35 (p.54) -- Graphical So lution, t<10` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "This provides the approximate init ial condition" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "ICb := A(10) = 140 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 102 "A first answer to the question about the amount of \+ salt in the tank 20 minutes after the leak begins, " }{TEXT 261 4 "i.e ." }{TEXT -1 2 ", " }{XPPEDIT 18 0 "t=30" "/%\"tG\"#I" }{TEXT -1 142 " , can be obtained from a graphical solution. (Be particularly careful \+ about the specification of the time interval and the initial condition .)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "p2 := DEplot( ??, ??, ??, ??, ?? ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "display( ??, titl e=`??` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "The ``union'' of these two plots is part icularly effective at illustrating the interconnections between the tw o stages of the problem." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "display( \{ p1, p2 \}, title=`Problem 35 (p.54) -- Graphical Solution , 0 " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 16 "Points to Ponder" }}{EXCHG {PARA 15 "" 0 "" {TEXT -1 95 "Notice that the solution is continuous. In fact, the solution appears to be differentiable at " }{XPPEDIT 18 0 "t=10" "/% \"tG\"#5" }{TEXT -1 45 ", but we know that this cannot be so. (Why?) " }}{PARA 15 "" 0 "" {TEXT -1 178 "Moreover, the change in the outflow rate does not seem to have had much of an impact on the solution. If \+ this is actually true, what qualitative behavior do you expect to see \+ in " }{XPPEDIT 18 0 "A" "I\"AG6\"" }{TEXT -1 48 "? (That is, assuming \+ there is no leak, what is " }{XPPEDIT 18 0 "A(t)" "-%\"AG6#%\"tG" } {TEXT -1 6 " as " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 3 "-->" } {XPPEDIT 18 0 "infinity" "I)infinityG6\"" }{TEXT -1 2 "?)" }}{PARA 15 "" 0 "" {TEXT -1 238 "Determine the true long-time behavior of the sol ution using the graphical solution for 9 minutes after the leak begins . Identify all unexpected behavior in the solution -- explanations wil l be developed in the remainder of this worksheet." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 268 "At this point it seem rea sonable to ask if the graphical solution can really be trusted. Since \+ the IVP involved in each stage involves a first-order linear ODE, an e xplicit solution can be obtained. The following commands can be used t o construct the solution for all " }{XPPEDIT 18 0 "t" "I\"tG6\"" } {TEXT -1 3 ">0." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "The solution d uring the first 10 minutes is obtained by a single call to " }{TEXT 19 6 "dsolve" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "SOLN1 := dsolve( \{ ??, ?? \}, A(t) );" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 145 "This solution is used to determine the initial conditi on for the second stage of the process. Substituting t=10 into the f irst solution yields:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "IC 2 := subs( t=10, ?? );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "which i s, approximately," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "evalf( IC2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "Now, the solution the second IVP is easil y determined:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "SOLN2 := d solve( \{ ??, ?? \}, A(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 124 "While this solution is \+ somewhat messy, note that it is simply a sixth-order polynomial (with \+ a few very small coefficients)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "evalf( SOLN2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "A plot of the solution over t he requested time interval yields the picture" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "P1 := plot( rhs(??), t=0..??, color=RED ):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "P2 := plot( rhs(??), t=??..??, colo r=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "display( \{P1,P2\}, ti tle=`Problem 35 (p.54) -- Symbolic Solution, 0 " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 16 "Points to Ponder" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "Note th at there are some differences in the graphical and symbolic solutions, but not before " }{XPPEDIT 18 0 "t=510" "/%\"tG\"$5&" }{TEXT -1 1 ". " }}}{EXCHG {PARA 15 "" 0 "" {TEXT -1 23 "What is special about " } {XPPEDIT 18 0 "t=510" "/%\"tG\"$5&" }{TEXT -1 1 "?" }}{PARA 15 "" 0 " " {TEXT -1 47 "What can be said about the solutions for t>510?" }} {PARA 15 "" 0 "" {TEXT -1 70 "(Hint: What does the existence theory ha ve to say about this problem?)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 369 "Other features of this solution that are of interest include the maximum amount of salt in the tank, and the t ime at which this occurs. Both answers can be obtained either from the graphical or symbolic solution. One way in which the symbolic solutio n can be used to obtain this information is illustrated in the next se t of commands, which are missing a few arguments." }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 148 "Basically, all that is needed is to find the crit ical points of the solution during stage 2 (why?). For this, a derivat ive of the solution is needed" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dA := diff( rhs(??), t );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " fsolve( ??, ?? );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "The maximum \+ amount of salt in the tank is, therefore, approximately" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 36 "evalf( subs( t=149.85207, SOLN2 ) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 23 "Note on Maple Usage -- " }{TEXT 19 6 "fsolve" }{TEXT -1 5 " vs. " }{TEXT 19 5 "solve" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "No te that " }{TEXT 19 5 "solve" }{TEXT -1 123 " can be used, but the res ults are almost of no use (to see what I mean, change the colon to a s emi-colon at the end of the " }{TEXT 19 5 "solve" }{TEXT -1 226 " comm and that follows). All five (5) solutions are reported, in terms of ne sted radicals. The main item of interest in these solutions is that th ere is only one real root; the other four appear as two pairs of conju gate pairs." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "solve( dA=0, t ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Numerical approximations to the roots confirm thi s conjecture:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(\"); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 " " 0 "" {TEXT -1 16 "Points to Ponder" }}{EXCHG {PARA 15 "" 0 "" {TEXT -1 78 "Do you think this amount is exactly 600 kg or the time is exact ly 150 minutes?" }}{PARA 15 "" 0 "" {TEXT -1 109 "Or, are these floati ng point approximation accurate to more several digits to the right of the decimal point?" }}{PARA 15 "" 0 "" {TEXT -1 50 "How could you use Maple to test these conjectures?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 139 "The analysis has focused on the a mount of salt in the tank. Similar questions can be asked about the co ncentration of the salt in the tank." }}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 46 "Plot the concentration as a function of time " } {XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 55 " for as long as the soluti on is physically reasonable." }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "Th e concentrations for each stage are" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "CONC1 := rhs(SOLN1)/500;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "CONC2 := simplify( rhs(SOLN2)/(510-t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "The solution ceases to have any physical meaning at " } {XPPEDIT 18 0 "t=510" "/%\"tG\"$5&" }{TEXT -1 169 " minutes (when the volume in the tank and the amount of salt both become zero). The conc entration can be plotted in the same manner as the amounts were plotte d earlier:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "p1 := plot( C ONC1, t=0..10, color=RED ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "p2 : = plot( CONC2, t=10..510, color=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "display( \{ p1, p2 \}, title=`Problem 35 (p.54) -- Concentrati on` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 36 "Is the concentration continuous at " } {XPPEDIT 18 0 "t=10" "/%\"tG\"#5" }{TEXT -1 1 "?" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 247 "The plot seems to suggest that the concentration mi ght be continuous at t=10. Physically, this also makes sense. To mat hematically verify this, note that limiting values of the two concentr ations, taken from the appropriate direction, are equal:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "Cleft := Limit( CONC1, t=10, left ) :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "Cright := Limit( CONC2, t=10, \+ right ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "TEST := Cleft = Cright: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "value( TEST );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 63 "What differential equation does the concentration satisfy for \+ " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 4 ">10?" }}{EXCHG {PARA 0 " " 0 "" {TEXT -1 116 "Recall that the concentration of salt in the solu tion is related to the amount of salt in the tank by the formula: " } {XPPEDIT 18 0 "C(t) = A(t)/v(t)" "/-%\"CG6#%\"tG*&-%\"AG6#F&\"\"\"-%\" vG6#F&!\"\"" }{TEXT -1 33 ". Thus, after the leak starts, " } {XPPEDIT 18 0 "A(t) = (510-t)*C(t)" "/-%\"AG6#%\"tG*&,&\"$5&\"\"\"F&! \"\"F*-%\"CG6#F&F*" }{TEXT -1 225 ". The differential equation for th e concentration can be found by substituting the above formula into th e differential equation for the amount of salt in the tank. Recall tha t the ODE for the amount of salt in the tank for " }{XPPEDIT 18 0 "t " "I\"tG6\"" }{TEXT -1 8 ">10 is:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "ODE2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Replacing all occurences of " } {XPPEDIT 18 0 "A(t)" "-%\"AG6#%\"tG" }{TEXT -1 69 " with the appropri ate expression involving the concentration yields:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "cODE2 := subs( A(t) = (510-t)*C(t), ODE2 ); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 128 "The next step towards putting this equation in a fa miliar form is to expand the derivative of the product on the left-han d side " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "cODE2 := eval( c ODE2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "Finally, isolating the derivative on the left-hand side of the equation, we finally have an equation in a stan dard form:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "cODE2 := op( \+ solve( cODE2, \{ diff(C(t),t) \} ) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "Observe that this equation is first-order and linear, so could be solve by hand or by Maple (graphically or symbolically)." }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 " " {TEXT -1 55 "Describe the qualitative behavior of the concentration. " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 289 "The plot of the concentration shows that it is an increasing function that approaches 2 in the fi nal minutes before the tank becomes empty. In fact, since the concentr ation is a polynomial, it must be continuous, so we can safely plug in the time t=510 to find the final concentration." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "eval( subs( t=510, CONC2 ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 151 "While we hav e explored many aspects of this problem beyond the scope of the origin al problem, the question in (b) has not been answered. Substituting \+ " }{XPPEDIT 18 0 "t=30" "/%\"tG\"#I" }{TEXT -1 60 " into the appropri ate formula for the concentration yields:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 20 "subs( t=30, CONC2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "evalf( \" );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 117 "Thus, there is approximately 0.598 kg of salt per liter of solution in the tank 20 minutes after the leak starts." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 43 "Int roduction to Piecewise-Defined Functions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 219 "The analysis of this problem is now complete. But, befor e we completely end this problem, it is appropriate to discuss an alte rnate way in which some of these results could be obtained. Maple prov ides a data structure, " }{TEXT 19 9 "piecewise" }{TEXT -1 193 ", for \+ the manipulation of piecewise-defined functions. For example, if the t wo differential equation for the amount of salt in the tank are combin ed into a single equation, the coefficient of " }{XPPEDIT 18 0 "A(t) " "-%\"AG6#%\"tG" }{TEXT -1 77 " in the differential equations will h ave to have different definitions for " }{XPPEDIT 18 0 "t" "I\"tG6\" " }{TEXT -1 13 "<10 and for " }{XPPEDIT 18 0 "t" "I\"tG6\"" }{TEXT -1 48 ">10. This would be entered, using piecewise, as:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "COEFF := piecewise( t<10, 5/500, 6/ (510-t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 98 "Using this idea, the two stages of the mi xing problem can be modelled in one differential equation" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 43 "ODE := diff( A(t), t ) = 10 - COEFF * A(t); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "The graphical solution is the n obtained in the usual way" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "DEplot( ODE, A, t=0..500, \{ [0,50] \}," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 " title=`Graphical Solution -- with piecewise` \+ );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 28 "While it is possible to use " }{TEXT 19 6 "dsolve " }{TEXT -1 230 " to obtain an explicit solution to an ODE that involv es piecewise-defined functions, this will not be pursued at this time. Instead, the two solutions obtained previously can be combined into a single piecewise-defined expression:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "SOLN := piecewise( t<10, rhs(SOLN1), rhs(SOLN2) );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 97 "Plotting of a piecewise-defined function is no differen t than any other function (or expression):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 69 "plot( SOLN, t=0..550, title=`Explicit Solution -- u sing piecewise` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "For additional information on piec ewise-defined functions, please see the on-line help (" }{HYPERLNK 17 "?piecewise" 2 "piecewise" "" }{TEXT -1 2 ")." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Copyri ght" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "mix.mws -- a Maple worksh eet for MIXING PROBLEMS" }}{PARA 0 "" 0 "" {TEXT -1 76 " \+ (for use with sections 2.2 and 2.3 of Nagle and Saff)" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 45 "Prepared \+ by: Douglas B. Meade (7 March 1996)" }}{PARA 0 "" 0 "" {TEXT -1 88 " \+ as part of the Maple Supplement for Nagle/Saff (Addison-Wesley)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "Updated to Maple V, Release 4, by Douglas B. Meade (27 De cember, 1996)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 78 "For more information, please contact the author at one of following addresses:" }}{PARA 0 "" 0 "" {TEXT -1 90 " \+ Department of Mathematics, Univ. of South Carolina, Columbia, SC 2 9208" }}{PARA 0 "" 0 "" {TEXT -1 35 " (803) 777-61 83" }}{PARA 0 "" 0 "" {TEXT -1 38 " meade@math.sc. edu" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 35 "(c opyright, Douglas B. Meade, 1996)" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 3 4 1802 }