Docsity

Ordinary Differential Equations: Plotting Orbits and Solution Curves, Lecture notes of Differential Equations

Partial preview of the text

Download Ordinary Differential Equations: Plotting Orbits and Solution Curves and more Lecture notes Differential Equations in PDF only on Docsity!

--.

DIFFERENTIAL EQUATIONS

LABORATORY WORKBOOK

A Collection of Experiments, Explorations

and Modeling Projects for the Computer

-- .'

t.

Copyright © 1992 by John Wiley & Sons, Inc.

All rights reserved. Published simultaneously in Canada.

Reproduction or translation of any part of thi s work

beyond that permitted by Sections 107 and 108 of the

1976 United States Copyright Act without the permission of the copyright owner is unlawful. Requests for permission or further information should be addressed to the Permissions Department, John Wiley & Sons.

ISBN 0-471-55142-

Printed in the United States of America

-- ..

--.

Contents

Preface IX

Notes for the Instructor xiii

CHAPTERS

1 Introduction: Learning About Your Hardware/Software

2 Solution Curves and Numerical Methods 39

3 First Order Equations 73

4 Second Order Equations 113

5 Planar Systems 149

6 Higher Dimensional Systems 209

APPENDICES

A Team Laboratory Reports 257

Some hints on writing team reports

B Mathematical Modeling 259

Derivation of the differential equations that appear in the modeling experiments throughout the workbook

B.l Population and Rate Models 260

B.2 Mechanics 264

B.3 Chemical Reactions 275

B.4 Circuits 282

B.S Scaling and Dimensionless Variables 286

C The Atlas 291

INDEX

A collection of graphs of solutions of differential equations

