MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

Similar documents
First Order Differential Equations Lecture 3

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

MATH 415, WEEKS 7 & 8: Conservative and Hamiltonian Systems, Non-linear Pendulum

Lecture 10. (2) Functions of two variables. Partial derivatives. Dan Nichols February 27, 2018

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

Solutions to Math 53 First Exam April 20, 2010

Math 353 Lecture Notes Week 6 Laplace Transform: Fundamentals

Math 2a Prac Lectures on Differential Equations

First Order Differential Equations

Chapter 2: First Order DE 2.4 Linear vs. Nonlinear DEs

First Order ODEs, Part I

Ordinary Differential Equations (ODEs)

dy dt = 1 y t 1 +t 2 y dy = 1 +t 2 dt 1 2 y2 = 1 2 ln(1 +t2 ) +C, y = ln(1 +t 2 ) + 9.

First Order ODEs, Part II

Week 4: Differentiation for Functions of Several Variables

The Fundamental Theorem of Calculus: Suppose f continuous on [a, b]. 1.) If G(x) = x. f(t)dt = F (b) F (a) where F is any antiderivative

HW2 Solutions. MATH 20D Fall 2013 Prof: Sun Hui TA: Zezhou Zhang (David) October 14, Checklist: Section 2.6: 1, 3, 6, 8, 10, 15, [20, 22]

Solutions of Math 53 Midterm Exam I

Solutions to the Review Questions

Chapter1. Ordinary Differential Equations

y0 = F (t0)+c implies C = y0 F (t0) Integral = area between curve and x-axis (where I.e., f(t)dt = F (b) F (a) wheref is any antiderivative 2.

SMA 208: Ordinary differential equations I

2.2 Separable Equations

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.

Slope Fields: Graphing Solutions Without the Solutions

Chapter 1: Introduction

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

MATH 319, WEEK 2: Initial Value Problems, Existence/Uniqueness, First-Order Linear DEs

Math 225 Differential Equations Notes Chapter 1

Definition of differential equations and their classification. Methods of solution of first-order differential equations

Solutions to the Review Questions

MATH 12 CLASS 5 NOTES, SEP

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

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

FIRST-ORDER ORDINARY DIFFERENTIAL EQUATIONS I: Introduction and Analytic Methods David Levermore Department of Mathematics University of Maryland

Homework Solutions:

Lecture Notes for Math 251: ODE and PDE. Lecture 7: 2.4 Differences Between Linear and Nonlinear Equations

1.1 Motivation: Why study differential equations?

First-Order ODE: Separable Equations, Exact Equations and Integrating Factor

Section 2.1 Differential Equation and Solutions

ORDINARY DIFFERENTIAL EQUATIONS: Introduction and First-Order Equations. David Levermore Department of Mathematics University of Maryland

Lecture 2. Introduction to Differential Equations. Roman Kitsela. October 1, Roman Kitsela Lecture 2 October 1, / 25

DIFFERENTIAL EQUATIONS COURSE NOTES, LECTURE 2: TYPES OF DIFFERENTIAL EQUATIONS, SOLVING SEPARABLE ODES.

Differential Equations

Lectures in Differential Equations

How to Use Calculus Like a Physicist

ORDINARY DIFFERENTIAL EQUATION: Introduction and First-Order Equations. David Levermore Department of Mathematics University of Maryland

DYNAMICAL SYSTEMS

MIDTERM 1 PRACTICE PROBLEM SOLUTIONS

Section 2.1 (First Order) Linear DEs; Method of Integrating Factors. General first order linear DEs Standard Form; y'(t) + p(t) y = g(t)

Math Applied Differential Equations

DIFFERENTIAL EQUATIONS

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

! 1.1 Definitions and Terminology

Lagrange Multipliers

MATH20411 PDEs and Vector Calculus B

. 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,

Coordinate Curves for Trajectories

Lecture 7: Differential Equations

Math Ordinary Differential Equations

Math 312 Lecture 3 (revised) Solving First Order Differential Equations: Separable and Linear Equations

25. Chain Rule. Now, f is a function of t only. Expand by multiplication:

Lecture 7 - Separable Equations

AMATH 351 Mar 15, 2013 FINAL REVIEW. Instructor: Jiri Najemnik

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

1 Mathematical Models

Homework 2 Solutions Math 307 Summer 17

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

Math Applied Differential Equations

Lecture 1, August 21, 2017

REVIEW OF DIFFERENTIAL CALCULUS

= 2e t e 2t + ( e 2t )e 3t = 2e t e t = e t. Math 20D Final Review

Solving Differential Equations: First Steps

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics

then the substitution z = ax + by + c reduces this equation to the separable one.

Lecture 2: Linear regression

Math Review ECON 300: Spring 2014 Benjamin A. Jones MATH/CALCULUS REVIEW

18.01 Calculus Jason Starr Fall 2005

DIFFERENTIAL EQUATIONS

Midterm 1 Review. Distance = (x 1 x 0 ) 2 + (y 1 y 0 ) 2.

Infinite series, improper integrals, and Taylor series

e (x y)2 /4kt φ(y) dy, for t > 0. (4)

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

Calculus I Review Solutions

Separable First-Order Equations

Math 123, Week 9: Separable, First-Order Linear, and Substitution Methods. Section 1: Separable DEs

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Sample Questions, Exam 1 Math 244 Spring 2007

MATH 124. Midterm 2 Topics

Math Reading assignment for Chapter 1: Study Sections 1.1 and 1.2.

CALCULUS III THE CHAIN RULE, DIRECTIONAL DERIVATIVES, AND GRADIENT

Introduction to di erential equations

Math53: Ordinary Differential Equations Autumn 2004

MATH The Chain Rule Fall 2016 A vector function of a vector variable is a function F: R n R m. In practice, if x 1, x n is the input,

Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University

Chapter 2 Notes, Kohler & Johnson 2e

Coordinate systems and vectors in three spatial dimensions

Additional Homework Problems

8.5 Taylor Polynomials and Taylor Series

Transcription:

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES J. WONG (FALL 2017) What did we cover this week? Basic definitions: DEs, linear operators, homogeneous (linear) ODEs. Solution techniques for some classes of first-order ODEs Linear (by integrating factor) Separable Exact Separable/exact equations describe curves on level sets of φ(x, y) Ways that a solution can fail to exist; finding the interval of definition 1. Classification of DEs 1.1. Definitions. A differential equation is an equation that describes a function in terms of its derivatives. Such equations are ubiquitous in the sciences, where physical systems depend on the rates of changes of quantities (acceleration, radioactive decay, wave oscillations, population growth rate...). An ordinary differential equation (ODE) relates a function y(t) of one variable to its derivatives. In its most general form, this is F (t, y, y, y, y (n) ) = 0. The highest derivative, n, is the order of the ODE. We will look only at equations that specify this highest derivative in terms of the others: (1) y (n) = F (t, y, y,, y (n 1) ). This is an equation relating functions. Without derivatives, e.g. y(t) = t + y(t) 2, the equation can be reduced to a set of scalar equations - for each t solve for y(t). We cannot do this for an ODE (1) because of the derivatives - the value of y(t) is not enough to know y (t). This coupling makes ODEs challenging to solve (and also gives them with a rich mathematical structure). A partial differential equation (PDE) is an equation for a function of more than one variable involving its partial derivatives. A few examples: u t = u a 2 for u(x, t) (Heat equation) x2 2 φ x + 2 φ = 0 for φ(x, y). (Laplace s equation) 2 y2 The coupling between derivatives in several directions makes PDEs even more challenging to solve than ODEs. We will build up theory for ODEs first, and study PDEs later. 1

2 J. WONG (FALL 2017) 1.2. Linear ODEs. It is difficult to gain much insight into the general ODE (1). Perhaps the most important subclass of ODEs are linear ODEs, which have a very specific structure that can be exploited to solve and understand their properties. To properly define a linear ODE, we need the concept of an operator. This is a special type of function that takes in a function as an input, and then outputs another function. For now, we will leave the domain/range of L vague (we ll introduce the rigorous notion of function spaces later). 1 For example we could define an operator L by L[y] = y which is just differentiation. Note that since L[y] is a function this is really short for L[y](t) = y (t) for all t in the domain of y(t). Another example is integration from 0 to t: L[y](t) = t 0 y(s) ds. The square braces indicate the input argument to L (and are used to distinguish from the evaluation of that function at t using regular parentheses). An operator is linear if (2) L[c 1 y 1 + c 2 y 2 ] = c 1 L[y 1 ] + c 2 L[y 2 ] for all scalars c 1, c 2 and functions y 1, y 2 in the domain of L (here, think of the domain as the vector spaces you know from linear algebra, but with functions instead of vectors). Examples: L[y] = yy L[y] = t 2 y + sin ty L[y] = y + 1 (nonlinear) (linear) (nonlinear). Now we can define a linear ODE for y(t), which is simply an equation (3) L[y] = g for some function g(t) and linear operator L depending on y, its derivatives, and t. Observe that for L to be linear, it must be a linear combination of y and its derivatives, with coefficients allowed to depend on t. Thus, the most general linear ODE is a n (t)y (n) + a n 1 (t)y (n 1) + + a 1 (t)y + a 0 (t)y = g(t). One last definition: a linear ODE is called homogeneous if it has the form and non-homogenous if L[y] = 0 L[y] = g with g a non-zero function. The crucial property of homogenous solutions is that a linear combination of solutions is also a solution (why?). Later, we will use this to construct a basis of solutions - whose linear combinations give us all possible solutions - and reduce the ODE to a familiar linear algebra problem. 1 The word operator has its own meaning in just about every branch of mathematics. In linear algebra, you have seen matrices as linear operators, which map a vector space to another vector space.

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES 3 2. Modeling (intro) Before delving into solution techniques, let s see an example of how ODEs arise from physical models. Here we will also introduce the idea of qualitative analysis, for which we care more about the qualitative behavior of the ODE and its key properties than a solution formula. We ll revisit modeling again in studying autonomous ODEs later. A modeling problem: Fish! Consider a population of fish in a lake that are harvested at some rate by fishermen (to be eaten). Suppose we are interested in knowing how the population of fish is affected by the fishing. When is the harvest sustainable? Denote by P (t) the amount of fish in the lake, and suppose they reproduce at a rate proportional to P and that a constant number K of fish are harvested per year. With t representing time (in years), we write down an equation describing P : dp dt = rp K where r (with units of fish/year) is the growth rate of fish. There is one more assumption to make: an initial condition. With t = 0 denoting the start of the year, supose the initial population of fish is P 0. This fully defines our model: dp dt = rp K, P (0) = P 0. The equation can be solved by several methods (to be addressed in detail later). One way is to use the method of separation of variables (with which you may be familiar); we rearrange the equation as 1 dp P K/r dt = r and then integrate (using the chain rule d(f (P (t))) = F (P (t)) dp on the left hand side) to d dt obtain ln(p K/r) = rt + C 0 where C is an integration constant to be chosen. Solving for P, we get P = K/r + C 1 e rt. where we have replaced e C 0 by C 1 (for convenience). Now we apply the initial condition to find that e C = P 0 K/r, and finally obtain the solution P (t) = P 0 + (P 0 K r )ert. The equation is now solved! That s great, but at this point it is important to recall the reason we wanted solve this equation in the first place - to determine whether the fishing will be sustainable (i.e. the population does not die out over time). Observe that P (t) increases (exponentially) ast if P 0 > K r and that P (t) 0 as t if P 0 < K r. So the model predicts that all the fish will die out if the amount harvested is too large.

4 J. WONG (FALL 2017) Of course, a model is only as good as its assumptions, which in this case are rather severe. A lake of infinite fish does not sound so plausible, suggesting the model is far from complete (there are of course many more potential complications - which we will revisit later). Direction fields. The qualitative description above is of interest - and it would be nice to be able to glean this from the model without solving the equation explicitly - reading it from the ODE directly. One way to visualize the ODE is by drawing a direction field in the (t, P ) plane. We draw a line of slope dp (known from the ODE) at each point (t, P ), or at least enough dt to get the idea. The key observation is that a solution curve (t, P (t)) is always tangent to the direction field - giving us a simple way to visualize solutions. 2 1.5 1 0.5 0 0 0.5 1 1.5 2 It is clear (the above is drawn with K/r = 1 for simplicity; you can check that this is true in general) that the solution is constant if P = K/r (the equilibrium ) but that all other solutions move away from the equilibrium as t increases. This is an unstable equilibrium; we ll study such features in details later. It is straightforward to draw a direction field for any first-order ODE y = f(t, y) which makes it a useful tool for gaining some intuition into the behavior of solutions.

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES 5 3. First order ODEs We turn now to a simpler setting; the general first order ODE and the initial value problem (IVP) y = f(t, y) (4) y = f(t, y), y(t 0 ) = y 0. From calculus, you should expect that the general ODE has a free choice of constant, and the IVP condition has one solution (this will turn out to be true most of the time - but not always!). Note that the ODE makes sense wherever f is defined, e.g. y = y/t is well-defined for t > 0 (or t < 0) and all y. But this does not mean that y(t) exists in the same region - and in fact, y may only exist in a much smaller interval. We define the interval of definition for a solution y(t) to an IVP (4) to be the largest t-interval (a, b) containing the initial point t 0 such that y(t) is defined. For example, y = y 2, y(0) = 1 has a solution y(t) = 1 1 t whose interval of definition is (, 1). On the other hand, the solution to y = y, y(0) = 1 y = e t, is defined for all t R. This is not obvious from just looking at the ODE! We needed to solve the equations to discover that y grows so fast in one case that it blows up as t 1. In the next section, equipped with a way to solve ODEs exactly, we will see some examples of solutions failing to exist.

6 J. WONG (FALL 2017) 4. Separable equations If the first order ODE is simple enough, we can solve it exactly. One frequently encountered type is a separable equation, which is an ODE that can be written as (5) f(y)y = g(x) for functions f, g (the minus sign is just for later convenience). This can be integrated directly, if you recall the chain rule d dx (F (y(x))) = F (y) dy dx. Let F, G be anti-derivatives of f, g (i.e. F = f and G = g). Then (5) is (F (y)) = G (x). Now integrate, to find that solutions y(x) satisfy F (y) + G(x) = C. Geometric interpretation: Solutions lie on level sets (contours) of φ(x, y) = F (y) + G(x). A contour plot of φ(x, y) will show you what solutions look like, and will help to show where solutions may stop being defined. Example 1: Consider the IVP y = x y, y(0) = R for a constant R. This is separable: yy = x which we can integrate to obtain the implicit general solution 1 2 x2 + 1 2 y2 = C. Solutions therefore follow arcs of circles (level sets of x 2 + y 2 ). condition, the explicit solution is y = { R2 x 2 if R > 0 R 2 x 2 if R < 0. Applying the initial The interval of definition for y(x) is ( R, R) (note that we do not include x = ±R because the ODE itself is not well-defined there, even if y(x) is). We can read from the ODE that solutions may fail to exist, since y as y 0 (assuming x 0). The ODE determines a barrier solutions may not cross, and indeed this is clear from a contour plot of x 2 + y 2 (draw it!) - if solutions were to continue along the circle, then y(x) would cease to be a function. The x-interval on which y(x) is defined depends on the initial condition; to find it, we set y = 0 in the solution. This gives x = ±R, as expected.

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES 7 Example 2: Consider the pair of IVPs y = (1 2x)y, y(0) = 1/2 (A) y = (1 2x)y 2, y(0) = 1/2 (B). On what interval are these solutions defined? Unlike Example 1, the ODE function that gives y is well-defined eveywhere, so there is no problematic value of y. We need to solve the equations to determine where solutions might fail to exist. For (A): y = (1 2x) y which integrates to ln y = x + x 2 + C. Applying the initial condition and solving for y, we get y = 1 2 ex2 x. (Note that the absolute value was dropped; this is because y(0) = 1/2. The solution for y suggests that y cannot change sign, so it is safe to have y = y everywhere). Even though y grows very fast, this is defined for all x R. For (B): This gives the solution y y 2 = 1 2x = 1 y = x x2 + C. 1 y(x) = (x + 1)(x 2). The interval of definition is thus ( 1, 2). In (A), y scales with y, which yields something like exponential growth. In (B), y scales with y 2, causing it to grow much faster - so fast that it blows up in a finite interval. We ll see how this can be detected from the ODE when we consider the existence/uniqueness theorem. Note that the bounds of the interval depend on both t 0 and y(t 0 ). If instead we required y(3) = 1/2, the interval of definition is not (2, ). Instead, we have to solve the IVP again: 1 y = x x2 + 8. Since x 2 x + 8 > 0 (no real roots), the solution is defined everywhere!

8 J. WONG (FALL 2017) A first order linear ODE, 5. First order linear ODEs (Integrating factors) (6) y + p(t)y = g(t) can always be solved exactly by using an integrating factor. This is a useful trick that can be adapted to many problems! Observe that we cannot just integrate (6) because of the py term. But the LHS looks a bit like the result of a product rule: (φy) = φy + φ y. Motivated by this, multiply by a function φ(t) to be chosen later: (7) φy + pφy = φg. We certainly know how to integrate (φy) - so the goal is to get the LHS to be in the form ( ) = function of t. We can use the product rule to rewrite (7) in terms of (φy) instead of φy, at the cost of an extra φ y term: (φy) φ y + pφy = φg }{{}}{{} good bad }{{} good We can get rid of the bad term (the one that we cannot integrate directly) by taking This is separable, so φ can be computed: φ = pφ. (8) φ = e p(t) dt. With this choice of φ, we can factor the ODE into a single derivative and then integrate. Summarizing the process: y + py = g. (original ODE) φy + φpy = φg (multiply by φ) (φy) = φg and then integrate to obtain y = 1 φ (factor via product rule) φ(t)g(t) dt. Note that the product rule step works because we chose the integrating factor to be (8). For an initial value problem, we would instead integrate from t 0 to t: y(t) = 1 ( t ) y(t 0 ) + φ(s)g(s) ds. φ(t) t 0 You could, of course, solve the general ODE and then find the constant C; it is typically easier to integrate from t 0 to t.

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES 9 Example 1: Consider the IVP y + 2ty = 1, y(0) = y 0. The integrating factor is φ = e 2t dt = e t2. The ODE then factors into (e t2 y) = e t2, which we integrate from 0 to t to obtain the solution t y(t) = e t2 y 0 + e t2 e s2 ds. Often, the solution contains some nasty integral we can t evaluate explicitly; in that case it is fine to leave it as an integral expression. Now suppose we are interested the long-term behavior (as t ) of solutions. Observe that y < 0 when y > 1/2t and y > 0 when y < 1/2t, suggesting that solutions are pushed towards y = 1/2t as t. A direction field confirms this (see Figure). We can conjecture that y = 1 + (smaller terms) as t (informally, we write 2t this as y 1/2t). To check this we can estimate the exact solution in the limit t (not trivial for the integral expression). 0 1 0 0 1 2 3 4 Optional: We can verify this from the ODE as well. Assume that y 0, so 2ty 1 and y 1/2t. We check that the above approximation made sense by verifying that y is in fact smaller than the other terms: large t : y }{{} + 2ty = 1. }{{} 1/2t 2 1

10 J. WONG (FALL 2017) Example 2: Consider the ODE ty + 2y = 1/t. Divide by t to find that the integrating factor is Multiply the original ODE by t to obtain φ = e 2/t dt = e 2 ln t = t 2. t 2 y + 2ty = 1. This factors (as it should, by our choice of φ) to (t 2 y) = 1. Integrating yields the general solution y = t+c t 2. 6. Exact equations For the purely mechanical treatment of exact equations, see the textbook. Instead, we will motivate the study of exact equations by making a detour into vector calculus, and arrive naturally at the procedure for solving exact equations. Recall that a vector field v = (M(x, y), N(x, y)) defined in a nice 2 region D is conservative if it is the gradient of a potential φ(x, y): v = φ. The gradient theorem states that a vector field is conservative if and only if it has path independence, i.e. the line integral of v along any path γ from a point a to b is the same: φ(b) φ(a) = M dx + N dy. Further, this holds if and only if M (9) y = N x Observe that if v is conservative then γ in D. dφ = Mdx + Ndy. Such a differential is called exact. Unpacking the slick differential notation, this means in particular that along a path y(x), d dy (φ(x, y(x))) = M + N dx dx. Now we may ask: given functions M(x, y) and N(x, y), when is Mdx + Ndy an exact differential? We know from the theorem that (9) is the right condition. 2 Simply connected; i.e. the domain has no holes. Rectangles work; annuli do not.

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES 11 Obtaining the potential: Given M, N, how do we compute φ? First, check (9) to make sure such a φ exists. We seek a φ(x, y) such that (M, N) = φ, i.e. M = φ x, We first integrate M with respect to x and obtain φ = x N = φ y. x 0 M(s, y) ds + h(y) for an integration constant h(y) (why is this allowed to depend on y?). This makes sure that M = φ, but we still need to satisfy the equation for N. Now differentiate with respect to y: x N = φ y = y ( ) + h (y). For any specific problem, the term in ellipses will be some explicit function you can differentiate. If the condition (9) holds, this equation will be independent of x (they will miraculously cancel!), and we can solve for h (and hence φ). See examples below. Exact equations. We have seen how to recognize exact differentials and find their potentials. In Section 2.6, we look at exact equations, which are simply ODEs in the form d (φ(x, y(x))) = 0. dx From what we just learned for exact differentials, a general first order ODE M(x, y) + N(x, y) dy dx = 0 in a (nice) domain D is exact if and only if M = N in D. The procedure for obtaining φ y x is then the same as we just did in Obtaining the potential, leading to the solution φ(x, y(x)) = C. That is, exact equations describe curves along which the potential φ for the conservative vector field (M, N) is constant. Example 1: Consider 2xy + (2y + x 2 )y = 0. We check that this is exact: (2xy) = 2x, y x (2y + x2 ) = 2x. Now integrate M (the term not multiplied by y ) in x: φ = 2xy dx = x 2 y + h(y). Differentiate in y and set equal to the coeffiicent of y : 2y + x 2 = φ y = x2 + h (y).

12 J. WONG (FALL 2017) The x-terms cancel, and we obtain h = y 2. The potential is thus φ = x 2 y + y 2 and solutions y(x) are givne by the implicit relation x 2 y + y 2 = C. Example 2: We solve the IVP 2x y + (2y x)y = 0, y(0) = 3/2. Check that it is exact: (2x y) = 1, (2y x) = 1. y x For variety, we start by integrating 2y x in y: Differentiate with respect to x: φ = y 2 xy + h(x). 2x y = φ x = y + h (x). Thus h(x) = x 2 so the implicit solution is x 2 xy + y 2 = 3 4. Solutions to the ODE are segments/arcs of an ellipse (see Figure). We can find the interval of definition by solving for y. Alternately, observe that the endpoints of the interval of definition are the points where y. From the ODE, this occurs when y = x/2. Plugging this into the implicit solution, we get so the solution is defined for ( 1, 1). 3x 2 /4 = 3/4, 2 1 0-1 -2-2 -1 0 1 2