Solving Differential Equations: First Steps

Similar documents
DIFFERENTIAL EQUATIONS

1.2. Direction Fields: Graphical Representation of the ODE and its Solution Let us consider a first order differential equation of the form dy

MA 102 Mathematics II Lecture Feb, 2015

Hour Exam #2 Math 3 Oct. 31, 2012

APPLICATIONS OF DIFFERENTIATION

Solutions to the Review Questions

MATH 100 and MATH 180 Learning Objectives Session 2010W Term 1 (Sep Dec 2010)

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point,

It is convenient to think that solutions of differential equations consist of a family of functions (just like indefinite integrals ).

Introduction to First Order Equations Sections

Learning Objectives for Math 165

Slope Fields: Graphing Solutions Without the Solutions

Exercise 4) Newton's law of cooling is a model for how objects are heated or cooled by the temperature of an ambient medium surrounding them.

Solutions to the Review Questions

Module 2: Reflecting on One s Problems

dt 2 The Order of a differential equation is the order of the highest derivative that occurs in the equation. Example The differential equation

Math 308, Sections 301, 302, Summer 2008 Review before Test I 06/09/2008

In general, if we start with a function f and want to reverse the differentiation process, then we are finding an antiderivative of f.

Section 3.1 Extreme Values

Math Week 1 notes

Parabolas and lines

Math Applied Differential Equations

for the initial position and velocity. Find formulas for v t and x t. b) Assuming x 0 = 0 and v 0 O 0, show that the maximum value of x t is x max

Ordinary Differential Equations (ODEs)

Sample Questions, Exam 1 Math 244 Spring 2007

MATH 1231 MATHEMATICS 1B Calculus Section 3A: - First order ODEs.

Without fully opening the exam, check that you have pages 1 through 11.


For those of you who are taking Calculus AB concurrently with AP Physics, I have developed a

Physics 101 Discussion Week 3 Explanation (2011)

Chapter 3: The Derivative in Graphing and Applications

APPLICATIONS OF DIFFERENTIATION

LECTURE 4-1 INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS

Blue Pelican Calculus First Semester

3 Algebraic Methods. we can differentiate both sides implicitly to obtain a differential equation involving x and y:

Unit IV Derivatives 20 Hours Finish by Christmas

Unit IV Derivatives 20 Hours Finish by Christmas

1 Antiderivatives graphically and numerically

Differential Equations

M155 Exam 2 Concept Review

Differential Equations

MAT100 OVERVIEW OF CONTENTS AND SAMPLE PROBLEMS

BHASVIC MαTHS. (a) The table shows the number of eggs a bird lays per brood cycle. The mean number of eggs is 1.5. Find the value of p

Math Week 1 notes

Autonomous Equations and Stability Sections

Calculus I Review Solutions

Review for Final Exam, MATH , Fall 2010

Chapter 2 Derivatives

Math 216 First Midterm 8 October, 2012

Final Exam. Math 3 December 7, 2010

Autonomous means conditions are constant in time, though they may depend on the current value of y.

Physics 121 for Majors

Chapter 3: Derivatives and Graphing

Solutions to Section 1.1

MAT 1320 Study Sheet for the final exam. Format. Topics

Integrals. D. DeTurck. January 1, University of Pennsylvania. D. DeTurck Math A: Integrals 1 / 61

MATH 408N PRACTICE FINAL

Please read for extra test points: Thanks for reviewing the notes you are indeed a true scholar!

Differential Equations

Lecture 19: Solving linear ODEs + separable techniques for nonlinear ODE s

7.1 Indefinite Integrals Calculus

AP Physics C Summer Homework. Questions labeled in [brackets] are required only for students who have completed AP Calculus AB

MATH 18.01, FALL PROBLEM SET #5 SOLUTIONS (PART II)

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

Week 4: Differentiation for Functions of Several Variables

CALCULUS AB SUMMER ASSIGNMENT

1. First-order ODE s

n=0 ( 1)n /(n + 1) converges, but not

