{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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 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 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "List Item" -1 14 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 3 3 1 0 1 0 2 2 14 5 }{PSTYLE "List Subitem" -1 256 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 3 3 3 12 1 0 2 2 273 5 }{PSTYLE "Norm al" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }2 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 41 "ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 38 "Unit 5 -- Applicat ion: Mixing Problems" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {URLLINK 17 "Prof. Douglas B. Meade" 4 "http://www.math.sc.edu/~m eade/" "" }}{PARA 257 "" 0 "" {URLLINK 17 "Industrial Mathematics Inst itute" 4 "http://www.math.sc.edu/~IMI/" "" }}{PARA 257 "" 0 "" {URLLINK 17 "Department of Mathematics" 4 "http://www.math.sc.edu/" " " }}{PARA 257 "" 0 "" {URLLINK 17 "University of South Carolina" 4 "ht tp://www.sc.edu/" "" }}{PARA 257 "" 0 "" {TEXT -1 19 "Columbia, SC 292 08\n" }}{PARA 257 "" 0 "" {TEXT -1 7 "URL: " }{URLLINK 17 "http://ww w.math.sc.edu/~meade/" 4 "http://www.math.sc.edu/~meade/" "" }}{PARA 257 "" 0 "" {TEXT -1 25 "E-mail: meade@math.sc.edu" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 38 "Copyright \251 2001 b y Douglas B. Meade" }}{PARA 257 "" 0 "" {TEXT -1 19 "All rights reserv ed" }}{PARA 257 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 67 "-------------------------------------------------------------------" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 17 "Outline of Unit 5" }} {EXCHG {PARA 14 "" 0 "" {HYPERLNK 17 "5.A" 1 "" "5.A" }{TEXT -1 24 " O ne-Tank Mixing Problem" }}{PARA 14 "" 0 "" {HYPERLNK 17 "5.B" 1 "" "5. B" }{TEXT -1 31 " Variable Volume Mixing Problem" }}{PARA 14 "" 0 "" {HYPERLNK 17 "5.C" 1 "" "5.C" }{TEXT -1 24 " Two-Tank Mixing Problem" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 14 "Initialization" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with( linalg ):" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 17 "with( PDEtools ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "5.A" {TEXT -1 27 "5.A One- Tank Mixing Problem" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 17 "Problem St atement" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 382 "A tank initially conta ins 40 gal of sugar water having a concentration of 3 lb of sugar for \+ each gallon of water. At time zero, sugar water with a concentration o f 4 lb of sugar per gal begins pouring into the tank at a rate of 2 ga l per minute. Simultaneously, a drain is opened at the bottom of the t ank so that the volume of the sugar-water solution in the tank remains constant." }}{PARA 14 "" 0 "" {TEXT -1 51 "(a) How much sugar is in t he tank after 15 minutes?" }}{PARA 14 "" 0 "" {TEXT -1 80 "(b) How lon g will it take the sugar content in the tank to reach 150 lb? 170 lb? " }}{PARA 14 "" 0 "" {TEXT -1 56 "(c) What will be the eventual sugar \+ content in the tank?" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "The mathematical formulation of this problem must express the physical requirement tha t" }}{PARA 257 "" 0 "" {TEXT -1 3 " " }{XPPEDIT 18 0 "Diff( `amount \+ of sugar in tank`, t )" "6#-%%DiffG6$%8amount~of~sugar~in~tankG%\"tG" }{TEXT -1 74 " = ( rate sugar is added to tank ) - ( rate sugar is re moved from tank ) " }}{PARA 0 "" 0 "" {TEXT -1 83 "Let x(t) denote the amount of sugar (pounds) in the tank at time t (minutes). Then," }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "rate_in := 4 * 2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " rate_out := (x(t)/40) * 2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "so that the governing ODE \+ is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "ode := diff( x(t), t ) = rate_in - rate_out;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "The amount of sugar in the tank initially, " }{XPPEDIT 18 0 "t=0" "6#/%\"tG\"\"!" }{TEXT -1 5 ", is " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "ic := x(0)= 40 * 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "The ODE in this IVP is first-order and li near. The integrating factor is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "mu(t) = intfactor( ode );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 26 "The solution to the IVP is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "sol := dsolve( \{ od e, ic \}, x(t), [linear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(a)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "The amount of sugar (in pounds) in the tank after 15 minutes is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "eval( sol, t=15. );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(b)" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "The tank will contain 150 pounds o f sugar at a time " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 24 " (in mi nutes) satisfying" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 31 "eq150 := eval( sol, x(t)=150 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 5 "Thus," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "t150 := solve( eq150, t ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "t[`150 lbs`] = t150;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "`` = evalf(t150);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "Repeating the same steps for \+ the time when 170 pounds of sugar are in the tank leads to" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "eq1 70 := eval( sol, x(t)=170 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "t170 := solve( eq170, t ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "t[`170 lbs`] = t170;\n`` = evalf(t170);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "This complex-valued solution is clearly not physically realist ic. A quick inspection of the solution," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "plot( rhs(sol), t=0..1 20 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 171 "shows that the amount of sugar in the tank rea ches a steady-state limit that is well below 170 pounds. Therefore, at no time is there ever 170 pounds of sugar in the tank." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(c)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 165 "In (b) it was noted that the amount of sugar in the tank levels off below 170 pounds. The exact limit can be determined from t he solution by looking at the limit as " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 4 " -> " }{XPPEDIT 18 0 "infinity" "6#%)infinityG" }{TEXT -1 1 ":" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "steady_state := map( Limit, sol, t=infinity );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "value( steady_state );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "Note that " }{XPPEDIT 18 0 "x=160" "6#/%\"xG\"$g\"" } {TEXT -1 122 " is an equilibrium solution for this ODE. Be careful to \+ avoid the common error of concluding that the limit is 160 pounds " } {TEXT 256 7 "because" }{TEXT -1 1 " " }{XPPEDIT 18 0 "x=160" "6#/%\"xG \"$g\"" }{TEXT -1 64 " is an equilibrium solution. (Recall the logisti c growth model, " }{HYPERLNK 17 "Unit 3, Section B" 1 "unit03.mws" "3. B" }{TEXT -1 28 ", which has two equilibria.)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}}{SECT 0 {PARA 3 "" 0 "5.B" {TEXT -1 34 "5.B Variable Volume Mixi ng Problem" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 17 "Problem Statement" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 106 "Consider the previous problem, \+ except that the outflow from the tank is at a rate of 3 gallons per mi nute." }}{PARA 14 "" 0 "" {TEXT -1 99 "(a) Find the formula for the vo lume of sugar water in the tank at any time. When is the tank empty?" }}{PARA 14 "" 0 "" {TEXT -1 53 "(b) Find the IVP for the amount of sug ar in the tank." }}{PARA 14 "" 0 "" {TEXT -1 61 "(c) Find the IVP for \+ the concentration of sugar in the water." }}{PARA 14 "" 0 "" {TEXT -1 144 "(d) When is the tank empty? What is the concentration of sugar im mediately before the tank is empty? How much sugar is in the tank at t his time?" }}{PARA 14 "" 0 "" {TEXT -1 154 "(e) Plot the amount of sug ar and concentration of sugar in the tank up to the time the tank beco mes empty. What happens to these solutions at later times?" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(a)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 253 "The volume starts at 40 gallons. Every m inute 2 gallons of sugar water are added to the tank and 3 gallons are removed; the net change is a loss of 1 gallon per minute. This situat ion is simple enough that one can simply write the formula for the vol ume" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "Vrate_in := 2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 " Vrate_out := 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "V := 40 \+ + (Vrate_in-Vrate_out)*t;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "Note that this could result \+ could have been obtained as the solution to the IVP" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "odeV := d iff( v(t), t ) = 2 - 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " icV := v(0) = 40;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "dsolve ( \{ odeV, icV \}, v(t), [separable] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(b)" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 205 "The IVP for the amount of sugar i n the tank is similar to the one in the previous example. There is no \+ difference in the rate at which sugar enters the tank. The concentrati on of sugar exiting the tank is " }{XPPEDIT 18 0 "x(t)/V" "6#*&-%\"xG6 #%\"tG\"\"\"%\"VG!\"\"" }{TEXT -1 31 " and this is different because \+ " }{XPPEDIT 18 0 "V = V(t);" "6#/%\"VG-F$6#%\"tG" }{TEXT -1 23 " is no longer constant." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 20 "Srate_in := rate_in;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 26 "Srate_out := (x(t)/V) * 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 26 "Thu s, the governing ODE is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "ode2 := diff( x(t), t ) = Srate_in \+ - Srate_out;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "The initial condition is unchanged:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "ic2 := ic;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(c)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 135 "The IVP for the concentration of sugar in the tank is ob tained from the ODE in (b) and the fact that the concentration, c(t), \+ satisfies" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 27 "conc_eq := c(t) = x(t)/'V';" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Instea d of manually deriving the differential equation for c(t), the " } {HYPERLNK 17 "dchange" 2 "PDEtools,dchange" "" }{TEXT -1 18 " command \+ from the " }{HYPERLNK 17 "PDEtools" 2 "PDEtools" "" }{TEXT -1 46 " pac kage will be used to automate the process." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "with( PDEtools ):" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 44 "odeC := dchange( x(t) = c(t)*V, ode2, [c] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 46 "The initial condition for the concentration is" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "icC := c(0) = 3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 "(d)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "The tank is empty when the volume of sugar water is zero. This occurs after 40 minutes." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "t_empty := solve( V=0, \{t\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 68 "The concentration is found by solving the (linear) IVP found in (c):" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "solC := dsolve( \{ odeC, icC \}, c(t), [lin ear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "Thus, the concentration at the instant th e tank empties is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 22 "subs( t_empty, solC );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "The a mount of sugar in the tank as the tank empties is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "sol2 := dso lve( \{ode2,ic2\}, x(t), [linear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "subs( t_empty, sol2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "This is exact ly what one would expect. (If not, think about it!)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 3 " (e)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "The requested plots are" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "plot( rhs(sol2), t=0..40, title=`Amount of sugar` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plot( rhs(solC), t=0..40, title=`Concentration of sug ar` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "The concentration remains positive until " } {XPPEDIT 18 0 "t=120" "6#/%\"tG\"$?\"" }{TEXT -1 13 " , but after " } {XPPEDIT 18 0 "t=40" "6#/%\"tG\"#S" }{TEXT -1 104 ", the volume and am ount of sugar become negative. Even though the IVPs have solutions for all time, for " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 37 " > 40 thes e results are non-physical." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{SECT 0 {PARA 3 "" 0 "5.C" {TEXT -1 27 "5.C Two-Tank Mixing Problem" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 17 "Problem Statement" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "Two tanks, tank I and tank II, are filled with " }{XPPEDIT 18 0 "V" "6#%\"VG" }{TEXT -1 42 " gal of pure water. A solution containing " }{XPPEDIT 18 0 "a" "6#%\"aG" }{TEXT -1 58 " lb of salt per gallon is poured into tank I at a rate of " } {XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 57 " gal per minute. The solutio n leaves tank I at a rate of " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 46 " gal/min and enters tank II at the same rate (" }{XPPEDIT 18 0 "b " "6#%\"bG" }{TEXT -1 83 " gal/min). A drain is adjusted on tank II an d solution leaves tank II at a rate of " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 68 " gal/min. This keeps the volume of solution constant in \+ both tanks (" }{XPPEDIT 18 0 "V" "6#%\"VG" }{TEXT -1 93 " gal). Show t hat the amount of salt solution in tank II, as a function of time t, i s given by" }}{PARA 257 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "a*V - a *b*t*exp(-(b/V)*t) - a*V*exp(-(b/V)*t)" "6#,(*&%\"aG\"\"\"%\"VGF&F&**F %F&%\"bGF&%\"tGF&-%$expG6#,$*(F)F&F'!\"\"F*F&F0F&F0*(F%F&F'F&-F,6#,$*( F)F&F'F0F*F&F0F&F0" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 62 "NOTE: This is Exercise 14 (p. 73) from Differential Equations," }} {PARA 258 "" 0 "" {TEXT -1 55 " by Polking, Boggess, and Arnold (Prent ice-Hall, 2001)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 0 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 4 "Let " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6#%\"tG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "y(t)" "6#-%\"yG6#%\"tG" }{TEXT -1 80 " denot e the amount of salt, in pounds, in tanks I and II, respectively, at t ime " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 46 ". The initial conditi ons for the two tanks are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "icI := x(0) = 0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "icII := y(0) = 0;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "The \" rate in\" for tank I is " }{XPPEDIT 18 0 "a" "6#%\"aG" }{TEXT -1 10 " \+ lb/gal * " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 28 " gal/min and the outflow is " }{XPPEDIT 18 0 "x(t)/V" "6#*&-%\"xG6#%\"tG\"\"\"%\"VG!\" \"" }{TEXT -1 21 " lb/gal at a rate of " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 18 " gal/min. That is," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "unassign('V');" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "odeI := diff( x(t), t ) = a*b - b* (x(t)/V);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "While, for tank II, the inflow is the sa me as the outflow from tank I and the outflow exactly matches the infl ow. Thus," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 51 "odeII := diff( y(t), t ) = b*(x(t)/V) - b*(y(t)/V); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "The IVP for tank I involves a first-order linear ODE with integrating factor" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "mu[1](t) = intfactor( odeI );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "The solution to this IVP is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "solI := dsolve( \{od eI,icI\}, x(t), [linear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 99 "To find the amount of salt in tank II, substitute the solution for tank I into the ODE for tank \+ II:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "odeIIa := subs( solI, odeII );" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "Despit e the somewhat complicated appearance of this ODE, note that it is lin ear" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "odeadvisor( odeIIa );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "with integrat ing factor" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 31 "mu[2](t) = intfactor( odeIIa );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "The solution to the IVP for tank II is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "solII := dsolve( \{odeIIa, icII\}, y(t), [linear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "Thus, the amount of salt in \+ tank II at any time t, is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "expand( solII );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 " [Back to " }{HYPERLNK 17 "ODE Powertool Table of Contents" 1 "unit00.m ws" "" }{TEXT -1 1 "]" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }