Academia.eduAcademia.edu

Everyone can do Differential Equations

2017, International Journal for Innovation Education and Research

International Journal for Innovation Education and Research www.ijier.net Vol:-5 No-04, 2017 Everyone can do Differential Equations Domenick Thomas Freshman, Savannah State University, Savannah GA USA Advisor: Dr. Shinemin Lin Acknowledgement: This paper was presented at Georgia State University 30th Annual Mathematics Conference at Clarkston Campus, Atlanta GA, USA Abstract The original research is to make connection between classroom mathematics and real life issues through dynamic models using Excel. After we completed several sample models such as Prey and Predator model, SIR model, we found we did really solve initial value differential equation problems. We even solve initial values system of linear differential equations numerically and graphically. Therefore, we extend our research to solve initial value differential equations using the same approach as we create dynamic models. We tested first order and second order differential equations and all got satisfactory numerical solutions. Key words: dynamic modeling, SIR model, Prey-Predator model, Classroom mathematics 1. Introduction Initial-valued Differential Equations are one of most important applied mathematics that can be used in real life issues. However, in order to take differential equations class, students need to complete Calculus I and Calculus II as prerequisites. Therefore many STEM major students have no chance to enjoy this beautiful bridge that connects real world issues and mathematics skills. There are three major approaches to solve differential equations: algebraic approach, numerical approach, and graphical approach. For application purpose, numerical and graphical solutions are more applicable than algebraic solution. At this research, we provided an easy short cut to solve initial-valued differential equations numerically. Anyone with Algebra background, and reading comprehension skills with help of Excel can easily solve initial-valued differential equations and system of differential equations. With help of this research, students of Biology, Public Health, Chemistry, Business, or other majors can enjoy the differential equation models. 2. First Sample Model (Sleeping Beauty)[2] Sleeping beauty is a well-known fiction. The main idea is that princess got poisoned by witch became sleeping beauty. There came a prince who kissed sleeping beauty and turned sleeping beauty back to princess. At this story princess and sleeping are major variables because they had change in quantities. International Educative Research Foundation and Publisher © 2017 pg. 131 Online-ISSN 2411-2933, Print-ISSN 2411-3123 April 2017 Witch and prince are auxiliary variables. The parameters are rates of poisoned by witch and kissed by prince respectively. The mathematics formula are Sleeping Beauties = poisoned princess – kissed by prince; Princesses = princesses + kissed by prince – poisoned princess; Poisoned princess = princesses * poisoned rate, and Kissed by prince = sleeping beauties * kissed rate. The diagram is as following [2]: witch poisoned Sleeping Beauties Princesses kissed by a prince Prince If we assume initially there are 50 princesses and 5 princes and further assume that both the poisoned rate and kissed rate are 0.03. After we implement the above formulas to Excel worksheet, we have solution as following: International Educative Research Foundation and Publisher © 2017 pg. 132 International Journal for Innovation Education and Research Time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Princesses 50 35 25 40 28 38 30 36 31 35 31 35 31 35 31 35 31 35 31 35 31 Sleeping Beauties Princes 0 5 0 5 15 5 0 5 60 12 5 2 5 50 5 10 4 5 40 9 5 4 5 30 9 5 4 5 20 5 9 4 5 10 5 9 4 5 9 05 4 50 9 -10 5 4 5 9 5 Poisoned 15 8 12 8 11 9 11 9 11 9 11 9 11 9 11 9 11 5 9 11 9 www.ijier.net Vol:-5 No-04, 2017 Kissed Poisoned Rate = 0.3 0 Kissed Rate = 0.3 0 23 Sleeping Beauties 0 18 3 15 6 14 6 14 6 14 6 14 6 14 15 20 6 10 14 6 Princesses Sleeping Beauties 14 25 How can this fiction related to mathematics? If we replace princesses by healthy people in a community, witch by virus, sleeping beauties by infected patients, and princes by medical treatments, it is a simple model of disease control. Certainly students can add more conditions to make the model be better representation of real situations. 3. Simple Population Model [2] This model is a study of population growth based on a growth factor over time. The easiest way to visualize a population growth model is to assume that some proportion of the population reproduces during each time step and some proportion dies. The difference between the two is the growth factor. This model simulates a simplified model where the population increases is proportional to the current population with proportional constant b. dp rate of change of population is dt . of change. dp  b* p , where the instantaneous The mathematics model is dt We can use average rate change to approximate instantaneous rate p(t  delta _ t )  p(t )  b * p(t ) delta t _ Therefore we have , or p(t + delta_t) =p(t)+ delta_t*b*p(t)…..(a). International Educative Research Foundation and Publisher © 2017 pg. 133 Online-ISSN 2411-2933, Print-ISSN 2411-3123 April 2017 The diagram is as following [2]: . Population births birth rate Now we can apply Excel to set up a model for equation a. Let assume initially the population is 1000, or p(0) = 1000, and proportional constant b is 0.02. The following Excel worksheet demonstrate this model. The Excel Solution is as following: Simple population Growth Model: P(t + delta_t) = p(t) + delta_t*b*p(t) Iteration Population b= 0.57 delta-t 0.49 0 1000 57 49 1 1279 2 1637 3 2094 Chart Title 4 2678 y = 1000e 0.2463x 5000000 5 3427 4500000 6 4384 7 5608 4000000 8 7174 3500000 9 9178 3000000 10 11742 2500000 11 15021 2000000 12 19216 1500000 13 24583 1000000 14 31449 500000 15 40233 0 16 51471 0 10 20 30 17 65846 40 6. Lotka-Volterra Predator-Prey model [3] Suppose foxes and grass eating rabbits interact within the same environment or ecosystem and suppose International Educative Research Foundation and Publisher © 2017 pg. 134 International Journal for Innovation Education and Research www.ijier.net Vol:-5 No-04, 2017 further that the rabbits eat only grass and the foxes eat rabbits. Let x(t) and y(t) denote the fox and rabbit populations, respectively, at time t. If there is no rabbits, then one might expect that foxes would dx decline in number according to  ax , a > 0. When rabbits are present in the environment, however, dt it seems reasonable that the number of interaction between foxes and rabbits per unit times is jointly proportional to their population x and y. Adding his condition gives a model of the fox population: dx  ax  bxy , b >0. On the other hand, if there no foxes, then the rabbits would, with an addition dt assumption unlimited grass, grow at the rate that is proportion to the number of rabbits present at time t: dy  dy , d > 0. But when foxes are present, a model for the rabbit population is decreased by cxy, c > 0. dt dy Therefore the rabbit population at time t will be  dy  cxy . dt dx dy Suppose  0.16 x  0.08 xy and  4.5 y  0.9 xy , with initial population x(0) = 4 and y(0) = 4. dt dt This is not a linear model. Certainly we can use numerical method to solve this system. For freshman level students, we can use excel and algebraic approximation to simulate this model. dx x(t  t )  x(t ) x(t  t )  x(t ) dx , we can approximate by . Likewise we approximate  lim dt t 0 t t dt y (t t )  y (t ) dy by . The differential equation model becomes algebraic model for college freshman. t dt The algebraic model for the example above becomes x(t t )  x(t ) (a) = -0.16x + 0.08xy, or x(t  t ) = x(t) + t (-0.16x +0.08xy). t y (t t )  y (t ) (b) = 4.5y -0.9xy or y (t  t ) = y(t) + t (4.5y – 0.9xy). t The diagram is as following [2]: Since Prey Population prey births prey deaths prey death proportionality constant prey birth fraction predator births Predator Population predator birth fraction International Educative Research Foundation and Publisher © 2017 predator deaths predator death proportionality constant pg. 135 Online-ISSN 2411-2933, Print-ISSN 2411-3123 April 2017 With help of Excel, we have the following solution: x(t+delta t) 4.0 4.0 4.1 4.1 4.1 4.1 4.2 4.2 4.3 4.3 4.4 4.4 4.5 4.5 4.6 4.6 4.7 4.7 y(t + delta t) delta t x(0) = 4 y(0) = 4 Iteration n= 4.0 0.04 y(t+deltat) = y(t) + deltat *(4.5y(t) -0.9*x(t)*y(t)) 4.1 0.04 x(t+delta t) = x(t) + delta t *(-0.16x(t) + 0.08*x(t)*y(t)) 4.3 0.04 Predator -Prey 4.4 0.04 4.6 0.04 12.0 4.7 0.04 10.00.04 4.9 5.0 8.00.04 5.2 6.00.04 5.3 0.04 4.00.04 5.4 2.00.04 5.6 5.7 0.00.04 5.8 0.04 5.9 0.04 6.0 0.04 Series1 Series2 6.1 0.04 6.1 0.04 25 1 43 85 127 169 211 253 295 337 379 421 463 505 547 589 631 673 715 757 799 841 883 925 967 t 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7. Simple SIR Model [5] The Susceptible, Infected, recovered model has been used since 1927 to provide estimates of how a disease will effect a population. The SIR model begins with a base population composed of susceptible and infected persons. Rates of change for the susceptible, infected and recovered persons are used to provide estimated numbers of each group at a specific point in time. The SIR model was developed by separate sources and is well supported. Assumptions and Limitations: The SIR model assumes a disease runs its course quickly enough that births and deaths (from other causes) will not affect the population and that the disease itself will not kill the population. The SIR model also assumes recovered persons will not infect others, or that a disease will not mutate and infect the same person multiple times. Variables There are three major components of the SIR model which together, represent the population. Initially, there are susceptible and infected person. As the disease runs its course, the susceptible population decreases and the infected population increases. Eventually, recovered individuals begin to emerge as they do, the infected population decreases. The only variables in the basic SIR model are: P, the total population S, the number or susceptible individuals I, the number of infected R, the number of recovered International Educative Research Foundation and Publisher © 2017 pg. 136 International Journal for Innovation Education and Research www.ijier.net Vol:-5 No-04, 2017 The diagram is as following [2]: infection probability recovery rate Infecteds Susceptibles infection Recovereds recovery It is known that at any point in time, the population is the combination of the susceptible, infected and recovered populations. Therefore: P = S + I + R In order to establish a differential equation set, a derivative is taken of the population equation. 0 = S’ + I’ + R’ The susceptible population changes at a rate dependent on the interaction of the susceptible and infected populations. This rate of susceptible change is modeled by the product of the susceptible, the infected and a coefficient representing a rate of contact between infected and susceptible individuals and the probability that the disease will be transmitted. S’ = -a*S*I (a) The infected population increases at the same rate the susceptible population decreases. The infected population also decreases as individuals recover. This recovery is dependent on the number of infected and a coefficient determined by the average duration of the infection. I’ = a*S*I – b*I (b) Individuals enter the recovered population at the same rate they leave the infected population. R’ = b*I (c) (a), (b) and (c) form a system of linear differential equations. It is very difficult to solve for general solutions od R, I and S. However, we can use the procedures we did before and get numerical approximations of S, I and R. Using average rate of change to approximate derivatives we have the system of equations: S (t  delta _ t )  S (t )  a * S (t ) * I (t ) delta _ t International Educative Research Foundation and Publisher © 2017 pg. 137 Online-ISSN 2411-2933, Print-ISSN 2411-3123 April 2017 I (t  delta _ t )  I (t )  a * S (t ) * I (t )  b * I (t ) delta _ t R(t  delta _ t )  R (t )  b * I (t ) delta _ t Using Excel we can get the solution as following that is similar to the solution from MATLAB using numerical method to solve this system of differential equations. The Simple SIR Model: S' + I' + R' = 0 S' = -a*S*I I' = a*S*I - b*I R' = aI Iteration Susceptible 0 1000.0 1 999.9 2 999.8 3 999.7 4 999.5 5 999.4 6 999.3 7 999.1 8 998.9 9 998.8 10 998.6 11 998.4 12 998.2 13 998.0 14 997.8 15 997.6 S(t + delta_t) = S(t) + delta_t*(-a*S(t)*I(t) a= 0.0011 I(t + delta_t) =I(t) + delta_t*( a*S(t)*I(t) - b*I(t)) b= 0.08 R(t + delta_t) = R(t) +delta_t*(b*(I(t)) delta_t = 0.05 Infected Recovered 2.0 0.0 SIR Model 2.1 0.0 2.2 0.0 1200.0 2.3 0.0 2.4 0.0 1000.0 2.6 0.0 800.0 2.7 0.1 2.8 0.1 600.0 3.0 0.1 400.0 3.1 0.1 3.3 0.1 200.0 3.5 0.1 0.0 3.6 0.1 0 200 400 600 800 1000 3.8 0.1 4.0 0.2 Susceptible Infected Recovered 4.2 0.2 1200 Here we did not consider the death rate for all S, I and R. Upper classes students can add conditions such as death from disease, or intervention through quarantine, vaccination and treatment to have better representation of models. 7. Solving Differential Equations Let us summarize so far what we have done. dp  b* p . a. The simple population model is solving initial-valued differential equation dt International Educative Research Foundation and Publisher © 2017 pg. 138 International Journal for Innovation Education and Research www.ijier.net b. Predator – Prey model is solving system of linear differential equation Vol:-5 No-04, 2017 dx  ax  bxy , dt dy  dy  cxy . dt c. The simple SIR model is solving system of differential equations S’ = -a*S*I, I’ = a*S*I – b*I and R’ = b*I. In order to test if this approximation approach to solve first order differential equations and second order differential equations, we chose some examples from the popular textbook Differential Equations with Boundary-value Problems. 7.1 First Order Differential Equations For any first order linear differential equation dy  P(t ) y  Q(t ) , we can dt dy  Q(t )  P(t ) y (t ) dt y (t  h)  y (t ) 2. Find the approximation equation  Q(t )  P(t ) * y (t ) h 3. Enter the formula y(t+h) = y(t) +h*(Q(t) – P(t)*y(t) at Excel worksheet with initial condition as 1. Rewrite equation in the form of previous example. 4. Creating a scroll bar is optional. Example 1* A tank contains 50 gallons composed of 90% water and 10% alcohol. A second solution containing 50% water and 50% alcohol is added to the tank at the rate of 4 gallons per minute. As the second solution is being added, the tank is being drained at a rate 5 gallons per minute. The solution in the tank is stirred constantly. How much alcohol in the tank after 10 minutes? Solution Let y be the number of gallons of alcohol in the tank at time t. We have the first order linear dy 5 equation ( ) y  2 , with initial condition y(0) = 5, through the standard process using dt 50  t 5 50  t  50  t  integrating factor, we can have solution y =   . 2  50  approximation y = 13.45. If t = 10 then we have numerical If we applied dynamic modeling technique using Excel, we can transform the equation into approximation equation y (t  h)  y (t )  5   2  y , and hence h  50  t   5  y (t  h)  y (t )  h * (2    y)  50  t  Excel worksheet shows if h = 0.2, after 50 iteration t = 10 and y(10) =13.47. It we choose h = 0.1, after 100 iterations, we have t = 10 and y(10) = 13.462. Using this approach has another advantage that student can see the approximation of y when h is changing through the scroll bar. International Educative Research Foundation and Publisher © 2017 pg. 139 Online-ISSN 2411-2933, Print-ISSN 2411-3123 91 92 93 94 95 96 97 98 99 100 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 10 April 2017 13.143 13.181 13.220 13.257 13.293 13.329 13.363 13.397 13.430 13.462 Separable Differential Equation, 13.125 13.164 13.203 13.240 13.276 13.312 13.347 13.381 13.414 13.446 dy  g (t )h( y ) dt Example** dy t   with initial condition y(4) = -3. dt y Solution: The approximation equation is Find y(4.1). y(t + h) = y(t) + delta_t*(-t/y(t)). Enter this formula to Excel Worksheet, we had solution y(4.1) = -2.862. If we find algebraic solution y = - 25  t 2 then plug in t = 4.1, then we get y(4.1) = -2.8618 y(t + h) = y(t) + delta_t*(y(t)2 – 4)tion Iteration t y(t) delta_t = 0 4 -3 1 4.01 -2.98667 2 4.02 -2.97324 3 4.03 -2.95972 4 4.04 -2.9461 5 4.05 -2.93239 6 4.06 -2.91858 7 4.07 -2.90467 8 4.08 -2.89066 9 4.09 -2.87654 10 4.1 -2.86232 0.01 7.2 Second order initial value problems So far, we concentrated on solve first order initial value differential equations using Excel. In order to approximate the second order initial value differential equation, we need to express a second order differential equation as a system of first order differential equations. To do this, we begin by writing the second-order differential equation in normal form by solving for y” in terms of t, y, and y’. A second-order initial-value problem y” = f(t, y, y’), y(t 0) = y0, y’(t0) = u0 can be expressed as an initial-valued problem for a system of first-order differential equations. If we let y’ = u, the differential equation above becomes the system Y’ = u and u’ = f(t, y, u) International Educative Research Foundation and Publisher © 2017 pg. 140 International Journal for Innovation Education and Research www.ijier.net Vol:-5 No-04, 2017 Since y’(0) = u(t 0), the corresponding initial condition are then y(t 0) = y0, u(t0) = u0. The approximation algebraic equations become Y(t + delta_t) = y(t) + delta_t*u(t), and u(t + delta_t) = u(t) + delta_t*f(t, y, u) with initial values y(t 0) = y0, u(t0) = u0. Example 1 Given the initial-value problem y” + ty’ + y = 0, y(0) = 1, y’(0) = 2, approximate y(0.2) Solution 1. Write the equation in normal form y” = -ty’ – y 2. Let y’ = u then u’ = -tu – y, y(0) = 1, u(0) = 2 3. Approximation equations are y(t + delta_t) = y(t) + delta_t*u(t) and u(t + delta_t) = u(t) + delta_t*(-t*u(t) – y(t)) 4. Enter the formula into Excel worksheet we have the solution as following: If delta_t is 0.1 we have y(0.2) = 1.39 and y’(0.2) = 1.72 Iteration 0 1 2 t 0 0.1 0.2 Y(t) 1.00 1.20 1.39 U(t) 2.00 1.88 1.72 Delta_t = 0.1 If delta_t is 0.01, we have y(0.2) = 1.38 and y’(0.2) = 1.72 Iteration 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 t 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 Y(t) 1.00 1.02 1.04 1.06 1.08 1.10 1.12 1.14 1.16 1.18 1.19 1.21 1.23 1.25 1.27 1.29 1.31 1.32 1.34 1.36 1.38 U(t) 2.00 1.99 1.98 1.97 1.96 1.95 1.93 1.92 1.91 1.89 1.88 1.87 1.85 1.84 1.82 1.81 1.79 1.78 1.76 1.74 1.72 Delta_t = 0.01 Example 2 Given initial-value differential equation y” – (12t +1)y =1, y(0) = 3, and y’(0) = 1. Approximate y(1). Solution 1. Write in normal form, y” = (12t + 1)y + 1 International Educative Research Foundation and Publisher © 2017 pg. 141 Online-ISSN 2411-2933, Print-ISSN 2411-3123 April 2017 2. Let y’ = u, u’ = (12t + 1)y + 1, y(0) = 3 and u(0) = 1. 3. Approximation algebraic equations are Y(t + delta_t) = y(t) + delta_t*u and U(t + delta_t) = u(t) + delta_t*((12t + 1)*y + 1) 4. Enter formula from (3) to excel worksheet, we have solution as following If delta_t = 0.2 then y(1) = 9.28 If delta_t = 0.1 then y(1) = 12.48 y(t + delta_t) = y(t) + delta_t*u(t). u(t + delta_t) = u(t) + delta_t*((12*t+1)*y(t))+1) Iteration t y(t) u(t) 0 0.00 3.00 1.00 1 0.20 3.20 1.80 2 0.40 3.56 4.18 3 0.60 4.40 8.51 4 0.80 6.10 15.91 5 1.00 9.28 29.04 delta_t = 0.2 8. Conclusion We can conclude our approximation approach, using average rate of change to approximate instantaneous rate of change, can solve both first order and second order differential equations as well as system of linear differential equations. Our ultimate goal of this research is to reduce the anxiety of learning differential equations. In our real world issues, any changes that proportional to the some quantity with certain initial state can be modeled by differential equations or system of differential equations. Graphical solutions are useful to show what will be to general publics. modeling techniques can provide numerical and graphical solutions. Our next research subjects are AIDS dynamics and Wolf Population Dynamics. Dynamic References 1. Jo Boaler, “The Math-Class Paradox”, The Atlantic, Feb. 4, 2016 2. Bob Pannof, Workshop Notes at West Virginia State University, 1-3 August 2016 3. Zill, Wright, “Differential Equations with Boundary-valued Problems 8th Edition, 2013 pp 108109. 4. Jack Andenoro, “The Spread of Infectious Disease”, http://home2.fvcc.edu/~dhicketh/DiffEqns/ Spring2012Projects/M274FinalProjectJackAndenoro/RuftDraft.pdf, May 11, 2012 5. Lin, Thomas, “Inquiry-Based Science and Mathematics Usinf Dynamic Modeling” submit to Journal of Modern Education Review (ISSN 2155-7993), USA. AMC, 3/18/2017 6. Ron Larson, Bruce Edwards, Calculus 10th edition, ISBN1-285-057090 International Educative Research Foundation and Publisher © 2017 pg. 142