Everything Old Is New Again: Connecting Calculus To Algebra Andrew Freda

Nonlinear Autonomous Systems of Differential

Chapter 2 Differentiation. 2.1 Tangent Lines and Their Slopes. Calculus: A Complete Course, 8e Chapter 2: Differentiation

4.9 Anti-derivatives. Definition. An anti-derivative of a function f is a function F such that F (x) = f (x) for all x.

ENGR 213: Applied Ordinary Differential Equations

Math 1270 Honors ODE I Fall, 2008 Class notes # 14. x 0 = F (x; y) y 0 = G (x; y) u 0 = au + bv = cu + dv

Parametric Equations

MATH 408N PRACTICE FINAL

Homework 2 Solutions Math 307 Summer 17

Topic Outline AP CALCULUS AB:

Justifications on the AP Calculus Exam

ERRATA for Calculus: The Language of Change

I II III IV V VI VII VIII IX Total

Predicting the future with Newton s Second Law

APPLICATIONS OF DIFFERENTIATION

A. 1 B. 2 C. 4.5 D. 7 E. 8

= 2 x. So, when 0 < x < 2 it is increasing but it is decreasing

Final exam practice 4 (solutions) UCLA: Math 3B, Winter 2019

Integral Curve (generic name for a member of the collection of known as the general solution)

MATH 215/255 Solutions to Additional Practice Problems April dy dt

2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems

Introduction to Vectors

y x 3. Solve each of the given initial value problems. (a) y 0? xy = x, y(0) = We multiply the equation by e?x, and obtain Integrating both sides with

FUNCTIONS AND MODELS

The Method Of Direction Fields With Illustrative Examples

QUIZ ON CHAPTER 4 APPLICATIONS OF DERIVATIVES; MATH 150 FALL 2016 KUNIYUKI 105 POINTS TOTAL, BUT 100 POINTS

Solutions to Math 53 First Exam April 20, 2010

Math 266: Ordinary Differential Equations

Experiment 4 Free Fall

Solutions to Math 41 First Exam October 18, 2012

DYNAMICAL SYSTEMS

Quarter 2 400, , , , , , ,000 50,000

Transcription:

30 ORDINARY DIFFERENTIAL EQUATIONS 3 Solving Differential Equations Solving Differential Equations: First Steps Now we start answering the question which is the theme of this book given a differential equation, does it have a solution? If it does, how many solutions are there? And finally, how do we find them? A solution to a differential equation is a function or a family of functions. Since functions can be represented in different ways, we look for solutions in all those ways as well. So, we will develop algebraic, geometric (visual), numeric, and qualitative (verbal) ways of finding and/or describing solutions. We might obtain exact solutions, or approximations, or only some information about solutions. As well, we will be using ready-made math software, such as Maple, Matlab, and WolframAlpha. Solving a differential equation involves two steps. First, we use a theoretical result (if there is one) to figure out if there is a solution, and (if so) we determine how many solutions are there. For many equations that we study in this book, such theoretical results exist, and are known by the name Existence and Uniqueness Theorems. Second, we pick an appropriate method to find all solutions. There is a useful parallel with solving equations in real numbers: consider the equation x 3 4x =0. By guessing, we see that x =0,x= 2, and x =2are solutions. But we know more: supported by the theory (in particular, by the fact that a polynomial equation of degree n has at most n real solutions) we are sure that we found all solutions. Some differential equations are straightforward (does not imply that they are easy); we go through a few of those first. Note: in general, if we do not explicitly state the domain of the independent variable, we assume that the domain consists of all real numbers. In what follows, we use capital C and D (sometimes with a subscript, such as C 1,C 2, and so on) to denote constants. The simplest differential equation is f (x) =0 To solve this differential equation means to find all functions f(x) with the property that their derivative is zero for all real numbers x. From calculus we know that f(x) =C, where C is any constant. Thus, the equation f (x) = 0 has infinitely many solutions, one for each value of C. Using the language we learned earlier, we say that f (x) = 0 has a one-parameter family of solutions f(x) =C. Next, we consider a general pure-time ODE y = F (x) where F (x) is a continuous function on some interval I. All solutions of this equation are given by y = F (x) dx + C where F (x)dx is any antiderivative of F (x), defined on I. For example, all solutions of the ODE y = 1 1+x 2

