A Course In Mathematical Modeling Pdf Mooney
A Course in Mathematical Modeling
Douglas D. Mooney, Randall J. Swift
この本はいかがでしたか?
ファイルの質はいかがですか?
質を評価するには、本をダウンロードしてください。
This book teaches elementary mathematical modeling.
出版社:
Cambridge University Press
1~5分以内にこのファイルをあなたの電子メールにお届けします。
1~5分以内にこのファイルをあなたのKindleにお届けします。
注意!Kindleへ送信するすべての本は、メールによる確認が求められています。Amazon Kindle Supportからメールが送信されますので、メールをご確認ください。
Douglas Mooney Randall Swift The Mathematical Association of America A Course in Mathematical Modeling Visit the MAA Bookstore on MAA Online (www.maa.org) to find a description of this book, and the link to the authors' website where you can download data sets, Mathematica files, and other modeling resources that perform the models described in the text. Cover photo of Sandhill Crane by Don Baccus. Cover photo of Randall Swift, courtesy of Stuart Burrill, Western Kentucky University, Cover design by Freedom by Design. © 1999 by The Mathematical Association of America (Incorporated) Library of Congress Catalog Card Number 98-85688 ISBN 0-88385-712-X Printed in the United States of America Current Printing (last digit): 10 9 8 7 6 5 A Course in Mathematical Modeling Douglas D. Mooney The Centerfor Healthcare Industry Performance Studies and Randall J. Swift Western Kentucky University Published and distributed by The Mathematical Association of America CLASSROOM RESOURCE MATERIALS Classroom Resource Materials is intended to provide supplementary classroom material for students—laboratory exercises, projects, historical information, textbooks with unusual approaches for presenting mathematical ideas, career information, etc. Committee on Publications James W. Daniel, Chair Andrew Sterrett, Jr., Editor Frank Farris Edward M. Hands Yvette C. Hester Millianne Lehmann Dana N. Mackenzie William A. Marion Edward R Merkes Daniel Otero Barbara Pence Dorothy D. Sherling Michael Starbird 101 Careers in Mathematics, edited by Andrew Sterrett Archimedes: What Did He Do Besides Cry Eureka? Sherman Stein Calculus Mysteries and Thrillers, R. Grant Woods Combinatorics: A Problem Oriented Approach, Daniel A. Marcus A Course in Mathematical Modeling, Douglas Mooney and Randall Swift Elementary Mathematical Models, Dan Kalman Interdisciplinary Lively Application Projects, edited by Chris Amey Inverse Problems: Activities for Undergraduates, Charles W. Groetsch Geometry from Africa: Mathema; tical and Educational Explorations, Paulus Gerdes Laboratory Experiences in Group Theory, Ellen Maycock Parker Learn from the Masters, Frank Swetz, John Fauvel, Otto Bekken, Bengt Johansson, and Victor Katz Mathematical Modeling in the Environment, Charles Hadlock A Primer of Abstract Mathematics, Robert B. Ash Proofs Without Words, Roger B. Nelsen A Radioed Approach to Real Analysis, David M. Bressoud She Does Math!, edited by Marla Pai'ker Acknowledgments This project began with the authors' desire to develop a course in mathematical modeling at Western Kentucky University. The mathematics department headed by James F. Porter has been very supportive of this project. We were given freedom in the development process, opportunities to team teach the course, access to computing equipment and software, and matching support for grants written for the course development. The Kentucky PRISM-UG program provided grant funding to assist the course development. The particular flavor and direction of the book owes a lot to the 1993 NFS workshop in biomodeling organized by Robert McKelvey. Special inspiration came from workshop instructors Anthony Starfield and William Derrick. Many individuals contributed to improving the drafts of this manuscript. We appreciate the careful reading of early drafts by colleagues John Boardman, Claus Ernst, Frank Fanis and James Porter. Richard and June Kraus provided valuable input on the copy edit draft of the text. Andrew Sterrett, editor of the Mathematical Association of America's Classroom Resources Series, read many versions of this text and we are grateful for his valuable comments. The production staff at The Mathematical Association of America were extremely helpful in preparing the final version of this text. In particular, we would like to thank Elaine Pedreira and Beverly Ruedi for their assistance, advice, and constant reassurance. Finally, the students of our modeling course suffered through rough drafts of this text and their careful comments and honest complaints have greatly enhanced the final product. Student Johnathan Jemigan deserves special mention for his help with many tedious technical details. V To Wilma Mitchell and Judy Wilson D.D.M To my wife Kelly, and my children Kaelin, Robyn, and Erin R.J.S. niv'.i ;.-. Preface This book is primarily intended as a one-semester course in mathematical modeling accessible to students who have completed one year of calculus. It is based on a course that the authors have taught at Western Kentucky University, a regional state-supported university with a small masters program and no engineering school. This course is offered as an elective and has been well received by the students taking it. There is more material in this text than can be covered in a one-semester course, giving the instructor options based on the character of a particular class. Most of the material in Chapters 0^, for example, is accessible to precalculus students. Selections from these chapters have been used in five week summer courses for middle- and secondary-school teachers. There are a number of issues to resolve and balance when teaching a modeling course or in writing a modeling textbook. The first is whether to teach modeling or models. The distinction here is that modeling is the process of building a model whereas a model is something someone else has already built. We chose to emphasize modeling. Models, however, are not excluded. They serve as examples of the modeling process and in many cases are building blocks that can be used when modeling. How then does one learn modeling? An obvious answer is by actively building models. Our course and consequently this book are based on modeling projects. In the text, modeling problems will be posed. The appropriate mathematics will be introduced. Use of computer software will be discussed. Models involving this problem will be presented. Finally modeling projects will be presented. As in other mathematics classes, the reader must be an active participant and is encouraged to work through the example models at a computer and to tackle the projects at the end of each section. When teaching this course, we require students to turn in completed projects in typewritten reports. A course of this type provides noncontrived opportunities to bring writing into the mathematics curriculum. What is the appropriate level at which to learn modeling? The answer is, of course, at any level. There are courses and texts at the high school/precalculus, calculus, junior, senior, and graduate levels, and many researchers study models and modeling. This book IS aimed at students who have completed two semesters of calculus. Leafing through the IX X Preface text, you will see difference and differential equations, probability and statistics, matrices, and other mathematical topics. No background is assumed except that students have an intuitive idea of an average, understand what it means for something to happen 30% of the time, know what a matrix is and that matrices can be multiplied, and finally know that dx/dt is a rate of change and understand what that means. One of our hopes is that students coming out of a course taught from this book will have been exposed to advanced mathematical topics, will have seen how they can be used, and will be motivated to take more mathematics. It is reasonable then to ask how someone can build models using ideas from advanced courses which they may not have taken. A problem with learning modeling at this level is the lack of mathematical tools possessed by the beginning modeler. Frequently, even the tools that a student does have are not understood well enough to be used competently. An additional complication is that if a particular problem which is solvable by hand is altered even slightly, the result is a problem which may be intractable by nonnumerical analysis. One example is projectile motion. The simple model can be handled quite well with an understanding of quadratic equations, and slightly more advanced questions can be answered using calculus. Add, however, to this basic model some factors involving wind speed and air resistance, and suddenly the problem has become extremely difficult to solve. Even with years of training a professional mathematician can be as stumped as a beginner when trying to analyze a model. This problem is handled in this book by using software packages. One of the benefits of technology is that it allows topics to be taught at lower levels than before. Graphing calculators, for example, enable min/max problems to be effectively taught at the precalculus level. Here we will work with nonlinear difference equations, using our math skills to set them up and letting software give us graphical and tabular solutions. Markov chains are presented and then solved using software which can multiply matrices. Thus we are able to build and study models at an early undergraduate level—models which would have been studied in a graduate course or not at all several years prior to this writing. Software changes rapidly, and to keep this book from becoming quickly outdated we are not connecting it to any particular piece of software. We will talk in general about Computer Algebra Systems (Mathematica and Maple being the current leaders). Systems Oriented Modeling Software (currently Stella II), spreadsheets, and statistical packages. This software is to varying degrees user-friendly, which is in keeping with the proposed level of the course. While serious simulation modeling often involves programming, numerical packages, and issues of numerical analysis, we felt that these details would obscure the ideas of modeling at the level of the intended audience. Further, easy-to-use software and quick results can be a useful first step to more serious work. In all things, balance is important. While we have just talked extensively about the usefulness of computer simulation modeling, this book does not neglect analytic or theoretical models. Both have their uses and their place. An analytic model allows us to study it with all the mathematical tools that we know. The result is great understanding. Their limitation is that in order to be tractable, they usually have to be so simplified that their relevance to the real world becomes questionable. Computer simulation models, by contrast, can handle as much real-world complication as you wish to add (within Preface XI limits of memory and processing time). It is much harder, however, to gain from them the type of understanding one can obtain from an analytic model. To test the effect of parameter variations for example, multiple runs must be performed. In general though, the philosophy of this book is that while pathologies can be found and one should be conscious of them, mathematics and software works well most of the time. (Discussion topic: Is the obsession of mathematicians with the abstract and pathological as opposed to the concrete and useful a reason that mathematicians ai-e in such low demand?) Modeling is a rich area. Due largely to the interests of the authors, this book deals almost exclusively with dynamical systems models and modeling. This means the problems studied involve changes over time. In this text, we will study discrete and continuous, linear and nonlinear, deterministic and stochastic, and matrix models and modeling. A goal of our study is to develop a modeling toolbox. Modeling techniques will be studied as components to be used in larger models. For example, the logistics equation will be studied, not as an end in itself, but as a building block for a more complex model. As for the choice of our models, we will limit ourselves primarily to problems in population biology and ecology with a few problems involving finance and sociology. This choice requires little prior background. We assume that every college age student has intensively investigated the processes involved in reproduction and death if for no reason other than an innate curiosity. This is a modeling book. The mathematics in it was chosen based on what was useful to the models. This book is not intended to be a book on difference equations, differential equations, linear algebra, probability and statistics, dynamical systems, or calculus despite the fact that all these topics are mentioned. This is one of the distinctions between this book and a book in, say, calculus that has modeling in it. In this book the modeling determines the math to be discussed; in a mathematics book, the models are chosen to match the mathematics being discussed. Leafing through the text, you will notice that there is a wide range in terms of the difficulty of the material. Some of it is accessible to precalculus students, while some requires some maturity. Again our motivation was to teach certain types of models and to let the mathematics taught be driven by the needs of the modeling. This modeling text has a website which contains other modeling resources and informa tion. This site will be continually updated and contains additional modeling projects, data sets, information about modeling software, and other relevant issues about modeling at the undergraduate level. The site also has the text's Mathematica appendix as downloadable files. The site can be reached through a link in the MAA Bookstore on MAA Online (www.maa.org). We have observed some interesting things in the students taking this course. Motivation is the primary component to doing well. A number of "average" students have excelled in this class, while some "exceptional" students who have learned the game of "getting an A" have struggled as have those who play the game of "getting by." Why study modeling? It integrates much of undergraduate mathematics. It provides real problems for students to cut their mathematical teeth on. It teaches mathematical XII Preface reasoning. It encourages flexible thinking and multiple approaches in problem solving. It delves into interesting nonmathematical topics. Most importantly, it's fun. We conclude with a bit of fine print. We stress in Chapter 0 that the purpose of a model is essential in determining whether it is a good model or not. This is a textbook, and all the models included have the purpose of teaching modeling skills. A model that is good for conveying a point may not be the best model for a real-world application. We made a great effort to pick, by and large, realistic examples which use realistic data and parameters. To do this, we have scavenged models from many sources. Sometimes we dramatically simplified a complex model that had a component that matched what we were teaching. Sometimes we have creatively interpreted data. Sometimes a model we present is out of favor with some faction or another. We justify this by saying the models are good for our purposes. For other purposes, we strongly urge a skeptical approach to every model and piece of data. We hope public policy is not decided based on our sandhill crane model, but that the methods of the book may be useful to someone building models for making such public policy. In other words, "your mileage may vary." To the Teacher As mentioned in the Preface, it is difficult to accurately represent a course in a textbook. Our course is typically very dynamic in nature, while a book is static and set in stone. In this section we hope to convey a sense of how the course is taught so, perhaps, the dynamic nature will come through somehow. For the first half of the semester, the class meetings followed a three-step cycle: math; model; and modeling project. More specifically, one day we would lecture on the mathematics needed for a certain type of model, say solving linear recurrence relations with constant coefficients. The next we would present a model building on the math taught the previous day, say the annual plants model. Usually the model discussion mixed chalkboard derivation with numerical analysis(we always had a computer demonstrator in class). Frequently after the initial points were made, discussion from the students directed in-class explorations of a model. Finally, we would assign a modeling project based on the preceding two days' work, Great Lakes pollution for example. Our university has a unique scheduling system of two classes one week followed by three classes the next with Friday being the swing day. On Fridays (i.e., every other week) we would go to a computer lab and give the students a demonstration of the software they would be using, then give them either a short computer exercise model to reinforce ideas while we could answer questions, or let them start on the current project. Thus we taught this class with four days of lecture followed by one day of lab. While this class could be taught without occasional lab days, we highly recommend them. They get students introduced to software quickly, with immediate assistance when they get stuck. We found that generally this amount of guidance was sufficient. Further, they create an environment where the teacher and student connect in a way that is not possible in the traditional lab. It is much easier for us to write recommendation letters for students we have had in this course than for students in our more traditionally taught courses. For the first half of the semester, we assign projects once a week. We also move through material quickly in class, getting to the useful aspects of the math without getting bogged down by the mathematical details which are frequently stressed in a non-modeling mathematics class. The book is intended to be read by the student and has more details XIII XIV To the Teacher than we present in class. The sections on the statistics of regression, for example, are relatively long in the text. In class this material can be covered in two or at most three days. The lecture is conducted with a computer demonstrator displaying a regression or ANOVA table for simple regression. The meaning of each element is discussed, and key points are present on the chalkboard. Data sets are changed, and the statistics are examined again. By the end of the lecture, the student knows all the elements and how to use the F-ratio to test for significance. The second lecture introduces multiple regression and how to use the t statistic. Again most of the lecture consists of examples. We build regression models by adding variables and by removing variables, and we hint about the ideas of forward, backward, and stepwise regression. These ideas are generally considered to be beyond our scope. In the text, there are formulas that are helpful for understanding where things come from, but generally they do not get discussed in class. By midsemester we are done or nearly done with Chapter 3. At this point, we assign a midterm project that synthesizes a number of ideas. The impala and caribou projects have been used as midterm projects. We have let the class work on these projects in groups of two or three and generally have given the groups several weeks to complete them. We require these projects to be written in a report format, and usually we create some scenario with the students being consultants hired to address certain questions with the given information. Though mathematically not difficult, the complexity of these projects form a defining moment in the class where the students see how the ideas covered fit together to construct models. We also require students to individually build a model to solve a problem on a topic of their choosing. These are considered final projects, and we have the students present them to the class at the end of the course and turn in a written report to us. We begin preparing the students for this project after the midterm project and cut back on the weekly projects (either making them less involved or less frequent—sometimes the in-lab project suffices as the project of the week). More material gets covered during the last portion of the course because we spend less time teaching software, have fewer projects, and meet in the lab less. We still follow a math/model format, but often the lectures may span several class periods. Testing is a peculiar issue in this class. With the emphasis on modeling and projects, tests seem inappropriate. The one time we taught this class without testing, however, resulted in students ignoring any material that did not show up on a project, and, frequently, they were not able to discern which material that would be.' This especially became a problem after the midterm project with the cutting back on the weekly projects. Since then, we have given a midterm and final exam. These exams are based on basic exercises over mathematical techniques. For example we have them find fixed points and test for stability, construct box plots and find regression lines with small data sets, construct and analyze small (two-step) Markov chains, and similar tasks. Together the midterm and final comprise 10% of the course grade. We are clear with the students what to expect on these exams to prevent panic in studying the broad nature of the material in this class. We have been pleased by the results of adding these exams. One final comment on the static nature of the book versus the dynamic nature of the class—the most recent offering of this course was taught directly from the book, and we To the Teacher XV found this to be constraining. This is a fun and exciting course, and part of the fun is discovering models on one's own. During the different offerings of the course, we have used different models and projects each year. There only a few models that we repeat each year. (We have always assigned the Blood Alcohol Model in Chapter 1 and have done the m&m simulation in Chapter 2.) In future offerings we will continue to present the material that is here, but will probably use different model applications to illustrate this. We strongly encourage those using this text to do the same. Material that we are excited about because it is new to us always goes over better than canonical examples dutifully presented. i f. 'i Si viriJ.. ■i ir. 1 i- Contents Acknowledgements Preface To the Teacher 0 1 V ix xin Modeling Basics: Purpose, Resolution, and Resources 0.1 Further Reading 6 0.2 Exercises 7 1 Discrete Dynamical Systems 9 1.1 Basic Recurrence Relations 10 1.2 Spreadsheet Simulations 1.2.1 Spreadsheet Basics 1.2.2 Relative and Absolute Addressing 11 11 13 1.2.3 Best, Medium, and Worst Cases 14 1.2.4 Hacking Chicks Example 14 1.2.5 Effects of Initial Population Example 1.3 Difference Equations and Compartmental Analysis 1.3.1 Specialty Software for Compartmental Analysis 1.4 Closed-Form Solutions and Mathematical Analysis 1.4.1 Exponential and Affine 1.4.2 Fixed Points and Stability 15 16 19 19 19 21 1.4.3 The Cobweb Method 24 1.4.4 Linear Recurrence Relations with Constant Coefficients 25 1.5 Variable Growth Rates and the Logistic Model 1.5.1 The Logistic Model 1.6 Systems of recurrence relations 1.6.1 Example: A Host-Parasite Model 1.7 For Further Reading 31 31 35 35 37 XVII Contents XVIII 1.8 Exercises 38 1.9 Projects . .38 2 Discrete Stochasticity 2.1 Stochastic Squirrels 2.1.1 Example 2.1.2 A Simple Population Simulation: Death of M&M's 2.2 Interpreting Stochastic Data 47 48 48 49 50 2.2.1 Measures of Center and Spread I: Mean, Variance, and Standard Deviation 51 2.2.2 Frequency Distributions and Histograms 53 2.2.3 Example: The X-files 56 2.2.4 Measures of Center and Spread II: Box Plots and Five-Point Summary ... 58 60 2.3 Creating Stochastic Models: Simulations 2.3.1 Distributions 60 2.3.2 Three Useful Distributions 66 2.3.3 Environmental versus Demographic Stochasticity 2.3.4 Environmental Stochasticity—A Closer Look 2.4 Model Validation: Chi-Square Goodness-of-Fit Test 2.4.1 Testing the Stochastic Squirrel Model 2.4.2 Testing Stochastic Models and Some Background Theory 2.4.3 Validity of Sandhill Crane Model 2.5 For Further Reading 70 2.6 Exercises 90 2.7 Projects 93 3 Stages, States, and Classes 3.1 A Human Population Model 3.2 State Diagrams 3.2.1 Human Population 3.2.2 Money in a bank account I 3.2.3 Money in a bank account II 3.3 Equations From State Diagrams 3.4 A Primer of Matrix Algebra 3.5 Applying Matrices to State Models 3.6 Eigenvector and Eigenvalue Analysis 3.7 A Staged Example 78 82 84 85 87 89 101 101 104 104 104 105 106 106 110 112 120 3.8 Fundamentals of Markov Chains 122 3.9 Markovian Squirrels 3.10 Harvesting Scot Pines: An Absorbing Markov Chain Model 127 3.11 Life Tables 133 130 3.12 For Further Reading 135 3.13 Exercises 135 3.14 Projects . 139 xix Contents 4 Empirical Modeling 4.1 Covariance and Correlation—A Discussion of Linear Dependence 4.2 Fitting a Line to Data Using the Least-Squares Criterion 4.3 A Measure of Fit 152 155 157 4.4 Finding for Curves Other Than Lines 4.5 Example: Opening The X-Files Again 159 4.6 Curvilinear Models 164 4.6.1 A Catalog of Functions 4.6.2 Intrinsically Linear Models 4.6.3 Intrinsically Nonlinear Models Which Can Be Linearized ... 4.7 Example: The Cost of Advertising 164 4.8 Example: Lynx Eur Returns 175 4.8.1 Intrinsically Nonlinear Models Which Cannot Be Linearized: The Logistic Equation 4.9 Interpolation 4.9.1 Simple Interpolation 4.9.2 Spline Interpolation 4.9.3 Example: The Population of Ireland 4.9.4 Interpolating Noisy Data 4.10 The Statistics of Simple Regression 4.10.1 Reading a Regression Table: I 4.10.2 The Sums of Squares and 4.10.3 Regression Assumptions 4.10.4 F-tests and the Significance of The Regression Line 4.10.5 The t-test for Testing the Significance of Regression Coefficients 4.10.6 Standard Errors of the Regression Coefficients and Confidence Intervals 4.10.7 Verifying the Assumptions 4.10.8 Reading a Regression Table: II 4.11 Example: Elk of The Grand Tetons 4.12 An Introduction to Multiple Regression 4.12.1 Example: A Testing Model 4.13 Curvilinear Regression 4.13.1 Example: A Com Storage Model 4.14 For Further Reading 5 151 161 167 167 169 180 187 187 190 191 195 197 199 199 200 201 204 205 207 207 210 214 215 219 220 224 4.15 Exercises 226 4.16 Projects 228 Continuous Models 5.1 Setting Up The Differential Equation: Compartmental Analysis II 5.2 Solving Special Classes of Differential Equations 5.2.1 Separable Equations 5.2.2 Example and Method: US Population Growth and Using Curves Pitted to Data 5.2.3 Linear Differential Equations 239 240 242 242 245 251 XX Contents 5.2.4 Example; Drugs in the Body 5.2.5 Linear Differential Equations with Constant Coefficients 5.2.6 Systems of Eirst-Order Homogeneous Linear Differential Equations With Constant Coefficients 5.2.7 Example: Social Mobility 5.3 Geometric Analysis and Nonlinear Equations 5.3.1 Phase Line Analysis 5.3.2 Gilpin and Ayala's 0-logistic Model 5.3.3 Example: Harvesting Models 5.3.4 Example; Spruce Budworm 5.3.5 Phase Plane Analysis 5.3.6 The Classical Predator-Prey Model 5.4 Differential Equation Solvers 5.4.1 The Answer Is Known, But Not By You 252 253 258 264 266 266 270 272 277 283 287 294 295 5.4.2 Numerical Solvers When No One Can Solve the Differential Equation .. 298 5.5 For Further Reading 305 5.6 Exercises 307 5.7 Projects 309 6 Continuous Stochasticity 6.1 Some Elements of Queueing Theory 323 323 6.2 Service at a Checkout Counter 324 6.3 Standing in Line—The Poisson Process 6.4 Example: Crossing a Busy Street 6.5 The Single-Server Queue 6.5.1 Stationary Distributions 6.5.2 Example: Traffic Intensity—When to Open Additional Checkout Counters 6.6 A Queueing Simulation 328 331 334 336 338 341 6.7 A Pure Birth Process 346 6.7.1 A Remark on Simulating the Pure Birth Process . 6.8 For Further Reading 351 6.9 Exercises 351 6.10 Projects 354 Appendices: A Chi-Square Table 351 369 B F-Table 371 C t-Table 375 D Mathematica Appendix 377 References 423 Index 427 % Modeling Basics: Purpose, Resolution, and Resources If we were to ask several people for examples of models, we would get a variety of responses which might include mathematical equations, toy trains, prototype cars, or fashion models. What these very different objects have in common is that they are representations of reality. The equations may represent the growth of a population, the toy train is representation of a real train, the prototype is a representation of a future car, and a fashion model is a representation of how clothes will look when worn and maybe other things that one has to live in the world of fashion to appreciate. A model is, then, a representation of reality. This, however, is not a sufficient definition. How can one evaluate different models? A fashion model and a toy train are both representations of reality, but so vastly different that they are incomparable. A street map of a city and a road map of the whole United States are representations of reality which are similar, but neither can substitute for the other. Intrinsic in a model is a sense of purpose. We define a model to be a purposeful representation of reality A street map is a representation of reality for the purpose of navigating streets in a particular city. It is useless for driving across country or even for locating traffic Jams or construction within a city but that does not make it a bad model. Other models are needed for those purposes. A successful fashion model serves the purpose of selling clothes, perhaps by creating some fantasy about what people will look like. An artist's model serves a different purpose. For this purpose, perhaps someone who is less glamorous, but with more idiosyncrasies might be a better model. There are different types of toy trains: some are for young children, some are for older children, and others are for adults. Again different purposes result in different models. This book deals exclusively with mathematical models which are models built using the tools and substance of mathematics (including computers and computer software). We do not deal with train sets or fashion models. Further, a major emphasis of this book is 1 2 0.0 Modeling Basics: Purpose, Resolution, and Resources on modeling which is the process of building mathematical models. Models are presented of course, but more as examples of the results of the modeling process and less as ends in themselves. Doing a modeling project will help illustrate several modeling concepts. You, the reader, are encouraged to get the following materials and do the tasks that are requested of you. You need a jar, preferably of an interesting shape, and a bag of M&M candies or some similarly sized objects (jelly beans, marbles, or pennies). Here is your project: Project: Take exactly one minute and determine how many M&M candies will fit in your jar. Warning: Not doing this project will result in inferior learning, low self esteem, and poorer jobs with lower pay. Now that you have done this, let us think about what you have done. First the concept of a resource constraint should have meaning to you. If you honestly attempted to do this problem in one minute, you may have been frustrated thinking that you could do this problem if you only had more time. There may have been other frustrations involving resources; for example, you could have done this if you had a ruler or some other measuring device. While this deficiency of resources may seem to be an unfair constraint it is something modelers have to cope with all the time. For example, your boss may tell you one morning to determine the effects of some new strategy for a meeting scheduled that afternoon. The boss does not care about, "I could do it if only ..." The model you construct given a couple hours will be very different from the model you would construct given several days or years. But it is the best you can do within the constraints. Other resource constraints are money, personnel, computing power, and expertise. It may be impractical for you to buy a computer, hire a staff, or go back to school just to solve a problem. One thing missing from the project above, which is a justifiable complaint, is that the purpose of the project was not stated. Why do you need to know how many M&M's fit in the jar? If the purpose is to determine if one bag of M&M candies would fill the jar, a quick visual inspection of the jar and of the bag would give the answer, and 60 seconds would be more than enough time. If the purpose is to figure out how many bags of M&M's would fill the jar to a point that most anyone would consider to be full, then one needs to do some figuring. Being off by a couple handfuls of candies, however, will not make any difference. Finally, if the purpose is a contest and the person who can fit the most M&M candies into the jar so that the lid can be fully tightened without squashing any candy wins valuable prizes, then it is very important to figure out exactly how many candies fit in the jar. Again the purpose is a vital part of any model that you build. These ideas bring up the notion of resolution. This term may be familiar from photographs or computer images. It is hard to determine details in a photograph with low resolution, but the details are very sharp in a high-resolution picture. Models have resolution also. In the previous paragraph, we discussed three purposes for the problem of finding how many candies fit in a particular jar. In each case, the answer had a different resolution: more or less than one bag; to within a couple handfuls; the exact maximum number. 0 Modeling Basics: Purpose, Resolution, and Resources 3 If the purpose of a model requires only a low-resolution answer, then a low-resolution model is completely acceptable. Even if resources permitted a better answer, the better answer would not be any more useful. On the other hand, if a liigh-resolution answer is desired, low-resolution models still have their place. Often one starts with a low-resolution model to get a ballpark estimate and successively refines the model until either the desired resolution is achieved or resource limitations prevent one from proceeding further. Let us go back to our modeling project and revise it a little. Project 2: A jigsaw puzzle company wants to fill your jar with M&M candies so that a photograph can be taken with the jar looking more or less full (a handful shy will not make any difference). A bag of M&M's holds 50 candies. How many bags should they buy? You have 15 minutes to complete this project. Before you start you may acquire any standard measuring instruments you think you will need. One constraint: do not start with more than one bag of candy (several bags are okay, but you are constrained so that you cannot fill up the jar, dump it, and count the candies). Assuming you have done this project, let us discuss what you have done. If you thought this would be an easy problem if you just had more time earlier, do you still think this is the case? There is no "right way" to approach this problem. We mention a few. Did you compute the volume of the jar? If you did this, did you approximate the jar as a cylinder, or as a small cylinder surmounting a larger one? Maybe you forgot the formula for a volume of a cylinder and used rectangular boxes instead of cylinders. Maybe you remembered the formula for the volume of a truncated cone and used that. If you had access to a well equipped kitchen you might have found the volume exactly by filling the jar with water and pouring it into a measuring cup. Perhaps your jar had the volume printed on it in some way. Now how about the Mc&M's? Did you treat them as ellipsoids with volume nabc7 Did you treat them as little cylinders, or as little boxes? Here is one approach to the problem. Approximate the volume of the jar using two cylinders taking care that the volume of the two cylinders is greater than or equal to the true volume. Call this volume V. Next treat an M&M candy as an ellipsoid and suppose its volume is v. Assuming that the volumetric units are the same, V divided by v gives the absolute maximum number of M&M's needed from which we can determine the number of bags needed. Of course this assumes that every millimeter of the jar is covered by candy. If you look at M&M candies poured into a jar, however, you notice that there is a lot of empty space. We can obtain a lower bound by considering the M&M's as cylinders and determining how many lie in one layer at the bottom of the jar and then figuring the number of layers the jar will hold. We may have to use multiple cylinders to represent the jar because of the neck. In any case, we can get a good estimate for how many M&M's would fit in the jar if they were stacked uniformly one on top of the other. Take a moment to convince yourself that, assuming one had the patience to stack them, one bump would knock the M&M's out of their columns and some would fit into the space between M&M's on the previous layer. This is called packing, and when it happens, which is always, more M&M's will be needed to fill the jar. Thus we have two numbers giving us a lower bound and an upper bound, and the true number is somewhere 4 0.0 Modeling Basics: Purpose, Resolution, and Resources Occam's Razor Model World Real World Interpreting and Testing Formulating Model Model Results World Problem Model T37 Mathematical Analysis FIGURE 0.1 Model World Diagram. in between. Despite the simple sounding nature of this problem there is a great deal of complexity. Complexity is associated with any real problem. Consider Figure 0.1. The problems that modelers wish to solve exist in the real world. The real world is a nasty place with all sort of complications. Bottles are irregularly shaped. Candies are shaped so they can fit together in many ways, but always having some space between them. To illustrate this, the real world is given a nebulous shape. The first step in the modeling process is to simplify the real world to create a model world. As the picture depicts, the model world leaves out much of the complexity of the real world. For example, a bottle becomes two cylinders. The M&M's become cylinders. The original question gets translated into a question involving the model world. In the model world, the question is how many M&M cylinders fit inside the two bottle cylinders. Next we construct a model of the problem in the model world. All the tools and techniques of mathematics can now be applied to the problem in the model world to get an answer in the model world. A very important mistake to avoid is to assume that the solution to the problem in the model world answers the question in the real world. The final step is to interpret the answer found for the model world problem, back in the real world. Here we notice that the M&M's can pack and that the shape of the jar is not two cylinders. Depending on our purpose, resolution, and resources, we may need to work through the cycle one or more times to get a satisfactory answer. In most mathematics classes, we start with an equation and solve it. Occasionally we start with a problem in a model world which we solve and answer back in the model world. In this book, we do both of these, but also carry the process further to begin with problems in the real world and work our way completely through this diagram to get answers in the real world. The process of converting the real world into a model world is probably the most important step in the modeling process. This process is referred to as using "Occam's razor." William of Occam, a fourteenth-century philosopher, coined a phrase in Latin 0 Modeling Basics: Purpose, Resolution, and Resources 5 which literally translates to: "things should not be multiplied without good reason." In other words, don't make things harder than they need to be. In a modeling setting, exclude the details which are irrelevant given the purpose, or which cannot be handled given the constraints. We are cutting the world down to manageable size, as if with a razor, hence the term Occam's razor. Occam's razor is a sensitive and dangerous tool. Cut out too much, and the model solutions have nothing to do with reality. Cut out too little, and the problem is too difficult to solve with the available resources. A model that every calculus student has probably seen is that projectiles follow parabolic trajectories. This is derived by starting with a constant acceleration rate g and initial conditions (sq and vq) and integrating the equation a{t) = g twice to get the displacement as a function of time s{t) = ^+ vot + sq- Let us examine this model in light of Figure 0.1 and Occam's razor. The problem in the real world was originally predicting the motion of cannon balls and perhaps things like bullets and stones. (A great deal of technological advances have been made exploring more efficient ways of killing people.) This problem was moved into the model world. Occam's razor sliced away and left a world which was flat, with constant gravitational force, in a vacuum, with no other forces of any kind. Within tliis world, the model for parabolic motion was set up and solved. Then it was tested in labs and on battlefields. For these purposes, the model was very good. One danger is to assume that because the model predicts that all projectiles have parabolic motion, in reality they all will. Try throwing a feather. Try throwing a light plastic ball into the wind. Try dropping a BB into a jar of honey. Missile designers realized that they could not assume constant gravitational force or neglect air resistance. However, for throwing rocks and firing cannon on windless days, the parabolic model is a good model. Occam's razor creates some assumptions which should be spelled out when reporting on a model that has been built. With the projectile motion, we spelled out that the model world was flat, was a vacuum, and had constant gravity and no other forces. This is a vital part of a model. When someone throws a feather and says, "Ah ha, your model is wrong," we can reply, "Well, the feather would have followed parabolic path if you had thrown it in a vacuum." The accuser would have to accept this. The next complaint might be that your model is unrealistic because we do not live in a vacuum. To which we reply that for objects of certain masses projected certain distances, the effects of not being in a vacuum are negligible. Of course we would have to back this up, and this is what the lab and field tests verify. Assumptions and model testing are two very important lines of defense against skeptics and critics. Here is another modeling project which we will only think about and not actually solve. It serves to illustrate many of the concepts of this book. Suppose we are starting a limousine service, driving people from a particular town to the nearest airport. For the sake of illustration, suppose that this is 70 miles one way. We want to compute the cost in gasoline of these trips for budgeting purposes. Our car has an average gas mileage for this type of driving of 25 miles per gallon. A first pass at this problem would be to divide the distance to the airport by the mileage and multiply by the current gasoline price. However, after thinking about things, we realize that the current gasoline price is changing. We look up records for the last five 6 0.1 Further Reading years and compute a function which predicts the price of gas into the future, understanding that while reality may be very different from this prediction, it will probably be good for the short term. We repeat the model with this gas price function. Now we have a time dependent model. The questions it answers are not just how much will it cost, but how much will it cost at different times. Both of the models we have constmcted are deterministic models. They include no random factors and consequently predict one number or one number at each point in time. Do we believe these numbers? We might suspect that different trips to the airport might result in different gas mileages due to random factors such as traffic and weather. If we include these into our model, we can run simulations and end up, not with a single number, but with a distribution of numbers. Models which include randonmess are called stochastic. We may think of other random factors such as varying distances based on where customers are picked up or where the driver is able to park. At some point the model may become unwieldy and we must decide (use Occam's razor) whether all this detail is important to our purpose and worth the necessary resources. The first chapter of this book deals with deterministic time dependent models where the change in time occurs in jumps (gas prices change weekly or daily, but not from instant to instant). The second chapter adds stochasticity into models and examines ways of analyzing the output. The third chapter adds additional complications such as a limousine service with multiple cars with different gas mileages. The fourth chapter deals with ways of looking at data such as gas prices over time and fitting functions to them. The fifth chapter deals with time dependent models where the change over time is continuous (for example if the gas mileage steadily decreased between service intervals). The last chapter covers randomness which occurs continuously. All these chapters provide different ways of analyzing essentially the same problem. Occam's razor must be used with the issues of purpose, resolution, and resource constraints to decide which approach is best for a particular situation. While we do not often think about it, we do modeling all of the time. Here is a another project. How long will it take to finish reading this chapter? This is a problem we may solve frequently when reading before bed and get tired. We could answer this question by computing our reading rate for this type of material and determining the number of words left to go. Maybe we could include a factor for reading rates slowing down as we get tired. But if we are trying to figure out whether to finish the chapter now or later, this degree of resolution is not necessary. For this purpose, a sufficient answer is "not long." 0.1 Further Reading These first two books are good continuations of the ideas presented in this chapter. Both go considerably deeper: John Harte, Consider a Spherical Cow: A Course in Environmental Problem Solving, University Science Books, Mill Valley, California, 1988. 7 0 Modeling Basics: Purpose, Resoiution, and Resources Anthony M. Starfield, Karl A. Smith, and Andrew L. Bleloch, How to Model It: Problem Solving for the Computer Age, McGraw-Hill Publishing Company, New York, 1990. The next book is an introductory modeling classic. It is recommended additional material for the whole book so we list it at the beginning and will not repeat it every chapter. The material is at a similar level to the material in this book, but it places greater emphasis on engineering-type problems: Frank R. Giordano and Maurice D. Wier, A First Course in Mathematical Modeling, Brooks/Cole Pub. Co., Monterey, CA, 1985. 0.2 Exercises 1. How many 1,000 cubic-inch cylindrical tin cans can be formed from a sheet of metal one yard wide and two yards long? 2. How many restaurants are there in the United States? Clearly it is impossible, for all practical purposes, to find the right answer as restaurants open and close daily. First establish an acceptable error range for your answer and then try to answer this question. You may consult any source for information (such as population size, or number of cities) with the exception of anything which directly deals with this question. Clearly state the assumptions you are making. Next find a source which states the number of restaurants there are. Compare your answer to this answer. Realizing that any "official" number is also an estimate and not truth, which answer are you more confident in and why? 3. Estimate the number of dots in Figure 0.2? Your method should not involve counting a large number of dots; counting a sample is acceptable. Suppose this figure represents 1 ! y. V" -.■'vr 0.8 :■ , A #v.|. .V • ••t Vfe. V-KV i s '1 .:;1 / ;r' 0.6 : • 'i v';. S. t--- 0.4 .i ;.V .■ : >* i l' •y : ' ■{C 0.2 ,1 How Many Dots? ■iCy, S'.' ■Cr: 0.2 FIGURE 0.2 ■•V 4 AC. ;; Y- t V 0.4 0.6 0.8 1 8 0.2 Exercises aerial photograph of a tree farm with each dot representing a tree. Your purpose is to tell a lumber company how many trees are in this tract of land so they can make revenue projections. Discrete Dynamical Systems Consider for a moment the difference between the growth of a population of maple trees and a population of humans. If we were to measure the population growth of some type of maple tree, we might go out and stake out a plot of land in some wilderness area and count the number of maple trees within it. If we went out day after day, we would notice very nearly the same number of trees in the plot. During a few weeks in the spring, however, the number would jump as the new trees sprouted from seeds. From then on the maple population would remain relatively constant until the next spring. A few might die and a few might sprout late, but the bulk of the activity takes place over a short period of time. After a few years of daily census taking, we might conclude that an annual census would probably be sufficient for most purposes. If we were measuring a human population, on the other hand, and were using an area that included a large number of people, there would be many birth and deaths each day. In fact, if we took a large enough area, say the entire United States, we would find changes in the population each minute and, perhaps, each second. Even this once-a-second census is an approximation to a continuously changing population. Human population growth is, then, modeled as a continuous process, while maple population growth is modeled as a discrete process. The equations we use to model each of these need to reflect this distinction. The first three chapters of this book deal exclusively with discrete modeling. Chapters 5 and 6 deal with continuous models. (Chapter 4 concerns fitting models to data, and its results can be used in either type of model.) It is also possible to construct models with both a continuous part and a discrete part. For example, we might decide that trees sprout according to a discrete model, but die according to a continuous model. These could be combined into a single model which is continuous through the summer, fall, and winter, but discrete in the spring. Such models are called metered models. This chapter is devoted to discrete time, deterministic (no randomness) models. The mathematics which describes this behavior is called discrete dynamical systems. 9 10 1.1 Basic Recurrence Relations 1.1 Basic Recurrence Relations A fundamental mathematical concept for working with discrete time models is the recurrence relation. A function x on the nonnegative integers (or any well ordered set) is recursively defined if x{n) is a function of the values of x at some or all of the numbers less than n, that is x{n) = /(n,x{n - 1), x{n — 2), ,a;(2), a;(l), x{Qi)). In order for this definition to make sense, some of the a;(f)'s must be specified as initial conditions. The number of time steps that a recursion relation makes reference to is called its order. For example x{n) — f{x{n - 1)) is a first-order recurrence relation, while x{n) = f(x(n - l),x(n — 2),x{n — 3)) is a third-order recurrence relation. Also x{n) — 3x{n - 4) is a fourth-order recurrence relation, illustrating that it is the number of time steps involved, not the number of prior states. Here are several examples with which you may be familiar. Let x be the factorial function. Recall that 0! is defined to be 1, so a;(0) = 1. From then on x{n) = nx{n - 1). Thus a;(3) = 3 a:(2) = 32 a;(l) = 3 2 1 x(0) = 3 2 1 1. The factorial function is a first-order recurrence relation. A second example is the Fibonacci sequence {1,1,2,3,5,8,...}. Each term is the sum of the two previous terms. Since the current term relies on the two previous terms, we need to specify the first two terms to get the process going. Here a;(0) = 1 and a;(l) = 1, and the recurrence relation is x{n) = x{n — 1)+ x{n — 2). The Fibonacci recurrence relation is second order. Some authors write recurrence relations using subscripts instead of functional notation. For example, the recurrence relation for the Fibonacci sequence is written Xn = Xn-\ + Xn-2- This book avoids this notation since in later chapters X{n) refers to a vector of values at time n, and the elements of the vector are denoted as (xi(n),2:2(71),..., Xm{ti)}. Thus to avoid the confusion of multiple subscripts or changing notation midway through, functional notation is used throughout. For our first modeling example we look at the population growth of the Florida sandhill crane. This endangered species has been extensively studied, and we make use of some of this research data to construct a series of increasingly sophisticated models over the next several chapters. The data and parameter values come from the book Filling the Gaps in Florida's Wildlife System by Cox et al [13]. We begin with a simple model using only annual growth rates. These are reported for several environmental conditions which we call best, medium, and worst. Under the best environmental conditions the growth rate r is 0.0194 or 1.94% annually. Suppose we start with a population of 100 birds. Thus a;(0) = 100. Next year we will have the initial 100 plus the change in population, so x{l) = a:(0)-|-.0194a;(0) = 101.9 or 102 birds, rounding to the nearest whole bird. The year after we will have x{2) = a;(l) -|- .0194a:(l) = 103.9, x{3) = 105.9, and so on. In general, x{n) = x{n — 1) r x{n — 1), or, if you like, x{n) = (1 -f r)x{n — 1). This is a recursive definition for the crane population year by year. The reader may already know or see a way to solve this to avoid the recursion, but we wait until Section 1.4 to talk about closed-form solutions. Recursive equations are easy to analyze numerically. With a pencil, paper, and a scientific calculator, we can compute as many years of model output as we need. When computing solutions for many recursion runs, a programmable calculator or computer is of great assistance. The next section discusses the use of spreadsheets in running recursion models and analyzes 1 Discrete Dynamical Systems 11 the sandhill crane model as an example. The use of Mathematica to evaluate recurrence relations is found in the Mathematica appendix. 1.2 Spreadsheet Simulations In this section, we numerically analyze the sandhill crane model and several variations of it. We use this opportunity to introduce spreadsheets as a modeling tool and spend a little time discussing how they are used. It is our opinion that spreadsheets are one of the single most important tools in everyday modeling. They are used in the work place far more than any other mathematical tool. The current generation of spreadsheets typically have the power to create quality graphics easily and have the power to do most of the statistical analyses discussed in this book (even multiple regression). The output from other programs, including C or FORTRAN programs, can be exported to a spreadsheet for further analysis or graphing. While the problems in this book can be solved without using a spreadsheet, we highly recommend their use and consider knowledge of spreadsheets part of computer literacy. So, if spreadsheets happen to be unavailable to you or if you are determined to use some other tool for solving recurrence relations, the material of this section is easily converted, but at least be aware of the spreadsheet as a valuable modeling tool. Spreadsheets are an ideal environment for analyzing recurrence relations. It is easy to set up the equations, and the output is readily available in both numerical and graphical form. 1.2.1 Spreadsheet Basics A spreadsheet is a grid of rectangles called cells. In each cell, we can enter numbers, text, or a formula, and the formula for one cell may depend on the contents of other cells. To facilitate this, each cell has an address that allows us to refer to it and its contents. The spreadsheet program used in our examples labels columns by letters of the alphabet and the rows by numbers. (Other spreadsheet programs may do the opposite.) Cell B3 is the cell in the second column and third row. In Figure 1.1, we constructed a spreadsheet for the sandhill crane model described above. Notice that one row, listed with time 0, has the initial population entered. The cells in the rows below it have formulas entered based on the model equations, and the computation of these equations is what is displayed in each cell. The initial population is in cell B7. Cell BS is defined to be = B7+ 0.0194 * B7. The = sign signifies that the contents are a formula to be evaluated rather than a number or text. Variations of this formula can be put in the successive cells beneath B7, each incrementing the cell number by one. Rather than entering these equations by hand, spreadsheets allow us to copy a cell to the right or left or up or down. Any formulas that depend on other cells have these cells' addresses automatically updated. For example if B8 is the formula = B7 + 0.0194 ♦ B7 and we copy the formula down two cells, then B9 = B8 + 0.0194 * B8 and BIQ = B9 + 0.0194 * B9. In our spreadsheet we copied the second row down to take our simulation through 15 years (0-14). The addresses of the cells were automatically updated to keep the equations correct. Spreadsheets allow for ready graphing of output. Each does it differently, but 12 1.2 Spreadsheet Simulations usually it involves selecting the cells to be graphed with the cursor, specifying the type of graph, and specifying where the graph should be drawn. A graph of the simulation we just ran is shown in Figure 1.2. A B 1 2 3 4 5 6 Time Population 7 0 8 1 102 9 2 104 10 3 106 11 4 108 12 5 110 13 6 112 14 7 100 114 15 FIGURE 1.1 117 16 9 119 17 10 121 18 11 124 19 12 126 20 13 128 21 14 131 Sandhill Crane Simple Spreadsheet 140 120 -- 100 c o 3 a. o 80 -- 60 -- 40 -- 20 -- 0 + 0 + 2 H 4 1 1 6 Sandhill Crane Growth Curve 1 1 10 Time FIGURE 1.2 1 1 1 12 1 14 1 Discrete Dynamical Systems 13 1.2.2 Relative and Absolute Addressing Frequently we set up a model and then decide to change part of it. Sometimes this is called creating "what if " scenarios. For example, "what if' the growth rates are decreased by one percent? If the model parameters are incorporated with the model equations, then the spreadsheet needs to be extensively rebuilt. To prevent this, all of the model parameters (birth and survival rates) should be located in one section of the spreadsheet. We can write formulas that refer to the appropriate parameter cells instead of putting the parameters into the equations. Unfortunately when we copy the formulas, the addresses for the parameters get changed also. This is called relative addressing, and in most cases it makes spreadsheet construction easier. Fortunately, spreadsheets allow us to specify an absolute address for a cell so that when we copy a formula the address remains the same. With the spreadsheet progi-am we used, if a formula refers to cell E9 as $E$9 (notice the $ signs), then whenever this formula is copied, the new cell has a formula which also refers to E9. The new formula does not change E9 to some other address. Other spreadsheets do this in different ways, but any quality spreadsheet is able to do this somehow. Absolute addressing results in elegant model construction. Figure 1.3 shows a rebuilt spreadsheet with growth rate in cell B2. Formulas for several of the cells are also presented. Now by simply changing the growth rate in the single cell B2, the values throughout the entire spreadsheet change, and the graph updates as well. With a little imagination, you should be able to come up with many useful variants of these ideas. Three examples are shown next. A B 1 2 Growth Rate 0.0194 3 4 5 6 Time Population 7 0 8 1 9 10 11 12 13 14 3 106 4 108 5 110 6 7 114 15 16 17 100 =B7+B7*$B$2 2 =B8+B8*$B$2 112 117 9 119 10 121 18 11 124 19 12 126 20 21 13 128 14 131 FIGURE 1.3 Sandhill Crane Model with Absolute Addressing 14 1.2 Spreadsheet Simulations A C B 1 2 3 4 0.0194 5 Best Medium -0.0324 6 Worst -0.0382 7 8 9 FIGURE 1.4 Year Worst Medium Best 10 0 100 100 100 11 1 102 97 96 12 2 104 94 93 13 106 91 89 14 3 4 108 88 86 15 5 110 85 82 16 6 112 82 79 17 7 114 79 76 18 8 117 77 73 19 9 119 74 70 20 21 10 11 121 72 68 124 70 65 22 12 67 65 63 63 58 23 13 126 128 24 14 131 60 Sandhill Crane Model with Three Growth Rates 1.2.3 Best, Medium, and Worst Cases The spreadsheet that we developed so far is easily modified to compare behaviors among the best, medium, and worst case growth rates. To do this, we add title cells for the medium and worst cases; copy the cell 2110 to the two cells to the right; copy All to the two cells to the right, making the appropriate changes in the absolute addresses; and copy row 11 down the desired number of years. This will give numerical runs for all three cases simultaneously. This spreadsheet is shown in Figure 1.4, and a graph based on it is shown in Figure 1.5. 1.2.4 Hacking Chicks Example We noticed in the previous example that in the medium and worst cases the population was declining. Suppose that a manager institutes a program of hacking chicks, that is, hatching chicks in captivity and releasing them to the wild. The term hacking comes from the ancient sport of falconry where wild hawk and falcon eggs were hatched in captivity and raised for sport hunting. Since adding chicks to an already growing population is not necessary, we examine only the effects of adding five chicks each year to the medium and worst case models. We also assume that the hacked chicks have no undue problems of survival or assimilation. To do this, we simply add 5 to each of the formulas in the cells of the previous model. Or, if we want to be slick about it, we add a cell for the 15 1 Discrete Dynamical Systems 140 120 -- 100 c .2 — Best 80 -- Medium D & 60 -■ Worst 40 -■ 20 -■ 0 H 0 1 h t 2 4 1 1 1 1 6 10 1 H 12 14 Years FIGURE 1.5 Graph of Sandhill Crane Model with Three Growth Rates number of chicks to be hacked each year and use absolute addressing. If we do this, we can easily change the number of chicks to see how this affects the solution curve. A graph of these results is shown in Figure 1.6. Notice that we ran the simulation through 100 years. We observe that the population levels appear to stabilize. 1.2.5 Effects of Initial Population Example What effect do the initial population values have on the hacking model? We rerun the analyses from the Hacking Chicks example, using only the medium growth rate and three values of the initial population. These results are shown in Figure 1.7. Notice that in all 160 150-- 140-a 130 o a 3 O. Medium 120 ■■ Worst O Ph no-100 90-80 H 0 1 16 h H 32 K + 48 + + 64 H 80 h 96 Years FIGURE 1.6 Effects of Hacking Five Chicks per Year to Medium and Worst Cases 16 1.3 Difference Equations and Compartmental Analysis 200 •V. 160 ■■ 0 0 j=r-=~- ^ + + + + + + + 14 28 42 56 63 77 91 105 + + + + + 119 133 147 161 175 + 189 203 Year FIGURE 1.7 Effects of Differential Initial Populations on Hacking Medium Case Model three cases the curves appear to stabilize at the same value. From this numerical evidence we hypothesize that the initial condition has no effect on where the population stabilizes. We verify this analytically in Section 1.4. 1.3 Difference Equations and Compartmental Analysis Some people prefer to approach discrete-time problems with difference equations instead of recurrence relations. Essentially they are different ways of writing the same equation, and many books use the terms interchangeably. We make a distinction between them because each has its own use. We consider only first-order difference equations for the time being. A first-order difference equation is an equation of the form x{n) — x{n — \) = f{x{n — 1)) (or equivalently x{n -hi) — x{n) = f(x{n))). We are computing the difference between this year's value and last year's value, hence the term "difference equation." In particular x{n) — x{n — 1) is the growth over one year. This is a preferable approach when one understands calculus and remembers that the derivative is defined by taking the limit of {f{x h) — f{x))/h as h goes to zero. In the case where h is not zero, {f{x -h h)- f{x))/h is the average growth rate over the time h, and the limit as h tends to zero is the instantaneous growth rate. In our case, h = 1 and x{n)- x(n — 1) is the average growth rate over one time increment. If the process were continuous, then x{n) — xfn — 1) gives the average growth rate, which is an approximation. If the process is discrete, which is this chapter's assumption, then the average growth rate is, in fact, the true growth rate. People sometimes use the derivative (instantaneous growth rate) in discrete situations because of the power that calculus gives in analyzing the problem. This is, however, just an approximation. Similarly, people use average growth 17 1 Discrete Dynamical Systems rates in continuous processes when the calculus becomes intractable. Again this gives an approximation. It is probably obvious, but we point out that a difference equation can be converted to a recurrence relation by taking the x{n — 1) to the other side of the equals sign. A recursion relation can be converted to a difference relation by subtracting x{n - 1) from both sides. A practical reason for using difference equations is that there is a convenient way of diagramming the relationships between variables called a compartmental diagram. A compartmental diagram uses a rectangle or box for each variable of interest. Arrows are then drawn to indicate the flow into or out of each variable. Adjacent to each arrow is the quantity that flows into or out of a variable in one time step. The direction of the arrow indicates the direction of positive flow. For an arrow pointing towards a box, a positive flow means the variable increases by that amount, while a negative quantity means the variable decreases by that amount. Conversely if an arrow is pointing away from a box, a positive flow means the variable decreases by that amount, and a negative flow means that the variable increases by that amount. Over each time step, the change in the variable x is x{n) — x{n — 1) which is the amount that flows into x, less the amount that flows out. Succinctly put, x(n)- x(n — 1) is equal to inflow minus outflow It is easy to formulate the difference equation(s) by using the flow equations adjacent to the arrows. Consider the following examples. Our sandhill crane model is shown in Figure 1.8. There is one arrow pointing into a variable representing the crane population. Over the arrow are the letters r x. This diagram indicates that at each time step r x flows into x. If r a; > 0, then x will grow; if r a; < 0, then x will decline. Thus the difference equation IS x{n) — x{n - 1)= rx{n — 1). Next consider the refinement to the crane model shown in Figure 1.9. Here there are a birth arrow going in and a death arrow going out. Above the birth arrow is bx, and Population }-X ■> Growth FIGURE 1.8 FIGURE 1.9 X Compartmental Diagram for a Sandhill Crane Model with a Growth Rate bx Population (1-.9)X Births X Deaths Compartmental Diagram for a Sandhill Crane Model with Birth and Death Rates 18 1.3 Difference Equations and Compartmentai Anaiysis Population bx (1 -s)x ■> X Births 4 h Deaths <k Hacked Chicks FIGURE 1.10 Compartmentai Diagram for a Sandhill Crane Model with Hacking above the death arrow is (1 - s) a; where b is the birth rate and s is the survival rate. Again from the diagram we easily formulate the equations x{n) - x{n — 1) = bx{n - 1) — (1 s) x{n — 1). Hacking chicks is shown in Figure 1.10, and the equation is x{n) — x{n — 1) = bx{n — 1) — (1 s) x{n l) + h. Finally, Figure 1.11 shows a model of two species interacting. From this, we set up a system of two difference equations. While compartmentai analysis seems easy, it should not be dismissed even if we are able to write down equations without its use. With a well drawn compartmentai diagram, we can consult experts who are not mathematicians and inquire as to the validity of the relationships in a model. Even people who may understand a linear or logistic relationship (discussed below) may not recognize it when it is part of a bigger equation, but will recognize it when isolated as the relationship over an arrow. Finally, any model that is not being built for our own purposes needs to be communicated to others. When writing a report of a model, a compartmentai diagram can replace an incomprehensibly tedious description. Herbivore b(y)x ■> Births Population x r(x)y Plant Biomass Intrinsic y ■» Deaths Growth FIGURE 1.11 Compartmentai Diagram for Herbivore-Plant Interaction 19 1 Discrete Dynamical Systems Stock Converter FIGURE 1.12 Elements of Stella 1.3.1 Specialty Software for Compartmental Analysis There are some computer programs (e.g., Stella n, GPSS) which allow the user to build models from a compartmental analysis point of view. Some are self-contained computer packages; others are front ends which sit on a programming language such as FORTRAN. In general, these are very helpful to modelers by allowing them to spend more time on the model and less time on programming. The authors have used Stella II in their classes and occasionally tlnoughout the text use compartmental diagrams created in Stella. For these reasons, we take a few moment to introduce Stella n (by High Performance Systems). We note that this is luxury software in some sense. It makes compartmental modeling easier, and students like it, but it is not a necessary part of this book. EveiTthing it does can be done some other way. If resources are available, however, it is a wonderful tool. Stella has four programming elements, a stock (indicated by a box), a flow (indicated by a thick arrow with a circle representing a flow regulator under it), a converter (indicated by a circle), and a connector (thin arrow) (see Figure 1.12). A stock is a compartment, and a flow is, of course, a flow in the compartmental diagram sense. Initial values are put into stocks, and formulas are put into flows to construct a simulation which can then be mn. As it runs, the values in the stocks rise and fall. A converter is used to store parameters or to manipulate parameters (convert from metric to English, for example). The connectors link objects that relate to one another. If, for example, the flow into a population depends on the current size of the population, a connector must link the population to the inflow. Good programming practice is to put parameters into converters so they can be changed easily (like absolute addressing in a spreadsheet). Any flow that depends on such a parameter must also be linked to the parameter with a connector. Connectors are not part of a traditional compartmental diagram, but they help the user of Stella keep interrelationships straight. An example of a Stella drawn compartmental diagram is seen in Figure 1.13. We point out again that programs like Stella are actually simulation programs, not just programs to make compartmental diagrams. 1.4 Closed-Form Solutions and Mathematical Analysis 1.4.1 Exponential and Affine In Section 1.1, we looked at the recurrence equation for the Florida sandhill crane, and in Section 1.2 we numerically analyzed it using a spreadsheet. Symbolically this recursion 20 1.4 Closed-Form Solutions and Wlathematical Analysis environs c respiration p respiration h carnivores plants OSolar Energy eaten 0 loss c loss p loss FIGURE 1.13 A Stella Model of a Cedar Bog Energy Flow equation is x[n Rx{n - 1), where R. — r + 1. Notice that to evaluate a;(100), it is necessary to compute a;(99), but to compute x(99), it is necessary to compute x(98), and so on. The problem with recurrence relations is that it is necessary to compute all or many of the preceding values just to obtain the desired value. For small values of n and with a computer assisting, tliis is not a problem, but for large values of n the process is prohibitively time-consuming. Sometimes it is possible to solve an equation to avoid computing previous values. This is called a closed-form solution. Observe that a;(l) = Rx{0). It follows that x{2) = Rx{l) = R'^x{0). Continuing we have x(3) = Rx{2), but from the previous step a;(3) = R?x{Q). After a few steps, we might conjecture that x{n) = i?"a;(0), which is verified by a simple induction proof. The equation x{n)= Ji"a:(0) is the desired closed-form solution. To compute x(lOO) it is only necessary to compute (?' -I- l)^°°x(0). It requires the same number of steps, and hence the same amount of time to compute a;(100) as it does .-r(l, 000). Notice that this equation is an exponential equation with base i?, hence it is called an exponential growth model. It is probably not an overstatement to say that these are the most important models and equations in modeling. The exponential model is the basis for the rest of this book, and the exponential equation is used more than any other single equation. The following simple fact is so important, we give it the distinction of being a proposition so we can refer to it later. 21 1 Discrete Dynamical Systems ii" grows exponentially if R > 1, decays exponen- Proposition 1.1. The function y tially if 0 < R < 1, is a damped oscillation if -1 < R < 0, is an undamped oscillation if R < -1, and is a constant or oscillates between two points if R e {0,1,-1}. 1.4.2 Fixed Points and Stabiiity In Section 1.2, we ran the exponential growth model for the sandhill crane for three choices of the growth parameter r. One of these grew according to an exponential growth curve, and two declined according to an exponential decay curve. The exponentially decaying models were then modified to include a term to account for adding additional chicks. The recursive equation for this model is x{n) = Rx{n - 1)+ a. Any recursive equation of the form x{n) = bx{n - 1)+ a with a and b non-zero constants will be called affine. (In general an affine equation involves adding a constant to a linear equation.) Our model equation is, then, an example of an affine recurrence equation. One of the exercises is to find a closed-form solution for an affine equation. We notice from the spreadsheet runs that the successive values of x{n) appear to stabilize. While the values given by the spreadsheet are useful for the number of birds at specific times, we must be careful when making inferences about the long-term behavior patterns based on relatively short runs. If we ran these simnlations longer, would the apparently stable values remain stable? Intuitively we answer this question by noting that for the declining models, the point at which the population loss equals the population gain remains stable forever. For an exponentially growing population, adding to the population will result in an even larger population, and hence we do not expect it to stabilize. On the other hand if we subtracted a certain amount from a growing population, a stable point might be reached. If the reader has a computer handy, try running this affine model with several values of bird removal and see if you observe this behavior. Some mathematical analysis is needed to answer these questions conclusively. If a recurrence relation or a dynamical system eventually settles down, the point at which it stabilizes is called a fixed point, and the system is said to be in a steady state. For the time being we concern ourselves only with first-order recurrence relations. Formally, a fixed point x of x{n) = f{x{n — 1)) is a point such that f{x) = x. This definition is used when finding fixed points. Suppose x{n) = -0.3x(n - 1) -t- 2. A fixed point occurs where x(n) and x{n - 1) are equal, and we call their common value X. Thus X = —0.3a: -f 2. 2/1.3 = 1.538. The power of mathematics lies in the fact that we are able to do this analysis in general once, for all choices of parameter values R and a. A general affine equation has the form Solving for x, we conclude that x x{n) = Rx{n — 1) -f a. Replacing x{n) and x(n — 1) by a;, we have x = Rx + a. This has solution a a 1-R —r X = 22 1.4 Closed-Form Solutions and Mathematical Analysis Here is an important observation to make concerning the solution x = a/{l — R). What role does the initial value x(0) play in the value of the fixed point? Since there is no x(0) in the equation, we conclude that x(0) plays no role. No matter what the initial population of cranes happens to be, this model predicts the same steady state value. We have mathematically proven the hypothesis we made looking at the results of the simulation. We say that the solution is robust with respect to initial conditions. On the other hand, the solution does depend on a and R (or r). We say the solution is sensitive to a and R. An analysis of how sensitive an equation is to changes in a parameter (or other changes) is called a sensitivity analysis. Example 1.2.5 demonstrated the robustness of a particular affine equation to initial conditions. The analysis just completed verifies this robustness for all affine equations. Now consider again the specific parameter values we have been using in the crane model. If R. is greater than one, then the population is growing exponentially and I — R is negative. If we add birds to this situation a > 0, then x is negative so the steady state exists but is not physically realized. A similar result holds if we subtract birds from a decreasing population. The steady state solution x is positive if either R is greater than 1 and a < 0 or i? is less than 1 and a > 0. The graph of the case r = -0.0324 and a = +5 was shown in Example 1.2.5. The graph of the case r = 0.0194 and a = -5 is shown in Figure 1.14. Notice that in the first case the steady state is observed, but in the second it is not. Somehow in the case of exponential growth, even though a theoretical steady state exists (and its value is 257.73), we do not observe it occurring. This brings up the notion of stable and unstable fixed points. Consider a single car from a roller coaster on a track with lots of peaks and dips. If one starts the roller coaster car out near the bottom of 100 80 ■ 60 - 40 - 20 o 0 D, 30 32 34 ^ - 20 - -40 -- -60 ■■ -80 ■■ - 100 Years FIGURE 1.14 Removing 5 Chicks per Year from an Intrinsically Growing Population 36 38 AO 23 1 Discrete Dynamical Systems one of the valleys, it will go back and forth slowly losing energy until it comes to rest at the bottom of the valley. Unless the amusement park retrieves it, the car will sit there forever. Now consider the car placed at the top of a peak. If perfectly balanced, the car will remain there forever, but the slightest perturbation will cause the car to roll down the track in one direction or the other. If one tries to give a car a shove to get it to the top, there is one perfect shove which will get it to the top so that it will stay. All other shoves will cause the car to go near the top and roll backwards, or go over the top and down the other side. The odds of giving it a shove of exactly the correct force are essentially zero. The bottom of a valley is a stable fixed point. The top is an unstable fixed point. In the case of the birds, if we started the population out at exactly the fixed point (which in this case is fractional), the population would stay there forever. Any deviation, even due to rounding in the 300th decimal place, will cause the population to leave the fixed point and grow or decline. Also, if by accident the growing population hit on the fixed point, it would stay there, but the odds of this happening are zero (i.e., the odds of picking a single particular number at random from any interval of the reals is zero). We can force it, by choosing parameters in clever ways, but this is mathematics not modeling. Evidently, it is important to know whether a fixed point is stable or not. Fortunately there is a simple test. The proof is provided (one of the few in this book) because it makes use of the exponential recurrence relation. Theorem 1.2. (Conditionsfor stability) Ifx is a fixed point of the first-order recurrence equation x{n) = f{x{n — 1)), then x is a stable fixed point if \f'{x)\ < 1. Proof Let e(n) be the difference between x{n) and x, i.e., e{n) = x(n)- x. Then e(n + 1) = x(n + 1)- x = /(x(n))- x = f[x + e(n)) — X. By Taylor's theorem, it follows that e(n + 1) /(x)+ f{x)e{n) — X. But X is a fixed point so x = /(x). Thus e(n + 1) « /'(x)e(n). Notice that since f'(x) is a constant, this is the recurrence relation (approximately) for exponential growth, so the error e(n) decays to zero if -1 < /'(x) < 1 if |/'(x)| < 1. □ Sometimes if |/'(x)| < 1, we call the fixed point attracting (instead of stable) and if |/'(x)| > 1, we say the fixed point is repelling (instead of unstable). The cobweb method makes this terminology clear. The cobweb method is a graphical method for finding and testing fixed points for stability. Its graphs are called cobweb diagrams, or simply web diagrams. This method is exceptional for the degree of visual insight that it gives, although to find a fixed point this way requires very precisely drawn graphs. 24 1.4 Closed-Form Solutions and Mathematical Analysis 1.4.3 The Cobweb Method. The problem is to find the fixed point of x{n) = f{x{n - 1)). We think about this equation as y = f(x). The fixed point occurs when x = f{x), or x = y. But this is the same as y = x. So on the same coordinate system draw curves for the function y = f{x) and for the line y = x. A fixed point occurs at the intersection of these two. To test a fixed point for stability pick a point from each side of the fixed point (if there is more than one fixed point, take care to pick the point between the fixed point we are testing and the next nearest one). Start at this point and draw a line segment vertically to the curve y = f{x). From this point of intersection, move horizontally to the line y = x, from this point of intersection vertically to y = f{x), from this intersection point horizontally to y = X, and so on. If this path converges to the point of intersection and the path from the point on the other side of the fixed point does also, then the fixed point is stable or attracting. Otherwise the fixed point is unstable. Unstable fixed points encompass a wide variety of behaviors including periodic, quasiperiodic, and chaotic. Figures 1.15 and 1.16 show cobweb diagrams for the recursion functions y = -.3x+2 and y = 1.5x - 2. We purposely chose these examples over the crane examples because the slopes of these lines make the method more evident. The crane examples would, of course, work the same, but the slopes of the lines are nearly 1, so visually they appear y = -.3x + 2 / (g FIGURE 1.15 Cobweb Diagram for a Stable Fixed Point 25 1 Discrete Dynamical Systems V y=l.5x-2 -- / I I I I / M I I I I M I l-t I I I 7" / -- FIGURE 1.16 Cobweb Diagram for a Repelling Fixed Point X. Notice that the Figure 1.15 exhibits an attracting or stable fixed point, while Figure 1.16 has a repelling or unstable fixed point. to be parallel to y 1.4.4 Linear Recurrence Relations with Constant Coefficients This section examines a method to solve a special class of difference or recurrence equations. A linear recurrence equation with constant coefficients is a recurrence relation which is a linear combination of x{i) terms, that is, it can be rearranged in the form aax{n)+ aix{n - 1)+ a2x{n - 2) H + am-ix{n -{m - 1))+ a^xin - rn) = b. In particular, the x{i)'s occur only raised to the first power and are multiplied by a constant. In this section we are interested, exclusively, in homogeneous linear equations which are linear equations that have constant b equal to zero. These can be written as aoa:(n) + aix{n - 1)+ a2x(n - 2) H + a„,,-ia;(n -(m - 1)) + amx{n - m)= 0. 26 1.4 Closed-Form Solutions and Mathematical Analysis Several examples in earlier sections have been of this type. For example, the exponential recurrence equation and the Fibonacci recurrence equation can be written as x{n)- Rx{n - 1)= 0 and x{n)- x{n - 1)- x(n - 2)= 0 respectively. Notice that the affine equation is a linear non-homogeneous equation, and the method of this section does not apply. The idea behind the method is that since the exponential equation has a solution of the form x{n) = R^x{0), perhaps a linear homogeneous equation of higher order has a similar solution. The Method: Consider the equation aoa;(n)+aia;(n-l)+a2a:(n-2)H \-am-ix{n-{m-l))+amx{n-m)= 0. (1) 1. Assume a solution of the form x{n)= CA". 2. Substitute x(n)= CA" into equation (1) to get UflCA" + a^CA n-l + a2CX n-2 m +•• •+ + amCr- = 0. 3. Factor out the common factors of C and A n—m. Since we are not interested in the cases C = 0 and A = 0 (these give a zero constant function which is fine but uninteresting), we set the rest equal to zero. The result is called the characteristic equation "h (X\A m—1 +(22A m —2 + ■ ■ ■ + am — lA + am = 0. 4. Solve the characteristic equation for A. The characteristic equation has m roots, some may be repeated, and some may be complex. These roots are called characteristic roots or eigenvalues, and they are the growth rates of the system. In fact the R used in the exponential equation was an eigenvalue, and we could have called it an eigenvalue at that time. Eigenvalues are denoted by Ai,...,Am- In practice, we solve second-degree polynomials using the quadratic formula. Third- and fourthdegree polynomials can be solved using the cubic and quartic formulas, but probably a computer algebra system like Mathematica or Maple is the best bet for solving them. For quintic polynomials and above, there is no general formula (thanks to work by Galois). So unless the equation has a special form, or we know the factorization, or it has enough rational roots to get us down into the quadratic, cubic, quartic range (recall the rational root test), it can not be solved exactly either by hand or with a computer algebra system. If this is the case, numerical root-finding routines or graphical zooming on zeros are used to find approximations of the eigenvalues to any desired precision. Depending on resources, these methods are sometimes used for lower-degree polynomials as well. 5. Assuming no multiple roots, each equation of the form x{n) = CA" is a solution of the original equation. The general solution is all linear combinations of these solutions or x{n) — Cl A" -f C2A2 -f ... -f CmX n m' 6. The Cj's can be found, provided enough initial information is given. Usually specific values for a:(0),...,x{m — 1) are given. They are used to find m equations in m 27 1 Discrete Dynamical Systems unknowns, which are solved by any standard method such as Gaussian elimination. Again computers or calculators are used if the m is large or if it is just easier to use them than solving the system by hand. This method yields a closed-form solution: n x{n) = Cl A" + +... + CmX m' Since each term is an exponential expression, we can analyze its pieces using Proposi tion 1.1. Over the short term the various eigenvalues or growth constants can contribute significantly to x{n), but eventually the contribution due to the eigenvalue which has the largest absolute value dominates the contribution of the others. For obvious reasons the eigenvalue A^ with largest absolute value, that is |Ai| > |Aj| for all i j, is called the dominant eigenvalue. Thus just by looking at the list of eigenvalues for an equation, we are able to determine the nature of its long-term behavior. Example: Fibonacci Sequence As an example of solving linear recurrence equations, consider the familiar Fibonacci sequence. Interestingly, it was once considered as a model for rabbit growth. Recall that the sequence is 1,1,2,3,5,8,.. . which is be generated by the recurrence relation x(n) = x(n - 1)+ x{n - 2). This can be rewritten in standard linear recurrence relation form as x{n)- x{n — 1) — x{n - 2) = 0. Substituting x{n) — CX^, we obtain CA"- CA"-i - CXn—2 = 0. Factoring out CA" ^ gives the characteristic equation A^ - A - 1 = 0. Using the quadratic formula, we get growth rates, or eigenvalues, or characteristic roots of A1 (l + x/5) 2 Notice that A 1 1.618 and A2 and A2 = (l-x/5) 2 —0.618, so Ai is the dominant eigenvalue, and the (1 + 75) long-term behavior resembles exponential growth with a base of 2 The general solution is / x{n)= Cl \ (1 + 75) n n / + C2 (1-75) 2 2 We know the initial values are a:(0) 1 and a;(l) 1. Using these we get the simultaneous equations. Cl + C2 — 1, and Cl (1 + 75) 2 (1 - 75) + C2 2 28 1.4 Closed-Form Solutions and Mathematical Analysis Solving gives Ci — and C2 5-VE . Thus the closed-form solution to the 10 Fibonacci recurrence relation is x{n) = 5 + VE ({1 + V5) 10 5 - ^/5 /(1 - V5)\ 2 10 \ 2 One amazing feature of this solution is that despite the fact that all of its factors are irrational, it takes on integer values for every n . 1.4.4.1 A Model for Annual Plants. Loosely speaking, linear models are appropriate when the model parameters are constants. More precisely, a model is linear if the amount of some item is a constant times the amount last year, or the sum of constants times the amount of the item for several past years. One very nice example of this type is a model for the propagation of annual plants. This example is taken from Mathematical Models in Biology by Edelstein-Keshet [15]. Consider an annual plant which germinates in the spring, blooms in early summer, and produces seeds in early fall. A fraction of these seeds survive the winter (i.e., do not rot, are not eaten, etc.) and a fraction of these seeds germinate the next spring, flower, and produce more seeds. Of the seeds that do not germinate, a fraction survive the winter, and a fraction of these germinate. This process could continue, but we assume that the number of seeds which survive more than two winters and germinate are negligible. We make the following parameter and variable assignments: 1. p{n) is the number of plants in year n. 2. 7 is the average number of seeds produced per plant during a year. 3. cr is the fraction of the seeds which survive a winter 4. a is the fraction of one-year-old seeds which germinate in the spring 5. P is the fraction of two-year-old seeds which germinate in the spring Next we set up the equation for the annual plant model. How does a new plant get formed? Either a one-year-old seed germinates or a two-year-old seed germinates. Thus p{n) = plants from one-year-old seeds plus the plants from two-year-old seeds. A plant germinates from a one-year-old seed if last year a plant produced seeds, which survived the winter, and then germinated. Last year there were p{n - 1) plants, that produced jp{n - 1) seeds, of these a'yp{n - 1) survived the winter, thus aayp{n - 1) new plants germinated from one-year-old seed. Similarly to be a new plant from a two-year-old seed, a plant two years ago (p{n - 2)) produces seeds (7), which survive a winter (cr), do not germinate (1 - a), survive another winter (a), and then germinate (/?). Thus the number of new plants germinating from two-year-old seed is j3a{\- a)ajp(n-2). Putting these two parts together yields p{n)= aayp{n - 1) -I- (3a{l a)ajp(n — 2). This is, of course, a second order linear homogeneous recurrence equation with constant coefficients. To simplify notation, let a = aay and b = /3cr(l - o;)cr7. The equation is now p{n) — ap{n - 1) — bp{n - 2) = 0. Its characteristic equation is - aA — 6 = 0 29 1 Discrete Dynamical Systems Year n - 2 Year n Year n - 1 "V April - May August Winter April-May August Winter April-May August V T V V IT T p(n-2) FIGURE 1.17 p(n) p(n-l) Annual Plants. Figure reproduced from Ma/te/nutica/Morfe/i w B/o/ogy by Edelstein-Keshet, 1988, McGraw-Hill, Inc. Used with Permission of The McGraw-Hill Companies. and its growth rates or eigenvalues are A= a ± \/a2 -h 45 2 Replacing a and b yields A= ct(T7 ± -|- 4/3(j2(l — 0!)7 2 With specific values of the parameters, we now find numerical values for the growth rates (eigenvalues) and determine from them whether the plant population is growing or declining, find the constants Ci and C2 to complete the closed-form solution, and use either the recursive- or closed-form equation to project the population of the plants. Suppose, for example, a = 0.5, (3 = 0.25, 7 = 2, and a = 0.8. We compute Ai = -0.166 and A2 = 0.966. The dominant eigenvalue is A2, which is less than one, so the population is declining. If all we are interested in is whether the plants will survive, we are finished. They will not. If we are interested in predicting the population size over the next several years, maybe to determine when half of the plants remain, then we need to find either the closed-form solution, or run a simulation. Suppose that currently {t = 0) there are 95 plants and that last year there were 100 plants. We want to track the 30 1.5 Variable Growth Rates and the Logistic Model population 10 years into the future. We know that p{n) = Cl(-0.166)" + C2(0.966)". Using our initial conditions gives the equations 95 = Cl(-0.166)° + C2(0.966)° = Ci + C2, and 100 = Ci(-0.166)-i + C2(0.966)-i. Solving for Ci and C2 gives Ci p{n) -0.234629 and C2 = 95.2346. Thus 0.234629(-.166)" + 95.2346(.966)". This equation can be plotted by using a computer program or calculator. The ten-year plot is shown in Figure 1.18; a hundred-year plot is shown in Figure 1.19. The ten-year plot is what we originally asked for. From a modeling point of view, we see that even though this plant is dying out, it will be around for a while. If we are trying to save it, there is plenty of time to change conditions (fertilizing the soil or relocation of the plants). If we are trying to get rid of it (a weed, for example) there will still be plenty around for years. Notice the strange comer in the graph. This is due to the competition between the two eigenvalues. The hundred-year graph is more of mathematical interest than modeling interest since it is unlikely that the various parameters would remain constant that long. Of mathematical interest is the fact that this curve looks like a pure exponential decay curve. Over this time scale, the behavior of dominant eigenvalue has dominated the behavior due to the other eigenvalue. Population 100 95 90 85 80 75 2 FIGURE 1.18 4 Annual Plants over Ten Years 6 ■^0 Years 31 1 Discrete Dynamical Systems Population 100 Years 20 FIGURE 1.19 40 60 80 100 Annual Plants over One Hundred Years 1.5 Variable Growth Rates and the Logistic Model "In 1977 there were 37 Elvis impersonators in the world. In 1993 there were 48,000. At this rate, by the year 2010 one out of every three people will be an Elvis impersonator." :ommunicated by the National Institutes of Health to Columbia University to Harvard University to Chicago Law School picked up on e-mail then published in Playboy and anonymously put in the mailbox of one of the authors. One of the problems with the exponential model (constant growth rate) for population growth is that even when critters (or Elvis impersonators) are piled four feet deep all over the surface of the earth, the model is still predicting growth at the same rate as when there were relatively few. There are several ways to deal with this problem. One of the best is to realize that even though the equation holds in the model world, in the real world there is a limited range over which the model solution is valid. Another, which we consider in this section, is to replace the constant growth rate with a variable one. This might extend the range over which a model is valid, but requires more information to construct. Until now we were interested in the equation x{n) — x{n — 1) = r x{n — 1). In this section, we consider some special cases of making r a function. Hence we are looking at equations of the form x(n)- x(n — 1) = r(x(n — 1)) x(n — 1). 1.5.1 The Logistic Model As a population increases, fixed resources must be shared between more and more individuals. A reasonable assumption is that as the population increases, the growth rate declines because of some combination of increased deaths or decreased births. Further there is probably some population level which cannot be exceeded called the carrying capacity. If a population were near the carrying capacity, its growth rate would be zero. If the population were small, the growth rate would be at its largest. Thus the growth rate 32 1.5 Variable Growth Rates and the Logistic Model function should pass through (0, R) and {K,0) where R is the intrinsic growth rate and K is the carrying capacity. The simplest function that can be put through two points is a line. The model that makes all these assumptions is called the logistic model. Various assumptions can be questioned and refined, but the result is a different model. The growth rate function for the logistic model is found using the point-slope equation for a line through (0, R) and {K,0), which is R r{x)- R ^{x-0). K Solving for r{x) yields r{x) =R~ Rx/K = R{1- x/K). Recall that the basic equation form of this chapter is x{n) x{n — 1) = r{x{n - 1)) x{n - 1). Substituting our expression for r{x) gives us x{n)- x{n - 1) = R.x{n - 1) 1 x{n - 1)\ K (2) This equation is the logistic dijference equation. It (together with its continuous cousin presented in Chapter 5) is one of the most important equations in ecology, second only to the exponential equation. Next we apply some of the analysis techniques from earlier sections to this equation. We begin with the mathematical analysis of fixed points and their stability. Rewriting equation (2) as a recurrence relation gives / / x{n) = x{n - 1) R 1 V x{n - 1) K V 4- 1 . (3) Thus X /(x) = X K (4) To find the fixed points, we look at (5) X = This has two solutions, namely x = 0 and x = K. These make sense. One is extinction; the other is the carrying capacity. Next let us look at the stability of these fixed points using Theorem 1.2. Computing the derivative of ,/'(x) we obtain fix) =R- 2Rx — + 1K Substituting x = 0 gives f{0)= R+l. This is stable if |/?-b 1| < 1 which is the same as -2<R<0. (6) 33 1 Discrete Dynamical Systems This makes sense because the model is set up so that if there is a non-zero population, it will grow (move away from the fixed point) if the growth rate is positive. If the growth rate is negative, the population dies out, which means it moves towards the fixed point. If R < -2, there are some strange mathematical artifacts, and the reader is encouraged to explore these with simulations. Next we look at the other fixed point, x = K. In this case, f{K)= 1 — R. Applying Theorem 1.2 we know this fixed point is stable for 0 < R<2. or For negative growth rates, the population declines, thus moving away from the carrying capacity. For positive growth rates under 200% the carrying capacity is stable, which indicates that the population will grow up to the carrying capacity and then stabilize. For large growth rates this analysis predicts instability. To examine this further we turn to spreadsheet simulations. Figures 1.20, 1.21, and 1.22 show the results of simulations for a logistic model with carrying capacity K = 100 and growth rates r = 0.5, r = 2.2, and r = 2.7. From our fixed point analysis we expect the carrying capacity to be a stable fixed point in the first case and unstable in the other two. Notice that the unstable cases exhibit very different behavior. When r = 2.2, the behavior is periodic which is not technically stable, but is well behaved. On the other hand, when r = 2.7, the behavior appears random. In Chapter 2, we examine models with random output, but notice that there is nothing random about the logistic equation. If we were to run this simulation 1,000 times, we would get exactly the same graph every single time. This is an example of chaos which can informally be thought of as deterministic or non-random behavior that looks random. We conclude this section with some philosophical thoughts concerning the logistic equation. As we discussed, a population obeying a logistic model starts out growing exponentially, but grows more and more slowly, until it reaches the carrying capacity 100 90 80 70 g 60- - I SO S' (£ 40- 30 20 10 ■ ■ 0 + 0 H—I r—h 2 4 6 1 H 10 Years FIGURE 1.20 Logistic Solution Curve with R = 0.5 H—I—I—I— 12 14 16 18 20 34 1.5 Variable Growth Rates and the Logistic Model 120 100- - 80 ■■ a o ■a 23 60 ■■ 3 D. O d. 40-- 20- 0 -I—I—I—I—I—I—h 0 2 4 H 1 6 1 10 1 1 H 12 H 14 1 1 16 1 18 20 Years FIGURE 1.21 Logistic Solution Curve with i? = 2.2 140 120 100 80 60 ■ ■ 40 20 ■ 0 1 0 1 2 1 H 4 H 6 1 1—I 8 1 10 1 V H 12 14 h H 16 1 18 1 20 Years FIGURE 1.22 Logistic Solution Curve with R = 2.7 where growth stops and the population remains stable. Naively we might think that a stable population at the carrying capacity i A Course In Mathematical Modeling Pdf Mooney
Source: https://jp.b-ok.as/book/5442238/e6cdf2
Posted by: trubytendought.blogspot.com

0 Response to "A Course In Mathematical Modeling Pdf Mooney"
Post a Comment