# MTH203 Dynamic System Modeling

Document Sample

```					                                                     1

Grand Valley State University
MTH302 – Differential Equations and Linear Algebra

Prof. Aboufadel
Section A
December 6, 2005

Computer Project #2: Finding the Leak

By

Dan Schwarz
2

Differential equations are very important to scientists and mathematicians because they
provide a means of modeling dynamic systems. If the rate of change in one or more
characteristics of a system is known, a differential equation can be developed. The solution to a
differential equation is a function that describes the characteristic of interest as it changes with
time.
In this sample solution, a differential equation is formed to describe the rate of change of
salt in a tank of water that has a leak in it. The tank of interest contains an unknown amount of
salty water at time t = 0. The values of the initial volume of liquid and the initial amount of salt
in the tank are symbolized by L gal and Q lb respectively. Throughout the observation period,
water is being pumped into the tank at a rate of 4.8 gal/min with a concentration of 0.34 lb/gal.
The water in the tank is also being pumped out of the tank at a rate of 4.8 gal/min. In order to
obtain enough information to solve for the unknown rate of leakage, symbolized by r gal/min,
the salt concentration of the water is sampled at time t = 3 min and t = 5 min. At time t = 3 min
the salt concentration of the water leaving the tank is 0.2645 lb/gal and at time t = 5 min the
concentration is 0.2910 lb/gal.
The first step in the process of solving the unknown values for the tank system, is to
create a differential equation. Equation 1 is a first order differential equation that describes the
tank system.

dx  0.34lb  4.8gal   xlb       4.8  r gal 
 gal  min    L  rt gal 
                                                                   (1)
dt                                 min       

Note that the first term in the equation is the rate of salt entering the tank and the second
term is the rate of the salt exiting the tank. It is already apparent that the known concentrations
at t = 0, t = 3 and t = 5 will come in handy since the concentration of the liquid exiting the tank
consists of unknowns only. Solving the differential equation with the intial value, Q, produces
equation 2.

      15               24 1 
       15                 24 1 
 Q     L  L  rt  5 r  rt   Q 
                     L  L  rt  5 r 
      

xt  
17    17
L  rt        50 
        50 
 24 1                                 24 1 
(2)
50    50
 L  5 r 
      
L  L  5 r 
Since it is known that Q = 0.2 lb/gal * L gal, a substitution is made to derive equation 3.

 24 1                     24 1 
0.14L L  rt  5 r  rt 0.14L L  rt  5 r 
xt  
17    17                                                  
L  rt              24 1 
              24 1 
(3)
50    50
 L  5 r              L  5 r 
At time t = 3 equation 3 is rewritten as equation 4.

 24 1                     24 1 
0.14L L  r 3 5 r  r 0.42L L  r 3 5 r 
x3 
17   51                                               
L r              24 1 
            24 1 
(4)
50   50
 L  5 r            L  5 r 
3

Since it is known that x(3) is also equal to 0.2645*(L-r3), equation 4 is used to create
equation 5.

 24 1                                             24 1 
0.14L L  r 3 5 r  r 0.42L L  r 3 5 r 
x3  0.2645L  r 3 
17   51                                               
L r              24 1 
            24 1 
(5)
50   50
 L  5 r            L  5 r 
Solving equation 5 for L results in equation 6.

3e 0.128647868r r
L                                                                                                                   (6)
 1  e 0.128647868r

Substituting equation 6 back into equation 3 yields equation 7.
 24 1                                                      24 1 
                                                                
     3e 0.128647868r r         5 r               3e 0.128647868r r            5 r 
0.42e                 1  e 0.128647868r  rt 
r 
0.128647868r
                    1  e 0.128647868r  rt 
rt 0.14                                                                 (7)
xt  
51 e 0.128647868r r        17
 rt                                                                                                    
50  1  e 0.128647868r    50                                                       24 1 
      
 24 1 
      
                      r  5 r                                 r  5 r 
                          
0.128647868r                               0.128647868r
3e                                          3e
  1  e 0.128647868r 
 1  e 0.128647868r                                             1  e 0.128647868r 
                      
                                                                  

At time t = 5 equation 7 is rewritten as equation 8.
 24 1                                                    24 1 
                                                              
 3e 0.128647868r r           5 r                      3e 0.128647868r r           5 r 
0.42e      0.128647868r
  1  e 0.128647868r  r 5 
r                                                 r 0.7 
  1  e 0.128647868r  r 5 
                   (8)
51 e 0.128647868r r                                                                                                                                
x5 
17
 r                                                                                     
50  1  e 0.128647868r 10                                                                        24 1 
      
 24 1 
      
 3e 0.128647868r r       5 r                   3e 0.128647868r r       5 r 
 1  e    0.128647868r
   
  1  e 0.128647868r   
                        
  1  e 0.128647868r   

                                                                        

Since it is known that x(5) is also equal to 0.2910*(L-r5), equation 6 is substituted for the
term L into equation 8 to create equation 9.

 3e 0.128647868r r          
x5  0.291
  1  e 0.128647868r  r 5  (9)

                            

Setting equation 8 and equation 9 equal and then solving for the concentration at t = 5
(0.2910 lb/gal) produces equation 9.
 24 1                                                    24 1 
                                                              
     3e 0.128647868r r            5 r            3e 0.128647868r r                            5 r 
0.42e                 1  e 0.128647868r  r 5 
r 
0.128647868r
          r 0.7 
  1  e 0.128647868r                      r5 

51 e 0.128647868r r        17
 r                                                                                                                   
50  1  e 0.128647868r    10                                                       24 1 
      
 24 1 
      
                     r  5 r                                                          5 r 
                          
0.128647868r
3e                                           3e 0.128647868r r
 1  e 0.128647868r  
 1 e                   
0.128647868r 

  1  e 0.128647868r                     
                       (9)
0.291                                                                                                                                                   
 3e 0.128647868r r          
  1  e 0.128647868r  r 5 
                            
                            

Since Maple will not solve equation 9 numerically for r, a graphical approach must be
taken. The “plot” function is used to create a graph for the function of r on the righthand side of
4

equation 9. The resultant plot in figure 1 shows that the value for r is 0.45 gal/min when the
concentration is 0.291 lb/gal.

Figure 1 : The value of r is approximately 0.4465 but is
rounded to 0.45 gal/min for the subsequent calculations.

Now that r is known to be 0.45 gal/min, 0.45 is substituted into equation 5 for r to derive
equation 10.
0.14L L  1.35          0.189L L  1.35
10.667                     10.667
x3  0.2645L  1.35 
17
L  0.459                                                       (10)
50                      L10.667                 L10.667
Once again maple does not solve for L and a graphical approach is taken. Solving
equation 10 for the concentration at t = 3 (0.2645 lb/gal) results in equation 11.

0.14L L  1.35          0.189L L  1.35
10.667                        10.667
17
L  0.459                           
0.2645 
50                      L 10.667
 L10.667              (11)
L  1.35
Again the “plot” function is used to create a graph for the function of L on the righthand
side of equation 11. The resultant plot in figure 2 shows that the value for L is 24 gal when the
concentration is 0.2645 lb/gal.

Figure 2 : The value of L is 24 gallons for the given concentration of 0.2645 lb/gal.
5

Now that L is known, Q is easily derive using the relation x(0) = Q = 0.2*L as shown in
equation 12.

x0  Q  0.224  0.45 0 a lg ebra Q  4.8lb
                                                (12)

As a result of the preceding process, the unknown values were found to be:
   r = 0.45 gal/min = leak rate
   L = 24 lb/gal = initial concentration
   Q = 4.8 lb. = initial amount of salt

Normally, differential equations are not this difficult to solve since more information can
be derived through experimentation. However, setting up a differential equation can be done in
the same manner, no matter what kinds of values are given. A numeric version of the solution is
created by substituting the appropriate values into equation 2.

        15                    24 1 
         15                     24 1 
  4.8  24  24  0.45 t  5 0.45  0.45 t   4.8  24  24  0.45 t  5 0.45 
                                                      

24  0.45 t  
50                                             50 
xt  
17     17
 24 1 
                            24 1 
50     50
 24  5 0.45                           24  24  5 0.45 

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 0 posted: 10/5/2012 language: English pages: 5