Section 3 Solving Differential Equations 31 are given by y = 1 dx =arctanx + C 1+x2 (For the record: if two functions f and g satisfy f (x) =g (x) for all x in some interval I, then a consequence of the Mean Value Theorem implies that f(x) and g(x) differ at most by a constant. Hence the guarantee that we indeed found all solutions of the given equation.) Clearly, to solve a differential equation we have to integrate. In some cases (actually in many cases) it is not possible to express an integral as a closed formula. For instance, unless we wish to expand into a MacLaurin series, or use an approximation method, the best we can do to solve y = sin x x is to write sin x y = x dx Example 3.1 Solution of an IVP Find a solution of the IVP y =12e 3x +4e x 1, y(0) = 4. Next, consider the ODE y = y Is there a function which is equal to its derivative? Yes, for instance y = e x. Thinking a bit more, we discover that any function of the form y = Ce x satisfies y = y. Likewise, y = Ce x, for any real number C, is a solution of the ODE y = y. So, we found some solutions. In order to be sure that there are no more, we need theoretical support. The function y = e x also satisfies the equation y = y Again, we easily check that y = C 1 e x for any constant C 1, is also a solution. Later in the course we will quote a theorem which will tell us that this is not all - there is another solution! By experimenting, we discover that y = e x works, and so do all of y = C 2 e x, where C 2 is a constant. (We will also make it clear in what sense e x, 5e x, and 3e x all count as one solution, whereas e x and e x count as two solutions.) The above mentioned theorem will tell us that the linear combination y = C 1 e x + C 2 e x gives all solutions of y = y. Example 3.2 Solution of a BVP Find a solution of the BVP y =2cosx 4sinx, y(0) = 0, y(2π) =0. Example 3.3 Solution of an ODE Find a general solution of the ODE y (x) =x 2 sin 4x.

32 ORDINARY DIFFERENTIAL EQUATIONS Example 3.4 Solution of a higher order ODE Find a general solution of the ODE y (4) (x) =sin3x. Example 3.5 Motion with Constant Acceleration (a) Describe the motion given by x (t) = 0 (zero acceleration), where x(t) isthe position of an object at time t. (b) Motion of an object under gravity only is defined by x (t) = g, where g is the acceleration of gravity (g =9.81 m/s 2 on Earth, g =3.71 m/s 2 on Mars, g =24.79 m/s 2 on Jupiter, g =1.62 m/s 2 on Earth s Moon). The function x(t) is the position of an object at time t. Assume that the initial position is x(0) = x 0, and the initial velocity is x (0) = v 0 (positive velocity means that the object is thrown upward). Solve x (t) = g to find the position x(t). Find the maximum height reached by the object, and the time it takes for it to hit the ground. (a) Velocity is constant x (t) =C, and the position changes linearly: x(t) =Ct+D (C and D are constants). (b) Answers: x(t) = 1 2 gt2 + v 0 t + x 0. The maximum height is v0/2g 2 + x 0 and the time it takes for the object to hit the ground is (v 0 + v0 2 +2gx 0)/g. Assume that x 0 =1.7 mandv 0 = 20 m/s (i.e., we throw a ball upward with initial velocity of 20 metres per second). Heights: 8.07, 20.39, 53.91, 123.46 metres; times to fall back: 1.69, 4.16, 10.87, 24.77 seconds (on Jupiter, Earth, Mars, Moon respectively). x FIGURE 3.1 Throwing ball upward as a function of gravity Example 3.6 Swimming Across a River Model the velocity at which a river flows in two different ways: (a) v R = v 0 (constant velocity at all locations in the river) ( (b) v R = v 0 1 x 2 /B 2), B x B (zero along the shores, small near the shores, fastest in the middle). A swimmer swims east at constant speed v S (i.e., does not adjust her direction due to the flow of the river). Where (at which point) will she reach the other shore, and what curve describes her motion?