v

  • Chapter Experiments li sted in boldface are team experiments.
  • Plotting Orbits and Solution Curves - 1.1 Direction Fields and Solution Curves - 1.2 ODEs in Non Normal Form - 1.3 Direction Fields and Orbits - 1.4 Solvers and IVPs
  • Generating Atlas Plots - 1.5 Generating Atlas Plots
  • First Order Rate Laws - 1.6 Population Growth and Decay - 1.7 Radioactive Decay: Carbon-14 Dating - 1.8 Potassium-Argon Dating
  • Falling Bodies - 1.9 Falling Bodies Near the Earth's Surface - 1.10 Escape Velocities
  • Aliasing and Other Phenomena - 1.11 Aliasing and Other Phenomena
  • Chapter
  • Properties of Orbits and Solution Curves - 2.1 Fundamentals - 2.2 Sign Analysis
  • Equilibrium Solutions and Sensitivity - 2.3 Pitchfork Bifurcation
  • Solutions That Escape to Infinity - 2.4 Solutions That Escape to Infinity
  • Picard Process for Solving IVPs - 2.5 Picard Process for Solving IVPs
  • Euler's Method for Solving IVPs - 2.6 Euler's Method and Explicit Solutions - 2.7 Limitations of Euler 's Method
  • Euler Solutions to the Logistic Equation - 2.8 Convergent Euler Sequences - 2.9 Period Doubling and Chaos: Graphical Evidence - 2.10 Period Doubling and Chaos: Theory
    • Chapter
    • Linear First Order ODE s: Properties of Solutions - 3.1 Superposition
      • 3.2 Singularities (
  • Linear First Order ODEs: Data - 3.3 Dependence on Data - 3.4 Bounded Input/Bounded Output
  • Separable ODEs: Implicit Solutions - 3.5 Separable ODEs: Implicit Solutions
  • Nonlinear ODEs: Homogeneous Functions - 3.6 Nonlinear ODEs: Homogeneous Functions -- .-
  • The ODE: M(x, y)dx + N(x, y)dy = - 3.7 Planar Systems and M dx + N dy = - 3.8 Construction of Integral Curves: The Cat
  • ODEs in Polar Coordinates - 3.9 ODEs in Polar Coordinates
  • Comparison of Solutions of Two ODEs - 3.10 Comparison of Solutions of Two ODEs
  • Harvesting a Species 9. - 3.11 Constant Rate Harvesting - 3.12 Variable Rate Harvesting - 3.13 Intermittent Harvesting
  • Salt Levels in a Brine - 3.14 Linear Brine Models - 3.15 Nonlinear Brine Models
  • Bimolecular Chemical Reactions - 3.16 Quadratic Rates as Bimolecular Models - 3.17 Modeling a Bimolecular Reaction
  • Chapter
  • Properties of Solutions - 4.1 Properties of Solutions
  • Constant Coefficient Linear ODEs: Undriven - 4.2 Constant Coefficient Linear ODEs: Undriven
  • Constant Coefficient Linear ODEs: Driven - 4.3 Beats and Resonance - 4.4 General Driving Forces
  • Frequency Response Modeling - 4.5 Parameter Identification - 4.6 Gain and Phase Shift
  • Springs - 4.7 Linear Springs - 4.8 Hard and Soft Springs - 4.9 Aging Springs
  • Circuits - 4.10 Simple RLC Circuit - 4.11 Tuning a Circuit
  • Chapter
    • Portraits of Planar Systems - 5.1 Portraits of Planar Systems
    • Autonomous Linear Systems - 5.2 Gallery of Pictures - 5.3 Stability
  • Driven Linear Systems viii - 5.4 Driven Linear Systems
  • Interacting Species - 5.5 Predator-Prey Models: Harvesting, Overcrowding -- - 5.6 Competing Species
  • The Pendulum - 5.7 The Undriven Pendulum: Linear Model - 5.8 The Undriven Nonlinear Pendulum - 5.9 The Driven Upended Pendulum
    • Duffing's Equation - 5.10 Duffing's Equation
    • Planetary Motion - 5.11 Elements of Orbital Mechanics
    • Stability and Lyapunov Functions - 5.12 The Effect of a Perturbation - 5.13 Stability and Lyapunov Functions
    • Cycles and Limit Cycles - 5.14 The van der Pol System - 5.15 Systems with Cycles and Limit Cycles
    • The Poincare-Bendixson Alternatives - 5.16 The Poincare-Bendixson Alternatives
    • The Hopf Bifurcation - 5.17 The Hopf Bifurcation - 5.18 Satiable Predation: Bifurcation to a Cycle
    • Chapter
    • Undriven Linear Systems - 6.1 Portraits of Undriven Linear Systems - 6.2 Asymptotic Behavior and Eigenelements
    • Driven Linear Systems - 6.3 Transients, Steady States, Resonance - 6.4 Coupled Oscillators
      • A Compartment Model: Lead in the Body - 6.5 A Compartment Model: Lead in the Body
      • Lorenz System: Sensitivity - 6.6 Inducing Chaos - 6.7 Search for Cycles
      • Rossler System: Period-doubling - 6.8 Rossler System: Sensitivity - 6.9 The Rotational Stability of a Tennis Racket The Rotational Stability of a Tennis Racket 235 '
      • Nonlinear Systems and Chemical Reactions - 6.10 Approach to Equilibrium: Five Species - 6.11 Approach to Equilibrium: Four Species
      • Oscillating Chemical Reactions - 6.12 On/Off Oscillations: Autocatalator - 6.13 Persistent Oscillations: The Oregonator
        • Bifurcations and Chaos in a Nonlinear Circuit - 6.14 Bifurcations and Chaos in a Nonlinear Circuit

x

-- ,-

writing team reports. Appendix C is a compendium of plots of solutions of ODEs (called

the Atlas) that are referenced throughout this workbook.

Although not the main focus, modeling projects appear in experiments throughout

the workbook. Models are drawn from rate processes, electrical circuits, and mechanics.

Appendix B gives a brief overview of these modeling environments.

Structure of Experiments

Every experiment in the workbook has the same format. First a cover sheet outlines

the problem area and gives a quick introduction and a few hints. The cover sheet spells out

the mathematical topics and modeling areas touched upon. Then one or more experiments

follow. Some space is provided on each laboratory worksheet for written answers, if

appropriate. Additional sheets for longer answers, scratch work, and hard copy of any

graphics should be attached to the worksheet before it is handed in. A computer problem

set consists of a selection of the tasks given on the worksheet of an experiment. The cover

sheets and the Atlas have examples that serve as a kind of calibration in preparation for the

main goals of the experiment. The cover sheet for each experiment follows a fixed format:

  • Purpose, Brief statement of goal of the experiment.
  • Keywords. Main concepts touched upon in the experiment.
  • See also (optional). References to the Atlas and to other related experiments. As a matter

of policy no standard textbooks are referenced.

  • Background. Brief discussion of the ideas involved in the experiment.
  • Observations (optional). Presentation of useful techniques or hints for the experiment.
  • Examples (optional). Illustrations of the concepts underlying the experiments.

To aid the experimenter in recognizing the kind of effort expected, one or more icons

may appear in the margin by each task:

o When the thrust of the task mainly involves the computer ~

, For tasks involving significant mathematical pencil-and-paper work

  • For tasks at a more advanced level

At least once in each chapter the following "team experiment" icon will appear next to

an experiment name on the worksheet, but not on the cover sheet:

& For an experiment that requires the effort of a team of students

The Figures in This Workbook

The headers of the workbook figures give information about the ODE being solved. In

some cases only the ODEs are listed. In others, more information is given. For example, the

header in Figure 0.1 lists three coupled ODEs (the LQrenz system), a user-defined function f

employed in the first ODE, two sets of initial data, the initial and final solve times, and the

number of solution points used to create the graphs. Different line styles mark the graphs

of the respective x-components of the two solutions corresponding to the two data sets. A

Lorenz system is also treated in Figure 0.2, but with variables XI, X2, X3, and a parameter al.

Different line styles mark the graph of the respective xI-components of the two solutions

corresponding to the two listed values of al.

Hardware/Software Issues

There is an abundance of available solver packages and hardware platforms that are

adequate for most of these experiments. For effective use of this workbook, students should

have convenient access to:

30

10

x '=f (x,y) y'=50x-y-xz z '=-(8/3)z+xy f(x ,y) :=-10x+l0y

x(0) : 1.0 1. y(0):1.0 1. z(0):1.0 1.

-..

t-zero 0 t-finol 10 " 10000 p t s

-30+-------~--r-~--~-+--+--+----~~~~--~~--~_+~ o 2 4 6 8 10

Figure 0.1 Sample graph showing overlay of x-components for two sets of initial data.

30

10

01 1 50! 1 55!

xl '=-10xl+l0x x2'~01xl-x2-xlx x3'=-(8/3)x3+xl*x

xl(0) :1. x2(0):1. x3(0) : 1.

t-zero 0 t-fino l 10 10000 pts

-30+--+--~------~--r-~--~-+--+--+--~__----~--r-~~ o 2 4 6 8 10

Figure 0.2 Sample graph showing sensitivity of the x I-component to parameter changes.

xi

-- .-

Notes for the Instructor

The integration of computers with the standard symbolic and theoretical approach of the classroom requires some thought and organization beforehand, especially where the support facilities are concerned. There are important choices to be made in advance: What hardware/software platforms should be used? Which experiments are appropriate for the platforms? How can modeling and computer-based experiments be presented in a first course in ODEs in a way that is challenging, but appropriate to the current stage of student development? This workbook was designed to facilitate these choices and to provide a coherent, organized structure for a "differential equations laboratory."

Style and Scope

The experiments generally follow the order of presentation of topics in a traditional first course in ODEs, but no references are made to standard textbooks. There is more than enough material for a one-credit-hour laboratory course. All the experiments require the use of computers at certain stages. Some experiments are straightforward and some may require substantial effort and ingenuity. Some experiments involve the construction of a mathematical model but many do not. The experiments fall into two categories. Most can be done by individual students, but some experiments are extensive in nature and are more appropriate for a student team. This workbook is organized and written to permit students to benefit from its use without extensive guidance from the instructor. A lab assistant can handle questions on the use of software and hardware, but some follow-up in class is recommended. Ironically, the introduction of computers into a course often leads to heightened interest in the theory rather than less. As some experiments in this workbook show, visual displays of solutions of ODEs can be misleading or difficult to interpret unless the basic theory is well in hand. Interestingly enough, the same claim can be made about modeling areas that generate the ODEs. For these reasons, this workbook includes relevant highlights of the theory and major modeling environments (albeit in condensed form).

Organization of This Workbook

The first chapter explores the power and ~he limitations of the user's platform and

introduces some basic ideas and techniques. After this introductory chapter, Chapters 2-

roughly parallel the logical development of topics in a typical ODE course:

- Chapter 2 treats numerical solutions of ODEs, reinforces the graphical underpinnings of solution curves and orbits, and examines properties of solutions of simple ODEs. - Chapter 3 goes into more detail on the properties of solutions of first order ODEs. - Chapter 4 treats second order linear ODEs. - Chapter 5 delves into the behavior of solutions of planar systems (i.e., first order systems with two state variables), both linear and nonlinear. - Chapter 6 covers the properties of solutions of higher dimensional systems. Three appendices complement the experiments in many important ways. For example, the experiments reference the appendices for background information and illustrations.

XIII

xiv

-- .-

  • Appendix A: How to Write Team Reports. Experiments specifically designed for student teams (indicated by a "team" icon) are more difficult to complete because they are open- ended in nature. This appendix contains some hints on :low to work in a team mode, and suggests an outline for the team report.
  • Appendix B: Modeling. The sections on modeling are useful starting points for exper- iments that involve the construction of a mathematical model.
  • Appendix C: Atlas. The Atlas consists of a series of plates giving solution curves and orbits of a large variety of ODEs and systems of ODEs. The plates, which constitute a handy visual reference, are often mentioned in the experiments. They are also useful in "tuning up" the user's hardware/software platform. Plates are accompanied by brief descriptions of the underlying system. Experiments throughout the workbook elaborate on Atlas entries-for example, by asking the student to describe the effect on solution plots when varying a parameter that appears in the ODE. Each chapter is introduced by a brief summary defining terms and concepts. Every chapter contains experiments that guide the student in visualizing important concepts or applications involving ODE s. The Notes at the end of some chapters elaborate at greater length on the mathematical ideas in a chapter, and should be helpful in doing some of the experiments.

Modes of Use

A great deal of flexibility has been designed into the computer experiments. In particular, each experiment consists of several tasks, generally arranged in ascending order of difficulty. As a rule, there are more tasks and questions in a single experiment than are intended to be assigned (a feature shared by traditional problem sets in textbooks). Thus, the level of difficulty of an assigned computer problem set may be adjusted by appropriate selection of questions and tasks. Advanced-level tasks are marked with an asterisk. Most computer problem sets can be done by students individually, but some are more appropriate for a team (with a common laboratory report-see Appendix A). If access to platforms is restricted, computer problem sets intended for individuals can be conducted by a team but with individual write-ups. Instructors may lecture beforehand on the material relevant to assigned computer prob- lem sets, if it is deemed appropriate. This workbook was designed to allow students to use it on their own with occasional advice from laboratory assistants. The "keywords" listed on the cover sheet of an experiment are a guide to the mathematical prerequi sites of that experiment. A summary of relevant concepts is included in the cover sheet. Instructors can use the cover sheets (as well as appendices, chapter introductions, and chapter notes) as lecture resources. The workbook can be used in a variety of modes because of the special features incorporated into its design. It is not expected that all of the features of the workbook will be used in anyone mode:

  • Homework set replacement. A computer problem set can replace a homework set from time to time in any course involving ODEs. The table on the facing page lists possible computer problem set assignments for a one-semester fir st course in ODEs. As in any lab course, it is not particularly important to synchronize computer work with the material covered in the lectures (indeed, the lack of sufficient hardware may dictate staggering the due dates of computer problem sets). A brief follow-up in class is recommended.
  • Lab text. The workbook may serve as a "text" for a separate laboratory course parallel to a traditional course involving ODEs. Science and engineering courses have long

xvi

-- .-

operated in this mode. The variety and level of experiments involving models makes this workbook appropriate for use in conjunction with a wide range of courses.

  • Project handbook. This workbook can be used as a "};}andbook for projects" in any course that touches upon ODEs (for example, Calculus, Advanced Engineering Math- ematics, Theoretical Mechanics, Physical Chemistry, or Population Dynamics), The terminology used in building the model ODEs is consistent with current usage by professionals in those fields.
  • Validation set. The plots and graphs in this workbook can serve as a "validation set" for the user's own platform or for user-written ODE solvers. All of the nearly 200 plots of solutions of ODEs in the workbook are described and labeled, and may be useful for benchmarking or "tuning" local platforms.
  • Reference/review. The many annotated graphs, the careful (but brief) overviews of theory, the clear derivation of all model ODEs, and a detailed index all combine with the user's own platform to produce an effective reference and review tool (a kind of "futuristic Schaum's Outline").

Selection of Hardware/Software Platforms

The choice of a suitable hardware/software platform depends on the local environment, local resources, and the computing expertise of the users. There are currently many hardware platforms that support software suitable for carrying out the experiments in this workbook. There are vast differences among platforms, and the first task of the instructor is to find a combination that is easy enough for nonprogrammers to use yet robust enough to carry out accurately the steps called for in the experiments. Usually there is little choice in which hardware platforms are available at a given site. Many institutions already have a "PC-Lab" or "Work Station Lab." If a hardware choice is possible, technical support may become an issue. Software selection, however, can be a many-splendored thing. Characteristics of software to look for include the following:

  • Interactive, easy to use (no knowledge of programming languages necessary)
  • Quality of documentation and support
  • Accurate and transparent operation
  • A large collection of predefined functions
  • Excellent graphics, 2D and 3D
  • Support for hard copy facilities The rapid growth of hardware/software platforms accessible to the general user for solving and plotting the solutions of ODEs shows no sign of letting up. For this reason, it makes no sense to attempt to describe any of these solvers here. Reviews of mathematical software appear regularly in many technical journals. Software packages have their own peculiariti~s depending on the actual ODE solver algorithms employed, the hardware platforms, and so on. Some are menu-driven and in- teract with the user through elaborate displays, whereas others interact in a linear com- mand/response stream, and some combine aspects of these two extremes. Some packages act like oracles (i.e., giving no hint that a mistake has occurred), whereas others print warn- ings and/or supply information on what went wrong. However, some peculiarities common to all solver/platform combinations affect the accuracy of the output. Users should be aware of these peculiarities and recognize them when they occur; solvers cannot be run mindlessly and results always accepted without question. Listed below are some problems that occur often enough to merit comment.
  • Clipping. A graphics screen can display only a finite portion of space. Some solvers will "shut down" when orbits leave the region represented by the screen. Thus orbits

that would have returned to the screen after exiting will not be picked up. Zoom features may also be affected, depending on how clipping is implemented.

  • Default settings. The number of points plotted on an orbit segment or a solution curve may have been selected by default. Thus if the represented screen size is small and the rate functions are large, too few solution points will appear on the screen, with the result that the orbit or solution curve looks like a broken line graph. Rate functions should be carefully examined before setting the screen size, the solution time interval, or the number of plotted solution points.
  • Screen resolution. Only a finite number of points (called pixels) on any screen can be turned "on." Hence orbits of a differential system may appear to run together when they actually do not. A zoom feature may resolve orbits in a given region. Also, direction field lines that appear to be distorted on the screen, may look normal when printed on a high-resolution printer.
  • Overflow/underflow. Numerical results that are too large will overflow their storage registers. Numerical results whose magnitudes are too small produce underflow errors. A brief tutorial for students on the use of the local computing facilities with some examples is generally beneficial and is strongly recommended. Students may not have access to platforms that will produce all the graphs called for in an experiment. They should be encouraged to be creative and find a way to do the best job possible with the graphing (and hard copy) tools at hand.

Other Design Features

This workbook incorporates a number of additional design feature s that are worth keeping in mind:

  • No extraordinary pains are taken to treat first order ODE s before higher order equations and systems of ODE s or linear ODEs before nonlinear ones-tho se distinctions do not always matter to numerical solvers anyway.
  • Sensitivity of solutions of initial value problems as the data change is examined through- out, not treated in just one location.
  • It is important to know that computers have limitation s. Some experiments were de- signed to highlight this fact.
  • Redundancies often occur in the workbook, permitting students to corroborate their results (or obtain hints on what to look for or do).
  • Each chapter contains a few experiments that involve the construction and analysis of mathematical models for applications treated in most ODE textbooks. The modeling areas covered are mechanics, electrical drcuits, and -rate processes. Appendix B gives a brief introduction to each of these areas and a di scussion of the modeling process itself.
  • In the modeling experiments, the actual design of an environment depends not only on the modeler's breadth of knowledge, but also on time constraints a nd the computer (and other) resources available. Thi s workbook tries, in sofar as is possible, to reflect awareness of this fact.
  • Scaling and nondimensionalization are important techniques in the practical world of computation. Appendix B.5 gives a brief introduction to these techniques, and some experiments give examples, but there is no substitute for experience.
  • A detailed index references key term s, definitions, and concepts.

xvii

CHAPTER 1

Introduction:

Learning About Your Hardware/Software

At the heart of the experimental approach to the study of ordinary differential equations (abbreviated ODEs) is the hardware/software platform, a tool that vastly expands our ability to visualize solutions. Therefore, the first step must be familiarization with the features and limitations ofthe platform of choice. Experiments in this chapter address this task. Limitations are inherent in any hardware/software platform, and the experiments in this chapter illustrate the most important ones. The following introductory examples and telegraphic review of standard terminology may be used for reference.

Introduction

Suppose that all that is known about a function is a formula for its rate of change (i.e., for its derivative) and the coordinates of one point on its graph. Can the function be determined from that information alone? For example, suppose that the unknown function of time is denoted by x(t), and that the following information is given:

x'(t)=4t- x(O) = 0

where x'(t) denotes dx(t)/dt, and the initial condition x(O) = 0 requires that at t = 0

the value of x be zero (i.e ., (0,0) is a point on the graph of x = x(t». Antidifferentiating x'(t) = 4t - 3, we have that x(t) = 2t 2 - 3t + C

where C is a constant of integration. The initial condition is used to find C:

x (0) = 0 = 0 + 0 + C

hence, C = 0, and the unknown solution x(t) has been determined. Graphs of solutions in tx-space are called solution curves. Different initial conditions yield different values of C, hence different solution curves. Figure 1.1 displays solution curves for a variety of initial conditions. The rate of change in the above example is a function of time t only and is not a function of the unknown state x. However, examples abound in contemporary engineering and science in which the rate of change of the state x (t) _of a system at time t depends not only upon time but also upon the current value of the state. For example, it may be known that x'(t) = 1 - t 2 + sin(t x(t» x(O) = 3

The right-hand side of the above differential equation is a complicated rate function of t and x, and there is no explicit formula for the solution x(t). Nevertheless, a computer solver can approximate the solution and draw its graph. Figure 1.2 shows the graph of the computed solution curve; the initial point (0, 3) is boxed. Even though modern solvers enable users to graph solutions of very complicated initial value problems, they should be used with care. This chapter explores the use of computer solvers to numerically approximate solutions of initial value problems and discusses some

Page I

-- ,-

CHAPTER 1

x'=4t - 3 x(0) =- 8. -6. - 4.-2.0.2. 4. 6. 10

5

o

-10+---+---+---+---+---+---+---~--~--~--+- --~--~--~--~~

o 2 3

Figure J.1 Solution curves for an initial value probl em using various initial conditions.

x(0)= 5

4

3

2

0+---+---~--~-----4--~---+---+---+--~--~--~--~-- -4 -2 o 2 4

Figure 1.2 The solution curve for an initial value problem.

Pa ge 2