Section 3 Solving Differential Equations 33 FIGURE 3.2 Swimming across a river The ODE for the swimmer, in general: slope = dy dx =tanθ = v R v S with initial condition y( B) = 0. See below. FIGURE 3.3 Slope is the ratio of velocities: river to swimmer In the case (a), the swimmer will move along the curve y(x) which satisfies dy dx = v 0 v S The solution is the line y = v0 v S x + v0 v S B and the location where she reaches the ( ) other shore is B,2 v0 v S B. In the case (b), the swimmer will move along the curve: dy dx = v ) 0 (1 x2 v S B 2 We solve this IVP by integration: y = v ) 0 (x x3 v S 3B 2 + 2Bv 0 3v S So the swimmer s trajectory is the graph of a polynomial of degree 3. End point: x = B,y =4Bv 0 /3v S. y 4Bv 0 /3v S FIGURE 3.4 Trajectory of the swimmer -B B 0 x

34 ORDINARY DIFFERENTIAL EQUATIONS General note about applications: usually, we solve a differential equation because we have questions in mind (think of any model we have introduced so far.) Rarely are our questions related to the behaviour of a solution for every possible value of the independent variable. Instead, we might be interested at a behaviour of a solution near some point, or at a long-term hehaviour (i.e., for large values of the independent variable). Thus, in some cases we might be satisfied by knowing that asolutionp (t) approaches zero as t approaches infinity, or that a solution is a periodic function, and might not insist on obtaining explicit solutions. (As we will see, in some cases it is very difficult, or impossible to obtain explicit solution of a given ODE as a closed form.) First Order ODEs Recall that a general form of a first-order ODE is F (x, y(x),y (x)) = 0 for some function F. We assume that x belongs to some interval I of real numbers. In explicit form, we write y (x) =G(x, y(x)) (3.1) for some function G(x), and for x in some interval I R. In the case when G depends on x only, equation (3.1) is called a pure-time differential equation. If G depends on y only, it is an autonomous differential question, and if G depends on both x and y, (3.1) is neither a pure-time nor an autonomous equation. Qualitative Analysis, Slope Fields and Solution Curves One way to qualitatively analyze an ODE consists of extracting information about a solution from the properties of its derivatives. Example 3.7 Qualitative Analysis of the Basic Exponential Model Consider a population whose behaviour is described by the IVP P (t) =kp(t), k>0, and P (0) = P 0 > 0. The first thing we notice is that, as long as P (t) > 0, the derivative P (t) is positive and thus P (t) is increasing. Moreover, P (t) =(P (t)) =(kp(t)) = kp (t) =k (kp(t)) = k 2 P (t) It follows that P (t) > 0, i.e., the solution to the equation is concave up. So, without actually solving the equation, we have determined that the solution (in the case k>0) is an increasing function, whose rates of increase increase with time (which is typical of an exponentially growing quantity). Inthesameway,wearguethat,withk<0, the population decreases as long as P (t) > 0; the graph is still concave up. Example 3.8 Qualitative Analysis of Newton s Law of Cooling Newton s law of cooling states that the rate at which an object gains or loses heat is proportional to the difference between the temperature of the object and the ambient temperature. Denoting the time by t, the temperature of the object by T (t), and the ambient temperature by A, we write T (t) =α (A T (t)), where α>0describes the object which is cooling down or warming up. The initial temperature of the object is T (0) = T 0.

Section 3 Solving Differential Equations 35 Assume that, at some moment t, T (t) <A.In that case, T (t) > 0, i.e. the temperature of the object in increasing. Show that the graph of T (t) isconcave down. If T (t) >A,then T (t) < 0, so the object is cooling down. Show that the graph of T (t) is concave up. If, at any moment, T (t) reaches A, then T (t) =0. Makes sense? A geometric way of analyzing first-order ODEs consists of drawing slope lines to create a slope field. We can interpret the equation y (x) =G(x, y(x)) by saying that the slope of the solution at a point (x, y) is given by the value of the function G. In a coordinate system, we plot the point (x, y) and, using a small line segment, indicate the slope. Here is an example. Consider the first order ODE y =2x y. At a point (2, 1), the slope is y =2x y =2(x) (1) = 3. So, we plot the point (2, 1) and indicate the slope of 3 (of course, we cannot do this really precisely unless we use a graph paper). y 1 FIGURE 3.5 A point and the corresponding slope 0 2 x Now we repeat this for more points. First, we create a table of values and transfer the information onto the graph. point (x, y) slope y =2x y (0, 0) 0 (1, 0) 2 (0, 1) 1 (1, 1) 1 ( 1, 1) 3 ( 1, 0) 2 y 2 1 ( 1, 1) 1 1 0 1 2 3 x FIGURE 3.6 Starting a slope field (1, 1) 3 (0, 1) 1 1 This is obviously becoming painful. Unless we have some simplest possible ODEs (that we will mention soon), we cannot really draw a slope field by hand. Good news is that we can use computers (either write a code, or use ready-made software, or online applets). The picture below was generated using a code in Python. We asked Python to compute and draw slopes at 21 2 = 441 equally spaced points in the rectangle 2 x 2, 2 y 2.

36 ORDINARY DIFFERENTIAL EQUATIONS FIGURE 3.7 Slope field of the differential equation y =2x y Now let s find a solution curve of the IVP y =2x y, y( 2) = 2. Starting at the point ( 2, 2), we draw a curve whose tangent lines are given by the slope field. At points where we do not have a slope line, we assume that the tangent lines are parallel to the nearby slope lines. In other words, we thread the curve through the slope field. In the figure below we drew three solutions, corresponding to initial conditions ( 2, 2), 2, 0.5), and (0.5, 2). FIGURE 3.8 Slope field y =2x y with solution curves Example 3.9 Slope fields Draw, and describe in words, the slope fields of the ODEs y =0,y =1, and y = 2. In each case, draw solution curves corresponding to three different initial conditions. Example 3.10 Slope fields Draw, and describe in words, the slope field of the ODEs y = x. What does a slope field of a pure-time ODE look like?

Section 3 Solving Differential Equations 37 In the previous example we realized that the slopes along each vertical line are constant, and this observation helped us a great deal in drawing the slope field. The curves at whose points all slopes of a direction field are equal are called isoclines. FortheODEy =2x y, the isoclines are given by 2x y = C, where C is a real number; i.e., they are parallel lines y =2x C. Thus, the slope field of y =2x y is not hard to draw: we draw a line of slope 2 and y-intercept C, and along all points on that line the slope is equal to C. See the figure below. FIGURE 3.9 Isoclines of y =2x y Isoclines do not have to be lines. Consider the ODE y = y x 2. From y x 2 = C we obtain y = x 2 + C, and so the isoclines are parabolas, all obtained as vertical translates of y = x 2. So, to draw a slope field, we sketch a parabola y = x 2 + C forachosen value of C, and at all points on that parabola the slope lines are of slope C. See below. Visually: the slope of all slope lines along a given parabola is equal to its y-intercept. FIGURE 3.10 Slope field of y = y x 2 drawn using isoclines To further improve our picture, we consider coordinate axes. Along the x-axis, the slopes are given by y = x 2 ; so they are all negative, except at the origin, where the slope is zero.

38 ORDINARY DIFFERENTIAL EQUATIONS Along the y-axis, the slopes are given by y = y; thus, the slopes are positive above the x-axis and negative below it; they increase in value as y increases. Example 3.11 Slope Fields of the Basic Exponential Model Draw slope fields for y (t) =ky(t) with positive and negative values of k and see how the solutions match the conclusions made in Example 3.7. FIGURE 3.11 Slope field y =0.7y FIGURE 3.12 Slope field y = y Note: here, we did not call the unknown function P (t) as in Example 3.7, because we wanted to show general behaviour of the ODE, not just in cases when the function is positive or zero (as it is when we study population). This example shows that although a slope field does not give exact information, we can figure out important features of solutions. For instance, when k = 1, all solutions (i.e., no matter what initial condition) approach zero as t ; see Figure 3.12. An advantage of drawing a slope field is that no integration is needed. Thus (likely with the help of a computer), we can draw a slope field of any first-order ODE. As we will see, not every ODE can be solved explicitly as a closed formula, so we take advantage of whatever means we have to obtain information about solution(s). As well, in some cases we do not really need an explicit solution, but

Section 3 Solving Differential Equations 39 only some qualitative information (such as the fact that a solution approaches zero over time). As mentioned, a disadvantage of using slope fields is that does not give precise information, such as exact shape or exact values of a solution. Example 3.12 Logistic Population Model Consider the population modelled by the IVP ( P (t) =kp(t) 1 P (t) ) L with k>0, L>0, and P (0) = P 0 > 0. (a) Assume that P (t) is very small compared to L. What does this ODE look like in that case? What is the biological meaning of the constant k? (b) Looking at the given ODE, i.e., by extracting information from P (t), draw conclusions about the solutions. (c) What is the biological meaning of the constant L? (d) Compute P (t) and express it in terms of P (t), and draw conclusions about the concavity of the solutions. (e) Construct a slope field and draw several solutions (i.e., solutions starting with different initial conditions). (a) We obtain P (t) =kp(t), so K is the rate of the initial exponential growth. (b) Increasing/decreasing, and also constant solutions. (c) Carrying capacity (maximum sustainable population size). ( (d) Show that P (t) =k 2 P (t) 1 P (t) )( ) 2P (t) 1. L L (e) Using computer/software: L FIGURE 3.13 Logistic ODE Note that we analyze the function in terms of itself, unlike in calculus, where we analyzed a function based on its independent variable. t Example 3.13 Modified Logistic ODE - Allee Effect Consider the ODE ( P (t) =kp(t) 1 P (t) )( 1 m ) L P (t) where 0 <m<l.

40 ORDINARY DIFFERENTIAL EQUATIONS (a) Describe how the fact that P (t) increases or decreases depends on the values of P (t). (b) Identify all constant solutions of this equation. (c) What is the biological meaning of m? Example 3.14 Free Fall with Air Resistance We consider the motion of an object falling under gravity and air resistance. Using physics (balancing forces), we derive the ODE for the vertical position my (t) =mg Dy (t) The coordinate system is oriented so that the downward direction is positive. Rewrite it in terms of velocity, v(t) =y (t), mv (t) =mg Dv(t), and divide by m: v (t) =g D v(t) (3.2) m Assume that the initial velocity is v 0. (a) Determine how increasing/decreasing features of a solution depend on v(t). (b) Identify a constant solution. (c) Draw a slope field several solutions. (a) If the velocity v(t) issmallsothatg D m v(t) > 0, then v (t) > 0, and the object s velocity increases. So, we see that as long as v(t) <gm/d,the velocity will increase. At any moment v(t) >gm/d,then v (t) =g D mv(t) < 0, and the falling object decelerates. (b) If the initial velocity is equal to gm/d, then v (t) =0, so there is no change in the velocity of the object. (c) The slope field confirms our conclusion: an object thrown downward with a small initial velocity will accelerate (its speed will increase); if initial speed is high (larger than gm/d) the falling object will slow down. mg/d FIGURE 3.14 Terminal velocity In either case, the velocity approaches the so-called terminal velocity v = gm/d (also called an equilibrium solution). Here, g =9.81 m/s 2 is the acceleration of the gravity, m is the mass in kg and D is the drag coefficient, which incorporates air resistance, density of air, and surface area of the object falling. t

Section 3 Solving Differential Equations 41 Actual terminal velocity for a human (70 kg) in the belly-to-earth position (D 12.2), about 56 m/s (202 km/h); free-fall, head first, arm close to body (D 8.6), about 80 m/s (288 km/h). Example 3.15 Slope Fields As illustration, we give slope fields and solutions of several first-order ODEs. Initial conditions are indicated by diamonds. FIGURE 3.15 Slope field of y =1+xy 2 FIGURE 3.16 Slope field of the first-order ODE y = xy y 1 FIGURE 3.17 Slope field of the first-order ODE y = y/x

42 ORDINARY DIFFERENTIAL EQUATIONS FIGURE 3.18 Slope field of the first-order ODE y = x 2 + y 2 0.8x FIGURE 3.19 Slope field of y = x y FIGURE 3.20 Slope field of y = y x

Section 3 Solving Differential Equations 43 Example 3.16 Dependence on Initial Conditions Consider the first-order non-linear ODE y =sinx cos y. Note that a small change in initial condition, ( 5, 1), compared to ( 5, 0.98), produces a large difference in solutions. It goes the other war around: big initial change (( 5, 5), compared to ( 5, 1),) produces solutions which are getting close to each other as x increases. FIGURE 3.21 Slope field of the first-order ODE y =sinx cos y Using the same program that constructed all slope fields and solutions in these notes, we tried to do the same for the ODE y = x/y. Does not look right, see below. FIGURE 3.22 y = x/y What went wrong? Near the x-axis, the slopes are very large, and approach for points on the x-axis (Python did not understand that, and did not know how to handle it). We now show that x 2 + y 2 = r 2, where r is a real number, is a solution of this equation. Implicitly differentiating x 2 + y 2 = r 2,weobtain 2x +2yy =0 yy = x y = x y

44 ORDINARY DIFFERENTIAL EQUATIONS Thus, the solutions of this equation form a one-parameter family of concentric circles. For the initial condition y(x 0 )=y 0, we obtain the circle x 2 + y 2 = x 2 0 + y2 0. Knowing that the solutions are circles, we adjusted the Python program to generate a correct picture: FIGURE 3.23 Slope field y = x/y Autonomous ODEs Recall that an autonomous ODE is of the form y = G(y) where y(x) is a function of x. The slope field is horizontal-translation invariant, since the values of the slopes are constant along horizontal lines (i.e., isoclines are horizontal lines). Example 3.17 Autonomous ODE and Phase-Line Diagram Consider the IVP for the function y = y(x): y =(y 3)(y +2) where y(0) = y 0. In this case, G(y) =(y 3)(y +2). What can we say about the solutions of this ODE, for different initial conditions? We argue as in calculus, but there is a difference: here we analyze y based on the values of y, and not on the values of x (since we don t have a formula for y as a function of x) The critical points of y are the points where y = G(y) = 0, i.e., y =3and y = 2. So, if the initial condition is y(0) = 3, then the solution is y(x) = 3 for all x. Likewise, the solution with y(0) = 2 is the constant function y(x) = 2. These solutions are called equilibrium solutions, and provide important information about the remaining solutions of this equation. A graphical way which keeps track of information about solutions is called a phase-line diagram. This diagram summarizes the information about where the solution y is increasing, decreasing, or where it remains constant. In the upper part of the diagram, we draw the graph of y as a function of y and in the lower part we indicate the information about the solutions y. First we label the two equilibrium solutions y = 2 andy =3. Then we draw rightwardpointing arrows at points where the solution y is increasing (i.e., where the above diagram of y lies above the y-axis). The size of the arrow shows the magnitude

Section 3 Solving Differential Equations 45 of the derivative: the larger the arrow, the larger the derivative. Likewise, we use leftward-pointing arrows to indicate where the solution y is decreasing; again the larger the arrow, the larger (in absolute value) the derivative. See below. FIGURE 3.24 Phase-line diagram The solutions follow the arrows. For instance, the solution with initial value y(0) = 1 will be pushed toward the left, i.e., toward smaller values (i.e., will be decreasing); so will the solutions with y(0) = 1 andy(0) = 2.9. The solutions with initial values y(0) = 3.2 andy(0) = 3 are increasing, and so on. As well, looking at the size of the arrows, we can see that a solution starting at y(0) = 1 initially decreases rapidly, and over time slows down the rate of decrease. To visualize, we draw the slope field and the solution curves with initial conditions discussed above. FIGURE 3.25 Slope field The equilibrium solutions y = 2 andy = 3 are constant solutions, and are represented by horizontal lines lines. Note that the slope lines along the same horizontal line are equal (i.e., as we mentioned before isoclines are horizontal lines). Note that we used the upper part of the diagram in Figure 3.24 to figure out the sign of y ; if we can figure it out otherwise (for instance, by looking at the formula for G(y), as in the next example) then we do not need it. As well, G(y) will not always be easy to graph, so we need to learn how to do a phase diagram without looking at the graph. Example 3.18 Phase-Line Diagram Sketch a phase-line diagram for the autonomous ODE y =0.3y(y 2)(4 y)

46 ORDINARY DIFFERENTIAL EQUATIONS Example 3.19 Phase-Line Diagram for Newton s Law of Cooling Newton s law of cooling states that the rate at which an object gains or loses heat is proportional to the difference between the temperature of the object and the ambient temperature. Denoting the time by t, temperature of the object by T (t), and the ambient temperature by A, we write T (t) =α ( A T (t) ) where α is a positive constant that describes the object which is cooling down or warming up. Sketch the phase-line diagram. In this case, G(T )=α(a T), where A is a constant. The graph of G is a line of negative slope. The equilibrium (i.e., constant) solution G(T ) = 0isgivenby T = A (makes sense: if the object of temperature A is brought into a room at the same temperature, its temperature will not change). Use the usual convention: if the derivative is positive, arrows point to the right; if the derivative is negative, arrows point to the left. The size of the arrows reflects the magnitude of the derivative. FIGURE 3.26 Phase-line diagram How do we read this diagram? See below. If T (0) <A,(i.e., the object is initially colder than the ambient temperature), the arrows will push the solution to the right, toward higher temperatures, so the object is warming up. Likewise, if T (0) > A,(i.e., the object is initially warmer than the ambient temperature), the arrows will push the solution to the left, toward lower temperatures. FIGURE 3.27 Phase-line diagram Example 3.20 Phase-Line Diagram for Reverse Newton s Law of Cooling Denoting the time by t, temperature of the object by T (t), and the ambient temperature by A, we write T (t) =α ( T (t) A ) where α is a positive constant. Sketch the phase-line diagram. From looking at the phase-line diagram, or at a slope field, we can deduce important stability properties of equilibrium solutions. The stability we define

Section 3 Solving Differential Equations 47 here is usually referred to as the asymptotic stability, since it describes the long-term behaviour of solutions. Definition 3.1 Stable and Unstable Equilibrium of an Autonomous ODE An equilibrium is called stable if solutions that start near the equilibrium remain near or approach it for all times. If solutions that start near an equilibrium move away from it, then the equilibrium is called unstable. We use geometric information to figure out stability. Other ways (such as algebraic) are discussed in follow-up ODE courses. Look at the phase diagram in Figure 3.27. A solution that starts (i.e., whose initial condition is) near the equilibrium A, will be pushed even closer to A (look at the arrows). Thus, the equilibrium T = A in is stable. On the other hand, the equilibrium A in Example 3.20 is unstable (check that). The equilibrium y = 3 in Example 3.17 (see Figure 3.24) is unstable, whereas y = 2 is a stable equilibrium. Example 3.21 Stability Determine the stability of equilibria in Example 3.18. Example 3.22 Population Model with Allee Effect Consider the population modelled by the equation ( P (t) =kp(t) 1 P (t) )( 1 m ) L P (t) with k > 0, 0 <m<l. Sketch a phase-line diagram, identify equilibria and determine their stability property. Answer: P = 0 is stable, P = m is unstable, P = L is stable.