Notes on Diffy Qs Differential Equations for Engineers by Jiลí Lebl May 6, 2022 (version 6.3) 2 Typeset in LATEX. Copyright ©2008–2022 Jiลí Lebl This work is dual licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 International License and the Creative Commons Attribution-Share Alike 4.0 International License. To view a copy of these licenses, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ or https://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons PO Box 1866, Mountain View, CA 94042, USA. You can use, print, duplicate, share this book as much as you want. You can base your own notes on it and reuse parts if you keep the license the same. You can assume the license is either the CC-BY-NC-SA or CC-BY-SA, whichever is compatible with what you wish to do, your derivative works must use at least one of the licenses. Derivative works must be prominently marked as such. During the writing of this book, the author was in part supported by NSF grant DMS-0900885 and DMS-1362337. The date is the main identifier of version. The major version / edition number is raised only if there have been substantial changes. Edition number started at 5, that is, version 5.0, as it was not kept track of before. See https://www.jirka.org/diffyqs/ for more information (including contact information). The LATEX source for the book is available for possible modification and customization at github: https://github.com/jirilebl/diffyqs Contents Introduction 7 0.1 Notes about these notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0.2 Introduction to differential equations . . . . . . . . . . . . . . . . . . . . . . . 10 0.3 Classification of differential equations . . . . . . . . . . . . . . . . . . . . . . 17 1 2 3 First order equations 1.1 Integrals as solutions . . . . . . . . . . . . . 1.2 Slope fields . . . . . . . . . . . . . . . . . . . 1.3 Separable equations . . . . . . . . . . . . . . 1.4 Linear equations and the integrating factor 1.5 Substitution . . . . . . . . . . . . . . . . . . 1.6 Autonomous equations . . . . . . . . . . . . 1.7 Numerical methods: Euler’s method . . . . 1.8 Exact equations . . . . . . . . . . . . . . . . 1.9 First order linear PDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Higher order linear ODEs 2.1 Second order linear ODEs . . . . . . . . . . . . 2.2 Constant coefficient second order linear ODEs 2.3 Higher order linear ODEs . . . . . . . . . . . . 2.4 Mechanical vibrations . . . . . . . . . . . . . . 2.5 Nonhomogeneous equations . . . . . . . . . . . 2.6 Forced oscillations and resonance . . . . . . . . . . . . . . . . . . . . . . . Systems of ODEs 3.1 Introduction to systems of ODEs . . . . . . . . . 3.2 Matrices and linear systems . . . . . . . . . . . . 3.3 Linear systems of ODEs . . . . . . . . . . . . . . 3.4 Eigenvalue method . . . . . . . . . . . . . . . . . 3.5 Two-dimensional systems and their vector fields 3.6 Second order systems and applications . . . . . . 3.7 Multiple eigenvalues . . . . . . . . . . . . . . . . 3.8 Matrix exponentials . . . . . . . . . . . . . . . . . 3.9 Nonhomogeneous systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 21 27 33 40 46 51 57 63 72 . . . . . . 79 79 84 90 96 104 111 . . . . . . . . . 119 119 127 136 140 147 152 162 169 177 4 4 CONTENTS Fourier series and PDEs 4.1 Boundary value problems . . . . . . . . . . . . . . . . 4.2 The trigonometric series . . . . . . . . . . . . . . . . . 4.3 More on the Fourier series . . . . . . . . . . . . . . . . 4.4 Sine and cosine series . . . . . . . . . . . . . . . . . . . 4.5 Applications of Fourier series . . . . . . . . . . . . . . 4.6 PDEs, separation of variables, and the heat equation . 4.7 One-dimensional wave equation . . . . . . . . . . . . 4.8 D’Alembert solution of the wave equation . . . . . . . 4.9 Steady state temperature and the Laplacian . . . . . . 4.10 Dirichlet problem in the circle and the Poisson kernel . . . . . . . . . . 189 189 198 208 218 226 232 243 252 258 264 5 More on eigenvalue problems 5.1 Sturm–Liouville problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Higher order eigenvalue problems . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Steady periodic solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 273 282 286 6 The Laplace transform 6.1 The Laplace transform . . . . . . . . . . . 6.2 Transforms of derivatives and ODEs . . . 6.3 Convolution . . . . . . . . . . . . . . . . . 6.4 Dirac delta and impulse response . . . . . 6.5 Solving PDEs with the Laplace transform . . . . . 293 293 300 308 313 320 7 Power series methods 7.1 Power series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Series solutions of linear second order ODEs . . . . . . . . . . . . . . . . . . 7.3 Singular points and the method of Frobenius . . . . . . . . . . . . . . . . . . 327 327 335 342 8 Nonlinear systems 8.1 Linearization, critical points, and equilibria . . . . . 8.2 Stability and classification of isolated critical points 8.3 Applications of nonlinear systems . . . . . . . . . . 8.4 Limit cycles . . . . . . . . . . . . . . . . . . . . . . . 8.5 Chaos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 351 357 364 373 378 . . . . . . 385 385 396 407 421 428 436 A Linear algebra A.1 Vectors, mappings, and matrices . . . A.2 Matrix algebra . . . . . . . . . . . . . . A.3 Elimination . . . . . . . . . . . . . . . . A.4 Subspaces, dimension, and the kernel A.5 Inner product and projections . . . . . A.6 Determinant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTENTS 5 B Table of Laplace Transforms 443 Further Reading 445 Solutions to Selected Exercises 447 Index 461 6 CONTENTS Introduction 0.1 Notes about these notes Note: A section for the instructor. This book originated from my class notes for Math 286 at the University of Illinois at Urbana-Champaign (UIUC) in Fall 2008 and Spring 2009. It is a first course on differential equations for engineers. Using this book, I also taught Math 285 at UIUC, Math 20D at University of California, San Diego (UCSD), and Math 4233 at Oklahoma State University (OSU). Normally these courses are taught with Edwards and Penney, Differential Equations and Boundary Value Problems: Computing and Modeling [EP], or Boyce and DiPrima’s Elementary Differential Equations and Boundary Value Problems [BD], and this book aims to be more or less a drop-in replacement. Other books I used as sources of information and inspiration are E.L. Ince’s classic (and inexpensive) Ordinary Differential Equations [I], Stanley Farlow’s Differential Equations and Their Applications [F], now available from Dover, Berg and McGregor’s Elementary Partial Differential Equations [BM], and William Trench’s free book Elementary Differential Equations with Boundary Value Problems [T]. See the Further Reading chapter at the end of the book. 0.1.1 Organization The organization of this book to some degree requires chapters be done in order. Later chapters can be dropped. The dependence of the material covered is roughly: Introduction Appendix A Chapter 1 Chapter 2 Chapter 3 Chapter 8 Chapter 7 Chapter 4 Chapter 5 Chapter 6 8 INTRODUCTION There are a few references in chapters 4 and 5 to chapter 3 (some linear algebra), but these references are not essential and can be skimmed over, so chapter 3 can safely be dropped, while still covering chapters 4 and 5. Chapter 6 does not depend on chapter 4 except that the PDE section 6.5 makes a few references to chapter 4, although it could, in theory, be covered separately. The more in-depth appendix A on linear algebra can replace the short review § 3.2 for a course that combines linear algebra and ODE. 0.1.2 Typical types of courses Several typical types of courses can be run with the book. There are the two original courses at UIUC, both cover ODE as well some PDE. Either, there is the 4 hours-a-week for a semester (Math 286 at UIUC): Introduction (0.2), chapter 1 (1.1–1.7), chapter 2, chapter 3, chapter 4 (4.1–4.9), chapter 5 (or 6 or 7 or 8). Or, the second course at UIUC is at 3 hours-a-week (Math 285 at UIUC): Introduction (0.2), chapter 1 (1.1–1.7), chapter 2, chapter 4 (4.1–4.9), (and maybe chapter 5, 6, or 7). A semester-long course at 3 hours a week that doesn’t cover either systems or PDE will cover, beyond the introduction, chapter 1, chapter 2, chapter 6, and chapter 7, (with sections skipped as above). On the other hand, a typical course that covers systems will probably need to skip Laplace and power series and cover chapter 1, chapter 2, chapter 3, and chapter 8. If sections need to be skipped in the beginning, a good core of the sections on single ODE is: 0.2, 1.1–1.4, 1.6, 2.1, 2.2, 2.4–2.6. The complete book can be covered at a reasonably fast pace at approximately 76 lectures (without appendix A) or 86 lectures (with appendix A replacing § 3.2). This is not accounting for exams, review, or time spent in a computer lab. A two-quarter or a two-semester course can be easily run with the material. For example (with some sections perhaps strategically skipped): Semester 1: Introduction, chapter 1, chapter 2, chapter 6, chapter 7. Semester 2: Chapter 3, chapter 8, chapter 4, chapter 5. A combined course on ODE with linear algebra can run as: Introduction, chapter 1 (1.1–1.7), chapter 2, appendix A, chapter 3 (w/o § 3.2), (possibly chapter 8). The chapter on the Laplace transform (chapter 6), the chapter on Sturm–Liouville (chapter 5), the chapter on power series (chapter 7), and the chapter on nonlinear systems (chapter 8), are more or less interchangeable and can be treated as “topics”. If chapter 8 is covered, it may be best to place it right after chapter 3, and chapter 5 is best covered right after chapter 4. If time is short, the first two sections of chapter 7 make a reasonable self-contained unit. 0.1. NOTES ABOUT THESE NOTES 0.1.3 9 Computer resources The book’s website https://www.jirka.org/diffyqs/ contains the following resources: 1. Interactive SAGE demos. 2. Online WeBWorK homeworks (using either your own WeBWorK installation or Edfinity) for most sections, customized for this book. 3. The PDFs of the figures used in this book. I taught the UIUC courses using IODE (https://faculty.math.illinois.edu/iode/). IODE is a free software package that works with Matlab (proprietary) or Octave (free software). The graphs in the book were made with the Genius software (see https: //www.jirka.org/genius.html). I use Genius in class to show these (and other) graphs. The LATEX source of the book is also available for possible modification and customization at github (https://github.com/jirilebl/diffyqs). 0.1.4 Acknowledgments Firstly, I would like to acknowledge Rick Laugesen. I used his handwritten class notes the first time I taught Math 286. My organization of this book through chapter 5, and the choice of material covered, is heavily influenced by his notes. Many examples and computations are taken from his notes. I am also heavily indebted to Rick for all the advice he has given me, not just on teaching Math 286. For spotting errors and other suggestions, I would also like to acknowledge (in no particular order): John P. D’Angelo, Sean Raleigh, Jessica Robinson, Michael Angelini, Leonardo Gomes, Jeff Winegar, Ian Simon, Thomas Wicklund, Eliot Brenner, Sean Robinson, Jannett Susberry, Dana Al-Quadi, Cesar Alvarez, Cem Bagdatlioglu, Nathan Wong, Alison Shive, Shawn White, Wing Yip Ho, Joanne Shin, Gladys Cruz, Jonathan Gomez, Janelle Louie, Navid Froutan, Grace Victorine, Paul Pearson, Jared Teague, Ziad Adwan, Martin Weilandt, Sönmez ลahutoฤlu, Pete Peterson, Thomas Gresham, Prentiss Hyde, Jai Welch, Simon Tse, Andrew Browning, James Choi, Dusty Grundmeier, John Marriott, Jim Kruidenier, Barry Conrad, Wesley Snider, Colton Koop, Sarah Morse, Erik Boczko, Asif Shakeel, Chris Peterson, Nicholas Hu, Paul Seeburger, Jonathan McCormick, David Leep, William Meisel, Shishir Agrawal, Tom Wan, Andres Valloud, Martin Irungu, Justin Corvino, and probably others I have forgotten. Finally, I would like to acknowledge NSF grants DMS-0900885 and DMS-1362337. 10 0.2 INTRODUCTION Introduction to differential equations Note: more than 1 lecture, §1.1 in [EP], chapter 1 in [BD] 0.2.1 Differential equations The laws of physics are generally written down as differential equations. Therefore, all of science and engineering use differential equations to some degree. Understanding differential equations is essential to understanding almost anything you will study in your science and engineering classes. You can think of mathematics as the language of science, and differential equations are one of the most important parts of this language as far as science and engineering are concerned. As an analogy, suppose all your classes from now on were given in Swahili. It would be important to first learn Swahili, or you would have a very tough time getting a good grade in your classes. You saw many differential equations already without perhaps knowing about it. And you even solved simple differential equations when you took calculus. Let us see an example you may not have seen: ๐๐ฅ + ๐ฅ = 2 cos ๐ก. (1) ๐๐ก Here ๐ฅ is the dependent variable and ๐ก is the independent variable. Equation (1) is a basic example of a differential equation. It is an example of a first order differential equation, since it involves only the first derivative of the dependent variable. This equation arises from Newton’s law of cooling where the ambient temperature oscillates with time. 0.2.2 Solutions of differential equations Solving the differential equation means finding ๐ฅ in terms of ๐ก. That is, we want to find a function of ๐ก, which we call ๐ฅ, such that when we plug ๐ฅ, ๐ก, and ๐๐ฅ ๐๐ก into (1), the equation holds; that is, the left hand side equals the right hand side. It is the same idea as it would be for a normal (algebraic) equation of just ๐ฅ and ๐ก. We claim that ๐ฅ = ๐ฅ(๐ก) = cos ๐ก + sin ๐ก is a solution. How do we check? We simply plug ๐ฅ into equation (1)! First we need to ๐๐ฅ compute ๐๐ฅ ๐๐ก . We find that ๐๐ก = − sin ๐ก + cos ๐ก. Now let us compute the left-hand side of (1). ๐๐ฅ + ๐ฅ = (− sin ๐ก + cos ๐ก) + (cos ๐ก + sin ๐ก) = 2 cos ๐ก. ๐๐ก | {z } | {z } ๐๐ฅ ๐๐ก ๐ฅ Yay! We got precisely the right-hand side. But there is more! We claim ๐ฅ = cos ๐ก + sin ๐ก + ๐ −๐ก is also a solution. Let us try, ๐๐ฅ = − sin ๐ก + cos ๐ก − ๐ −๐ก . ๐๐ก 11 0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS We plug into the left-hand side of (1) ๐๐ฅ + ๐ฅ = (− sin ๐ก + cos ๐ก − ๐ −๐ก ) + (cos ๐ก + sin ๐ก + ๐ −๐ก ) = 2 cos ๐ก. ๐๐ก | {z } | {z } ๐ฅ ๐๐ฅ ๐๐ก And it works yet again! So there can be many different solutions. For this equation all solutions can be written in the form ๐ฅ = cos ๐ก + sin ๐ก + ๐ถ๐ −๐ก , for some constant ๐ถ. Different constants ๐ถ will give different solutions, so there are really infinitely many possible solutions. See Figure 1 for the graph of a few of these solutions. We will see how we find these solutions a few lectures from now. Solving differential equations can be quite hard. There is no general method that solves every differential equation. We will generally focus on how to get exact formulas for solutions of certain differential equations, but we will also spend a little bit of time on getting approximate solutions. And we will spend some time on understanding the equations without solving them. Most of this book is dedicated to ordinary differential equations or ODEs, that is, equations with only one independent variable, Figure 1: Few solutions of ๐๐ฅ ๐๐ก + ๐ฅ = 2 cos ๐ก. where derivatives are only with respect to this one variable. If there are several independent variables, we get partial differential equations or PDEs. Even for ODEs, which are very well understood, it is not a simple question of turning a crank to get answers. When you can find exact solutions, they are usually preferable to approximate solutions. It is important to understand how such solutions are found. Although in real applications you will leave much of the actual calculations to computers, you need to understand what they are doing. It is often necessary to simplify or transform your equations into something that a computer can understand and solve. You may even need to make certain assumptions and changes in your model to achieve this. To be a successful engineer or scientist, you will be required to solve problems in your job that you never saw before. It is important to learn problem solving techniques, so that you may apply those techniques to new problems. A common mistake is to expect to learn some prescription for solving all the problems you will encounter in your later career. This course is no exception. 0 1 2 3 4 5 3 3 2 2 1 1 0 0 -1 -1 0 1 2 3 4 5 12 0.2.3 INTRODUCTION Differential equations in practice So how do we use differential equations in Real-world problem science and engineering? First, we have some real-world problem we wish to understand. We abstract interpret make some simplifying assumptions and cresolve ate a mathematical model. That is, we translate Mathematical Mathematical the real-world situation into a set of differential model solution equations. Then we apply mathematics to get some sort of a mathematical solution. There is still something left to do. We have to interpret the results. We have to figure out what the mathematical solution says about the real-world problem we started with. Learning how to formulate the mathematical model and how to interpret the results is what your physics and engineering classes do. In this course, we will focus mostly on the mathematical analysis. Sometimes we will work with simple real-world examples so that we have some intuition and motivation about what we are doing. Let us look at an example of this process. One of the most basic differential equations is the standard exponential growth model. Let ๐ denote the population of some bacteria on a Petri dish. We assume that there is enough food and enough space. Then the rate of growth of bacteria is proportional to the population—a large population grows quicker. Let ๐ก denote time (say in seconds) and ๐ the population. Our model is ๐๐ = ๐๐, ๐๐ก for some positive constant ๐ > 0. Example 0.2.1: Suppose there are 100 bacteria at time 0 and 200 bacteria 10 seconds later. How many bacteria will there be 1 minute from time 0 (in 60 seconds)? First we need to solve the equation. We claim that a solution is given by 0 10 20 30 40 50 60 6000 6000 5000 5000 4000 4000 3000 3000 2000 2000 1000 1000 ๐๐ก ๐(๐ก) = ๐ถ๐ , where ๐ถ is a constant. Let us try: ๐๐ = ๐ถ ๐๐ ๐๐ก = ๐๐. ๐๐ก And it really is a solution. OK, now what? We do not know ๐ถ, and we do not know ๐. But we know something. We know ๐(0) = 100, and we know ๐(10) = 200. Let us plug these conditions in and see what happens. 0 0 0 10 20 30 40 50 60 Figure 2: Bacteria growth in the first 60 seconds. 100 = ๐(0) = ๐ถ๐ ๐0 = ๐ถ, 200 = ๐(10) = 100 ๐ ๐10 . 0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS Therefore, 2 = ๐ 10๐ or ln 2 10 13 = ๐ ≈ 0.069. So ๐(๐ก) = 100 ๐ (ln 2)๐ก/10 ≈ 100 ๐ 0.069๐ก . At one minute, ๐ก = 60, the population is ๐(60) = 6400. See Figure 2 on the preceding page. Let us talk about the interpretation of the results. Does our solution mean that there must be exactly 6400 bacteria on the plate at 60s? No! We made assumptions that might not be true exactly, just approximately. If our assumptions are reasonable, then there will be approximately 6400 bacteria. Also, in real life ๐ is a discrete quantity, not a real number. However, our model has no problem saying that for example at 61 seconds, ๐(61) ≈ 6859.35. Normally, the ๐ in ๐ 0 = ๐๐ is known, and we want to solve the equation for different initial conditions. What does that mean? Take ๐ = 1 for simplicity. Suppose we want to solve the equation ๐๐ ๐๐ก = ๐ subject to ๐(0) = 1000 (the initial condition). Then the solution turns out to be (exercise) ๐(๐ก) = 1000 ๐ ๐ก . We call ๐(๐ก) = ๐ถ๐ ๐ก the general solution, as every solution of the equation can be written in this form for some constant ๐ถ. We need an initial condition to find out what ๐ถ is, in order to find the particular solution we are looking for. Generally, when we say “particular solution,” we just mean some solution. 0.2.4 Four fundamental equations A few equations appear often and it is useful to just memorize what their solutions are. Let us call them the four fundamental equations. Their solutions are reasonably easy to guess by recalling properties of exponentials, sines, and cosines. They are also simple to check, which is something that you should always do. No need to wonder if you remembered the solution correctly. First such equation is ๐๐ฆ = ๐ ๐ฆ, ๐๐ฅ for some constant ๐ > 0. Here ๐ฆ is the dependent and ๐ฅ the independent variable. The general solution for this equation is ๐ฆ(๐ฅ) = ๐ถ๐ ๐๐ฅ . We saw above that this function is a solution, although we used different variable names. Next, ๐๐ฆ = −๐ ๐ฆ, ๐๐ฅ for some constant ๐ > 0. The general solution for this equation is ๐ฆ(๐ฅ) = ๐ถ๐ −๐๐ฅ . 14 INTRODUCTION Exercise 0.2.1: Check that the ๐ฆ given is really a solution to the equation. Next, take the second order differential equation ๐2 ๐ฆ 2 = −๐ 2 ๐ฆ, ๐๐ฅ for some constant ๐ > 0. The general solution for this equation is ๐ฆ(๐ฅ) = ๐ถ1 cos(๐๐ฅ) + ๐ถ2 sin(๐๐ฅ). Since the equation is a second order differential equation, we have two constants in our general solution. Exercise 0.2.2: Check that the ๐ฆ given is really a solution to the equation. Finally, consider the second order differential equation ๐2 ๐ฆ 2 = ๐ 2 ๐ฆ, ๐๐ฅ for some constant ๐ > 0. The general solution for this equation is ๐ฆ(๐ฅ) = ๐ถ1 ๐ ๐๐ฅ + ๐ถ2 ๐ −๐๐ฅ , or ๐ฆ(๐ฅ) = ๐ท1 cosh(๐๐ฅ) + ๐ท2 sinh(๐๐ฅ). For those that do not know, cosh and sinh are defined by ๐ ๐ฅ + ๐ −๐ฅ ๐ ๐ฅ − ๐ −๐ฅ , sinh ๐ฅ = . 2 2 They are called the hyperbolic cosine and hyperbolic sine. These functions are sometimes easier to work with than exponentials. They have some nice familiar properties such as ๐ ๐ cosh 0 = 1, sinh 0 = 0, and ๐๐ฅ cosh ๐ฅ = sinh ๐ฅ (no that is not a typo) and ๐๐ฅ sinh ๐ฅ = cosh ๐ฅ. cosh ๐ฅ = Exercise 0.2.3: Check that both forms of the ๐ฆ given are really solutions to the equation. Example 0.2.2: In equations of higher order, you get more constants you must solve for ๐2 ๐ฆ to get a particular solution. The equation ๐๐ฅ 2 = 0 has the general solution ๐ฆ = ๐ถ1 ๐ฅ + ๐ถ2 ; simply integrate twice and don’t forget about the constant of integration. Consider the initial conditions ๐ฆ(0) = 2 and ๐ฆ 0(0) = 3. We plug in our general solution and solve for the constants: 2 = ๐ฆ(0) = ๐ถ1 · 0 + ๐ถ2 = ๐ถ2 , 3 = ๐ฆ 0(0) = ๐ถ1 . In other words, ๐ฆ = 3๐ฅ + 2 is the particular solution we seek. An interesting note about cosh: The graph of cosh is the exact shape of a hanging chain. This shape is called a catenary. Contrary to popular belief this is not a parabola. If you invert the graph of cosh, it is also the ideal arch for supporting its weight. For example, the gateway arch in Saint Louis is an inverted graph of cosh—if it were just a parabola it might fall. The formula used in the design is inscribed inside the arch: ๐ฆ = −127.7 ft · cosh(๐ฅ/127.7 ft) + 757.7 ft. 15 0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS 0.2.5 Exercises Exercise 0.2.4: Show that ๐ฅ = ๐ 4๐ก is a solution to ๐ฅ 000 − 12๐ฅ 00 + 48๐ฅ 0 − 64๐ฅ = 0. Exercise 0.2.5: Show that ๐ฅ = ๐ ๐ก is not a solution to ๐ฅ 000 − 12๐ฅ 00 + 48๐ฅ 0 − 64๐ฅ = 0. Exercise 0.2.6: Is ๐ฆ = sin ๐ก a solution to 2 ๐๐ฆ ๐๐ก = 1 − ๐ฆ 2 ? Justify. Exercise 0.2.7: Let ๐ฆ 00 + 2๐ฆ 0 − 8๐ฆ = 0. Now try a solution of the form ๐ฆ = ๐ ๐๐ฅ for some (unknown) constant ๐. Is this a solution for some ๐? If so, find all such ๐. Exercise 0.2.8: Verify that ๐ฅ = ๐ถ๐ −2๐ก is a solution to ๐ฅ 0 = −2๐ฅ. Find ๐ถ to solve for the initial condition ๐ฅ(0) = 100. Exercise 0.2.9: Verify that ๐ฅ = ๐ถ1 ๐ −๐ก + ๐ถ2 ๐ 2๐ก is a solution to ๐ฅ 00 − ๐ฅ 0 − 2๐ฅ = 0. Find ๐ถ1 and ๐ถ2 to solve for the initial conditions ๐ฅ(0) = 10 and ๐ฅ 0(0) = 0. Exercise 0.2.10: Find a solution to (๐ฅ 0)2 + ๐ฅ 2 = 4 using your knowledge of derivatives of functions that you know from basic calculus. Exercise 0.2.11: Solve: a) ๐๐ด = −10๐ด, ๐๐ก ๐2 ๐ฆ c) = 4๐ฆ, ๐๐ฅ 2 ๐ด(0) = 5 ๐ฆ(0) = 0, b) ๐ฆ 0(0) =1 ๐๐ป = 3๐ป, ๐๐ฅ ๐ป(0) = 1 ๐2 ๐ฅ d) = −9๐ฅ, ๐๐ฆ 2 ๐ฅ(0) = 1, ๐ฅ 0(0) = 0 Exercise 0.2.12: Is there a solution to ๐ฆ 0 = ๐ฆ, such that ๐ฆ(0) = ๐ฆ(1)? Exercise 0.2.13: The population of city X was 100 thousand 20 years ago, and the population of city X was 120 thousand 10 years ago. Assuming constant growth, you can use the exponential population model (like for the bacteria). What do you estimate the population is now? Exercise 0.2.14: Suppose that a football coach gets a salary of one million dollars now, and a raise of 10% every year (so exponential model, like population of bacteria). Let ๐ be the salary in millions of dollars, and ๐ก is time in years. a) What is ๐ (0) and ๐ (1). b) Approximately how many years will it take for the salary to be 10 million. c) Approximately how many years will it take for the salary to be 20 million. d) Approximately how many years will it take for the salary to be 30 million. Note: Exercises with numbers 101 and higher have solutions in the back of the book. Exercise 0.2.101: Show that ๐ฅ = ๐ −2๐ก is a solution to ๐ฅ 00 + 4๐ฅ 0 + 4๐ฅ = 0. Exercise 0.2.102: Is ๐ฆ = ๐ฅ 2 a solution to ๐ฅ 2 ๐ฆ 00 − 2๐ฆ = 0? Justify. 16 INTRODUCTION Exercise 0.2.103: Let ๐ฅ๐ฆ 00 − ๐ฆ 0 = 0. Try a solution of the form ๐ฆ = ๐ฅ ๐ . Is this a solution for some ๐? If so, find all such ๐. Exercise 0.2.104: Verify that ๐ฅ = ๐ถ1 ๐ ๐ก + ๐ถ2 is a solution to ๐ฅ 00 − ๐ฅ 0 = 0. Find ๐ถ1 and ๐ถ2 so that ๐ฅ satisfies ๐ฅ(0) = 10 and ๐ฅ 0(0) = 100. Exercise 0.2.105: Solve ๐๐ ๐๐ = 8๐ and ๐(0) = −9. Exercise 0.2.106: Solve: a) ๐๐ฅ = −4๐ฅ, ๐๐ก c) ๐๐ = 3๐, ๐๐ ๐ฅ(0) = 9 ๐(0) = 4 b) ๐2 ๐ฅ = −4๐ฅ, ๐๐ก 2 d) ๐ 2๐ = 4๐, ๐๐ฅ 2 ๐ฅ(0) = 1, ๐(0) = 0, ๐ฅ 0(0) = 2 ๐ 0(0) = 6 0.3. CLASSIFICATION OF DIFFERENTIAL EQUATIONS 0.3 17 Classification of differential equations Note: less than 1 lecture or left as reading, §1.3 in [BD] There are many types of differential equations, and we classify them into different categories based on their properties. Let us quickly go over the most basic classification. We already saw the distinction between ordinary and partial differential equations: • Ordinary differential equations or (ODE) are equations where the derivatives are taken with respect to only one variable. That is, there is only one independent variable. • Partial differential equations or (PDE) are equations that depend on partial derivatives of several variables. That is, there are several independent variables. Let us see some examples of ordinary differential equations: ๐๐ฆ = ๐ ๐ฆ, ๐๐ก ๐๐ฆ = ๐(๐ด − ๐ฆ), ๐๐ก ๐2 ๐ฅ ๐๐ฅ + ๐๐ฅ = ๐ (๐ก). ๐ 2 +๐ ๐๐ก ๐๐ก (Exponential growth) (Newton’s law of cooling) (Mechanical vibrations) And of partial differential equations: ๐๐ฆ ๐๐ฆ +๐ = 0, ๐๐ก ๐๐ฅ ๐๐ข ๐2 ๐ข , = ๐๐ก ๐๐ฅ 2 ๐2 ๐ข ๐2 ๐ข ๐2 ๐ข = + . ๐๐ก 2 ๐๐ฅ 2 ๐๐ฆ 2 (Transport equation) (Heat equation) (Wave equation in 2 dimensions) If there are several equations working together, we have a so-called system of differential equations. For example, ๐ฆ 0 = ๐ฅ, ๐ฅ0 = ๐ฆ is a simple system of ordinary differential equations. Maxwell’s equations for electromagnetics, ® = ๐, ∇·๐ท ∇ · ๐ต® = 0, ๐ ๐ต® ∇ × ๐ธ® = − , ๐๐ก ® ® = ®๐ฝ + ๐ ๐ท , ∇×๐ป ๐๐ก are a system of partial differential equations. The divergence operator ∇· and the curl operator ∇× can be written out in partial derivatives of the functions involved in the ๐ฅ, ๐ฆ, and ๐ง variables. 18 INTRODUCTION The next bit of information is the order of the equation (or system). The order is simply the order of the largest derivative that appears. If the highest derivative that appears is the first derivative, the equation is of first order. If the highest derivative that appears is the second derivative, then the equation is of second order. For example, Newton’s law of cooling above is a first order equation, while the mechanical vibrations equation is a second order equation. The equation governing transversal vibrations in a beam, ๐4 ๐4 ๐ฆ ๐2 ๐ฆ + = 0, ๐๐ฅ 4 ๐๐ก 2 is a fourth order partial differential equation. It is fourth order as at least one derivative is the fourth derivative. It does not matter that the derivative in ๐ก is only of second order. In the first chapter, we will start attacking first order ordinary differential equations, ๐๐ฆ that is, equations of the form ๐๐ฅ = ๐ (๐ฅ, ๐ฆ). In general, lower order equations are easier to work with and have simpler behavior, which is why we start with them. We also distinguish how the dependent variables appear in the equation (or system). In particular, we say an equation is linear if the dependent variable (or variables) and their derivatives appear linearly, that is only as first powers, they are not multiplied together, and no other functions of the dependent variables appear. In other words, the equation is a sum of terms, where each term is some function of the independent variables or some function of the independent variables multiplied by a dependent variable or its derivative. Otherwise, the equation is called nonlinear. For example, an ordinary differential equation is linear if it can be put into the form ๐๐ ๐ฆ ๐ ๐−1 ๐ฆ ๐๐ฆ ๐ ๐ (๐ฅ) ๐ + ๐ ๐−1 (๐ฅ) ๐−1 + · · · + ๐ 1 (๐ฅ) + ๐ 0 (๐ฅ)๐ฆ = ๐(๐ฅ). ๐๐ฅ ๐๐ฅ ๐๐ฅ (2) The functions ๐ 0 , ๐ 1 , . . . , ๐ ๐ are called the coefficients. The equation is allowed to depend arbitrarily on the independent variable. So ๐๐ฅ ๐2 ๐ฆ ๐๐ฆ 1 2 + sin(๐ฅ) + ๐ฅ ๐ฆ = ๐๐ฅ ๐ฅ ๐๐ฅ 2 (3) is still a linear equation as ๐ฆ and its derivatives only appear linearly. All the equations and systems above as examples are linear. It may not be immediately obvious for Maxwell’s equations unless you write out the divergence and curl in terms of partial derivatives. Let us see some nonlinear equations. For example Burger’s equation, ๐๐ฆ ๐๐ฆ ๐2 ๐ฆ +๐ฆ = ๐ 2, ๐๐ก ๐๐ฅ ๐๐ฅ is a nonlinear second order partial differential equation. It is nonlinear because ๐ฆ and are multiplied together. The equation ๐๐ฅ = ๐ฅ2 ๐๐ก ๐๐ฆ ๐๐ฅ (4) 0.3. CLASSIFICATION OF DIFFERENTIAL EQUATIONS 19 is a nonlinear first order differential equation as there is a second power of the dependent variable ๐ฅ. A linear equation may further be called homogeneous if all terms depend on the dependent variable. That is, if no term is a function of the independent variables alone. Otherwise, the equation is called nonhomogeneous or inhomogeneous. For example, the exponential growth equation, the wave equation, or the transport equation above are homogeneous. The mechanical vibrations equation above is nonhomogeneous as long as ๐ (๐ก) is not the zero function. Similarly, if the ambient temperature ๐ด is nonzero, Newton’s law of cooling is nonhomogeneous. A homogeneous linear ODE can be put into the form ๐๐ ๐ฆ ๐ ๐−1 ๐ฆ ๐๐ฆ ๐ ๐ (๐ฅ) ๐ + ๐ ๐−1 (๐ฅ) ๐−1 + · · · + ๐ 1 (๐ฅ) + ๐ 0 (๐ฅ)๐ฆ = 0. ๐๐ฅ ๐๐ฅ ๐๐ฅ Compare to (2) and notice there is no function ๐(๐ฅ). If the coefficients of a linear equation are actually constant functions, then the equation is said to have constant coefficients. The coefficients are the functions multiplying the dependent variable(s) or one of its derivatives, not the function ๐(๐ฅ) standing alone. A constant coefficient nonhomogeneous ODE is an equation of the form ๐๐ ๐ฆ ๐ ๐−1 ๐ฆ ๐๐ฆ + ๐ 0 ๐ฆ = ๐(๐ฅ), ๐ ๐ ๐ + ๐ ๐−1 ๐−1 + · · · + ๐1 ๐๐ฅ ๐๐ฅ ๐๐ฅ where ๐ 0 , ๐1 , . . . , ๐ ๐ are all constants, but ๐ may depend on the independent variable ๐ฅ. The mechanical vibrations equation above is a constant coefficient nonhomogeneous second order ODE. The same nomenclature applies to PDEs, so the transport equation, heat equation and wave equation are all examples of constant coefficient linear PDEs. Finally, an equation (or system) is called autonomous if the equation does not depend on the independent variable. For autonomous ordinary differential equations, the independent variable is then thought of as time. Autonomous equation means an equation that does not change with time. For example, Newton’s law of cooling is autonomous, so is equation (4). On the other hand, mechanical vibrations or (3) are not autonomous. 0.3.1 Exercises Exercise 0.3.1: Classify the following equations. Are they ODE or PDE? Is it an equation or a system? What is the order? Is it linear or nonlinear, and if it is linear, is it homogeneous, constant coefficient? If it is an ODE, is it autonomous? a) sin(๐ก) ๐2 ๐ฅ + cos(๐ก)๐ฅ = ๐ก 2 ๐๐ก 2 c) ๐ฆ 00 + 3๐ฆ + 5๐ฅ = 0, e) ๐ฅ 00 + ๐ก๐ฅ 2 = ๐ก ๐ฅ 00 + ๐ฅ − ๐ฆ = 0 b) ๐๐ข ๐๐ข +3 = ๐ฅ๐ฆ ๐๐ฅ ๐๐ฆ d) ๐2 ๐ข ๐2 ๐ข + ๐ข =0 ๐๐ก 2 ๐๐ 2 f) ๐4 ๐ฅ =0 ๐๐ก 4 20 INTRODUCTION Exercise 0.3.2: If ๐ข® = (๐ข1 , ๐ข2 , ๐ข3 ) is a vector, we have the divergence ∇ · ๐ข® = curl ∇ × ๐ข® = ๐๐ข3 ๐๐ฆ − ๐๐ข2 ๐๐ข1 , ๐๐ง ๐๐ง − ๐๐ข3 ๐๐ข2 , ๐๐ฅ ๐๐ฅ − ๐๐ข1 ๐๐ฆ ๐๐ข1 ๐๐ฅ + ๐๐ข2 ๐๐ฆ + ๐๐ข3 ๐๐ง and . Notice that curl of a vector is still a vector. Write out Maxwell’s equations in terms of partial derivatives and classify the system. Exercise 0.3.3: Suppose ๐น is a linear function, that is, ๐น(๐ฅ, ๐ฆ) = ๐๐ฅ + ๐๐ฆ for constants ๐ and ๐. What is the classification of equations of the form ๐น(๐ฆ 0 , ๐ฆ) = 0. Exercise 0.3.4: Write down an explicit example of a third order, linear, nonconstant coefficient, nonautonomous, nonhomogeneous system of two ODE such that every derivative that could appear, does appear. Exercise 0.3.101: Classify the following equations. Are they ODE or PDE? Is it an equation or a system? What is the order? Is it linear or nonlinear, and if it is linear, is it homogeneous, constant coefficient? If it is an ODE, is it autonomous? a) ๐2 ๐ฃ ๐2 ๐ฃ + 3 = sin(๐ฅ) ๐๐ฅ 2 ๐๐ฆ 2 b) c) ๐7 ๐น = 3๐น(๐ฅ) ๐๐ฅ 7 d) ๐ฆ 00 + 8๐ฆ 0 = 1 00 0 e) ๐ฅ + ๐ก ๐ฆ๐ฅ = 0, 00 ๐ฆ + ๐ก๐ฅ๐ฆ = 0 ๐๐ฅ + cos(๐ก)๐ฅ = ๐ก 2 + ๐ก + 1 ๐๐ก ๐๐ข ๐2 ๐ข f) = 2 + ๐ข2 ๐๐ก ๐๐ Exercise 0.3.102: Write down the general zeroth order linear ordinary differential equation. Write down the general solution. Exercise 0.3.103: For which ๐ is ๐๐ฅ ๐๐ก + ๐ฅ ๐ = ๐ก ๐+2 linear. Hint: there are two answers. Chapter 1 First order equations 1.1 Integrals as solutions Note: 1 lecture (or less), §1.2 in [EP], covered in §1.2 and §2.1 in [BD] A first order ODE is an equation of the form ๐๐ฆ = ๐ (๐ฅ, ๐ฆ), ๐๐ฅ or just ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ). In general, there is no simple formula or procedure one can follow to find solutions. In the next few lectures we will look at special cases where solutions are not difficult to obtain. In this section, let us assume that ๐ is a function of ๐ฅ alone, that is, the equation is ๐ฆ 0 = ๐ (๐ฅ). (1.1) We could just integrate (antidifferentiate) both sides with respect to ๐ฅ. ∫ 0 ๐ฆ (๐ฅ) ๐๐ฅ = that is ๐ฆ(๐ฅ) = ∫ ∫ ๐ (๐ฅ) ๐๐ฅ + ๐ถ, ๐ (๐ฅ) ๐๐ฅ + ๐ถ. This ๐ฆ(๐ฅ) is actually the general solution. So to solve (1.1), we find some antiderivative of ๐ (๐ฅ) and then we add an arbitrary constant to get the general solution. Now is a good time to discuss a point about calculus notation and terminology. Calculus textbooks muddy the waters by talking about the integral as primarily the so-called indefinite integral. The indefinite integral is really the antiderivative (in fact the whole one-parameter family of antiderivatives). There really exists only one integral and that is the definite integral. The only reason for the indefinite integral notation is that we 22 CHAPTER 1. FIRST ORDER EQUATIONS can always write an antiderivative as a (definite) integral. That is, by the fundamental ∫ theorem of calculus we can always write ๐ (๐ฅ) ๐๐ฅ + ๐ถ as ∫ ๐ฅ ๐ (๐ก) ๐๐ก + ๐ถ. ๐ฅ0 Hence the terminology to integrate when we may really mean to antidifferentiate. Integration is just one way to compute the antiderivative (and it is a way that always works, see the following examples). Integration is defined as the area under the graph, it only happens to also compute antiderivatives. For sake of consistency, we will keep using the indefinite integral notation when we want an antiderivative, and you should always think of the definite integral as a way to write it. Example 1.1.1: Find the general solution of ๐ฆ 0 = 3๐ฅ 2 . Elementary calculus tells us that the general solution must be ๐ฆ = ๐ฅ 3 + ๐ถ. Let us check by differentiating: ๐ฆ 0 = 3๐ฅ 2 . We got precisely our equation back. Normally, we also have an initial condition such as ๐ฆ(๐ฅ0 ) = ๐ฆ0 for some two numbers ๐ฅ0 and ๐ฆ0 (๐ฅ0 is usually 0, but not always). We can then write the solution as a definite integral in a nice way. Suppose our problem is ๐ฆ 0 = ๐ (๐ฅ), ๐ฆ(๐ฅ0 ) = ๐ฆ0 . Then the solution is ๐ฆ(๐ฅ) = ๐ฅ ∫ ๐ (๐ ) ๐๐ + ๐ฆ0 . ๐ฅ0 (1.2) Let us check! We compute ๐ฆ 0 = ๐ (๐ฅ), via the fundamental theorem of calculus, and ∫by๐ฅ0 Jupiter, ๐ฆ is a solution. Is it the one satisfying the initial condition? Well, ๐ฆ(๐ฅ0 ) = ๐ (๐ฅ) ๐๐ฅ + ๐ฆ0 = ๐ฆ0 . It is! ๐ฅ0 Do note that the definite integral and the indefinite integral (antidifferentiation) are completely different beasts. The definite integral always evaluates to a number. Therefore, (1.2) is a formula we can plug into the calculator or a computer, and it will be happy to calculate specific values for us. We will easily be able to plot the solution and work with it just like with any other function. It is not so crucial to always find a closed form for the antiderivative. Example 1.1.2: Solve 2 ๐ฆ 0 = ๐ −๐ฅ , ๐ฆ(0) = 1. By the preceding discussion, the solution must be ๐ฆ(๐ฅ) = ∫ ๐ฅ 2 ๐ −๐ ๐๐ + 1. 0 Here is a good way to make fun of your friends taking second semester calculus. Tell them to find the closed form solution. Ha ha ha (bad math joke). It is not possible (in closed form). There is absolutely nothing wrong with writing the solution as a definite integral. This particular integral is in fact very important in statistics. 23 1.1. INTEGRALS AS SOLUTIONS Using this method, we can also solve equations of the form ๐ฆ 0 = ๐ (๐ฆ). Let us write the equation in Leibniz notation. ๐๐ฆ = ๐ (๐ฆ). ๐๐ฅ Now we use the inverse function theorem from calculus to switch the roles of ๐ฅ and ๐ฆ to obtain ๐๐ฅ 1 = . ๐๐ฆ ๐ (๐ฆ) What we are doing seems like algebra with ๐๐ฅ and ๐๐ฆ. It is tempting to just do algebra with ๐๐ฅ and ๐๐ฆ as if they were numbers. And in this case it does work. Be careful, however, as this sort of hand-waving calculation can lead to trouble, especially when more than one independent variable is involved. At this point, we can simply integrate, ๐ฅ(๐ฆ) = ∫ 1 ๐๐ฆ + ๐ถ. ๐ (๐ฆ) Finally, we try to solve for ๐ฆ. Example 1.1.3: Previously, we guessed ๐ฆ 0 = ๐ ๐ฆ (for some ๐ > 0) has the solution ๐ฆ = ๐ถ๐ ๐๐ฅ . We can now find the solution without guessing. First we note that ๐ฆ = 0 is a solution. Henceforth, we assume ๐ฆ ≠ 0. We write 1 ๐๐ฅ = . ๐๐ฆ ๐๐ฆ We integrate to obtain 1 ln |๐ฆ| + ๐ท, ๐ where ๐ท is an arbitrary constant. Now we solve for ๐ฆ (actually for |๐ฆ|). ๐ฅ(๐ฆ) = ๐ฅ = |๐ฆ| = ๐ ๐๐ฅ−๐๐ท = ๐ −๐๐ท ๐ ๐๐ฅ . If we replace ๐ −๐๐ท with an arbitrary constant ๐ถ, we can get rid of the absolute value bars (which we can do as ๐ท was arbitrary). In this way, we also incorporate the solution ๐ฆ = 0. We get the same general solution as we guessed before, ๐ฆ = ๐ถ๐ ๐๐ฅ . Example 1.1.4: Find the general solution of ๐ฆ 0 = ๐ฆ 2 . First we note that ๐ฆ = 0 is a solution. We can now assume that ๐ฆ ≠ 0. Write ๐๐ฅ 1 = 2. ๐๐ฆ ๐ฆ 24 CHAPTER 1. FIRST ORDER EQUATIONS We integrate to get ๐ฅ= We solve for ๐ฆ = 1 ๐ถ−๐ฅ . −1 + ๐ถ. ๐ฆ So the general solution is ๐ฆ= 1 ๐ถ−๐ฅ ๐ฆ = 0. or Note the singularities of the solution. If for example ๐ถ = 1, then the solution “blows up” as we approach ๐ฅ = 1. See Figure 1.1. Generally, it is hard to tell from just looking at the equation itself how the solution is going to behave. The equation ๐ฆ 0 = ๐ฆ 2 is very nice and defined everywhere, but the solution is only defined on some interval (−∞, ๐ถ) or (๐ถ, ∞). Usually when this happens we only consider one of these the solution. For example if 1 we impose a condition ๐ฆ(0) = 1, then the solution is ๐ฆ = 1−๐ฅ , and we would consider this solution only for ๐ฅ on the interval (−∞, 1). In the figure, it is the left side of the graph. -3 -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 Figure 1.1: Plot of ๐ฆ = 2 3 1 1−๐ฅ . Classical problems leading to differential equations solvable by integration are problems dealing with velocity, acceleration and distance. You have surely seen these problems before in your calculus class. Example 1.1.5: Suppose a car drives at a speed ๐ ๐ก/2 meters per second, where ๐ก is time in seconds. How far did the car get in 2 seconds (starting at ๐ก = 0)? How far in 10 seconds? Let ๐ฅ denote the distance the car traveled. The equation is ๐ฅ 0 = ๐ ๐ก/2 . We just integrate this equation to get that ๐ฅ(๐ก) = 2๐ ๐ก/2 + ๐ถ. 25 1.1. INTEGRALS AS SOLUTIONS We still need to figure out ๐ถ. We know that when ๐ก = 0, then ๐ฅ = 0. That is, ๐ฅ(0) = 0. So 0 = ๐ฅ(0) = 2๐ 0/2 + ๐ถ = 2 + ๐ถ. Thus ๐ถ = −2 and ๐ฅ(๐ก) = 2๐ ๐ก/2 − 2. Now we just plug in to get where the car is at 2 and at 10 seconds. We obtain ๐ฅ(2) = 2๐ 2/2 − 2 ≈ 3.44 meters, ๐ฅ(10) = 2๐ 10/2 − 2 ≈ 294 meters. Example 1.1.6: Suppose that the car accelerates at a rate of ๐ก 2 m/s2 . At time ๐ก = 0 the car is at the 1 meter mark and is traveling at 10 m/s. Where is the car at time ๐ก = 10? Well this is actually a second order problem. If ๐ฅ is the distance traveled, then ๐ฅ 0 is the velocity, and ๐ฅ 00 is the acceleration. The equation with initial conditions is ๐ฅ 00 = ๐ก 2 , ๐ฅ(0) = 1, ๐ฅ 0(0) = 10. What if we say ๐ฅ 0 = ๐ฃ. Then we have the problem ๐ฃ0 = ๐ก 2 , ๐ฃ(0) = 10. Once we solve for ๐ฃ, we can integrate and find ๐ฅ. Exercise 1.1.1: Solve for ๐ฃ, and then solve for ๐ฅ. Find ๐ฅ(10) to answer the question. 1.1.1 Exercises Exercise 1.1.2: Solve ๐๐ฆ ๐๐ฅ = ๐ฅ 2 + ๐ฅ for ๐ฆ(1) = 3. Exercise 1.1.3: Solve ๐๐ฆ ๐๐ฅ = sin(5๐ฅ) for ๐ฆ(0) = 2. Exercise 1.1.4: Solve ๐๐ฆ ๐๐ฅ = 1 ๐ฅ 2 −1 for ๐ฆ(0) = 0. Exercise 1.1.5: Solve ๐ฆ 0 = ๐ฆ 3 for ๐ฆ(0) = 1. Exercise 1.1.6 (little harder): Solve ๐ฆ 0 = (๐ฆ − 1)(๐ฆ + 1) for ๐ฆ(0) = 3. Exercise 1.1.7: Solve ๐๐ฆ ๐๐ฅ = 1 ๐ฆ+1 for ๐ฆ(0) = 0. Exercise 1.1.8 (harder): Solve ๐ฆ 00 = sin ๐ฅ for ๐ฆ(0) = 0, ๐ฆ 0(0) = 2. Exercise 1.1.9: A spaceship is traveling at the speed 2๐ก 2 + 1 km/s (๐ก is time in seconds). It is pointing directly away from earth and at time ๐ก = 0 it is 1000 kilometers from earth. How far from earth is it at one minute from time ๐ก = 0? Exercise 1.1.10: Solve integral. ๐๐ฅ ๐๐ก = sin(๐ก 2 ) + ๐ก, ๐ฅ(0) = 20. It is OK to leave your answer as a definite 26 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.1.11: A dropped ball accelerates downwards at a constant rate 9.8 meters per second squared. Set up the differential equation for the height above ground โ in meters. Then supposing โ(0) = 100 meters, how long does it take for the ball to hit the ground. Exercise 1.1.12: Find the general solution of ๐ฆ 0 = ๐ ๐ฅ , and then ๐ฆ 0 = ๐ ๐ฆ . Exercise 1.1.101: Solve ๐๐ฆ ๐๐ฅ = ๐ ๐ฅ + ๐ฅ and ๐ฆ(0) = 10. Exercise 1.1.102: Solve ๐ฅ 0 = 1 , ๐ฅ2 ๐ฅ(1) = 1. Exercise 1.1.103: Solve ๐ฅ 0 = 1 , cos(๐ฅ) ๐ฅ(0) = ๐4 . Exercise 1.1.104: Sid is in a car traveling at speed 10๐ก + 70 miles per hour away from Las Vegas, where ๐ก is in hours. At ๐ก = 0, Sid is 10 miles away from Vegas. How far from Vegas is Sid 2 hours later? Exercise 1.1.105: Solve ๐ฆ 0 = ๐ฆ ๐ , ๐ฆ(0) = 1, where ๐ is a positive integer. Hint: You have to consider different cases. Exercise 1.1.106: The rate of change of the volume of a snowball that is melting is proportional to the surface area of the snowball. Suppose the snowball is perfectly spherical. The volume (in centimeters cubed) of a ball of radius ๐ centimeters is (4/3)๐๐ 3 . The surface area is 4๐๐ 2 . Set up the differential equation for how the radius ๐ is changing. Then, suppose that at time ๐ก = 0 minutes, the radius is 10 centimeters. After 5 minutes, the radius is 8 centimeters. At what time ๐ก will the snowball be completely melted? Exercise 1.1.107: Find the general solution to ๐ฆ 0000 = 0. How many distinct constants do you need? 27 1.2. SLOPE FIELDS 1.2 Slope fields Note: 1 lecture, §1.3 in [EP], §1.1 in [BD] As we said, the general first order equation we are studying looks like ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ). A lot of the time, we cannot simply solve these kinds of equations explicitly. It would be nice if we could at least figure out the shape and behavior of the solutions, or find approximate solutions. 1.2.1 Slope fields The equation ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ) gives you a slope at each point in the (๐ฅ, ๐ฆ)-plane. And this is the slope a solution ๐ฆ(๐ฅ) would have at ๐ฅ if its value was ๐ฆ. In other words, ๐ (๐ฅ, ๐ฆ) is the slope of a solution whose graph runs through the point (๐ฅ, ๐ฆ). At a point (๐ฅ, ๐ฆ), we plot a short line with the slope ๐ (๐ฅ, ๐ฆ). For example, if ๐ (๐ฅ, ๐ฆ) = ๐ฅ๐ฆ, then at point (2, 1.5) we draw a short line of slope ๐ฅ๐ฆ = 2 × 1.5 = 3. So, if ๐ฆ(๐ฅ) is a solution and ๐ฆ(2) = 1.5, then the equation mandates that ๐ฆ 0(2) = 3. See Figure 1.2. -3 -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 2 3 Figure 1.2: The slope ๐ฆ 0 = ๐ฅ ๐ฆ at (2, 1.5). To get an idea of how solutions behave, we draw such lines at lots of points in the plane, not just the point (2, 1.5). We would ideally want to see the slope at every point, but that is just not possible. Usually we pick a grid of points fine enough so that it shows the behavior, but not too fine so that we can still recognize the individual lines. We call this picture the slope field of the equation. See Figure 1.3 on the following page for the slope field of the equation ๐ฆ 0 = ๐ฅ๐ฆ. Usually in practice, one does not do this by hand, but has a computer do the drawing. 28 CHAPTER 1. FIRST ORDER EQUATIONS Suppose we are given a specific initial condition ๐ฆ(๐ฅ0 ) = ๐ฆ0 . A solution, that is, the graph of the solution, would be a curve that follows the slopes we drew. For a few sample solutions, see Figure 1.4. It is easy to roughly sketch (or at least imagine) possible solutions in the slope field, just from looking at the slope field itself. You simply sketch a line that roughly fits the little line segments and goes through your initial condition. -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 3 Figure 1.3: Slope field of ๐ฆ 0 = ๐ฅ๐ฆ. -3 -3 -2 -1 0 1 2 3 Figure 1.4: Slope field of ๐ฆ 0 = ๐ฅ ๐ฆ with a graph of solutions satisfying ๐ฆ(0) = 0.2, ๐ฆ(0) = 0, and ๐ฆ(0) = −0.2. By looking at the slope field we get a lot of information about the behavior of solutions without having to solve the equation. For example, in Figure 1.4 we see what the solutions do when the initial conditions are ๐ฆ(0) > 0, ๐ฆ(0) = 0 and ๐ฆ(0) < 0. A small change in the initial condition causes quite different behavior. We see this behavior just from the slope field and imagining what solutions ought to do. We see a different behavior for the equation ๐ฆ 0 = −๐ฆ. The slope field and a few solutions is in see Figure 1.5 on the next page. If we think of moving from left to right (perhaps ๐ฅ is time and time is usually increasing), then we see that no matter what ๐ฆ(0) is, all solutions tend to zero as ๐ฅ tends to infinity. Again that behavior is clear from simply looking at the slope field itself. 1.2.2 Existence and uniqueness We wish to ask two fundamental questions about the problem ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ), (i) Does a solution exist? (ii) Is the solution unique (if it exists)? ๐ฆ(๐ฅ0 ) = ๐ฆ0 . 29 1.2. SLOPE FIELDS -3 -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 2 3 Figure 1.5: Slope field of ๐ฆ 0 = −๐ฆ with a graph of a few solutions. What do you think is the answer? The answer seems to be yes to both does it not? Well, pretty much. But there are cases when the answer to either question can be no. Since generally the equations we encounter in applications come from real life situations, it seems logical that a solution always exists. It also has to be unique if we believe our universe is deterministic. If the solution does not exist, or if it is not unique, we have probably not devised the correct model. Hence, it is good to know when things go wrong and why. Example 1.2.1: Attempt to solve: ๐ฆ0 = 1 , ๐ฅ ๐ฆ(0) = 0. Integrate to find the general solution ๐ฆ = ln |๐ฅ| + ๐ถ. The solution does not exist at ๐ฅ = 0. See Figure 1.6 on the following page. The equation may have been written as the seemingly harmless ๐ฅ๐ฆ 0 = 1. Example 1.2.2: Solve: 0 q ๐ฆ = 2 |๐ฆ|, ๐ฆ(0) = 0. See Figure 1.7 on the next page. Note that ๐ฆ = 0 is a solution. But another solution is the function ( ๐ฅ2 if ๐ฅ ≥ 0, ๐ฆ(๐ฅ) = −๐ฅ 2 if ๐ฅ < 0. It is hard to tell by staring at the slope field that the solution is not unique. Is there any hope? Of course there is. We have the following theorem, known as Picard’s theorem∗ . ∗ Named after the French mathematician Charles Émile Picard (1856–1941) 30 CHAPTER 1. FIRST ORDER EQUATIONS -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 3 -3 -3 Figure 1.6: Slope field of ๐ฆ 0 = 1/๐ฅ . -2 -1 0 1 2 3 Figure 1.7: Slope field of ๐ฆ 0 = 2 |๐ฆ| with two solutions satisfying ๐ฆ(0) = 0. p Theorem 1.2.1 (Picard’s theorem on existence and uniqueness). If ๐ (๐ฅ, ๐ฆ) is continuous (as a ๐๐ function of two variables) and ๐๐ฆ exists and is continuous near some (๐ฅ0 , ๐ฆ0 ), then a solution to ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ(๐ฅ0 ) = ๐ฆ0 , exists (at least for ๐ฅ in some small interval) and is unique. Note that the problems ๐ฆ 0 = 1/๐ฅ , ๐ฆ(0) = 0 and ๐ฆ 0 = 2 |๐ฆ|, ๐ฆ(0) = 0 do not satisfy the hypothesis of the theorem. Even if we can use the theorem, we ought to be careful about this existence business. It is quite possible that the solution only exists for a short while. p Example 1.2.3: For some constant ๐ด, solve: ๐ฆ0 = ๐ฆ 2 , ๐ฆ(0) = ๐ด. We know how to solve this equation. First assume that ๐ด ≠ 0, so ๐ฆ is not equal to zero at 1 least for some ๐ฅ near 0. So ๐ฅ 0 = 1/๐ฆ 2 , so ๐ฅ = −1/๐ฆ + ๐ถ, so ๐ฆ = ๐ถ−๐ฅ . If ๐ฆ(0) = ๐ด, then ๐ถ = 1/๐ด so ๐ฆ= 1 . 1/๐ด − ๐ฅ If ๐ด = 0, then ๐ฆ = 0 is a solution. For example, when ๐ด = 1 the solution “blows up” at ๐ฅ = 1. Hence, the solution does not exist for all ๐ฅ even if the equation is nice everywhere. The equation ๐ฆ 0 = ๐ฆ 2 certainly looks nice. For most of this course we will be interested in equations where existence and uniqueness holds, and in fact holds “globally” unlike for the equation ๐ฆ 0 = ๐ฆ 2 . 31 1.2. SLOPE FIELDS 1.2.3 Exercises Exercise 1.2.1: Sketch slope field for ๐ฆ 0 = ๐ ๐ฅ−๐ฆ . How do the solutions behave as ๐ฅ grows? Can you guess a particular solution by looking at the slope field? Exercise 1.2.2: Sketch slope field for ๐ฆ 0 = ๐ฅ 2 . Exercise 1.2.3: Sketch slope field for ๐ฆ 0 = ๐ฆ 2 . Exercise 1.2.4: Is it possible to solve the equation ๐ฆ 0 = ๐ฅ๐ฆ cos ๐ฅ for ๐ฆ(0) = 1? Justify. p Exercise 1.2.5: Is it possible to solve the equation ๐ฆ 0 = ๐ฆ |๐ฅ| for ๐ฆ(0) = 0? Is the solution unique? Justify. Exercise 1.2.6: Match equations ๐ฆ 0 = 1 − ๐ฅ, ๐ฆ 0 = ๐ฅ − 2๐ฆ, ๐ฆ 0 = ๐ฅ(1 − ๐ฆ) to slope fields. Justify. a) b) c) Exercise 1.2.7 (challenging): Take ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ(0) = 0, where ๐ (๐ฅ, ๐ฆ) > 1 for all ๐ฅ and ๐ฆ. If the solution exists for all ๐ฅ, can you say what happens to ๐ฆ(๐ฅ) as ๐ฅ goes to positive infinity? Explain. Exercise 1.2.8 (challenging): Take (๐ฆ − ๐ฅ)๐ฆ 0 = 0, ๐ฆ(0) = 0. a) Find two distinct solutions. b) Explain why this does not violate Picard’s theorem. Exercise 1.2.9: Suppose ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ). What will the slope field look like, explain and sketch an example, if you know the following about ๐ (๐ฅ, ๐ฆ): a) ๐ does not depend on ๐ฆ. b) ๐ does not depend on ๐ฅ. c) ๐ (๐ก, ๐ก) = 0 for any number ๐ก. d) ๐ (๐ฅ, 0) = 0 and ๐ (๐ฅ, 1) = 1 for all ๐ฅ. Exercise 1.2.10: Find a solution to ๐ฆ 0 = |๐ฆ|, ๐ฆ(0) = 0. Does Picard’s theorem apply? Exercise 1.2.11: Take an equation ๐ฆ 0 = (๐ฆ − 2๐ฅ)๐(๐ฅ, ๐ฆ) + 2 for some function ๐(๐ฅ, ๐ฆ). Can you solve the problem for the initial condition ๐ฆ(0) = 0, and if so what is the solution? 32 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.2.12 (challenging): Suppose ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ) is such that ๐ (๐ฅ, 1) = 0 for every ๐ฅ, ๐ is ๐๐ continuous and ๐๐ฆ exists and is continuous for every ๐ฅ and ๐ฆ. a) Guess a solution given the initial condition ๐ฆ(0) = 1. b) Can graphs of two solutions of the equation for different initial conditions ever intersect? c) Given ๐ฆ(0) = 0, what can you say about the solution. In particular, can ๐ฆ(๐ฅ) > 1 for any ๐ฅ? Can ๐ฆ(๐ฅ) = 1 for any ๐ฅ? Why or why not? Exercise 1.2.101: Sketch the slope field of ๐ฆ 0 = ๐ฆ 3 . Can you visually find the solution that satisfies ๐ฆ(0) = 0? Exercise 1.2.102: Is it possible to solve ๐ฆ 0 = ๐ฅ๐ฆ for ๐ฆ(0) = 0? Is the solution unique? Exercise 1.2.103: Is it possible to solve ๐ฆ 0 = ๐ฅ ๐ฅ 2 −1 for ๐ฆ(1) = 0? Exercise 1.2.104: Match equations ๐ฆ 0 = sin ๐ฅ, ๐ฆ 0 = cos ๐ฆ, ๐ฆ 0 = ๐ฆ cos(๐ฅ) to slope fields. Justify. a) b) c) Exercise 1.2.105 (tricky): Suppose ( ๐ (๐ฆ) = 0 if ๐ฆ > 0, 1 if ๐ฆ ≤ 0. Does ๐ฆ 0 = ๐ (๐ฆ), ๐ฆ(0) = 0 have a continuously differentiable solution? Does Picard apply? Why, or why not? Exercise 1.2.106: Consider an equation of the form ๐ฆ 0 = ๐ (๐ฅ) for some continuous function ๐ , and an initial condition ๐ฆ(๐ฅ0 ) = ๐ฆ0 . Does a solution exist for all ๐ฅ? Why or why not? 33 1.3. SEPARABLE EQUATIONS 1.3 Separable equations Note: 1 lecture, §1.4 in [EP], §2.2 in [BD] 0 ∫ When a differential equation is of the form ๐ฆ = ๐ (๐ฅ), we can just integrate: ๐ฆ = ๐ (๐ฅ) ๐๐ฅ + ๐ถ. Unfortunately this method no longer works for the general form of the equation ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ). Integrating both sides yields ∫ ๐ฆ= ๐ (๐ฅ, ๐ฆ) ๐๐ฅ + ๐ถ. Notice the dependence on ๐ฆ in the integral. 1.3.1 Separable equations We say a differential equation is separable if we can write it as ๐ฆ 0 = ๐ (๐ฅ)๐(๐ฆ), for some functions ๐ (๐ฅ) and ๐(๐ฆ). Let us write the equation in the Leibniz notation ๐๐ฆ = ๐ (๐ฅ)๐(๐ฆ). ๐๐ฅ Then we rewrite the equation as ๐๐ฆ = ๐ (๐ฅ) ๐๐ฅ. ๐(๐ฆ) Both sides look like something we can integrate. We obtain ∫ ๐๐ฆ = ๐(๐ฆ) ∫ ๐ (๐ฅ) ๐๐ฅ + ๐ถ. If we can find closed form expressions for these two integrals, we can, perhaps, solve for ๐ฆ. Example 1.3.1: Take the equation ๐ฆ 0 = ๐ฅ๐ฆ. Note that ๐ฆ = 0 is a solution. We will remember that fact and assume ๐ฆ ≠ 0 from now on, ๐๐ฆ so that we can divide by ๐ฆ. Write the equation as ๐๐ฅ = ๐ฅ๐ฆ. Then ∫ ๐๐ฆ = ๐ฆ ∫ ๐ฅ ๐๐ฅ + ๐ถ. We compute the antiderivatives to get ln |๐ฆ| = ๐ฅ2 + ๐ถ, 2 34 CHAPTER 1. FIRST ORDER EQUATIONS or |๐ฆ| = ๐ ๐ฅ2 2 +๐ถ ๐ฅ2 ๐ฅ2 = ๐ 2 ๐ ๐ถ = ๐ท๐ 2 , where ๐ท > 0 is some constant. Because ๐ฆ = 0 is also a solution and because of the absolute value we can write: ๐ฅ2 ๐ฆ = ๐ท๐ 2 , for any number ๐ท (including zero or negative). We check: ๐ฅ2 ๐ฅ2 ๐ฆ 0 = ๐ท๐ฅ๐ 2 = ๐ฅ ๐ท๐ 2 = ๐ฅ๐ฆ. Yay! We should be a little bit more careful with this method. You may be worried that we integrated in two different variables. We seemingly did a different operation to each side. Let us work through this method more rigorously. Take ๐๐ฆ = ๐ (๐ฅ)๐(๐ฆ). ๐๐ฅ We rewrite the equation as follows. Note that ๐ฆ = ๐ฆ(๐ฅ) is a function of ๐ฅ and so is ๐๐ฆ ๐๐ฅ ! 1 ๐๐ฆ = ๐ (๐ฅ). ๐(๐ฆ) ๐๐ฅ We integrate both sides with respect to ๐ฅ: 1 ๐๐ฆ ๐๐ฅ = ๐(๐ฆ) ๐๐ฅ ∫ ∫ ๐ (๐ฅ) ๐๐ฅ + ๐ถ. We use the change of variables formula (substitution) on the left hand side: ∫ 1 ๐๐ฆ = ๐(๐ฆ) ∫ ๐ (๐ฅ) ๐๐ฅ + ๐ถ. And we are done. 1.3.2 Implicit solutions We sometimes get stuck even if we can do the integration. Consider the separable equation ๐ฆ0 = ๐ฅ๐ฆ . +1 ๐ฆ2 We separate variables, ๐ฆ2 + 1 1 ๐๐ฆ = ๐ฆ + ๐ฆ ๐ฆ ๐๐ฆ = ๐ฅ ๐๐ฅ. 35 1.3. SEPARABLE EQUATIONS We integrate to get ๐ฆ2 ๐ฅ2 + ln |๐ฆ| = + ๐ถ, 2 2 or perhaps the easier looking expression (where ๐ท = 2๐ถ) ๐ฆ 2 + 2 ln |๐ฆ| = ๐ฅ 2 + ๐ท. It is not easy to find the solution explicitly as it is hard to solve for ๐ฆ. We, therefore, leave the solution in this form and call it an implicit solution. It is still easy to check that an implicit solution satisfies the differential equation. In this case, we differentiate with respect to ๐ฅ, and remember that ๐ฆ is a function of ๐ฅ, to get 2 = 2๐ฅ. ๐ฆ 2๐ฆ + ๐ฆ 0 Multiply both sides by ๐ฆ and divide by 2(๐ฆ 2 + 1) and you will get exactly the differential equation. We leave this computation to the reader. If you have an implicit solution, and you want to compute values for ๐ฆ, you might have to be tricky. You might get multiple solutions ๐ฆ for each ๐ฅ, so you have to pick one. Sometimes you can graph ๐ฅ as a function of ๐ฆ, and then flip your paper. Sometimes you have to do more. Computers are also good at some of these tricks. More advanced mathematical software usually has some way of plotting solutions to implicit equations. For example, for ๐ถ = 0 if you plot all the points (๐ฅ, ๐ฆ) that are solutions to ๐ฆ 2 + 2 ln |๐ฆ| = ๐ฅ 2 , you find the two curves in Figure 1.8 on the following page. This is not quite a graph of a function. For each ๐ฅ there are two choices of ๐ฆ. To find a function you would have to pick one of these two curves. You pick the one that satisfies your initial condition if you have one. For example, the top curve satisfies the condition ๐ฆ(1) = 1. So for each ๐ถ we really got two solutions. As you can see, computing values from an implicit solution can be somewhat tricky. But sometimes, an implicit solution is the best we can do. The equation above also has the solution ๐ฆ = 0. So the general solution is ๐ฆ 2 + 2 ln |๐ฆ| = ๐ฅ 2 + ๐ถ, and ๐ฆ = 0. These outlying solutions such as ๐ฆ = 0 are sometimes called singular solutions. 1.3.3 Examples of separable equations Example 1.3.2: Solve ๐ฅ 2 ๐ฆ 0 = 1 − ๐ฅ 2 + ๐ฆ 2 − ๐ฅ 2 ๐ฆ 2 , ๐ฆ(1) = 0. Factor the right-hand side ๐ฅ 2 ๐ฆ 0 = (1 − ๐ฅ 2 )(1 + ๐ฆ 2 ). 36 CHAPTER 1. FIRST ORDER EQUATIONS -5.0 5.0 -2.5 0.0 2.5 5.0 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 -5.0 -5.0 -5.0 -2.5 0.0 2.5 5.0 Figure 1.8: The implicit solution ๐ฆ 2 + 2 ln |๐ฆ| = ๐ฅ 2 to ๐ฆ 0 = ๐ฅ๐ฆ . ๐ฆ 2 +1 Separate variables, integrate, and solve for ๐ฆ: ๐ฆ0 1 − ๐ฅ2 = , 1 + ๐ฆ2 ๐ฅ2 ๐ฆ0 1 = 2 − 1, 2 1+๐ฆ ๐ฅ −1 arctan(๐ฆ) = − ๐ฅ + ๐ถ, ๐ฅ −1 −๐ฅ+๐ถ . ๐ฆ = tan ๐ฅ Solve for the initial condition, 0 = tan(−2 + ๐ถ) to get ๐ถ = 2 (or ๐ถ = 2 + ๐, or ๐ถ = 2 + 2๐, etc.). The particular solution we seek is, therefore, −1 ๐ฆ = tan −๐ฅ+2 . ๐ฅ Example 1.3.3: Bob made a cup of coffee, and Bob likes to drink coffee only once reaches 60 degrees Celsius and will not burn him. Initially at time ๐ก = 0 minutes, Bob measured the temperature and the coffee was 89 degrees Celsius. One minute later, Bob measured the coffee again and it had 85 degrees. The temperature of the room (the ambient temperature) is 22 degrees. When should Bob start drinking? Let ๐ be the temperature of the coffee in degrees Celsius, and let ๐ด be the ambient (room) temperature, also in degrees Celsius. Newton’s law of cooling states that the rate at which the temperature of the coffee is changing is proportional to the difference between the ambient temperature and the temperature of the coffee. That is, ๐๐ = ๐(๐ด − ๐), ๐๐ก 37 1.3. SEPARABLE EQUATIONS for some constant ๐. For our setup ๐ด = 22, ๐(0) = 89, ๐(1) = 85. We separate variables and integrate (let ๐ถ and ๐ท denote arbitrary constants): 1 ๐๐ = −๐, ๐ − ๐ด ๐๐ก ln(๐ − ๐ด) = −๐๐ก + ๐ถ, (note that ๐ − ๐ด > 0) ๐ − ๐ด = ๐ท ๐ −๐๐ก , ๐ = ๐ด + ๐ท ๐ −๐๐ก . That is, ๐ = 22 + ๐ท ๐ −๐๐ก . We plug in the first condition: 89 = ๐(0) = 22 + ๐ท, and hence ๐ท = 67. So ๐ = 22 + 67 ๐ −๐๐ก . The second condition says 85 = ๐(1) = 22 + 67 ๐ −๐ . Solving for ๐ we get ๐ = − ln 85−22 67 ≈ 0.0616. Now we solve for the time ๐ก that gives us a temperature of 60 degrees. Namely, we solve 60 = 22 + 67๐ −0.0616๐ก ln 60−22 67 to get ๐ก = − 0.0616 ≈ 9.21 minutes. So Bob can begin to drink the coffee at just over 9 minutes from the time Bob made it. That is probably about the amount of time it took us to calculate how long it would take. See Figure 1.9. 0.0 2.5 5.0 7.5 10.0 90 12.5 90 80 80 70 70 60 60 0 20 40 60 80 80 80 60 60 40 40 20 0.0 2.5 5.0 7.5 10.0 12.5 20 0 20 40 60 80 Figure 1.9: Graphs of the coffee temperature function ๐(๐ก). On the left, horizontal lines are drawn at temperatures 60, 85, and 89. Vertical lines are drawn at ๐ก = 1 and ๐ก = 9.21. Notice that the temperature of the coffee hits 85 at ๐ก = 1, and 60 at ๐ก ≈ 9.21. On the right, the graph is over a longer period of time, with a horizontal line at the ambient temperature 22. −๐ฅ ๐ฆ 2 Example 1.3.4: Find the general solution to ๐ฆ 0 = 3 (including singular solutions). First note that ๐ฆ = 0 is a solution (a singular solution). Now assume that ๐ฆ ≠ 0. −3 0 ๐ฆ = ๐ฅ, ๐ฆ2 38 CHAPTER 1. FIRST ORDER EQUATIONS ๐ฅ2 3 = + ๐ถ, ๐ฆ 2 3 6 ๐ฆ= 2 = 2 . ๐ฅ /2 + ๐ถ ๐ฅ + 2๐ถ So the general solution is, ๐ฆ= 1.3.4 ๐ฅ2 6 , + 2๐ถ ๐ฆ = 0. and Exercises Exercise 1.3.1: Solve ๐ฆ 0 = ๐ฅ/๐ฆ . Exercise 1.3.2: Solve ๐ฆ 0 = ๐ฅ 2 ๐ฆ. Exercise 1.3.3: Solve ๐๐ฅ = (๐ฅ 2 − 1) ๐ก, for ๐ฅ(0) = 0. ๐๐ก Exercise 1.3.4: Solve ๐๐ฅ = ๐ฅ sin(๐ก), for ๐ฅ(0) = 1. ๐๐ก Exercise 1.3.5: Solve ๐๐ฆ = ๐ฅ๐ฆ + ๐ฅ + ๐ฆ + 1. Hint: Factor the right-hand side. ๐๐ฅ Exercise 1.3.6: Solve ๐ฅ๐ฆ 0 = ๐ฆ + 2๐ฅ 2 ๐ฆ, where ๐ฆ(1) = 1. Exercise 1.3.7: Solve ๐ฆ2 + 1 ๐๐ฆ = 2 , for ๐ฆ(0) = 1. ๐๐ฅ ๐ฅ +1 Exercise 1.3.8: Find an implicit solution for ๐๐ฆ ๐ฅ2 + 1 = 2 , for ๐ฆ(0) = 1. ๐๐ฅ ๐ฆ +1 Exercise 1.3.9: Find an explicit solution for ๐ฆ 0 = ๐ฅ๐ −๐ฆ , ๐ฆ(0) = 1. Exercise 1.3.10: Find an explicit solution for ๐ฅ๐ฆ 0 = ๐ −๐ฆ , for ๐ฆ(1) = 1. 2 Exercise 1.3.11: Find an explicit solution for ๐ฆ 0 = ๐ฆ๐ −๐ฅ , ๐ฆ(0) = 1. It is alright to leave a definite integral in your answer. Exercise 1.3.12: Suppose a cup of coffee is at 100 degrees Celsius at time ๐ก = 0, it is at 70 degrees at ๐ก = 10 minutes, and it is at 50 degrees at ๐ก = 20 minutes. Compute the ambient temperature. Exercise 1.3.101: Solve ๐ฆ 0 = 2๐ฅ๐ฆ. Exercise 1.3.102: Solve ๐ฅ 0 = 3๐ฅ๐ก 2 − 3๐ก 2 , ๐ฅ(0) = 2. Exercise 1.3.103: Find an implicit solution for ๐ฅ 0 = 1 , 3๐ฅ 2 +1 ๐ฅ(0) = 1. Exercise 1.3.104: Find an explicit solution to ๐ฅ๐ฆ 0 = ๐ฆ 2 , ๐ฆ(1) = 1. 39 1.3. SEPARABLE EQUATIONS Exercise 1.3.105: Find an implicit solution to ๐ฆ 0 = sin(๐ฅ) . cos(๐ฆ) Exercise 1.3.106: Take Example 1.3.3 with the same numbers: 89 degrees at ๐ก = 0, 85 degrees at ๐ก = 1, and ambient temperature of 22 degrees. Suppose these temperatures were measured with precision of ±0.5 degrees. Given this imprecision, the time it takes the coffee to cool to (exactly) 60 degrees is also only known in a certain range. Find this range. Hint: Think about what kind of error makes the cooling time longer and what shorter. Exercise 1.3.107: A population ๐ฅ of rabbits on an island is modeled by ๐ฅ 0 = ๐ฅ − 1/1000 ๐ฅ 2 , where the independent variable is time in months. At time ๐ก = 0, there are 40 rabbits on the island. a) Find the solution to the equation with the initial condition. b) How many rabbits are on the island in 1 month, 5 months, 10 months, 15 months (round to the nearest integer). 40 1.4 CHAPTER 1. FIRST ORDER EQUATIONS Linear equations and the integrating factor Note: 1 lecture, §1.5 in [EP], §2.1 in [BD] One of the most important types of equations we will learn how to solve are the so-called linear equations. In fact, the majority of the course is about linear equations. In this section we focus on the first order linear equation. A first order equation is linear if we can put it into the form: ๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ). (1.3) The word “linear” means linear in ๐ฆ and ๐ฆ 0; no higher powers nor functions of ๐ฆ or ๐ฆ 0 appear. The dependence on ๐ฅ can be more complicated. Solutions of linear equations have nice properties. For example, the solution exists wherever ๐(๐ฅ) and ๐ (๐ฅ) are defined, and has the same regularity (read: it is just as nice). But most importantly for us right now, there is a method for solving linear first order equations. The trick is to rewrite the left-hand side of (1.3) as a derivative of a product of ๐ฆ with another function. To this end we find a function ๐(๐ฅ) such that ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐(๐ฅ)๐ฆ = i ๐ h ๐(๐ฅ)๐ฆ . ๐๐ฅ This is the left-hand side of (1.3) multiplied by ๐(๐ฅ). So if we multiply (1.3) by ๐(๐ฅ), we obtain i ๐ h ๐(๐ฅ)๐ฆ = ๐(๐ฅ) ๐ (๐ฅ). ๐๐ฅ Now we integrate both sides. The right-hand side does not depend on ๐ฆ and the left-hand side is written as a derivative of a function. Afterwards, we solve for ๐ฆ. The function ๐(๐ฅ) is called the integrating factor and the method is called the integrating factor method. We are looking for a function ๐(๐ฅ), such that if we differentiate it, we get the same function back multiplied by ๐(๐ฅ). That seems like a job for the exponential function! Let ๐(๐ฅ) = ๐ ∫ ๐(๐ฅ) ๐๐ฅ . We compute: ๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), ๐ ∫ ๐(๐ฅ) ๐๐ฅ 0 ∫ ∫ ๐ฆ + ๐ ๐(๐ฅ) ๐๐ฅ ๐(๐ฅ)๐ฆ = ๐ ∫ ๐ h ∫ ๐(๐ฅ) ๐๐ฅ i ๐ ๐ฆ =๐ ๐๐ฅ ∫ ๐ ∫ ๐(๐ฅ) ๐๐ฅ ๐ฆ= ๐ฆ=๐ − ๐(๐ฅ) ๐๐ฅ ๐ (๐ฅ), ๐(๐ฅ) ๐๐ฅ ๐ (๐ฅ), ๐ ∫ ∫ ๐(๐ฅ) ๐๐ฅ ๐(๐ฅ) ๐๐ฅ ๐ (๐ฅ) ๐๐ฅ + ๐ถ, ∫ ๐ ∫ ๐(๐ฅ) ๐๐ฅ ๐ (๐ฅ) ๐๐ฅ + ๐ถ . 41 1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR Of course, to get a closed form formula for ๐ฆ, we need to be able to find a closed form formula for the integrals appearing above. Example 1.4.1: Solve ๐ฆ 0 + 2๐ฅ๐ฆ = ๐ ๐ฅ−๐ฅ , 2 ๐ฆ(0) = −1. 2 ๐ ๐ฅ−๐ฅ . First note that ๐(๐ฅ) = 2๐ฅ and ๐ (๐ฅ) = The integrating factor is ๐(๐ฅ) = ๐ We multiply both sides of the equation by ๐(๐ฅ) to get ∫ ๐(๐ฅ) ๐๐ฅ = ๐๐ฅ . 2 ๐ ๐ฅ ๐ฆ 0 + 2๐ฅ๐ ๐ฅ ๐ฆ = ๐ ๐ฅ−๐ฅ ๐ ๐ฅ , ๐ h ๐ฅ2 i ๐ ๐ฆ = ๐๐ฅ. ๐๐ฅ 2 2 2 2 We integrate ๐ ๐ฅ ๐ฆ = ๐ ๐ฅ + ๐ถ, 2 ๐ฆ = ๐ ๐ฅ−๐ฅ + ๐ถ๐ −๐ฅ . 2 2 Next, we solve for the initial condition −1 = ๐ฆ(0) = 1 + ๐ถ, so ๐ถ = −2. The solution is ๐ฆ = ๐ ๐ฅ−๐ฅ − 2๐ −๐ฅ . 2 2 ∫ Note that we do not care which antiderivative we take when computing ๐ ๐(๐ฅ)๐๐ฅ . You can always add a constant of integration, but those constants will not matter in the end. Exercise 1.4.1: Try it! Add a constant of integration to the integral in the integrating factor and show that the solution you get in the end is the same as what we got above. Advice: Do not try to remember the formula itself, that is way too hard. It is easier to remember the process and repeat it. Since we cannot always evaluate the integrals in closed form, it is useful to know how to write the solution in definite integral form. A definite integral is something that you can plug into a computer or a calculator. Suppose we are given ๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), ๐ฆ(๐ฅ 0 ) = ๐ฆ0 . Look at the solution and write the integrals as definite integrals. ๐ฆ(๐ฅ) = ๐ − ∫๐ฅ ๐ฅ0 ๐(๐ ) ๐๐ ∫ ๐ฅ ๐ ∫๐ก ๐ฅ0 ๐(๐ ) ๐๐ ๐ฅ0 ๐ (๐ก) ๐๐ก + ๐ฆ0 . (1.4) You should be careful to properly use dummy variables here. If you now plug such a formula into a computer or a calculator, it will be happy to give you numerical answers. Exercise 1.4.2: Check that ๐ฆ(๐ฅ0 ) = ๐ฆ0 in formula (1.4). 42 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.4.3: Write the solution of the following problem as a definite integral, but try to simplify as far as you can. You will not be able to find the solution in closed form. ๐ฆ0 + ๐ฆ = ๐ ๐ฅ 2 −๐ฅ , ๐ฆ(0) = 10. Remark 1.4.1: Before we move on, we should note some interesting properties of linear equations. First, for the linear initial value problem ๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), ๐ฆ(๐ฅ 0 ) = ๐ฆ0 , there is always an explicit formula (1.4) for the solution. Second, it follows from the formula (1.4) that if ๐(๐ฅ) and ๐ (๐ฅ) are continuous on some interval (๐, ๐), then the solution ๐ฆ(๐ฅ) exists and is differentiable on (๐, ๐). Compare with the simple nonlinear example we have seen previously, ๐ฆ 0 = ๐ฆ 2 , and compare to Theorem 1.2.1. Example 1.4.2: Let us discuss a common simple application of linear equations. This type of problem is used often in real life. For example, linear equations are used in figuring out the concentration of chemicals in bodies of water (rivers and lakes). A 100 liter tank contains 10 kilograms of salt dissolved in 60 5 L/min, 0.1 kg/L liters of water. Solution of water and salt (brine) with concentration of 0.1 kilograms per liter is flowing in at the rate of 5 liters a minute. The solution in the tank is well stirred and flows out at a rate of 3 liters a minute. How much salt is in the tank when the tank is full? Let us come up with the equation. Let ๐ฅ denote the kilograms 60 L of salt in the tank, let ๐ก denote the time in minutes. For a small 10 kg salt change Δ๐ก in time, the change in ๐ฅ (denoted Δ๐ฅ) is approximately 3 L/min Δ๐ฅ ≈ (rate in × concentration in)Δ๐ก − (rate out × concentration out)Δ๐ก. Dividing through by Δ๐ก and taking the limit Δ๐ก → 0, we see that ๐๐ฅ = (rate in × concentration in) − (rate out × concentration out). ๐๐ก In our example, rate in = 5, concentration in = 0.1, rate out = 3, concentration out = ๐ฅ ๐ฅ = . volume 60 + (5 − 3)๐ก Our equation is, therefore, ๐๐ฅ ๐ฅ = (5 × 0.1) − 3 . ๐๐ก 60 + 2๐ก Or in the form (1.3) ๐๐ฅ 3 + ๐ฅ = 0.5. ๐๐ก 60 + 2๐ก 43 1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR Let us solve. The integrating factor is ๐(๐ก) = exp ∫ 3 3 ๐๐ก = exp ln(60 + 2๐ก) = (60 + 2๐ก)3/2 . 60 + 2๐ก 2 We multiply both sides of the equation to get (60 + 2๐ก)3/2 3 ๐๐ฅ + (60 + 2๐ก)3/2 ๐ฅ = 0.5(60 + 2๐ก)3/2 , ๐๐ก 60 + 2๐ก i ๐ h (60 + 2๐ก)3/2 ๐ฅ = 0.5(60 + 2๐ก)3/2 , ๐๐ก ∫ (60 + 2๐ก)3/2 ๐ฅ = 0.5(60 + 2๐ก)3/2 ๐๐ก + ๐ถ, −3/2 ๐ฅ = (60 + 2๐ก) ๐ฅ = (60 + 2๐ก)−3/2 ๐ฅ= (60 + 2๐ก)3/2 ๐๐ก + ๐ถ(60 + 2๐ก)−3/2 , 2 1 (60 + 2๐ก)5/2 + ๐ถ(60 + 2๐ก)−3/2 , 10 60 + 2๐ก + ๐ถ(60 + 2๐ก)−3/2 . 10 We need to find ๐ถ. We know that at ๐ก = 0, ๐ฅ = 10. So 10 = ๐ฅ(0) = ∫ 60 + ๐ถ(60)−3/2 = 6 + ๐ถ(60)−3/2 , 10 or ๐ถ = 4(603/2 ) ≈ 1859.03. We are interested in ๐ฅ when the tank is full. The tank is full when 60 + 2๐ก = 100, or when ๐ก = 20. So 0 5 10 15 20 11.5 11.5 11.0 11.0 10.5 10.5 10.0 60 + 40 ๐ฅ(20) = + ๐ถ(60 + 40)−3/2 10 ≈ 10 + 1859.03(100)−3/2 ≈ 11.86. 10.0 0 5 10 15 20 Figure 1.10: Graph of the solution ๐ฅ kilograms of salt in the tank at time ๐ก. See Figure 1.10 for the graph of ๐ฅ over ๐ก. The concentration when the tank is full is approximately 0.1186 kg/liter, and we started with 1/6 or 0.167 kg/liter. 1.4.1 Exercises In the exercises, feel free to leave answer as a definite integral if a closed form solution cannot be found. If you can find a closed form solution, you should give that. Exercise 1.4.4: Solve ๐ฆ 0 + ๐ฅ๐ฆ = ๐ฅ. 44 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.4.5: Solve ๐ฆ 0 + 6๐ฆ = ๐ ๐ฅ . 3 Exercise 1.4.6: Solve ๐ฆ 0 + 3๐ฅ 2 ๐ฆ = sin(๐ฅ) ๐ −๐ฅ , with ๐ฆ(0) = 1. Exercise 1.4.7: Solve ๐ฆ 0 + cos(๐ฅ)๐ฆ = cos(๐ฅ). Exercise 1.4.8: Solve 1 ๐ฅ 2 +1 ๐ฆ 0 + ๐ฅ๐ฆ = 3, with ๐ฆ(0) = 0. Exercise 1.4.9: Suppose there are two lakes located on a stream. Clean water flows into the first lake, then the water from the first lake flows into the second lake, and then water from the second lake flows further downstream. The in and out flow from each lake is 500 liters per hour. The first lake contains 100 thousand liters of water and the second lake contains 200 thousand liters of water. A truck with 500 kg of toxic substance crashes into the first lake. Assume that the water is being continually mixed perfectly by the stream. a) Find the concentration of toxic substance as a function of time in both lakes. b) When will the concentration in the first lake be below 0.001 kg per liter? c) When will the concentration in the second lake be maximal? Exercise 1.4.10: Newton’s law of cooling states that ๐๐ฅ ๐๐ก = −๐(๐ฅ − ๐ด) where ๐ฅ is the temperature, ๐ก is time, ๐ด is the ambient temperature, and ๐ > 0 is a constant. Suppose that ๐ด = ๐ด0 cos(๐๐ก) for some constants ๐ด0 and ๐. That is, the ambient temperature oscillates (for example night and day temperatures). a) Find the general solution. b) In the long term, will the initial conditions make much of a difference? Why or why not? Exercise 1.4.11: Initially 5 grams of salt are dissolved in 20 liters of water. Brine with concentration of salt 2 grams of salt per liter is added at a rate of 3 liters a minute. The tank is mixed well and is drained at 3 liters a minute. How long does the process have to continue until there are 20 grams of salt in the tank? Exercise 1.4.12: Initially a tank contains 10 liters of pure water. Brine of unknown (but constant) concentration of salt is flowing in at 1 liter per minute. The water is mixed well and drained at 1 liter per minute. In 20 minutes there are 15 grams of salt in the tank. What is the concentration of salt in the incoming brine? Exercise 1.4.101: Solve ๐ฆ 0 + 3๐ฅ 2 ๐ฆ = ๐ฅ 2 . Exercise 1.4.102: Solve ๐ฆ 0 + 2 sin(2๐ฅ)๐ฆ = 2 sin(2๐ฅ), ๐ฆ(๐/2) = 3. Exercise 1.4.103: Suppose a water tank is being pumped out at 3 L/min. The water tank starts at 10 L of clean water. Water with toxic substance is flowing into the tank at 2 L/min, with concentration 20๐ก g/L at time ๐ก. When the tank is half empty, how many grams of toxic substance are in the tank (assuming perfect mixing)? 1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR 45 Exercise 1.4.104: There is bacteria on a plate and a toxic substance is being added that slows down the rate of growth of the bacteria. That is, suppose that ๐๐ ๐๐ก = (2 − 0.1 ๐ก)๐. If ๐(0) = 1000, find the population at ๐ก = 5. Exercise 1.4.105: A cylindrical water tank has water flowing in at ๐ผ cubic meters per second. Let ๐ด be the area of the cross section of the tank in square meters. Suppose water is flowing out from the bottom of the tank at a rate proportional to the height of the water level. Set up the differential equation for โ, the height of the water, introducing and naming constants that you need. You should also give the units for your constants. 46 1.5 CHAPTER 1. FIRST ORDER EQUATIONS Substitution Note: 1 lecture, can safely be skipped, §1.6 in [EP], not in [BD] Just as when solving integrals, one method to try is to change variables to end up with a simpler equation to solve. 1.5.1 Substitution The equation ๐ฆ 0 = (๐ฅ − ๐ฆ + 1)2 is neither separable nor linear. What can we do? How about trying to change variables, so that in the new variables the equation is simpler. We use another variable ๐ฃ, which we treat as a function of ๐ฅ. Let us try ๐ฃ = ๐ฅ − ๐ฆ + 1. We need to figure out ๐ฆ 0 in terms of ๐ฃ 0, ๐ฃ and ๐ฅ. We differentiate (in ๐ฅ) to obtain ๐ฃ 0 = 1 − ๐ฆ 0. So ๐ฆ 0 = 1 − ๐ฃ 0. We plug this into the equation to get 1 − ๐ฃ0 = ๐ฃ 2 . In other words, ๐ฃ 0 = 1 − ๐ฃ 2 . Such an equation we know how to solve by separating variables: 1 ๐๐ฃ = ๐๐ฅ. 1 − ๐ฃ2 So ๐ฃ+1 1 ln = ๐ฅ + ๐ถ, 2 ๐ฃ−1 or ๐ฃ+1 = ๐ 2๐ฅ+2๐ถ , ๐ฃ−1 or ๐ฃ+1 = ๐ท๐ 2๐ฅ , ๐ฃ−1 for some constant ๐ท. Note that ๐ฃ = 1 and ๐ฃ = −1 are also solutions. Now we need to “unsubstitute” to obtain ๐ฅ−๐ฆ+2 = ๐ท๐ 2๐ฅ , ๐ฅ−๐ฆ and also the two solutions ๐ฅ − ๐ฆ + 1 = 1 or ๐ฆ = ๐ฅ, and ๐ฅ − ๐ฆ + 1 = −1 or ๐ฆ = ๐ฅ + 2. We solve the first equation for ๐ฆ. ๐ฅ − ๐ฆ + 2 = (๐ฅ − ๐ฆ)๐ท๐ 2๐ฅ , ๐ฅ − ๐ฆ + 2 = ๐ท๐ฅ๐ 2๐ฅ − ๐ฆ๐ท๐ 2๐ฅ , −๐ฆ + ๐ฆ๐ท๐ 2๐ฅ = ๐ท๐ฅ๐ 2๐ฅ − ๐ฅ − 2, ๐ฆ (−1 + ๐ท๐ 2๐ฅ ) = ๐ท๐ฅ๐ 2๐ฅ − ๐ฅ − 2, ๐ฆ= ๐ท๐ฅ๐ 2๐ฅ − ๐ฅ − 2 . ๐ท๐ 2๐ฅ − 1 47 1.5. SUBSTITUTION Note that ๐ท = 0 gives ๐ฆ = ๐ฅ + 2, but no value of ๐ท gives the solution ๐ฆ = ๐ฅ. Substitution in differential equations is applied in much the same way that it is applied in calculus. You guess. Several different substitutions might work. There are some general patterns to look for. We summarize a few of these in a table. When you see Try substituting ๐ฆ๐ฆ 0 ๐ฆ 2 ๐ฆ0 (cos ๐ฆ)๐ฆ 0 (sin ๐ฆ)๐ฆ 0 ๐ฆ0 ๐ ๐ฆ ๐ฃ ๐ฃ ๐ฃ ๐ฃ ๐ฃ = ๐ฆ2 = ๐ฆ3 = sin ๐ฆ = cos ๐ฆ = ๐๐ฆ Usually you try to substitute in the “most complicated” part of the equation with the hopes of simplifying it. The table above is just a rule of thumb. You might have to modify your guesses. If a substitution does not work (it does not make the equation any simpler), try a different one. 1.5.2 Bernoulli equations There are some forms of equations where there is a general rule for substitution that always works. One such example is the so-called Bernoulli equation∗ : ๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐(๐ฅ)๐ฆ ๐ . This equation looks a lot like a linear equation except for the ๐ฆ ๐ . If ๐ = 0 or ๐ = 1, then the equation is linear and we can solve it. Otherwise, the substitution ๐ฃ = ๐ฆ 1−๐ transforms the Bernoulli equation into a linear equation. Note that ๐ need not be an integer. Example 1.5.1: Solve ๐ฅ๐ฆ 0 + ๐ฆ(๐ฅ + 1) + ๐ฅ๐ฆ 5 = 0, ๐ฆ(1) = 1. The equation is a Bernoulli equation, ๐(๐ฅ) = (๐ฅ + 1)/๐ฅ and ๐(๐ฅ) = −1. We substitute ๐ฃ = ๐ฆ 1−5 = ๐ฆ −4 , ๐ฃ 0 = −4๐ฆ −5 ๐ฆ 0 . In other words, (−1/4) ๐ฆ 5 ๐ฃ 0 = ๐ฆ 0. So ๐ฅ๐ฆ 0 + ๐ฆ(๐ฅ + 1) + ๐ฅ๐ฆ 5 = 0, −๐ฅ๐ฆ 5 0 ๐ฃ + ๐ฆ(๐ฅ + 1) + ๐ฅ๐ฆ 5 = 0, 4 ∗ There are several things called Bernoulli equations, this is just one of them. The Bernoullis were a prominent Swiss family of mathematicians. These particular equations are named for Jacob Bernoulli (1654–1705). 48 CHAPTER 1. FIRST ORDER EQUATIONS −๐ฅ 0 ๐ฃ + ๐ฆ −4 (๐ฅ + 1) + ๐ฅ = 0, 4 −๐ฅ 0 ๐ฃ + ๐ฃ(๐ฅ + 1) + ๐ฅ = 0, 4 and finally 4(๐ฅ + 1) ๐ฃ = 4. ๐ฅ The equation is now linear. We can use the integrating factor method. In particular, we use formula (1.4). We assume that ๐ฅ > 0 so |๐ฅ| = ๐ฅ. This assumption is OK, as our initial condition is at ๐ฅ = 1 > 0. Let us compute the integrating factor. Here ๐(๐ ) from formula . (1.4) is −4(๐ +1) ๐ ๐ฃ0 − ๐ ๐− ∫๐ฅ 1 ∫๐ฅ 1 ๐(๐ ) ๐๐ ๐ฅ ∫ = exp 1 ๐(๐ ) ๐๐ −4(๐ + 1) ๐ −4๐ฅ+4 −4๐ฅ−4 ln(๐ฅ)+4 −4๐ฅ+4 −4 =๐ ๐ฅ = ๐๐ = ๐ , ๐ ๐ฅ4 = ๐ 4๐ฅ+4 ln(๐ฅ)−4 = ๐ 4๐ฅ−4 ๐ฅ 4 . We now plug in to (1.4) ๐ฃ(๐ฅ) = ๐ − =๐ ∫๐ฅ 1 ๐(๐ ) ๐๐ ๐ฅ 4๐ฅ−4 4 ๐ฅ ∫ ∫ 1 ๐ฅ ๐ ∫๐ก 1 ๐(๐ ) ๐๐ 4 ๐๐ก + 1 1 ๐ −4๐ก+4 4 4 ๐๐ก + 1 . ๐ก The integral in this expression is not possible to find in closed form. As we said before, it is perfectly fine to have a definite integral in our solution. Now “unsubstitute” ๐ฅ ∫ ๐ฆ −4 = ๐ 4๐ฅ−4 ๐ฅ 4 4 1 ๐ฆ= ๐ −๐ฅ+1 ∫๐ฅ ๐ฅ 4 1.5.3 ๐ −4๐ก+4 ๐๐ก + 1 , ๐ก4 ๐ −4๐ก+4 ๐ก4 1 ๐๐ก + 1 1/4 . Homogeneous equations Another type of equations we can solve by substitution are the so-called homogeneous equations. Suppose that we can write the differential equation as 0 ๐ฆ =๐น ๐ฆ ๐ฅ . Here we try the substitutions ๐ฃ= ๐ฆ ๐ฅ and therefore ๐ฆ 0 = ๐ฃ + ๐ฅ๐ฃ 0 . 49 1.5. SUBSTITUTION We note that the equation is transformed into ๐ฃ + ๐ฅ๐ฃ 0 = ๐น(๐ฃ) ๐ฅ๐ฃ 0 = ๐น(๐ฃ) − ๐ฃ or or ๐ฃ0 1 = . ๐ฅ ๐น(๐ฃ) − ๐ฃ Hence an implicit solution is ∫ 1 ๐๐ฃ = ln |๐ฅ| + ๐ถ. ๐น(๐ฃ) − ๐ฃ Example 1.5.2: Solve ๐ฅ 2 ๐ฆ 0 = ๐ฆ 2 + ๐ฅ๐ฆ, ๐ฆ(1) = 1. We put the equation into the form ๐ฆ 0 = ( ๐ฆ/๐ฅ )2 + ๐ฆ/๐ฅ . We substitute ๐ฃ = ๐ฆ/๐ฅ to get the separable equation ๐ฅ๐ฃ 0 = ๐ฃ 2 + ๐ฃ − ๐ฃ = ๐ฃ 2 , which has a solution ∫ 1 ๐๐ฃ = ln |๐ฅ| + ๐ถ, ๐ฃ2 −1 = ln |๐ฅ| + ๐ถ, ๐ฃ −1 ๐ฃ= . ln |๐ฅ| + ๐ถ We unsubstitute ๐ฆ −1 = , ๐ฅ ln |๐ฅ| + ๐ถ −๐ฅ ๐ฆ= . ln |๐ฅ| + ๐ถ We want ๐ฆ(1) = 1, so 1 = ๐ฆ(1) = −1 −1 = . ๐ถ ln |1| + ๐ถ Thus ๐ถ = −1 and the solution we are looking for is ๐ฆ= 1.5.4 −๐ฅ . ln |๐ฅ| − 1 Exercises Hint: Answers need not always be in closed form. Exercise 1.5.1: Solve ๐ฆ 0 + ๐ฆ(๐ฅ 2 − 1) + ๐ฅ๐ฆ 6 = 0, with ๐ฆ(1) = 1. Exercise 1.5.2: Solve 2๐ฆ๐ฆ 0 + 1 = ๐ฆ 2 + ๐ฅ, with ๐ฆ(0) = 1. 50 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.5.3: Solve ๐ฆ 0 + ๐ฅ๐ฆ = ๐ฆ 4 , with ๐ฆ(0) = 1. Exercise 1.5.4: Solve ๐ฆ๐ฆ 0 + ๐ฅ = p ๐ฅ2 + ๐ฆ2. Exercise 1.5.5: Solve ๐ฆ 0 = (๐ฅ + ๐ฆ − 1)2 . Exercise 1.5.6: Solve ๐ฆ 0 = ๐ฅ 2 −๐ฆ 2 ๐ฅ๐ฆ , with ๐ฆ(1) = 2. Exercise 1.5.101: Solve ๐ฅ๐ฆ 0 + ๐ฆ + ๐ฆ 2 = 0, ๐ฆ(1) = 2. Exercise 1.5.102: Solve ๐ฅ๐ฆ 0 + ๐ฆ + ๐ฅ = 0, ๐ฆ(1) = 1. Exercise 1.5.103: Solve ๐ฆ 2 ๐ฆ 0 = ๐ฆ 3 − 3๐ฅ, ๐ฆ(0) = 2. Exercise 1.5.104: Solve 2๐ฆ๐ฆ 0 = ๐ ๐ฆ 2 −๐ฅ 2 + 2๐ฅ. 51 1.6. AUTONOMOUS EQUATIONS 1.6 Autonomous equations Note: 1 lecture, §2.2 in [EP], §2.5 in [BD] Consider problems of the form ๐๐ฅ = ๐ (๐ฅ), ๐๐ก where the derivative of solutions depends only on ๐ฅ (the dependent variable). Such equations are called autonomous equations. If we think of ๐ก as time, the naming comes from the fact that the equation is independent of time. We return to the cooling coffee problem (Example 1.3.3). Newton’s law of cooling says ๐๐ฅ = ๐(๐ด − ๐ฅ), ๐๐ก where ๐ฅ is the temperature, ๐ก is time, ๐ is some positive constant, and ๐ด is the ambient temperature. See Figure 1.11 for an example with ๐ = 0.3 and ๐ด = 5. Note the solution ๐ฅ = ๐ด (in the figure ๐ฅ = 5). We call these constant solutions the equilibrium solutions. The points on the ๐ฅ-axis where ๐ (๐ฅ) = 0 are called critical points. The point ๐ฅ = ๐ด is a critical point. In fact, each critical point corresponds to an equilibrium solution. Note also, by looking at the graph, that the solution ๐ฅ = ๐ด is “stable” in that small perturbations in ๐ฅ do not lead to substantially different solutions as ๐ก grows. If we change the initial condition a little bit, then as ๐ก → ∞ we get ๐ฅ(๐ก) → ๐ด. We call such a critical point stable. In this simple example it turns out that all solutions in fact go to ๐ด as ๐ก → ∞. If a critical point is not stable, we say it is unstable. 0 5 10 15 20 0 10 10 5 5 0 0 -5 -5 -10 -10 0 5 10 15 20 Figure 1.11: The slope field and some solutions of ๐ฅ 0 = 0.3 (5 − ๐ฅ). 5 10 15 20 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 -5.0 -5.0 0 5 10 15 20 Figure 1.12: The slope field and some solutions of ๐ฅ 0 = 0.1 ๐ฅ (5 − ๐ฅ). Consider now the logistic equation ๐๐ฅ = ๐๐ฅ(๐ − ๐ฅ), ๐๐ก 52 CHAPTER 1. FIRST ORDER EQUATIONS for some positive ๐ and ๐. This equation is commonly used to model population if we know the limiting population ๐, that is the maximum sustainable population. The logistic equation leads to less catastrophic predictions on world population than ๐ฅ 0 = ๐๐ฅ. In the real world there is no such thing as negative population, but we will still consider negative ๐ฅ for the purposes of the math. See Figure 1.12 on the preceding page for an example, ๐ฅ 0 = 0.1๐ฅ(5 − ๐ฅ). There are two critical points, ๐ฅ = 0 and ๐ฅ = 5. The critical point at ๐ฅ = 5 is stable, while the critical point at ๐ฅ = 0 is unstable. It is not necessary to find the exact solutions to talk about the long term behavior of the solutions. From the slope field above of ๐ฅ 0 = 0.1๐ฅ(5 − ๐ฅ), we see that if ๐ฅ(0) > 0, ๏ฃฑ ๏ฃด 5 ๏ฃด ๏ฃฒ ๏ฃด lim ๐ฅ(๐ก) = 0 ๐ก→∞ if ๐ฅ(0) = 0, ๏ฃด ๏ฃด ๏ฃด DNE or −∞ if ๐ฅ(0) < 0. ๏ฃณ Here DNE means “does not exist.” From just looking at the slope field we cannot quite decide what happens if ๐ฅ(0) < 0. It could be that the solution does not exist for ๐ก all the way to ∞. Think of the equation ๐ฅ 0 = ๐ฅ 2 ; we have seen that solutions only exist for some finite period of time. Same can happen here. In our example equation above it turns out that the solution does not exist for all time, but to see that we would have to solve the equation. In any case, the solution does go to −∞, but it may get there rather quickly. If we are interested only in the long term behavior of the solution, we would be doing unnecessary work if we solved the equation exactly. We could draw the slope field, but it is easier to just look at the phase diagram or phase portrait, which is a simple way to visualize the behavior of autonomous equations. In this case there is one dependent variable ๐ฅ. We draw the ๐ฅ-axis, we mark all the critical points, and then we draw arrows in between. Since ๐ฅ is the dependent variable we draw the axis vertically, as it appears in the slope field diagrams above. If ๐ (๐ฅ) > 0, we draw an up arrow. If ๐ (๐ฅ) < 0, we draw a down arrow. To figure this out, we could just plug in some ๐ฅ between the critical points, ๐ (๐ฅ) will have the same sign at all ๐ฅ between two critical points as long ๐ (๐ฅ) is continuous. For example, ๐ (6) = −0.6 < 0, so ๐ (๐ฅ) < 0 for ๐ฅ > 5, and the arrow above ๐ฅ = 5 is a down arrow. Next, ๐ (1) = 0.4 > 0, so ๐ (๐ฅ) > 0 whenever 0 < ๐ฅ < 5, and the arrow points up. Finally, ๐ (−1) = −0.6 < 0 so ๐ (๐ฅ) < 0 when ๐ฅ < 0, and the arrow points down. ๐ฅ=5 ๐ฅ=0 53 1.6. AUTONOMOUS EQUATIONS Armed with the phase diagram, it is easy to sketch the solutions approximately: As time ๐ก moves from left to right, the graph of a solution goes up if the arrow is up, and it goes down if the arrow is down. Exercise 1.6.1: Try sketching a few solutions simply from looking at the phase diagram. Check with the preceding graphs if you are getting the same type of curves. Once we draw the phase diagram, we classify critical points as stable or unstable∗ . unstable stable Since any mathematical model we cook up will only be an approximation to the real world, unstable points are generally bad news. Let us think about the logistic equation with harvesting. Suppose an alien race really likes to eat humans. They keep a planet with humans on it and harvest the humans at a rate of โ million humans per year. Suppose ๐ฅ is the number of humans in millions on the planet and ๐ก is time in years. Let ๐ be the limiting population when no harvesting is done. The number ๐ > 0 is a constant depending on how fast humans multiply. Our equation becomes ๐๐ฅ = ๐๐ฅ(๐ − ๐ฅ) − โ. ๐๐ก We expand the right-hand side and set it to zero. ๐๐ฅ(๐ − ๐ฅ) − โ = −๐๐ฅ 2 + ๐๐๐ฅ − โ = 0. Solving for the critical points, let us call them ๐ด and ๐ต, we get ๐๐ + ๐ด= q 2 (๐๐) − 4โ๐ 2๐ ๐๐ − , ๐ต= q (๐๐)2 − 4โ๐ 2๐ . Exercise 1.6.2: Sketch a phase diagram for different possibilities. Note that these possibilities are ๐ด > ๐ต, or ๐ด = ๐ต, or ๐ด and ๐ต both complex (i.e. no real solutions). Hint: Fix some simple ๐ and ๐ and then vary โ. For example, let ๐ = 8 and ๐ = 0.1. When โ = 1, then ๐ด and ๐ต are distinct and positive. The slope field we get is in Figure 1.13 on the next page. As long as the population starts above ๐ต, which is approximately 1.55 million, then the population will not die out. It will in fact tend towards ๐ด ≈ 6.45 million. If ever some catastrophe happens and the population drops below ๐ต, humans will die out, and the fast food restaurant serving them will go out of business. ∗ Unstable points with one of the arrows pointing towards the critical point are sometimes called semistable. 54 CHAPTER 1. FIRST ORDER EQUATIONS 0 5 10 15 0 20 5 10 15 20 10.0 10.0 10.0 10.0 7.5 7.5 7.5 7.5 5.0 5.0 5.0 5.0 2.5 2.5 2.5 2.5 0.0 0.0 0.0 0 5 10 15 0.0 0 20 Figure 1.13: The slope field and some solutions of ๐ฅ 0 = 0.1 ๐ฅ (8 − ๐ฅ) − 1. 5 10 15 20 Figure 1.14: The slope field and some solutions of ๐ฅ 0 = 0.1 ๐ฅ (8 − ๐ฅ) − 1.6. When โ = 1.6, then ๐ด = ๐ต = 4. There is only one critical point and it is unstable. When the population starts above 4 million it will tend towards 4 million. If it ever drops below 4 million, humans will die out on the planet. This scenario is not one that we (as the human fast food proprietor) want to be in. A small perturbation of the equilibrium state and we are out of business. There is no room for error. See Figure 1.14. Finally if we are harvesting at 2 million humans per year, there are no critical points. The population will always plummet towards zero, no matter how well stocked the planet starts. See Figure 1.15. 0 5 10 15 20 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 0.0 0.0 0 5 10 15 20 Figure 1.15: The slope field and some solutions of ๐ฅ 0 = 0.1 ๐ฅ (8 − ๐ฅ) − 2. 55 1.6. AUTONOMOUS EQUATIONS 1.6.1 Exercises Exercise 1.6.3: Consider ๐ฅ 0 = ๐ฅ 2 . a) Draw the phase diagram, find the critical points, and mark them stable or unstable. b) Sketch typical solutions of the equation. c) Find lim ๐ฅ(๐ก) for the solution with the initial condition ๐ฅ(0) = −1. ๐ก→∞ Exercise 1.6.4: Consider ๐ฅ 0 = sin ๐ฅ. a) Draw the phase diagram for −4๐ ≤ ๐ฅ ≤ 4๐. On this interval mark the critical points stable or unstable. b) Sketch typical solutions of the equation. c) Find lim ๐ฅ(๐ก) for the solution with the initial condition ๐ฅ(0) = 1. ๐ก→∞ Exercise 1.6.5: Suppose ๐ (๐ฅ) is positive for 0 < ๐ฅ < 1, it is zero when ๐ฅ = 0 and ๐ฅ = 1, and it is negative for all other ๐ฅ. a) Draw the phase diagram for ๐ฅ 0 = ๐ (๐ฅ), find the critical points, and mark them stable or unstable. b) Sketch typical solutions of the equation. c) Find lim ๐ฅ(๐ก) for the solution with the initial condition ๐ฅ(0) = 0.5. ๐ก→∞ Exercise 1.6.6: Start with the logistic equation ๐๐ฅ ๐๐ก = ๐๐ฅ(๐ − ๐ฅ). Suppose we modify our harvesting. That is we will only harvest an amount proportional to current population. In other words, we harvest โ๐ฅ per unit of time for some โ > 0 (similar to earlier example with โ replaced with โ๐ฅ). a) Construct the differential equation. b) Show that if ๐๐ > โ, then the equation is still logistic. c) What happens when ๐๐ < โ? Exercise 1.6.7: A disease is spreading through the country. Let ๐ฅ be the number of people infected. Let the constant ๐ be the number of people susceptible to infection. The infection rate ๐๐ฅ ๐๐ก is proportional to the product of already infected people, ๐ฅ, and the number of susceptible but uninfected people, ๐ − ๐ฅ. a) Write down the differential equation. b) Supposing ๐ฅ(0) > 0, that is, some people are infected at time ๐ก = 0, what is lim ๐ฅ(๐ก). ๐ก→∞ c) Does the solution to part b) agree with your intuition? Why or why not? 56 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.6.101: Let ๐ฅ 0 = (๐ฅ − 1)(๐ฅ − 2)๐ฅ 2 . a) Sketch the phase diagram and find critical points. b) Classify the critical points. c) If ๐ฅ(0) = 0.5, then find lim ๐ฅ(๐ก). ๐ก→∞ Exercise 1.6.102: Let ๐ฅ 0 = ๐ −๐ฅ . a) Find and classify all critical points. b) Find lim ๐ฅ(๐ก) given any initial condition. ๐ก→∞ Exercise 1.6.103: Assume that a population of fish in a lake satisfies suppose that fish are continually added at ๐ด fish per unit of time. a) Find the differential equation for ๐ฅ. Exercise 1.6.104: Suppose ๐๐ฅ ๐๐ก ๐๐ฅ ๐๐ก = ๐๐ฅ(๐ − ๐ฅ). Now b) What is the new limiting population? = (๐ฅ − ๐ผ)(๐ฅ − ๐ฝ) for two numbers ๐ผ < ๐ฝ. a) Find the critical points, and classify them. For b), c), d), find lim ๐ฅ(๐ก) based on the phase diagram. ๐ก→∞ b) ๐ฅ(0) < ๐ผ, c) ๐ผ < ๐ฅ(0) < ๐ฝ, d) ๐ฝ < ๐ฅ(0). 57 1.7. NUMERICAL METHODS: EULER’S METHOD 1.7 Numerical methods: Euler’s method Note: 1 lecture, can safely be skipped, §2.4 in [EP], §8.1 in [BD] Unless ๐ (๐ฅ, ๐ฆ) is of a special form, it is generally very hard if not impossible to get a nice formula for the solution of the problem ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ(๐ฅ0 ) = ๐ฆ0 . If the equation can be solved in closed form, we should do that. But what if we have an equation that cannot be solved in closed form? What if we want to find the value of the solution at some particular ๐ฅ? Or perhaps we want to produce a graph of the solution to inspect the behavior. In this section we will learn about the basics of numerical approximation of solutions. The simplest method for approximating a solution is Euler’s method∗ . It works as follows: Take ๐ฅ0 and compute the slope ๐ = ๐ (๐ฅ0 , ๐ฆ0 ). The slope is the change in ๐ฆ per unit change in ๐ฅ. Follow the line for an interval of length โ on the ๐ฅ-axis. Hence if ๐ฆ = ๐ฆ0 at ๐ฅ0 , then we say that ๐ฆ1 (the approximate value of ๐ฆ at ๐ฅ1 = ๐ฅ 0 + โ) is ๐ฆ1 = ๐ฆ0 + โ๐. Rinse, repeat! Let ๐ = ๐ (๐ฅ1 , ๐ฆ1 ), and then compute ๐ฅ2 = ๐ฅ 1 + โ, and ๐ฆ2 = ๐ฆ1 + โ๐. Now compute ๐ฅ3 and ๐ฆ3 using ๐ฅ2 and ๐ฆ2 , etc. Consider the equation ๐ฆ 0 = ๐ฆ 2/3, ๐ฆ(0) = 1, and โ = 1. Then ๐ฅ0 = 0 and ๐ฆ0 = 1. We compute ๐ฅ1 = ๐ฅ 0 + โ = 0 + 1 = 1, ๐ฆ1 = ๐ฆ0 + โ ๐ (๐ฅ0 , ๐ฆ0 ) = 1 + 1 · 1/3 = 4/3 ≈ 1.333, ๐ฅ2 = ๐ฅ 1 + โ = 1 + 1 = 2, ๐ฆ2 = ๐ฆ1 + โ ๐ (๐ฅ1 , ๐ฆ1 ) = 4/3 + 1 · (4/3)2 52 = /27 ≈ 1.926. 3 We then draw an approximate graph of the solution by connecting the points (๐ฅ0 , ๐ฆ0 ), (๐ฅ1 , ๐ฆ1 ), (๐ฅ2 , ๐ฆ2 ),. . . . For the first two steps of the method see Figure 1.16 on the following page. More abstractly, for any ๐ = 0, 1, 2, 3, . . ., we compute ๐ฅ ๐+1 = ๐ฅ ๐ + โ, ๐ฆ ๐+1 = ๐ฆ ๐ + โ ๐ (๐ฅ ๐ , ๐ฆ ๐ ). The line segments we get are an approximate graph of the solution. Generally it is not exactly the solution. See Figure 1.17 on the next page for the plot of the real solution and the approximation. We continue with the equation ๐ฆ 0 = ๐ฆ 2/3, ๐ฆ(0) = 1. Let us try to approximate ๐ฆ(2) using Euler’s method. In Figures 1.16 and 1.17 we have graphically approximated ๐ฆ(2) with step size 1. With step size 1, we have ๐ฆ(2) ≈ 1.926. The real answer is 3. We are approximately 1.074 off. Let us halve the step size. Computing ๐ฆ4 with โ = 0.5, we find that ๐ฆ(2) ≈ 2.209, so an error of about 0.791. Table 1.1 on page 59 gives the values computed for various parameters. ∗ Named after the Swiss mathematician Leonhard Paul Euler (1707–1783). The correct pronunciation of the name sounds more like “oiler.” 58 CHAPTER 1. FIRST ORDER EQUATIONS -1 0 1 2 3 -1 0 1 2 3 3.0 3.0 3.0 3.0 2.5 2.5 2.5 2.5 2.0 2.0 2.0 2.0 1.5 1.5 1.5 1.5 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 -1 0 1 2 3 0.0 -1 0 1 Figure 1.16: First two steps of Euler’s method with โ = 1 for the equation ๐ฆ 0 = ๐ฆ(0) = 1. -1 0 1 2 2 ๐ฆ2 3 3 with initial conditions 3 3.0 3.0 2.5 2.5 2.0 2.0 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 -1 0 1 2 3 Figure 1.17: Two steps of Euler’s method (step size 1) and the exact solution for the equation ๐ฆ 0 = initial conditions ๐ฆ(0) = 1. ๐ฆ2 3 with Exercise 1.7.1: Solve this equation exactly and show that ๐ฆ(2) = 3. The difference between the actual solution and the approximate solution is called the error. We usually talk about just the size of the error and we do not care much about its sign. The point is, we usually do not know the real solution, so we only have a vague understanding of the error. If we knew the error exactly . . . what is the point of doing the approximation? Notice that except for the first few times, every time we halved the interval the error approximately halved. This halving of the error is a general feature of Euler’s method as it is a first order method. There exists an improved Euler method, see the exercises, which is a second order method. A second order method reduces the error to approximately one 59 1.7. NUMERICAL METHODS: EULER’S METHOD โ Approximate ๐ฆ(2) Error Error Previous error 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 1.92593 2.20861 2.47250 2.68034 2.82040 2.90412 2.95035 2.97472 1.07407 0.79139 0.52751 0.31966 0.17960 0.09588 0.04965 0.02528 0.73681 0.66656 0.60599 0.56184 0.53385 0.51779 0.50913 Table 1.1: Euler’s method approximation of ๐ฆ(2) where of ๐ฆ 0 = ๐ฆ 2/3, ๐ฆ(0) = 1. quarter every time we halve the interval. The meaning of “second” order is the squaring in = 1/2 × 1/2 = (1/2)2 . To get the error to be within 0.1 of the answer we had to already do 64 steps. To get it to within 0.01 we would have to halve another three or four times, meaning doing 512 to 1024 steps. That is quite a bit to do by hand. The improved Euler method from the exercises should quarter the error every time we halve the interval, so we would have to approximately do half as many “halvings” to get the same error. This reduction can be a big deal. With 10 halvings (starting at โ = 1) we have 1024 steps, whereas with 5 halvings we only have to do 32 steps, assuming that the error was comparable to start with. A computer may not care about this difference for a problem this simple, but suppose each step would take a second to compute (the function may be substantially more difficult to compute than ๐ฆ 2/3). Then the difference is 32 seconds versus about 17 minutes. We are not being altogether fair, a second order method would probably double the time to do each step. Even so, it is 1 minute versus 17 minutes. Next, suppose that we have to repeat such a calculation for different parameters a thousand times. You get the idea. Note that in practice we do not know how large the error is! How do we know what is the right step size? Well, essentially we keep halving the interval, and if we are lucky, we can estimate the error from a few of these calculations and the assumption that the error goes down by a factor of one half each time (if we are using standard Euler). 1/4 Exercise 1.7.2: In the table above, suppose you do not know the error. Take the approximate values of the function in the last two lines, assume that the error goes down by a factor of 2. Can you estimate the error in the last time from this? Does it (approximately) agree with the table? Now do it for the first two rows. Does this agree with the table? Let us talk a little bit more about the example ๐ฆ 0 = ๐ฆ 2/3, ๐ฆ(0) = 1. Suppose that instead of the value ๐ฆ(2) we wish to find ๐ฆ(3). The results of this effort are listed in Table 1.2 on the next page for successive halvings of โ. What is going on here? Well, you should solve the 60 CHAPTER 1. FIRST ORDER EQUATIONS equation exactly and you will notice that the solution does not exist at ๐ฅ = 3. In fact, the solution goes to infinity when you approach ๐ฅ = 3. โ Approximate ๐ฆ(3) 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 3.16232 4.54329 6.86079 10.80321 17.59893 29.46004 50.40121 87.75769 Table 1.2: Attempts to use Euler’s to approximate ๐ฆ(3) where of ๐ฆ 0 = ๐ฆ 2/3, ๐ฆ(0) = 1. Another case where things go bad is if the solution oscillates wildly near some point. The solution may exist at all points, but even a much better numerical method than Euler would need an insanely small step size to approximate the solution with reasonable precision. And computers might not be able to easily handle such a small step size. In real applications we would not use a simple method such as Euler’s. The simplest method that would probably be used in a real application is the standard Runge–Kutta method (see exercises). That is a fourth order method, meaning that if we halve the interval, the error generally goes down by a factor of 16 (it is fourth order as 1/16 = 1/2 × 1/2 × 1/2 × 1/2). Choosing the right method to use and the right step size can be very tricky. There are several competing factors to consider. • Computational time: Each step takes computer time. Even if the function ๐ is simple to compute, we do it many times over. Large step size means faster computation, but perhaps not the right precision. • Roundoff errors: Computers only compute with a certain number of significant digits. Errors introduced by rounding numbers off during our computations become noticeable when the step size becomes too small relative to the quantities we are working with. So reducing step size may in fact make errors worse. There is a certain optimum step size such that the precision increases as we approach it, but then starts getting worse as we make our step size smaller still. Trouble is: this optimum may be hard to find. • Stability: Certain equations may be numerically unstable. What may happen is that the numbers never seem to stabilize no matter how many times we halve the interval. 61 1.7. NUMERICAL METHODS: EULER’S METHOD We may need a ridiculously small interval size, which may not be practical due to roundoff errors or computational time considerations. Such problems are sometimes called stiff . In the worst case, the numerical computations might be giving us bogus numbers that look like a correct answer. Just because the numbers seem to have stabilized after successive halving, does not mean that we must have the right answer. We have seen just the beginnings of the challenges that appear in real applications. Numerical approximation of solutions to differential equations is an active research area for engineers and mathematicians. For example, the general purpose method used for the ODE solver in Matlab and Octave (as of this writing) is a method that appeared in the literature only in the 1980s. 1.7.1 Exercises Exercise 1.7.3: Consider approximate ๐ฅ(1). Exercise 1.7.4: Consider ๐๐ฅ = (2๐ก − ๐ฅ)2 , ๐ฅ(0) = 2. Use Euler’s method with step size โ = 0.5 to ๐๐ก ๐๐ฅ = ๐ก − ๐ฅ, ๐ฅ(0) = 1. ๐๐ก a) Use Euler’s method with step sizes โ = 1, 1/2, 1/4, 1/8 to approximate ๐ฅ(1). b) Solve the equation exactly. c) Describe what happens to the errors for each โ you used. That is, find the factor by which the error changed each time you halved the interval. Exercise 1.7.5: Approximate the value of ๐ by looking at the initial value problem ๐ฆ 0 = ๐ฆ with ๐ฆ(0) = 1 and approximating ๐ฆ(1) using Euler’s method with a step size of 0.2. Exercise 1.7.6: Example of numerical instability: Take ๐ฆ 0 = −5๐ฆ, ๐ฆ(0) = 1. We know that the solution should decay to zero as ๐ฅ grows. Using Euler’s method, start with โ = 1 and compute ๐ฆ1 , ๐ฆ2 , ๐ฆ3 , ๐ฆ4 to try to approximate ๐ฆ(4). What happened? Now halve the interval. Keep halving the interval and approximating ๐ฆ(4) until the numbers you are getting start to stabilize (that is, until they start going towards zero). Note: You might want to use a calculator. ๐๐ฆ The simplest method used in practice is the Runge–Kutta method. Consider ๐๐ฅ = ๐ (๐ฅ, ๐ฆ), ๐ฆ(๐ฅ0 ) = ๐ฆ0 , and a step size โ. Everything is the same as in Euler’s method, except the computation of ๐ฆ ๐+1 and ๐ฅ ๐+1 . ๐ 1 = ๐ (๐ฅ ๐ , ๐ฆ ๐ ), ๐ 2 = ๐ ๐ฅ ๐ + โ/2, ๐ฆ ๐ + ๐ 1 ( โ/2) , ๐ 3 = ๐ ๐ฅ ๐ + โ/2, ๐ฆ ๐ + ๐ 2 ( โ/2) , ๐ 4 = ๐ (๐ฅ ๐ + โ, ๐ฆ ๐ + ๐ 3 โ). ๐ฅ ๐+1 = ๐ฅ ๐ + โ, ๐ 1 + 2๐ 2 + 2๐ 3 + ๐4 ๐ฆ ๐+1 = ๐ฆ ๐ + โ, 6 62 CHAPTER 1. FIRST ORDER EQUATIONS Exercise 1.7.7: Consider ๐๐ฆ = ๐ฆ๐ฅ 2 , ๐ฆ(0) = 1. ๐๐ฅ a) Use Runge–Kutta (see above) with step sizes โ = 1 and โ = 1/2 to approximate ๐ฆ(1). b) Use Euler’s method with โ = 1 and โ = 1/2. c) Solve exactly, find the exact value of ๐ฆ(1), and compare. Exercise 1.7.101: Let ๐ฅ 0 = sin(๐ฅ๐ก), and ๐ฅ(0) = 1. Approximate ๐ฅ(1) using Euler’s method with step sizes 1, 0.5, 0.25. Use a calculator and compute up to 4 decimal digits. Exercise 1.7.102: Let ๐ฅ 0 = 2๐ก, and ๐ฅ(0) = 0. a) Approximate ๐ฅ(4) using Euler’s method with step sizes 4, 2, and 1. b) Solve exactly, and compute the errors. c) Compute the factor by which the errors changed. Exercise 1.7.103: Let ๐ฅ 0 = ๐ฅ๐ ๐ฅ๐ก+1 , and ๐ฅ(0) = 0. a) Approximate ๐ฅ(4) using Euler’s method with step sizes 4, 2, and 1. b) Guess an exact solution based on part a) and compute the errors. There is a simple way to improve Euler’s method to make it a second order method ๐๐ฆ by doing just one extra step. Consider ๐๐ฅ = ๐ (๐ฅ, ๐ฆ), ๐ฆ(๐ฅ 0 ) = ๐ฆ0 , and a step size โ. What we do is to pretend we compute the next step as in Euler, that is, we start with (๐ฅ ๐ , ๐ฆ ๐ ), we compute a slope ๐1 = ๐ (๐ฅ ๐ , ๐ฆ ๐ ), and then look at the point (๐ฅ ๐ + โ, ๐ฆ ๐ + ๐1 โ). Instead of letting our new point be (๐ฅ ๐ + โ, ๐ฆ ๐ + ๐ 1 โ), we compute the slope at that point, call it ๐ 2 , and then take the average of ๐1 and ๐ 2 , hoping that the average is going to be closer to the actual slope on the interval from ๐ฅ ๐ to ๐ฅ ๐ + โ. And we are correct, if we halve the step, the error should go down by a factor of 22 = 4. To summarize, the setup is the same as for regular Euler, except the computation of ๐ฆ ๐+1 and ๐ฅ ๐+1 . ๐ 1 = ๐ (๐ฅ ๐ , ๐ฆ ๐ ), ๐ 2 = ๐ (๐ฅ ๐ + โ, ๐ฆ ๐ + ๐ 1 โ), Exercise 1.7.104: Consider ๐ฅ ๐+1 = ๐ฅ ๐ + โ, ๐1 + ๐2 ๐ฆ ๐+1 = ๐ฆ ๐ + โ. 2 ๐๐ฆ = ๐ฅ + ๐ฆ, ๐ฆ(0) = 1. ๐๐ฅ a) Use the improved Euler’s method (see above) with step sizes โ = 1/4 and โ = 1/8 to approximate ๐ฆ(1). b) Use Euler’s method with โ = 1/4 and โ = 1/8. c) Solve exactly, find the exact value of ๐ฆ(1). d) Compute the errors, and the factors by which the errors changed. 63 1.8. EXACT EQUATIONS 1.8 Exact equations Note: 1–2 lectures, can safely be skipped, §1.6 in [EP], §2.6 in [BD] Another type of equation that comes up quite often in physics and engineering is an exact equation. Suppose ๐น(๐ฅ, ๐ฆ) is a function of two variables, which we call the potential function. The naming should suggest potential energy, or electric potential. Exact equations and potential functions appear when there is a conservation law at play, such as conservation of energy. Let us make up a simple example. Let ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฆ 2 . We are interested in the lines of constant energy, that is lines where the energy is conserved; we want curves where ๐น(๐ฅ, ๐ฆ) = ๐ถ, for some constant ๐ถ. In our example, the curves ๐ฅ 2 + ๐ฆ 2 = ๐ถ are circles. See Figure 1.18. We take the total derivative of ๐น: ๐๐น = ๐๐น ๐๐น ๐๐ฅ + ๐๐ฆ. ๐๐ฅ ๐๐ฆ For convenience, we will make use of the notation of ๐น๐ฅ = ๐๐น and ๐น ๐ฆ = ๐๐น . In our ๐๐ฅ ๐๐ฆ example, ๐๐น = 2๐ฅ ๐๐ฅ + 2๐ฆ ๐๐ฆ. -10 -5 0 5 10 10 10 5 5 0 0 -5 -5 -10 -10 -10 -5 0 5 10 Figure 1.18: Solutions to ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฆ 2 = ๐ถ for various ๐ถ. We apply the total derivative to ๐น(๐ฅ, ๐ฆ) = ๐ถ, to find the differential equation ๐๐น = 0. The differential equation we obtain in such a way has the form ๐๐ฆ ๐ ๐๐ฅ + ๐ ๐๐ฆ = 0, or ๐+๐ = 0. ๐๐ฅ An equation of this form is called exact if it was obtained as ๐๐น = 0 for some potential function ๐น. In our simple example, we obtain the equation 2๐ฅ ๐๐ฅ + 2๐ฆ ๐๐ฆ = 0, or 2๐ฅ + 2๐ฆ ๐๐ฆ = 0. ๐๐ฅ Since we obtained this equation by differentiating ๐ฅ 2 + ๐ฆ 2 = ๐ถ, the equation is exact. We often wish to solve for ๐ฆ in terms of ๐ฅ. In our example, √ ๐ฆ = ± ๐ถ2 − ๐ฅ2. An interpretation of the setup is that at each point ๐ฃ® = (๐, ๐) is a vector in the plane, that is, a direction and a magnitude. As ๐ and ๐ are functions of (๐ฅ, ๐ฆ), we have a 64 CHAPTER 1. FIRST ORDER EQUATIONS vector field. The particular vector field ๐ฃ® that comes from an exact equation is a so-called conservative vector field, that is, a vector field that comes with a potential function ๐น(๐ฅ, ๐ฆ), such that ๐๐น ๐๐น ๐ฃ® = , . ๐๐ฅ ๐๐ฆ Let ๐พ be a path in the plane starting at (๐ฅ1 , ๐ฆ1 ) and ending at (๐ฅ 2 , ๐ฆ2 ). If we think of ๐ฃ® as force, then the work required to move along ๐พ is ∫ ๐พ ๐ฃ® (®๐ ) · ๐®๐ = ∫ ๐พ ๐ ๐๐ฅ + ๐ ๐๐ฆ = ๐น(๐ฅ2 , ๐ฆ2 ) − ๐น(๐ฅ1 , ๐ฆ1 ). That is, the work done only depends on endpoints, that is where we start and where we end. For example, suppose ๐น is gravitational potential. The derivative of ๐น given by ๐ฃ® is the gravitational force. What we are saying is that the work required to move a heavy box from the ground floor to the roof, only depends on the change in potential energy. That is, the work done is the same no matter what path we took; if we took the stairs or the elevator. Although if we took the elevator, the elevator is doing the work for us. The curves ๐น(๐ฅ, ๐ฆ) = ๐ถ are those where no work need be done, such as the heavy box sliding along without accelerating or breaking on a perfectly flat roof, on a cart with incredibly well oiled wheels. An exact equation is a conservative vector field, and the implicit solution of this equation is the potential function. 1.8.1 Solving exact equations Now you, the reader, should ask: Where did we solve a differential equation? Well, in applications we generally know ๐ and ๐, but we do not know ๐น. That is, we may have ๐๐ฆ just started with 2๐ฅ + 2๐ฆ ๐๐ฅ = 0, or perhaps even ๐ฅ+๐ฆ ๐๐ฆ = 0. ๐๐ฅ It is up to us to find some potential ๐น that works. Many different ๐น will work; adding a constant to ๐น does not change the equation. Once we have a potential function ๐น, the equation ๐น ๐ฅ, ๐ฆ(๐ฅ) = ๐ถ gives an implicit solution of the ODE. ๐๐ฆ Example 1.8.1: Let us find the general solution to 2๐ฅ + 2๐ฆ ๐๐ฅ = 0. Forget we knew what ๐น was. If we know that this is an exact equation, we start looking for a potential function ๐น. We have ๐ = 2๐ฅ and ๐ = 2๐ฆ. If ๐น exists, it must be such that ๐น๐ฅ (๐ฅ, ๐ฆ) = 2๐ฅ. Integrate in the ๐ฅ variable to find ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ด(๐ฆ), (1.5) for some function ๐ด(๐ฆ). The function ๐ด is the “constant of integration”, though it is only constant as far as ๐ฅ is concerned, and may still depend on ๐ฆ. Now differentiate (1.5) in ๐ฆ 65 1.8. EXACT EQUATIONS and set it equal to ๐, which is what ๐น ๐ฆ is supposed to be: 2๐ฆ = ๐น ๐ฆ (๐ฅ, ๐ฆ) = ๐ด0(๐ฆ). Integrating, we find ๐ด(๐ฆ) = ๐ฆ 2 . We could add a constant of integration if we wanted to, but there is no need. We found ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฆ 2 . Next for a constant ๐ถ, we solve ๐น ๐ฅ, ๐ฆ(๐ฅ) = ๐ถ. √ for ๐ฆ in terms of ๐ฅ. In this case, we obtain ๐ฆ = ± ๐ถ 2 − ๐ฅ 2 as we did before. Exercise 1.8.1: Why did we not need to add a constant of integration when integrating ๐ด0(๐ฆ) = 2๐ฆ? Add a constant of integration, say 3, and see what ๐น you get. What is the difference from what we got above, and why does it not matter? The procedure, once we know that the equation is exact, is: (i) Integrate ๐น๐ฅ = ๐ in ๐ฅ resulting in ๐น(๐ฅ, ๐ฆ) = something + ๐ด(๐ฆ). (ii) Differentiate this ๐น in ๐ฆ, and set that equal to ๐, so that we may find ๐ด(๐ฆ) by integration. The procedure can also be done by first integrating in ๐ฆ and then differentiating in ๐ฅ. Pretty easy huh? Let’s try this again. ๐๐ฆ Example 1.8.2: Consider now 2๐ฅ + ๐ฆ + ๐ฅ๐ฆ ๐๐ฅ = 0. OK, so ๐ = 2๐ฅ + ๐ฆ and ๐ = ๐ฅ๐ฆ. We try to proceed as before. Suppose ๐น exists. Then ๐น๐ฅ (๐ฅ, ๐ฆ) = 2๐ฅ + ๐ฆ. We integrate: ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฅ๐ฆ + ๐ด(๐ฆ) for some function ๐ด(๐ฆ). Differentiate in ๐ฆ and set equal to ๐: ๐ = ๐ฅ๐ฆ = ๐น ๐ฆ (๐ฅ, ๐ฆ) = ๐ฅ + ๐ด0(๐ฆ). But there is no way to satisfy this requirement! The function ๐ฅ๐ฆ cannot be written as ๐ฅ plus a function of ๐ฆ. The equation is not exact; no potential function ๐น exists. Is there an easier way to check for the existence of ๐น, other than failing in trying to find it? Turns out there is. Suppose ๐ = ๐น๐ฅ and ๐ = ๐น ๐ฆ . Then as long as the second derivatives are continuous, ๐๐ ๐2 ๐น ๐2 ๐น ๐๐ = = = . ๐๐ฆ ๐๐ฆ๐๐ฅ ๐๐ฅ๐๐ฆ ๐๐ฅ Let us state it as a theorem. Usually this is called the Poincaré Lemma∗ . Theorem 1.8.1 (Poincaré). If ๐ and ๐ are continuously differentiable functions of (๐ฅ, ๐ฆ), and ๐๐ = ๐๐ , then near any point there is a function ๐น(๐ฅ, ๐ฆ) such that ๐ = ๐๐น and ๐ = ๐๐น . ๐๐ฆ ๐๐ฅ ๐๐ฅ ๐๐ฆ ∗ Named for the French polymath Jules Henri Poincaré (1854–1912). 66 CHAPTER 1. FIRST ORDER EQUATIONS The theorem doesn’t give us a global ๐น defined everywhere. In general, we can only find the potential locally, near some initial point. By this time, we have come to expect this from differential equations. Let us return to Example 1.8.2 where ๐ = 2๐ฅ + ๐ฆ and ๐ = ๐ฅ๐ฆ. Notice ๐ ๐ฆ = 1 and ๐๐ฅ = ๐ฆ, which are clearly not equal. The equation is not exact. Example 1.8.3: Solve ๐๐ฆ −2๐ฅ − ๐ฆ = , ๐๐ฅ ๐ฅ−1 ๐ฆ(0) = 1. We write the equation as (2๐ฅ + ๐ฆ) + (๐ฅ − 1) ๐๐ฆ = 0, ๐๐ฅ so ๐ = 2๐ฅ + ๐ฆ and ๐ = ๐ฅ − 1. Then ๐ ๐ฆ = 1 = ๐๐ฅ . The equation is exact. Integrating ๐ in ๐ฅ, we find ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฅ๐ฆ + ๐ด(๐ฆ). Differentiating in ๐ฆ and setting to ๐, we find ๐ฅ − 1 = ๐ฅ + ๐ด0(๐ฆ). So ๐ด0(๐ฆ) = −1, and ๐ด(๐ฆ) = −๐ฆ will work. Take ๐น(๐ฅ, ๐ฆ) = ๐ฅ 2 + ๐ฅ๐ฆ − ๐ฆ. We wish to solve ๐ฅ 2 + ๐ฅ ๐ฆ − ๐ฆ = ๐ถ. First let us find ๐ถ. As ๐ฆ(0) = 1 then ๐น(0, 1) = ๐ถ. Therefore 02 + 0 × 1 − 1 = ๐ถ, so ๐ถ = −1. Now we solve ๐ฅ 2 + ๐ฅ๐ฆ − ๐ฆ = −1 for ๐ฆ to get ๐ฆ= −๐ฅ 2 − 1 . ๐ฅ−1 Example 1.8.4: Solve − ๐ฅ2 ๐ฆ ๐ฅ ๐๐ฅ + 2 ๐๐ฆ = 0, 2 +๐ฆ ๐ฅ + ๐ฆ2 ๐ฆ(1) = 2. We leave to the reader to check that ๐ ๐ฆ = ๐๐ฅ . This vector field (๐, ๐) is not conservative if considered as a vector field of the entire plane minus the origin. The problem is that if the curve ๐พ is a circle around the origin, say starting at (1, 0) and ending at (1, 0) going counterclockwise, then if ๐น existed we would expect 0 = ๐น(1, 0) − ๐น(1, 0) = ∫ ๐พ ๐น๐ฅ ๐๐ฅ + ๐น ๐ฆ ๐๐ฆ = ∫ ๐พ −๐ฆ ๐ฅ ๐๐ฅ + 2 ๐๐ฆ = 2๐. 2 +๐ฆ ๐ฅ + ๐ฆ2 ๐ฅ2 That is nonsense! We leave the computation of the path integral to the interested reader, or you can consult your multivariable calculus textbook. So there is no potential function ๐น defined everywhere outside the origin (0, 0). 67 1.8. EXACT EQUATIONS If we think back to the theorem, it does not guarantee such a function anyway. It only guarantees a potential function locally, that is only in some region near the initial point. As ๐ฆ(1) = 2 we start at the point (1, 2). Considering ๐ฅ > 0 and integrating ๐ in ๐ฅ or ๐ in ๐ฆ, we find ๐น(๐ฅ, ๐ฆ) = arctan ๐ฆ/๐ฅ . The implicit solution is arctan ๐ฆ/๐ฅ = ๐ถ. Solving, ๐ฆ = tan(๐ถ)๐ฅ. That is, the solution is a straight line. Solving ๐ฆ(1) = 2 gives us that tan(๐ถ) = 2, and so ๐ฆ = 2๐ฅ is the desired solution. See Figure 1.19, and note that the solution only exists for ๐ฅ > 0. -5.0 10 -2.5 0.0 2.5 5.0 10 5 5 0 0 -5 -5 -10 -5.0 -10 -2.5 ๐ฆ Figure 1.19: Solution to − ๐ฅ 2 +๐ฆ 2 ๐๐ฅ + 0.0 ๐ฅ ๐๐ฆ ๐ฅ 2 +๐ฆ 2 2.5 5.0 = 0, ๐ฆ(1) = 2, with initial point marked. Example 1.8.5: Solve ๐๐ฆ = 0. ๐๐ฅ The reader should check that this equation is exact. Let ๐ = ๐ฅ 2 + ๐ฆ 2 and ๐ = 2๐ฆ(๐ฅ + 1). We follow the procedure for exact equations ๐ฅ 2 + ๐ฆ 2 + 2๐ฆ(๐ฅ + 1) ๐น(๐ฅ, ๐ฆ) = 1 3 ๐ฅ + ๐ฅ๐ฆ 2 + ๐ด(๐ฆ), 3 and 2๐ฆ(๐ฅ + 1) = 2๐ฅ๐ฆ + ๐ด0(๐ฆ). Therefore ๐ด0(๐ฆ) = 2๐ฆ or ๐ด(๐ฆ) = ๐ฆ 2 and ๐น(๐ฅ, ๐ฆ) = 31 ๐ฅ 3 + ๐ฅ๐ฆ 2 + ๐ฆ 2 . We try to solve ๐น(๐ฅ, ๐ฆ) = ๐ถ. We easily solve for ๐ฆ 2 and then just take the square root: ๐ถ − (1/3)๐ฅ 3 ๐ฆ2 = , ๐ฅ+1 ๐๐ฆ r so ๐ฆ=± ๐ถ − (1/3)๐ฅ 3 . ๐ฅ+1 When ๐ฅ = −1, the term in front of ๐๐ฅ vanishes. You can also see that our solution is not valid in that case. However, one could in that case try to solve for ๐ฅ in terms of ๐ฆ starting from the implicit solution 13 ๐ฅ 3 + ๐ฅ๐ฆ 2 + ๐ฆ 2 = ๐ถ. The solution is somewhat messy and we leave it as implicit. 68 1.8.2 CHAPTER 1. FIRST ORDER EQUATIONS Integrating factors Sometimes an equation ๐ ๐๐ฅ + ๐ ๐๐ฆ = 0 is not exact, but it can be made exact by multiplying with a function ๐ข(๐ฅ, ๐ฆ). That is, perhaps for some nonzero function ๐ข(๐ฅ, ๐ฆ), ๐ข(๐ฅ, ๐ฆ)๐(๐ฅ, ๐ฆ) ๐๐ฅ + ๐ข(๐ฅ, ๐ฆ)๐(๐ฅ, ๐ฆ) ๐๐ฆ = 0 is exact. Any solution to this new equation is also a solution to ๐ ๐๐ฅ + ๐ ๐๐ฆ = 0. In fact, a linear equation ๐๐ฆ + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), ๐๐ฅ or ๐(๐ฅ)๐ฆ − ๐ (๐ฅ) ๐๐ฅ + ๐๐ฆ = 0 ∫ is always such an equation. Let ๐(๐ฅ) = ๐ ๐(๐ฅ) ๐๐ฅ be the integrating factor for a linear equation. ๐๐ฆ Multiply the equation by ๐(๐ฅ) and write it in the form of ๐ + ๐ ๐๐ฅ = 0. ๐(๐ฅ)๐(๐ฅ)๐ฆ − ๐(๐ฅ) ๐ (๐ฅ) + ๐(๐ฅ) ๐๐ฆ = 0. ๐๐ฅ Then ๐ = ๐(๐ฅ)๐(๐ฅ)๐ฆ − ๐(๐ฅ) ๐ (๐ฅ), so ๐ ๐ฆ = ๐(๐ฅ)๐(๐ฅ), while ๐ = ๐(๐ฅ), so ๐๐ฅ = ๐ 0(๐ฅ) = ๐(๐ฅ)๐(๐ฅ). In other words, we have an exact equation. Integrating factors for linear functions are just a special case of integrating factors for exact equations. But how do we find the integrating factor ๐ข? Well, given an equation ๐ ๐๐ฅ + ๐ ๐๐ฆ = 0, ๐ข should be a function such that ๐ ๐ ๐ข๐ = ๐ข ๐ฆ ๐ + ๐ข๐ ๐ฆ = ๐ข๐ = ๐ข๐ฅ ๐ + ๐ข๐๐ฅ . ๐๐ฆ ๐๐ฅ Therefore, (๐ ๐ฆ − ๐๐ฅ )๐ข = ๐ข๐ฅ ๐ − ๐ข ๐ฆ ๐. At first it may seem we replaced one differential equation by another. True, but all hope is not lost. A strategy that often works is to look for a ๐ข that is a function of ๐ฅ alone, or a function of ๐ฆ alone. If ๐ข is a function of ๐ฅ alone, that is ๐ข(๐ฅ), then we write ๐ข 0(๐ฅ) instead of ๐ข๐ฅ , and ๐ข ๐ฆ is just zero. Then ๐ ๐ฆ − ๐๐ฅ ๐ข = ๐ข0. ๐ ๐ −๐ In particular, ๐ฆ๐ ๐ฅ ought to be a function of ๐ฅ alone (not depend on ๐ฆ). If so, then we have a linear equation ๐ ๐ฆ − ๐๐ฅ ๐ข0 − ๐ข = 0. ๐ 69 1.8. EXACT EQUATIONS ๐ ๐ฆ −๐๐ฅ , ๐ ๐(๐ฅ) ๐๐ฅ Letting ๐(๐ฅ) = ∫ we solve using the standard integrating factor method, to find ๐ข(๐ฅ) = ๐ถ๐ . The constant in the solution is not relevant, we need any nonzero ∫ ๐(๐ฅ) ๐๐ฅ solution, so we take ๐ถ = 1. Then ๐ข(๐ฅ) = ๐ is the integrating factor. Similarly we could try a function of the form ๐ข(๐ฆ). Then ๐ ๐ฆ − ๐๐ฅ ๐ In particular, ๐ ๐ฆ −๐๐ฅ ๐ ought to be a function of ๐ฆ alone. If so, then we have a linear equation ๐ข0 + ๐ ๐ฆ − ๐๐ฅ ๐ ๐ −๐ Letting ๐(๐ฆ) = ๐ฆ๐ ๐ฅ , we find ๐ข(๐ฆ) = ๐ถ๐ − the integrating factor. Example 1.8.6: Solve Let ๐ = ๐ฅ 2 +๐ฆ 2 ๐ฅ+1 ๐ข = −๐ข 0 . ∫ ๐ข = 0. ๐(๐ฆ) ๐๐ฆ . We take ๐ถ = 1. So ๐ข(๐ฆ) = ๐ − ๐ฅ2 + ๐ฆ2 ๐๐ฆ + 2๐ฆ = 0. ๐ฅ+1 ๐๐ฅ and ๐ = 2๐ฆ. Compute ๐ ๐ฆ − ๐๐ฅ = 2๐ฆ 2๐ฆ −0= . ๐ฅ+1 ๐ฅ+1 As this is not zero, the equation is not exact. We notice ๐(๐ฅ) = ๐ ๐ฆ − ๐๐ฅ ๐ = 2๐ฆ 1 1 = ๐ฅ + 1 2๐ฆ ๐ฅ+1 is a function of ๐ฅ alone. We compute the integrating factor ๐ ∫ ๐(๐ฅ) ๐๐ฅ = ๐ ln(๐ฅ+1) = ๐ฅ + 1. We multiply our given equation by (๐ฅ + 1) to obtain ๐ฅ 2 + ๐ฆ 2 + 2๐ฆ(๐ฅ + 1) ๐๐ฆ = 0, ๐๐ฅ which is an exact equation that we solved in Example 1.8.5. The solution was r ๐ฆ=± ๐ถ − (1/3)๐ฅ 3 . ๐ฅ+1 Example 1.8.7: Solve ๐ฆ 2 + (๐ฅ๐ฆ + 1) ๐๐ฆ = 0. ๐๐ฅ ∫ ๐(๐ฆ) ๐๐ฆ is 70 CHAPTER 1. FIRST ORDER EQUATIONS First compute ๐ ๐ฆ − ๐๐ฅ = 2๐ฆ − ๐ฆ = ๐ฆ. As this is not zero, the equation is not exact. We observe ๐(๐ฆ) = ๐ ๐ฆ − ๐๐ฅ ๐ = ๐ฆ 1 = ๐ฆ ๐ฆ2 is a function of ๐ฆ alone. We compute the integrating factor ๐− ∫ ๐(๐ฆ) ๐๐ฆ = ๐ − ln ๐ฆ = 1 . ๐ฆ Therefore we look at the exact equation ๐ฆ+ ๐ฅ๐ฆ + 1 ๐๐ฆ = 0. ๐ฆ ๐๐ฅ The reader should double check that this equation is exact. We follow the procedure for exact equations ๐น(๐ฅ, ๐ฆ) = ๐ฅ๐ฆ + ๐ด(๐ฆ), and ๐ฅ๐ฆ + 1 1 = ๐ฅ + = ๐ฅ + ๐ด0(๐ฆ). ๐ฆ ๐ฆ (1.6) Consequently ๐ด0(๐ฆ) = 1๐ฆ or ๐ด(๐ฆ) = ln ๐ฆ. Thus ๐น(๐ฅ, ๐ฆ) = ๐ฅ๐ฆ + ln ๐ฆ. It is not possible to solve ๐น(๐ฅ, ๐ฆ) = ๐ถ for ๐ฆ in terms of elementary functions, so let us be content with the implicit solution: ๐ฅ๐ฆ + ln ๐ฆ = ๐ถ. We are looking for the general solution and we divided by ๐ฆ above. We should check what happens when ๐ฆ = 0, as the equation itself makes perfect sense in that case. We plug in ๐ฆ = 0 to find the equation is satisfied. So ๐ฆ = 0 is also a solution. 1.8.3 Exercises Exercise 1.8.2: Solve the following exact equations, implicit general solutions will suffice: a) (2๐ฅ ๐ฆ + ๐ฅ 2 ) ๐๐ฅ + (๐ฅ 2 + ๐ฆ 2 + 1) ๐๐ฆ = 0 ๐๐ฆ c) ๐ ๐ฅ + ๐ฆ 3 + 3๐ฅ๐ฆ 2 ๐๐ฅ = 0 ๐๐ฆ b) ๐ฅ 5 + ๐ฆ 5 ๐๐ฅ = 0 d) (๐ฅ + ๐ฆ) cos(๐ฅ) + sin(๐ฅ) + sin(๐ฅ)๐ฆ 0 = 0 Exercise 1.8.3: Find the integrating factor for the following equations making them into exact equations: ๐ฆ a) ๐ ๐ฅ ๐ฆ ๐๐ฅ + ๐ฅ ๐ ๐ฅ ๐ฆ ๐๐ฆ = 0 c) 4(๐ฆ 2 + ๐ฅ) ๐๐ฅ + 2๐ฅ+2๐ฆ 2 ๐ฆ b) ๐๐ฆ = 0 ๐ ๐ฅ +๐ฆ 3 ๐ฆ2 ๐๐ฅ + 3๐ฅ ๐๐ฆ = 0 d) 2 sin(๐ฆ) ๐๐ฅ + ๐ฅ cos(๐ฆ) ๐๐ฆ = 0 71 1.8. EXACT EQUATIONS ๐๐ฆ Exercise 1.8.4: Suppose you have an equation of the form: ๐ (๐ฅ) + ๐(๐ฆ) ๐๐ฅ = 0. a) Show it is exact. b) Find the form of the potential function in terms of ๐ and ๐. Exercise 1.8.5: Suppose that we have the equation ๐ (๐ฅ) ๐๐ฅ − ๐๐ฆ = 0. a) Is this equation exact? b) Find the general solution using a definite integral. Exercise 1.8.6: Find the potential function ๐น(๐ฅ, ๐ฆ) of the exact equation in two different ways. 1+๐ฅ ๐ฆ ๐ฅ ๐๐ฅ + 1/๐ฆ + ๐ฅ ๐๐ฆ = 0 a) Integrate ๐ in terms of ๐ฅ and then differentiate in ๐ฆ and set to ๐. b) Integrate ๐ in terms of ๐ฆ and then differentiate in ๐ฅ and set to ๐. Exercise 1.8.7: A function ๐ข(๐ฅ, ๐ฆ) is said to be a harmonic function if ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0. a) Show if ๐ข is harmonic, −๐ข ๐ฆ ๐๐ฅ + ๐ข๐ฅ ๐๐ฆ = 0 is an exact equation. So there exists (at least locally) the so-called harmonic conjugate function ๐ฃ(๐ฅ, ๐ฆ) such that ๐ฃ ๐ฅ = −๐ข ๐ฆ and ๐ฃ ๐ฆ = ๐ข๐ฅ . Verify that the following ๐ข are harmonic and find the corresponding harmonic conjugates ๐ฃ: c) ๐ข = ๐ ๐ฅ cos ๐ฆ b) ๐ข = 2๐ฅ๐ฆ d) ๐ข = ๐ฅ 3 − 3๐ฅ๐ฆ 2 Exercise 1.8.101: Solve the following exact equations, implicit general solutions will suffice: a) cos(๐ฅ) + ๐ฆ๐ ๐ฅ ๐ฆ + ๐ฅ๐ ๐ฅ ๐ฆ ๐ฆ 0 = 0 ๐๐ฆ c) ๐ ๐ฅ + ๐ ๐ฆ ๐๐ฅ = 0 b) (2๐ฅ + ๐ฆ) ๐๐ฅ + (๐ฅ − 4๐ฆ) ๐๐ฆ = 0 d) (3๐ฅ 2 + 3๐ฆ) ๐๐ฅ + (3๐ฆ 2 + 3๐ฅ) ๐๐ฆ = 0 Exercise 1.8.102: Find the integrating factor for the following equations making them into exact equations: a) c) 1 ๐ฆ ๐๐ฅ + 3๐ฆ ๐๐ฆ = 0 cos(๐ฅ) ๐ฆ2 + 1 ๐ฆ ๐๐ฅ + b) ๐๐ฅ − ๐ −๐ฅ−๐ฆ ๐๐ฆ = 0 ๐ฅ ๐ฆ2 ๐๐ฆ = 0 d) 2๐ฆ + ๐ฆ2 ๐ฅ ๐๐ฅ + (2๐ฆ + ๐ฅ) ๐๐ฆ = 0 Exercise 1.8.103: a) Show that every separable equation ๐ฆ 0 = ๐ (๐ฅ)๐(๐ฆ) can be written as an exact equation, and verify that it is indeed exact. b) Using this rewrite ๐ฆ 0 = ๐ฅ๐ฆ as an exact equation, solve it and verify that the solution is the same as it was in Example 1.3.1. 72 1.9 CHAPTER 1. FIRST ORDER EQUATIONS First order linear PDE Note: 1 lecture, can safely be skipped We only considered ODE so far, so let us solve a linear first order PDE. Consider the equation ๐(๐ฅ, ๐ก) ๐ข๐ฅ + ๐(๐ฅ, ๐ก) ๐ข๐ก + ๐(๐ฅ, ๐ก) ๐ข = ๐(๐ฅ, ๐ก), ๐ข(๐ฅ, 0) = ๐ (๐ฅ), −∞ < ๐ฅ < ∞, ๐ก > 0, where ๐ข(๐ฅ, ๐ก) is a function of ๐ฅ and ๐ก. The initial condition ๐ข(๐ฅ, 0) = ๐ (๐ฅ) is now a function of ๐ฅ rather than just a number. In these problems, it is useful to think of ๐ฅ as position and ๐ก as time. The equation describes the evolution of a function of ๐ฅ as time goes on. Below, the coefficients ๐, ๐, ๐, and the function ๐ are mostly going to be constant or zero. The method we describe works with nonconstant coefficients, although the computations may get difficult quickly. This method we use is the method of characteristics. The idea is that we find lines along which the equation is an ODE that we solve. We will see this technique again for second order PDE when we encounter the wave equation in § 4.8. Example 1.9.1: Consider the equation ๐ข๐ก + ๐ผ๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = ๐ (๐ฅ). This particular equation, ๐ข๐ก + ๐ผ๐ข๐ฅ = 0, is called the transport equation. The data will propagate along curves called characteristics. The idea is to change to the so-called characteristic coordinates. If we change to these coordinates, the equation simplifies. The change of variables for this equation is ๐ = ๐ฅ − ๐ผ๐ก, ๐ = ๐ก. Let’s see what the equation becomes. Remember the chain rule in several variables. ๐ข๐ก = ๐ข๐ ๐๐ก + ๐ข๐ ๐ ๐ก = −๐ผ๐ข๐ + ๐ข๐ , ๐ข ๐ฅ = ๐ข๐ ๐ ๐ฅ + ๐ข ๐ ๐ ๐ฅ = ๐ข๐ . The equation in the coordinates ๐ and ๐ becomes (−๐ผ๐ข๐ + ๐ข๐ ) +๐ผ (๐ข๐ ) = 0, | {z ๐ข๐ก } |{z} ๐ข๐ฅ or in other words ๐ข๐ = 0. That is trivial to solve. Treating ๐ as simply a parameter, we have obtained the ODE ๐๐ข ๐๐ = 0. The solution is a function that does not depend on ๐ (but it does depend on ๐). That is, there is some function ๐ด such that ๐ข = ๐ด(๐) = ๐ด(๐ฅ − ๐ผ๐ก). 73 1.9. FIRST ORDER LINEAR PDE The initial condition says that: ๐ (๐ฅ) = ๐ข(๐ฅ, 0) = ๐ด(๐ฅ − ๐ผ0) = ๐ด(๐ฅ), so ๐ด = ๐ . In other words, ๐ข(๐ฅ, ๐ก) = ๐ (๐ฅ − ๐ผ๐ก). Everything is simply moving right at speed ๐ผ as ๐ก increases. The curve given by the equation ๐ = constant is called the characteristic. See Figure 1.20. In this case, the solution does not change along the characteristic. In the (๐ฅ, ๐ก) coordinates, the characteristic curves satisfy ๐ก = ๐ผ1 (๐ฅ − ๐), and are in fact lines. ๐ก ๐=0 ๐=1 ๐=2 1 The slope of characteristic lines is ๐ผ , and for each different ๐ we get a different characteristic line. We see why ๐ข๐ก + ๐ผ๐ข๐ฅ = 0 is called the transport equation: everything travels at some constant speed. Sometimes this is called convection. An example application is material being moved by ๐ฅ a river where the material does not diffuse and Figure 1.20: Characteristic curves. is simply carried along. In this setup, ๐ฅ is the position along the river, ๐ก is the time, and ๐ข(๐ฅ, ๐ก) the concentration the material at position ๐ฅ and time ๐ก. See Figure 1.21 for an example. -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 1.00 1.00 1.00 1.00 0.75 0.75 0.75 0.75 0.50 0.50 0.50 0.50 0.25 0.25 0.25 0.25 0.00 0.00 0.00 -3 -2 -1 0 1 2 3 0.00 -3 -2 -1 0 1 2 3 Figure 1.21: Example of “transport” in ๐ข๐ก − ๐ข๐ฅ = 0 (that is, ๐ผ = 1) where the initial condition ๐ (๐ฅ) is a peak at the origin. On the left is a graph of the initial condition ๐ข(๐ฅ, 0). On the right is a graph of the function ๐ข(๐ฅ, 1), that is at time ๐ก = 1. Notice it is the same graph shifted one unit to the right. We use similar idea in the more general case: ๐๐ข๐ฅ + ๐๐ข๐ก + ๐๐ข = ๐, ๐ข(๐ฅ, 0) = ๐ (๐ฅ). 74 CHAPTER 1. FIRST ORDER EQUATIONS We change coordinates to the characteristic coordinates. Let us call these coordinates (๐, ๐ ). These are coordinates where ๐๐ข๐ฅ + ๐๐ข๐ก becomes differentiation in the ๐ variable. Along the characteristic curves (where ๐ is constant), we get a new ODE in the ๐ variable. In the transport equation, we got the simple ๐๐ข ๐๐ = 0. In general, we get the linear equation ๐๐ข + ๐๐ข = ๐. ๐๐ (1.7) We think of everything as a function of ๐ and ๐ , although we are thinking of ๐ as a parameter rather than an independent variable. So the equation is an ODE. It is a linear ODE that we can solve using the integrating factor. To find the characteristics, think of a curve given parametrically ๐ฅ(๐ ), ๐ก(๐ ) . We try to have the curve satisfy ๐๐ก ๐๐ฅ = ๐, = ๐. ๐๐ ๐๐ Why? Because when we think of ๐ฅ and ๐ก as functions of ๐ we find, using the chain rule, ๐๐ข ๐๐ฅ ๐๐ก + ๐๐ข = ๐ข๐ฅ + ๐ข๐ก +๐๐ข = ๐๐ข๐ฅ + ๐๐ข๐ก + ๐๐ข = ๐. ๐๐ ๐๐ ๐๐ | {z ๐๐ข ๐๐ } So we get the ODE (1.7), which then describes the value of the solution ๐ข of the PDE along this characteristic curve. It is also convenient to make sure that ๐ = 0 corresponds to ๐ก = 0, that is ๐ก(0) = 0. It will be convenient also for ๐ฅ(0) = ๐. See Figure 1.22. ๐ก ๐ = constant ๐ฅ(๐ ), ๐ก(๐ ) ๐ =0 ๐ฅ ๐ฅ=๐ Figure 1.22: General characteristic curve. Example 1.9.2: Consider ๐ข๐ฅ + ๐ข๐ก + ๐ข = ๐ฅ, 2 ๐ข(๐ฅ, 0) = ๐ −๐ฅ . We find the characteristics, that is, the curves given by ๐๐ฅ = 1, ๐๐ ๐๐ก = 1. ๐๐ 75 1.9. FIRST ORDER LINEAR PDE So ๐ฅ = ๐ + ๐1 , ๐ก = ๐ + ๐2 , for some ๐1 and ๐ 2 . At ๐ = 0 we want ๐ก = 0, and ๐ฅ should be ๐. So we let ๐ 1 = ๐ and ๐2 = 0: ๐ฅ = ๐ + ๐, The ODE is ๐๐ข ๐๐ ๐ก = ๐ . + ๐ข = ๐ฅ, and ๐ฅ = ๐ + ๐. So, the ODE to solve along the characteristic is ๐๐ข + ๐ข = ๐ + ๐. ๐๐ The general solution of this equation, treating ๐ as a parameter, is ๐ข = ๐ถ๐ −๐ + ๐ + ๐ − 1, 2 for some constant ๐ถ. At ๐ = 0, our initial condition is that ๐ข is ๐ −๐ , since at ๐ = 0 we have 2 ๐ฅ = ๐. Given this initial condition, we find ๐ถ = ๐ −๐ − ๐ + 1. So, 2 ๐ข = ๐ −๐ − ๐ + 1 ๐ −๐ + ๐ + ๐ − 1 = ๐ −๐ 2 −๐ + (1 − ๐)๐ −๐ + ๐ + ๐ − 1. Substitute ๐ = ๐ฅ − ๐ก and ๐ = ๐ก to find ๐ข in terms of ๐ฅ and ๐ก: ๐ข = ๐ −๐ 2 −๐ + (1 − ๐)๐ −๐ + ๐ + ๐ − 1 2 = ๐ −(๐ฅ−๐ก) −๐ก + (1 − ๐ฅ + ๐ก)๐ −๐ก + ๐ฅ − 1. See Figure 1.23 on the next page for a plot of ๐ข(๐ฅ, ๐ก) as a function of two variables. When the coefficients are not constants, the characteristic curves are not going to be straight lines anymore. Example 1.9.3: Consider the following variable coefficient equation: ๐ฅ๐ข๐ฅ + ๐ข๐ก + 2๐ข = 0, ๐ข(๐ฅ, 0) = cos(๐ฅ). We find the characteristics, that is, the curves given by ๐๐ฅ = ๐ฅ, ๐๐ So ๐ฅ = ๐1 ๐ ๐ , ๐๐ก = 1. ๐๐ ๐ก = ๐ + ๐2 . At ๐ = 0, we wish to get the line ๐ก = 0, and ๐ฅ should be ๐. So ๐ฅ = ๐๐ ๐ , ๐ก = ๐ . OK, the ODE we need to solve is ๐๐ข + 2๐ข = 0. ๐๐ 76 CHAPTER 1. FIRST ORDER EQUATIONS 3 x 3.0 2 2.5 1 t 2.0 0 1.5 -1 1.0 -2 -3 u(x,t) 0.5 0.0 2 2 1 1 0 0 -1 1.73 1.15 0.58 0.00 -0.58 -1.15 -1.73 -2.30 -2.88 -3.46 -1 -2 -2 -3 -3 3.0 2.5 3 2 2.0 1 1.5 0 1.0 t -1 0.5 -2 x 0.0 -3 2 Figure 1.23: Plot of the solution ๐ข(๐ฅ, ๐ก) to ๐ข๐ฅ + ๐ข๐ก + ๐ข = ๐ฅ, ๐ข(๐ฅ, 0) = ๐ −๐ฅ . This is for a fixed ๐. At ๐ = 0, we should get that ๐ข is cos(๐), so that is our initial condition. Consequently, ๐ข = ๐ −2๐ cos(๐) = ๐ −2๐ก cos(๐ฅ๐ −๐ก ). We make a few closing remarks. One thing to keep in mind is that we would get into trouble if the coefficient in front of ๐ข๐ก , that is the ๐, is ever zero. Let us consider a quick example of what can go wrong: ๐ข๐ฅ + ๐ข = 0, ๐ข(๐ฅ, 0) = sin(๐ฅ). This problem has no solution. If we had a solution, it would imply that ๐ข๐ฅ (๐ฅ, 0) = cos(๐ฅ), but ๐ข๐ฅ (๐ฅ, 0) + ๐ข(๐ฅ, 0) = cos(๐ฅ) + sin(๐ฅ) ≠ 0. The problem is that the characteristic curve is now the line ๐ก = 0, and the solution is already provided on that line! As long as ๐ is nonzero, it is convenient to ensure that ๐ is positive by multiplying by −1 if necessary, so that positive ๐ means positive ๐ก. Another remark is that if ๐ or ๐ in the equation are variable, the computations can quickly get out of hand, as the expressions for the characteristic coordinates become messy and then solving the ODE becomes even messier. In the examples above, ๐ was always 1, meaning we got ๐ = ๐ก in the characteristic coordinates. If ๐ is not constant, your expression for ๐ will be more complicated. Finding the characteristic coordinates is really a system of ODE in general if ๐ depends on ๐ก or if ๐ depends on ๐ฅ. In that case, we would need techniques of systems of ODE to 77 1.9. FIRST ORDER LINEAR PDE solve, see chapter 3 or chapter 8. In general, if ๐ and ๐ are not linear functions or constants, finding closed form expressions for the characteristic coordinates may be impossible. Finally, the method of characteristics applies to nonlinear first order PDE as well. In the nonlinear case, the characteristics depend not only on the differential equation, but also on the initial data. This leads to not only more difficult computations, but also the formation of singularities where the solution breaks down at a certain point in time. An example application where first order nonlinear PDE come up is traffic flow theory, and you have probably experienced the formation of singularities: traffic jams. But we digress. 1.9.1 Exercises Exercise 1.9.1: Solve a) ๐ข๐ก + 9๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = sin(๐ฅ), b) ๐ข๐ก − 8๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = sin(๐ฅ), c) ๐ข๐ก + ๐๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = sin(๐ฅ), d) ๐ข๐ก + ๐๐ข๐ฅ + ๐ข = 0, ๐ข(๐ฅ, 0) = sin(๐ฅ). Exercise 1.9.2: Solve ๐ข๐ก + 3๐ข๐ฅ = 1, ๐ข(๐ฅ, 0) = ๐ฅ 2 . Exercise 1.9.3: Solve ๐ข๐ก + 3๐ข๐ฅ = ๐ฅ, ๐ข(๐ฅ, 0) = ๐ ๐ฅ . Exercise 1.9.4: Solve ๐ข๐ฅ + ๐ข๐ก + ๐ฅ๐ข = 0, ๐ข(๐ฅ, 0) = cos(๐ฅ). Exercise 1.9.5: a) Find the characteristic coordinates for the following equations: 1) ๐ข๐ฅ + ๐ข๐ก + ๐ข = 1, ๐ข(๐ฅ, 0) = cos(๐ฅ), 2) 2๐ข๐ฅ + 2๐ข๐ก + 2๐ข = 2, ๐ข(๐ฅ, 0) = cos(๐ฅ). b) Solve the two equations using the coordinates. c) Explain why you got the same solution, although the characteristic coordinates you found were different. Exercise 1.9.6: Solve (1 + ๐ฅ 2 )๐ข๐ก + ๐ฅ 2 ๐ข๐ฅ + ๐ ๐ฅ ๐ข = 0, ๐ข(๐ฅ, 0) = 0. Hint: Think a little out of the box. Exercise 1.9.101: Solve a) ๐ข๐ก − 5๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = 1 , 1+๐ฅ 2 b) ๐ข๐ก + 2๐ข๐ฅ = 0, ๐ข(๐ฅ, 0) = cos(๐ฅ). Exercise 1.9.102: Solve ๐ข๐ฅ + ๐ข๐ก + ๐ก๐ข = 0, ๐ข(๐ฅ, 0) = cos(๐ฅ). Exercise 1.9.103: Solve ๐ข๐ฅ + ๐ข๐ก = 5, ๐ข(๐ฅ, 0) = ๐ฅ. 78 CHAPTER 1. FIRST ORDER EQUATIONS Chapter 2 Higher order linear ODEs 2.1 Second order linear ODEs Note: 1 lecture, reduction of order optional, first part of §3.1 in [EP], parts of §3.1 and §3.2 in [BD] Let us consider the general second order linear differential equation ๐ด(๐ฅ)๐ฆ 00 + ๐ต(๐ฅ)๐ฆ 0 + ๐ถ(๐ฅ)๐ฆ = ๐น(๐ฅ). We usually divide through by ๐ด(๐ฅ) to get ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), (2.1) where ๐(๐ฅ) = ๐ต(๐ฅ)/๐ด(๐ฅ), ๐(๐ฅ) = ๐ถ(๐ฅ)/๐ด(๐ฅ), and ๐ (๐ฅ) = ๐น(๐ฅ)/๐ด(๐ฅ). The word linear means that the equation contains no powers nor functions of ๐ฆ, ๐ฆ 0, and ๐ฆ 00. In the special case when ๐ (๐ฅ) = 0, we have a so-called homogeneous equation ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0. (2.2) We have already seen some second order linear homogeneous equations. ๐ฆ 00 + ๐ 2 ๐ฆ = 0 Two solutions are: ๐ฆ1 = cos(๐๐ฅ), ๐ฆ 00 − ๐ 2 ๐ฆ = 0 Two solutions are: ๐ฆ1 = ๐ ๐๐ฅ , ๐ฆ2 = sin(๐๐ฅ). ๐ฆ2 = ๐ −๐๐ฅ . If we know two solutions of a linear homogeneous equation, we know many more of them. Theorem 2.1.1 (Superposition). Suppose ๐ฆ1 and ๐ฆ2 are two solutions of the homogeneous equation (2.2). Then ๐ฆ(๐ฅ) = ๐ถ1 ๐ฆ1 (๐ฅ) + ๐ถ2 ๐ฆ2 (๐ฅ), also solves (2.2) for arbitrary constants ๐ถ1 and ๐ถ2 . 80 CHAPTER 2. HIGHER ORDER LINEAR ODES That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We call the expression ๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 a linear combination of ๐ฆ1 and ๐ฆ2 . Let us prove this theorem; the proof is very enlightening and illustrates how linear equations work. Proof: Let ๐ฆ = ๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 . Then ๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ = (๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 )00 + ๐(๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 )0 + ๐(๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 ) = ๐ถ1 ๐ฆ100 + ๐ถ2 ๐ฆ200 + ๐ถ1 ๐๐ฆ10 + ๐ถ2 ๐๐ฆ20 + ๐ถ1 ๐๐ฆ1 + ๐ถ2 ๐๐ฆ2 = ๐ถ1 (๐ฆ100 + ๐๐ฆ10 + ๐๐ฆ1 ) + ๐ถ2 (๐ฆ200 + ๐๐ฆ20 + ๐๐ฆ2 ) = ๐ถ1 · 0 + ๐ถ2 · 0 = 0. The proof becomes even simpler to state if we use the operator notation. An operator is an object that eats functions and spits out functions (kind of like what a function is, but a function eats numbers and spits out numbers). Define the operator ๐ฟ by ๐ฟ๐ฆ = ๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ. The differential equation now becomes ๐ฟ๐ฆ = 0. The operator (and the equation) ๐ฟ being linear means that ๐ฟ(๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 ) = ๐ถ1 ๐ฟ๐ฆ1 + ๐ถ2 ๐ฟ๐ฆ2 . The proof above becomes ๐ฟ๐ฆ = ๐ฟ(๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 ) = ๐ถ1 ๐ฟ๐ฆ1 + ๐ถ2 ๐ฟ๐ฆ2 = ๐ถ1 · 0 + ๐ถ2 · 0 = 0. Two different solutions to the second equation ๐ฆ 00 − ๐ 2 ๐ฆ = 0 are ๐ฆ1 = cosh(๐๐ฅ) and ๐ฅ −๐ฅ ๐ฅ −๐ฅ ๐ฆ2 = sinh(๐๐ฅ). Let us remind ourselves of the definition, cosh ๐ฅ = ๐ +๐ and sinh ๐ฅ = ๐ −๐ 2 2 . Therefore, these are solutions by superposition as they are linear combinations of the two exponential solutions. The functions sinh and cosh are sometimes more convenient to use than the exponential. Let us review some of their properties: cosh 0 = 1, i ๐ h cosh ๐ฅ = sinh ๐ฅ, ๐๐ฅ cosh2 ๐ฅ − sinh2 ๐ฅ = 1. sinh 0 = 0, i ๐ h sinh ๐ฅ = cosh ๐ฅ, ๐๐ฅ Exercise 2.1.1: Derive these properties using the definitions of sinh and cosh in terms of exponentials. Linear equations have nice and simple answers to the existence and uniqueness question. Theorem 2.1.2 (Existence and uniqueness). Suppose ๐, ๐, ๐ are continuous functions on some interval ๐ผ, ๐ is a number in ๐ผ, and ๐, ๐0 , ๐1 are constants. The equation ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = ๐ (๐ฅ), has exactly one solution ๐ฆ(๐ฅ) defined on the same interval ๐ผ satisfying the initial conditions ๐ฆ(๐) = ๐ 0 , ๐ฆ 0(๐) = ๐ 1 . 81 2.1. SECOND ORDER LINEAR ODES For example, the equation ๐ฆ 00 + ๐ 2 ๐ฆ = 0 with ๐ฆ(0) = ๐ 0 and ๐ฆ 0(0) = ๐ 1 has the solution ๐ฆ(๐ฅ) = ๐ 0 cos(๐๐ฅ) + ๐1 sin(๐๐ฅ). ๐ The equation ๐ฆ 00 − ๐ 2 ๐ฆ = 0 with ๐ฆ(0) = ๐ 0 and ๐ฆ 0(0) = ๐ 1 has the solution ๐ฆ(๐ฅ) = ๐ 0 cosh(๐๐ฅ) + ๐1 sinh(๐๐ฅ). ๐ Using cosh and sinh in this solution allows us to solve for the initial conditions in a cleaner way than if we have used the exponentials. The initial conditions for a second order ODE consist of two equations. Common sense tells us that if we have two arbitrary constants and two equations, then we should be able to solve for the constants and find a solution to the differential equation satisfying the initial conditions. Question: Suppose we find two different solutions ๐ฆ1 and ๐ฆ2 to the homogeneous equation (2.2). Can every solution be written (using superposition) in the form ๐ฆ = ๐ถ 1 ๐ฆ1 + ๐ถ 2 ๐ฆ2 ? Answer is affirmative! Provided that ๐ฆ1 and ๐ฆ2 are different enough in the following sense. We say ๐ฆ1 and ๐ฆ2 are linearly independent if one is not a constant multiple of the other. Theorem 2.1.3. Let ๐, ๐ be continuous functions. Let ๐ฆ1 and ๐ฆ2 be two linearly independent solutions to the homogeneous equation (2.2). Then every other solution is of the form ๐ฆ = ๐ถ 1 ๐ฆ1 + ๐ถ 2 ๐ฆ2 . That is, ๐ฆ = ๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 is the general solution. For example, we found the solutions ๐ฆ1 = sin ๐ฅ and ๐ฆ2 = cos ๐ฅ for the equation ๐ฆ 00 + ๐ฆ = 0. It is not hard to see that sine and cosine are not constant multiples of each other. If sin ๐ฅ = ๐ด cos ๐ฅ for some constant ๐ด, we let ๐ฅ = 0 and this would imply ๐ด = 0. But then sin ๐ฅ = 0 for all ๐ฅ, which is preposterous. So ๐ฆ1 and ๐ฆ2 are linearly independent. Hence, ๐ฆ = ๐ถ1 cos ๐ฅ + ๐ถ2 sin ๐ฅ is the general solution to ๐ฆ 00 + ๐ฆ = 0. For two functions, checking linear independence is rather simple. Let us see another example. Consider ๐ฆ 00 − 2๐ฅ −2 ๐ฆ = 0. Then ๐ฆ1 = ๐ฅ 2 and ๐ฆ2 = 1/๐ฅ are solutions. To see that they are linearly indepedent, suppose one is a multple of the other: ๐ฆ1 = ๐ด๐ฆ2 , we just have to find out that ๐ด cannot be a constant. In this case we have ๐ด = ๐ฆ1/๐ฆ2 = ๐ฅ 3 , this most decidedly not a constant. So ๐ฆ = ๐ถ1 ๐ฅ 2 + ๐ถ2 1/๐ฅ is the general solution. If you have one solution to a second order linear homogeneous equation, then you can find another one. This is the reduction of order method. The idea is that if we somehow 82 CHAPTER 2. HIGHER ORDER LINEAR ODES found ๐ฆ1 as a solution of ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0 we try a second solution of the form ๐ฆ2 (๐ฅ) = ๐ฆ1 (๐ฅ)๐ฃ(๐ฅ). We just need to find ๐ฃ. We plug ๐ฆ2 into the equation: 0 = ๐ฆ200 + ๐(๐ฅ)๐ฆ20 + ๐(๐ฅ)๐ฆ2 = ๐ฆ100๐ฃ + 2๐ฆ10 ๐ฃ 0 + ๐ฆ1 ๐ฃ 00 + ๐(๐ฅ)(๐ฆ10 ๐ฃ + ๐ฆ1 ๐ฃ 0) + ๐(๐ง)๐ฆ1 ๐ฃ 00 = ๐ฆ1 ๐ฃ + (2๐ฆ10 :0 0 + ๐(๐ฅ)๐ฆ1 )๐ฃ + 0 ๐ฆ100 + ๐(๐ฅ)๐ฆ + ๐(๐ฅ)๐ฆ1 1 ๐ฃ. In other words, ๐ฆ1 ๐ฃ 00 + (2๐ฆ10 + ๐(๐ฅ)๐ฆ1 )๐ฃ 0 = 0. Using ๐ค = ๐ฃ 0 we have the first order linear equation ๐ฆ1 ๐ค 0 + (2๐ฆ10 + ๐(๐ฅ)๐ฆ1 )๐ค = 0. After solving this equation for ๐ค (integrating factor), we find ๐ฃ by antidifferentiating ๐ค. We then form ๐ฆ2 by computing ๐ฆ1 ๐ฃ. For example, suppose we somehow know ๐ฆ1 = ๐ฅ is a solution to ๐ฆ 00 + ๐ฅ −1 ๐ฆ 0 − ๐ฅ −2 ๐ฆ = 0. The equation for ๐ค is then ๐ฅ๐ค 0 + 3๐ค = 0. We find a solution, ๐ค = ๐ถ๐ฅ −3 , and we find an antiderivative −๐ถ −๐ถ 1 ๐ฃ = 2๐ฅ 2 . Hence ๐ฆ2 = ๐ฆ1 ๐ฃ = 2๐ฅ . Any ๐ถ works and so ๐ถ = −2 makes ๐ฆ2 = /๐ฅ . Thus, the 1 general solution is ๐ฆ = ๐ถ1 ๐ฅ + ๐ถ2 /๐ฅ . Since we have a formula for the solution to the first order linear equation, we can write a formula for ๐ฆ2 : ∫ ๐ฆ2 (๐ฅ) = ๐ฆ1 (๐ฅ) ∫ ๐− ๐(๐ฅ) ๐๐ฅ ๐ฆ1 (๐ฅ) 2 ๐๐ฅ However, it is much easier to remember that we just need to try ๐ฆ2 (๐ฅ) = ๐ฆ1 (๐ฅ)๐ฃ(๐ฅ) and find ๐ฃ(๐ฅ) as we did above. Also, the technique works for higher order equations too: you get to reduce the order for each solution you find. So it is better to remember how to do it rather than a specific formula. We will study the solution of nonhomogeneous equations in § 2.5. We will first focus on finding general solutions to homogeneous equations. 2.1.1 Exercises Exercise 2.1.2: Show that ๐ฆ = ๐ ๐ฅ and ๐ฆ = ๐ 2๐ฅ are linearly independent. Exercise 2.1.3: Take ๐ฆ 00 + 5๐ฆ = 10๐ฅ + 5. Find (guess!) a solution. Exercise 2.1.4: Prove the superposition principle for nonhomogeneous equations. Suppose that ๐ฆ1 is a solution to ๐ฟ๐ฆ1 = ๐ (๐ฅ) and ๐ฆ2 is a solution to ๐ฟ๐ฆ2 = ๐(๐ฅ) (same linear operator ๐ฟ). Show that ๐ฆ = ๐ฆ1 + ๐ฆ2 solves ๐ฟ๐ฆ = ๐ (๐ฅ) + ๐(๐ฅ). Exercise 2.1.5: For the equation ๐ฅ 2 ๐ฆ 00 − ๐ฅ๐ฆ 0 = 0, find two solutions, show that they are linearly independent and find the general solution. Hint: Try ๐ฆ = ๐ฅ ๐ . Equations of the form ๐๐ฅ 2 ๐ฆ 00 + ๐๐ฅ๐ฆ 0 + ๐๐ฆ = 0 are called Euler’s equations or Cauchy–Euler equations. They are solved by trying ๐ฆ = ๐ฅ ๐ and solving for ๐ (assume that ๐ฅ ≥ 0 for simplicity). 83 2.1. SECOND ORDER LINEAR ODES Exercise 2.1.6: Suppose that (๐ − ๐)2 − 4๐๐ > 0. a) Find a formula for the general solution of ๐๐ฅ 2 ๐ฆ 00 + ๐๐ฅ๐ฆ 0 + ๐๐ฆ = 0. Hint: Try ๐ฆ = ๐ฅ ๐ and find a formula for ๐. b) What happens when (๐ − ๐)2 − 4๐๐ = 0 or (๐ − ๐)2 − 4๐๐ < 0? We will revisit the case when (๐ − ๐)2 − 4๐๐ < 0 later. Exercise 2.1.7: Same equation as in Exercise 2.1.6. Suppose (๐ − ๐)2 − 4๐๐ = 0. Find a formula for the general solution of ๐๐ฅ 2 ๐ฆ 00 + ๐๐ฅ๐ฆ 0 + ๐๐ฆ = 0. Hint: Try ๐ฆ = ๐ฅ ๐ ln ๐ฅ for the second solution. Exercise 2.1.8 (reduction of order): Suppose ๐ฆ1 is a solution to ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0. By directly plugging into the equation, show that ๐ฆ2 (๐ฅ) = ๐ฆ1 (๐ฅ) ∫ ๐− ∫ ๐(๐ฅ) ๐๐ฅ ๐ฆ1 (๐ฅ) 2 ๐๐ฅ is also a solution. Exercise 2.1.9 (Chebyshev’s equation of order 1): Take (1 − ๐ฅ 2 )๐ฆ 00 − ๐ฅ๐ฆ 0 + ๐ฆ = 0. a) Show that ๐ฆ = ๐ฅ is a solution. b) Use reduction of order to find a second linearly independent solution. c) Write down the general solution. Exercise 2.1.10 (Hermite’s equation of order 2): Take ๐ฆ 00 − 2๐ฅ๐ฆ 0 + 4๐ฆ = 0. a) Show that ๐ฆ = 1 − 2๐ฅ 2 is a solution. b) Use reduction of order to find a second linearly independent solution. (It’s OK to leave a definite integral in the formula.) c) Write down the general solution. Exercise 2.1.101: Are sin(๐ฅ) and ๐ ๐ฅ linearly independent? Justify. Exercise 2.1.102: Are ๐ ๐ฅ and ๐ ๐ฅ+2 linearly independent? Justify. Exercise 2.1.103: Guess a solution to ๐ฆ 00 + ๐ฆ 0 + ๐ฆ = 5. Exercise 2.1.104: Find the general solution to ๐ฅ๐ฆ 00 + ๐ฆ 0 = 0. Hint: It is a first order ODE in ๐ฆ 0. Exercise 2.1.105: Write down an equation (guess) for which we have the solutions ๐ ๐ฅ and ๐ 2๐ฅ . Hint: Try an equation of the form ๐ฆ 00 + ๐ด๐ฆ 0 + ๐ต๐ฆ = 0 for constants ๐ด and ๐ต, plug in both ๐ ๐ฅ and ๐ 2๐ฅ and solve for ๐ด and ๐ต. 84 CHAPTER 2. HIGHER ORDER LINEAR ODES 2.2 Constant coefficient second order linear ODEs Note: more than 1 lecture, second part of §3.1 in [EP], §3.1 in [BD] 2.2.1 Solving constant coefficient equations Consider the problem ๐ฆ 00 − 6๐ฆ 0 + 8๐ฆ = 0, ๐ฆ(0) = −2, ๐ฆ 0(0) = 6. This is a second order linear homogeneous equation with constant coefficients. Constant coefficients means that the functions in front of ๐ฆ 00, ๐ฆ 0, and ๐ฆ are constants, they do not depend on ๐ฅ. To guess a solution, think of a function that stays essentially the same when we differentiate it, so that we can take the function and its derivatives, add some multiples of these together, and end up with zero. Yes, we are talking about the exponential. Let us try∗ a solution of the form ๐ฆ = ๐ ๐๐ฅ . Then ๐ฆ 0 = ๐๐ ๐๐ฅ and ๐ฆ 00 = ๐ 2 ๐ ๐๐ฅ . Plug in to get ๐ฆ 00 − 6๐ฆ 0 + 8๐ฆ = 0, ๐ 2 ๐ ๐๐ฅ −6 ๐๐ ๐๐ฅ +8 ๐ ๐๐ฅ = 0, |{z} ๐ฆ 00 |{z} ๐ฆ0 |{z} ๐ฆ ๐ 2 − 6๐ + 8 = 0 (divide through by ๐ ๐๐ฅ ), (๐ − 2)(๐ − 4) = 0. Hence, if ๐ = 2 or ๐ = 4, then ๐ ๐๐ฅ is a solution. So let ๐ฆ1 = ๐ 2๐ฅ and ๐ฆ2 = ๐ 4๐ฅ . Exercise 2.2.1: Check that ๐ฆ1 and ๐ฆ2 are solutions. The functions ๐ 2๐ฅ and ๐ 4๐ฅ are linearly independent. If they were not linearly independent, we could write ๐ 4๐ฅ = ๐ถ๐ 2๐ฅ for some constant ๐ถ, implying that ๐ 2๐ฅ = ๐ถ for all ๐ฅ, which is clearly not possible. Hence, we can write the general solution as ๐ฆ = ๐ถ1 ๐ 2๐ฅ + ๐ถ2 ๐ 4๐ฅ . We need to solve for ๐ถ1 and ๐ถ2 . To apply the initial conditions, we first find ๐ฆ 0 = 2๐ถ1 ๐ 2๐ฅ + 4๐ถ2 ๐ 4๐ฅ . We plug ๐ฅ = 0 into ๐ฆ and ๐ฆ 0 and solve. −2 = ๐ฆ(0) = ๐ถ1 + ๐ถ2 , 6 = ๐ฆ 0(0) = 2๐ถ1 + 4๐ถ2 . ∗ Making an educated guess with some parameters to solve for is such a central technique in differential equations, that people sometimes use a fancy name for such a guess: ansatz, German for “initial placement of a tool at a work piece.” Yes, the Germans have a word for that. 85 2.2. CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES Either apply some matrix algebra, or just solve these by high school math. For example, divide the second equation by 2 to obtain 3 = ๐ถ1 + 2๐ถ2 , and subtract the two equations to get 5 = ๐ถ2 . Then ๐ถ1 = −7 as −2 = ๐ถ1 + 5. Hence, the solution we are looking for is ๐ฆ = −7๐ 2๐ฅ + 5๐ 4๐ฅ . Let us generalize this example into a method. Suppose that we have an equation ๐๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ = 0, (2.3) where ๐, ๐, ๐ are constants. Try the solution ๐ฆ = ๐ ๐๐ฅ to obtain ๐๐ 2 ๐ ๐๐ฅ + ๐๐๐ ๐๐ฅ + ๐๐ ๐๐ฅ = 0. Divide by ๐ ๐๐ฅ to obtain the so-called characteristic equation of the ODE: ๐๐ 2 + ๐๐ + ๐ = 0. Solve for the ๐ by using the quadratic formula. √ −๐ ± ๐ 2 − 4๐๐ ๐1 , ๐2 = . 2๐ So ๐ ๐1 ๐ฅ and ๐ ๐2 ๐ฅ are solutions. There is still a difficulty if ๐1 = ๐2 , but it is not hard to overcome. Theorem 2.2.1. Suppose that ๐1 and ๐2 are the roots of the characteristic equation. (i) If ๐1 and ๐2 are distinct and real (when ๐ 2 − 4๐๐ > 0), then (2.3) has the general solution ๐ฆ = ๐ถ 1 ๐ ๐1 ๐ฅ + ๐ถ 2 ๐ ๐2 ๐ฅ . (ii) If ๐1 = ๐2 (happens when ๐ 2 − 4๐๐ = 0), then (2.3) has the general solution ๐ฆ = (๐ถ1 + ๐ถ2 ๐ฅ) ๐ ๐1 ๐ฅ . Example 2.2.1: Solve ๐ฆ 00 − ๐ 2 ๐ฆ = 0. The characteristic equation is ๐ 2 − ๐ 2 = 0 or (๐ − ๐)(๐ + ๐) = 0. Consequently, ๐ −๐๐ฅ and ๐ ๐๐ฅ are the two linearly independent solutions, and the general solution is ๐ฆ = ๐ถ1 ๐ ๐๐ฅ + ๐ถ2 ๐ −๐๐ฅ . Since cosh ๐ = ๐ ๐ +๐ −๐ 2 and sinh ๐ = ๐ ๐ −๐ −๐ 2 , we can also write the general solution as ๐ฆ = ๐ท1 cosh(๐๐ฅ) + ๐ท2 sinh(๐๐ฅ). Example 2.2.2: Find the general solution of ๐ฆ 00 − 8๐ฆ 0 + 16๐ฆ = 0. The characteristic equation is ๐ 2 − 8๐ + 16 = (๐ − 4)2 = 0. The equation has a double root ๐1 = ๐2 = 4. The general solution is, therefore, ๐ฆ = (๐ถ1 + ๐ถ2 ๐ฅ) ๐ 4๐ฅ = ๐ถ1 ๐ 4๐ฅ + ๐ถ2 ๐ฅ๐ 4๐ฅ . 86 CHAPTER 2. HIGHER ORDER LINEAR ODES Exercise 2.2.2: Check that ๐ 4๐ฅ and ๐ฅ๐ 4๐ฅ are linearly independent. That ๐ 4๐ฅ solves the equation is clear. If ๐ฅ๐ 4๐ฅ solves the equation, then we know we are done. Let us compute ๐ฆ 0 = ๐ 4๐ฅ + 4๐ฅ๐ 4๐ฅ and ๐ฆ 00 = 8๐ 4๐ฅ + 16๐ฅ๐ 4๐ฅ . Plug in ๐ฆ 00 − 8๐ฆ 0 + 16๐ฆ = 8๐ 4๐ฅ + 16๐ฅ๐ 4๐ฅ − 8(๐ 4๐ฅ + 4๐ฅ๐ 4๐ฅ ) + 16๐ฅ๐ 4๐ฅ = 0. In some sense, a doubled root rarely happens. If coefficients are picked randomly, a doubled root is unlikely. There are, however, some natural phenomena (such as resonance as we will see) where a doubled root does happen, so we cannot just dismiss this case. Let us give a short argument for why the solution ๐ฅ๐ ๐๐ฅ works when the root is doubled. This case is really a limiting case of when the two roots are distinct and very close. Note ๐ ๐ฅ ๐1 ๐ฅ that ๐ 2๐2 −๐ −๐1 is a solution when the roots are distinct. When we take the limit as ๐1 goes to ๐2 , we are really taking the derivative of ๐ ๐๐ฅ using ๐ as the variable. Therefore, the limit is ๐ฅ๐ ๐๐ฅ , and hence this is a solution in the doubled root case. 2.2.2 Complex numbers and Euler’s formula A polynomial may have complex roots. The equation ๐ 2 + 1 = 0 has no real roots, but it does have two complex roots. Here we review some properties of complex numbers. Complex numbers may seem a strange concept, especially because of the terminology. There is nothing imaginary or really complicated about complex numbers. A complex number is simply a pair of real numbers, (๐, ๐). Think of a complex number as a point in the plane. We add complex numbers in the straightforward way: (๐, ๐) + (๐, ๐) = (๐ + ๐, ๐ + ๐). We define multiplication by def (๐, ๐) × (๐, ๐) = (๐๐ − ๐๐, ๐๐ + ๐๐). It turns out that with this multiplication rule, all the standard properties of arithmetic hold. Further, and most importantly (0, 1) × (0, 1) = (−1, 0). Generally we write (๐, ๐) as ๐ + ๐๐, and we treat ๐ as if it were an unknown. When ๐ is zero, then (๐, 0) is just the number ๐. We do arithmetic with complex numbers just as we would with polynomials. The property we just mentioned becomes ๐ 2 = −1. So whenever we see ๐ 2 , we replace it by −1. For example, (2 + 3๐)(4๐) − 5๐ = (2 × 4)๐ + (3 × 4)๐ 2 − 5๐ = 8๐ + 12(−1) − 5๐ = −12 + 3๐. The numbers ๐ and −๐ are the two roots of ๐ 2 + 1 = 0. Engineers often use the letter ๐ instead of ๐ for the square root of −1. We use the mathematicians’ convention and use ๐. Exercise 2.2.3: Make sure you understand (that you can justify) the following identities: 1 = −๐, ๐ a) ๐ 2 = −1, ๐ 3 = −๐, ๐ 4 = 1, b) c) (3 − 7๐)(−2 − 9๐) = · · · = −69 − 13๐, d) (3−2๐)(3+2๐) = 32 −(2๐)2 = 32 +22 = 13, e) 1 3−2๐ = 1 3+2๐ 3−2๐ 3+2๐ = 3+2๐ 13 = 3 13 + 2 13 ๐. 2.2. CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES 87 We also define the exponential ๐ ๐+๐๐ of a complex number. We do this by writing down the Taylor series and plugging in the complex number. Because most properties of the exponential can be proved by looking at the Taylor series, these properties still hold for the complex exponential. For example the very important property: ๐ ๐ฅ+๐ฆ = ๐ ๐ฅ ๐ ๐ฆ . This means that ๐ ๐+๐๐ = ๐ ๐ ๐ ๐๐ . Hence if we can compute ๐ ๐๐ , we can compute ๐ ๐+๐๐ . For ๐ ๐๐ we use the so-called Euler’s formula. Theorem 2.2.2 (Euler’s formula). ๐ ๐๐ = cos ๐ + ๐ sin ๐ and ๐ −๐๐ = cos ๐ − ๐ sin ๐. In other words, ๐ ๐+๐๐ = ๐ ๐ cos(๐) + ๐ sin(๐) = ๐ ๐ cos(๐) + ๐๐ ๐ sin(๐). Exercise 2.2.4: Using Euler’s formula, check the identities: cos ๐ = ๐ ๐๐ + ๐ −๐๐ 2 and sin ๐ = ๐ ๐๐ − ๐ −๐๐ . 2๐ 2 Exercise 2.2.5: Double angle identities: Start with ๐ ๐(2๐) = ๐ ๐๐ . Use Euler on each side and deduce: cos(2๐) = cos2 ๐ − sin2 ๐ and sin(2๐) = 2 sin ๐ cos ๐. For a complex number ๐ + ๐๐ we call ๐ the real part and ๐ the imaginary part of the number. Often the following notation is used, Re(๐ + ๐๐) = ๐ 2.2.3 and Im(๐ + ๐๐) = ๐. Complex roots Suppose the equation ๐๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ = 0 has the characteristic equation ๐๐ 2 + ๐๐ + ๐ = 0 √ that has complex roots. By the quadratic formula, the roots are complex if ๐ 2 − 4๐๐ < 0. In this case the roots are √ −๐ 4๐๐ − ๐ 2 ๐1 , ๐2 = ±๐ . 2๐ 2๐ −๐± ๐ 2 −4๐๐ . 2๐ These roots are As you can see, we always get a pair of roots of the form ๐ผ ± ๐๐ฝ. In this case we can still write the solution as ๐ฆ = ๐ถ1 ๐ (๐ผ+๐๐ฝ)๐ฅ + ๐ถ2 ๐ (๐ผ−๐๐ฝ)๐ฅ . However, the exponential is now complex-valued. We need to allow ๐ถ1 and ๐ถ2 to be complex numbers to obtain a real-valued solution (which is what we are after). While there is nothing particularly wrong with this approach, it can make calculations harder and it is generally preferred to find two real-valued solutions. Here we can use Euler’s formula. Let ๐ฆ1 = ๐ (๐ผ+๐๐ฝ)๐ฅ and ๐ฆ2 = ๐ (๐ผ−๐๐ฝ)๐ฅ . 88 CHAPTER 2. HIGHER ORDER LINEAR ODES Then ๐ฆ1 = ๐ ๐ผ๐ฅ cos(๐ฝ๐ฅ) + ๐๐ ๐ผ๐ฅ sin(๐ฝ๐ฅ), ๐ฆ2 = ๐ ๐ผ๐ฅ cos(๐ฝ๐ฅ) − ๐๐ ๐ผ๐ฅ sin(๐ฝ๐ฅ). Linear combinations of solutions are also solutions. Hence, ๐ฆ1 + ๐ฆ2 = ๐ ๐ผ๐ฅ cos(๐ฝ๐ฅ), 2 ๐ฆ1 − ๐ฆ2 = ๐ ๐ผ๐ฅ sin(๐ฝ๐ฅ), ๐ฆ4 = 2๐ ๐ฆ3 = are also solutions. Furthermore, they are real-valued. It is not hard to see that they are linearly independent (not multiples of each other). Therefore, we have the following theorem. Theorem 2.2.3. Take the equation ๐๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ = 0. If the characteristic equation has the roots ๐ผ ± ๐๐ฝ (when ๐ 2 − 4๐๐ < 0), then the general solution is ๐ฆ = ๐ถ1 ๐ ๐ผ๐ฅ cos(๐ฝ๐ฅ) + ๐ถ2 ๐ ๐ผ๐ฅ sin(๐ฝ๐ฅ). Example 2.2.3: Find the general solution of ๐ฆ 00 + ๐ 2 ๐ฆ = 0, for a constant ๐ > 0. The characteristic equation is ๐ 2 + ๐ 2 = 0. Therefore, the roots are ๐ = ±๐๐, and by the theorem, we have the general solution ๐ฆ = ๐ถ1 cos(๐๐ฅ) + ๐ถ2 sin(๐๐ฅ). Example 2.2.4: Find the solution of ๐ฆ 00 − 6๐ฆ 0 + 13๐ฆ = 0, ๐ฆ(0) = 0, ๐ฆ 0(0) = 10. The characteristic equation is ๐ 2 − 6๐ + 13 = 0. By completing the square we get (๐ − 3)2 + 22 = 0 and hence the roots are ๐ = 3 ± 2๐. By the theorem we have the general solution ๐ฆ = ๐ถ1 ๐ 3๐ฅ cos(2๐ฅ) + ๐ถ2 ๐ 3๐ฅ sin(2๐ฅ). To find the solution satisfying the initial conditions, we first plug in zero to get 0 = ๐ฆ(0) = ๐ถ1 ๐ 0 cos 0 + ๐ถ2 ๐ 0 sin 0 = ๐ถ1 . Hence, ๐ถ1 = 0 and ๐ฆ = ๐ถ2 ๐ 3๐ฅ sin(2๐ฅ). We differentiate, ๐ฆ 0 = 3๐ถ2 ๐ 3๐ฅ sin(2๐ฅ) + 2๐ถ2 ๐ 3๐ฅ cos(2๐ฅ). We again plug in the initial condition and obtain 10 = ๐ฆ 0(0) = 2๐ถ2 , or ๐ถ2 = 5. The solution we are seeking is ๐ฆ = 5๐ 3๐ฅ sin(2๐ฅ). 2.2. CONSTANT COEFFICIENT SECOND ORDER LINEAR ODES 2.2.4 89 Exercises Exercise 2.2.6: Find the general solution of 2๐ฆ 00 + 2๐ฆ 0 − 4๐ฆ = 0. Exercise 2.2.7: Find the general solution of ๐ฆ 00 + 9๐ฆ 0 − 10๐ฆ = 0. Exercise 2.2.8: Solve ๐ฆ 00 − 8๐ฆ 0 + 16๐ฆ = 0 for ๐ฆ(0) = 2, ๐ฆ 0(0) = 0. Exercise 2.2.9: Solve ๐ฆ 00 + 9๐ฆ 0 = 0 for ๐ฆ(0) = 1, ๐ฆ 0(0) = 1. Exercise 2.2.10: Find the general solution of 2๐ฆ 00 + 50๐ฆ = 0. Exercise 2.2.11: Find the general solution of ๐ฆ 00 + 6๐ฆ 0 + 13๐ฆ = 0. Exercise 2.2.12: Find the general solution of ๐ฆ 00 = 0 using the methods of this section. Exercise 2.2.13: The method of this section applies to equations of other orders than two. We will see higher orders later. Try to solve the first order equation 2๐ฆ 0 + 3๐ฆ = 0 using the methods of this section. Exercise 2.2.14: Let us revisit the Cauchy–Euler equations of Exercise 2.1.6 on page 82. Suppose now that (๐ − ๐)2 − 4๐๐ < 0. Find a formula for the general solution of ๐๐ฅ 2 ๐ฆ 00 + ๐๐ฅ๐ฆ 0 + ๐๐ฆ = 0. Hint: Note that ๐ฅ ๐ = ๐ ๐ ln ๐ฅ . Exercise 2.2.15: Find the solution to ๐ฆ 00 − (2๐ผ)๐ฆ 0 + ๐ผ2 ๐ฆ = 0, ๐ฆ(0) = ๐, ๐ฆ 0(0) = ๐, where ๐ผ, ๐, and ๐ are real numbers. Exercise 2.2.16: Construct an equation such that ๐ฆ = ๐ถ1 ๐ −2๐ฅ cos(3๐ฅ) + ๐ถ2 ๐ −2๐ฅ sin(3๐ฅ) is the general solution. Exercise 2.2.101: Find the general solution to ๐ฆ 00 + 4๐ฆ 0 + 2๐ฆ = 0. Exercise 2.2.102: Find the general solution to ๐ฆ 00 − 6๐ฆ 0 + 9๐ฆ = 0. Exercise 2.2.103: Find the solution to 2๐ฆ 00 + ๐ฆ 0 + ๐ฆ = 0, ๐ฆ(0) = 1, ๐ฆ 0(0) = −2. Exercise 2.2.104: Find the solution to 2๐ฆ 00 + ๐ฆ 0 − 3๐ฆ = 0, ๐ฆ(0) = ๐, ๐ฆ 0(0) = ๐. Exercise 2.2.105: Find the solution to ๐ง 00(๐ก) = −2๐ง 0(๐ก) − 2๐ง(๐ก), ๐ง(0) = 2, ๐ง 0(0) = −2. Exercise 2.2.106: Find the solution to ๐ฆ 00 − (๐ผ + ๐ฝ)๐ฆ 0 + ๐ผ๐ฝ๐ฆ = 0, ๐ฆ(0) = ๐, ๐ฆ 0(0) = ๐, where ๐ผ, ๐ฝ, ๐, and ๐ are real numbers, and ๐ผ ≠ ๐ฝ. Exercise 2.2.107: Construct an equation such that ๐ฆ = ๐ถ1 ๐ 3๐ฅ + ๐ถ2 ๐ −2๐ฅ is the general solution. 90 2.3 CHAPTER 2. HIGHER ORDER LINEAR ODES Higher order linear ODEs Note: somewhat more than 1 lecture, §3.2 and §3.3 in [EP], §4.1 and §4.2 in [BD] We briefly study higher order equations. Equations appearing in applications tend to be second order. Higher order equations do appear from time to time, but generally the world around us is “second order.” The basic results about linear ODEs of higher order are essentially the same as for second order equations, with 2 replaced by ๐. The important concept of linear independence is somewhat more complicated when more than two functions are involved. For higher order constant coefficient ODEs, the methods developed are also somewhat harder to apply, but we will not dwell on these complications. It is also possible to use the methods for systems of linear equations from chapter 3 to solve higher order constant coefficient equations. Let us start with a general homogeneous linear equation ๐ฆ (๐) + ๐ ๐−1 (๐ฅ)๐ฆ (๐−1) + · · · + ๐1 (๐ฅ)๐ฆ 0 + ๐ 0 (๐ฅ)๐ฆ = 0. (2.4) Theorem 2.3.1 (Superposition). Suppose ๐ฆ1 , ๐ฆ2 , . . . , ๐ฆ๐ are solutions of the homogeneous equation (2.4). Then ๐ฆ(๐ฅ) = ๐ถ1 ๐ฆ1 (๐ฅ) + ๐ถ2 ๐ฆ2 (๐ฅ) + · · · + ๐ถ ๐ ๐ฆ๐ (๐ฅ) also solves (2.4) for arbitrary constants ๐ถ1 , ๐ถ2 , . . . , ๐ถ ๐ . In other words, a linear combination of solutions to (2.4) is also a solution to (2.4). We also have the existence and uniqueness theorem for nonhomogeneous linear equations. Theorem 2.3.2 (Existence and uniqueness). Suppose ๐0 through ๐ ๐−1 , and ๐ are continuous functions on some interval ๐ผ, ๐ is a number in ๐ผ, and ๐0 , ๐1 , . . . , ๐ ๐−1 are constants. The equation ๐ฆ (๐) + ๐ ๐−1 (๐ฅ)๐ฆ (๐−1) + · · · + ๐ 1 (๐ฅ)๐ฆ 0 + ๐0 (๐ฅ)๐ฆ = ๐ (๐ฅ) has exactly one solution ๐ฆ(๐ฅ) defined on the same interval ๐ผ satisfying the initial conditions ๐ฆ(๐) = ๐ 0 , 2.3.1 ๐ฆ 0(๐) = ๐1 , ..., ๐ฆ (๐−1) (๐) = ๐ ๐−1 . Linear independence When we had two functions ๐ฆ1 and ๐ฆ2 we said they were linearly independent if one was not the multiple of the other. Same idea holds for ๐ functions. In this case it is easier to state as follows. The functions ๐ฆ1 , ๐ฆ2 , . . . , ๐ฆ๐ are linearly independent if the equation ๐ 1 ๐ฆ1 + ๐ 2 ๐ฆ2 + · · · + ๐ ๐ ๐ฆ ๐ = 0 has only the trivial solution ๐ 1 = ๐2 = · · · = ๐ ๐ = 0, where the equation must hold for all ๐ฅ. If we can solve equation with some constants where for example ๐1 ≠ 0, then we can solve for ๐ฆ1 as a linear combination of the others. If the functions are not linearly independent, they are linearly dependent. 91 2.3. HIGHER ORDER LINEAR ODES Example 2.3.1: Show that ๐ ๐ฅ , ๐ 2๐ฅ , ๐ 3๐ฅ are linearly independent. Let us give several ways to show this fact. Many textbooks (including [EP] and [F]) introduce Wronskians, but it is difficult to see why they work and they are not really necessary here. Let us write down ๐1 ๐ ๐ฅ + ๐2 ๐ 2๐ฅ + ๐3 ๐ 3๐ฅ = 0. We use rules of exponentials and write ๐ง = ๐ ๐ฅ . Hence ๐ง 2 = ๐ 2๐ฅ and ๐ง 3 = ๐ 3๐ฅ . Then we have ๐ 1 ๐ง + ๐2 ๐ง 2 + ๐ 3 ๐ง 3 = 0. The left-hand side is a third degree polynomial in ๐ง. It is either identically zero, or it has at most 3 zeros. Therefore, it is identically zero, ๐ 1 = ๐ 2 = ๐3 = 0, and the functions are linearly independent. Let us try another way. As before we write ๐1 ๐ ๐ฅ + ๐2 ๐ 2๐ฅ + ๐3 ๐ 3๐ฅ = 0. This equation has to hold for all ๐ฅ. We divide through by ๐ 3๐ฅ to get ๐1 ๐ −2๐ฅ + ๐2 ๐ −๐ฅ + ๐ 3 = 0. As the equation is true for all ๐ฅ, let ๐ฅ → ∞. After taking the limit we see that ๐ 3 = 0. Hence our equation becomes ๐ 1 ๐ ๐ฅ + ๐ 2 ๐ 2๐ฅ = 0. Rinse, repeat! How about yet another way. We again write ๐1 ๐ ๐ฅ + ๐2 ๐ 2๐ฅ + ๐3 ๐ 3๐ฅ = 0. We can evaluate the equation and its derivatives at different values of ๐ฅ to obtain equations for ๐1 , ๐ 2 , and ๐3 . Let us first divide by ๐ ๐ฅ for simplicity. ๐ 1 + ๐ 2 ๐ ๐ฅ + ๐ 3 ๐ 2๐ฅ = 0. We set ๐ฅ = 0 to get the equation ๐ 1 + ๐ 2 + ๐ 3 = 0. Now differentiate both sides ๐ 2 ๐ ๐ฅ + 2๐3 ๐ 2๐ฅ = 0. We set ๐ฅ = 0 to get ๐2 + 2๐3 = 0. We divide by ๐ ๐ฅ again and differentiate to get 2๐3 ๐ ๐ฅ = 0. It is clear that ๐3 is zero. Then ๐2 must be zero as ๐ 2 = −2๐ 3 , and ๐1 must be zero because ๐1 + ๐2 + ๐3 = 0. There is no one best way to do it. All of these methods are perfectly valid. The important thing is to understand why the functions are linearly independent. Example 2.3.2: On the other hand, the functions ๐ ๐ฅ , ๐ −๐ฅ , and cosh ๐ฅ are linearly dependent. Simply apply definition of the hyperbolic cosine: cosh ๐ฅ = ๐ ๐ฅ + ๐ −๐ฅ 2 or 2 cosh ๐ฅ − ๐ ๐ฅ − ๐ −๐ฅ = 0. 92 CHAPTER 2. HIGHER ORDER LINEAR ODES 2.3.2 Constant coefficient higher order ODEs When we have a higher order constant coefficient homogeneous linear equation, the song and dance is exactly the same as it was for second order. We just need to find more solutions. If the equation is ๐ th order, we need to find ๐ linearly independent solutions. It is best seen by example. Example 2.3.3: Find the general solution to ๐ฆ 000 − 3๐ฆ 00 − ๐ฆ 0 + 3๐ฆ = 0. (2.5) Try: ๐ฆ = ๐ ๐๐ฅ . We plug in and get ๐ 3 ๐ ๐๐ฅ −3 ๐ 2 ๐ ๐๐ฅ − ๐๐ ๐๐ฅ +3 ๐ ๐๐ฅ = 0. |{z} ๐ฆ 000 |{z} |{z} ๐ฆ 00 ๐ฆ0 |{z} ๐ฆ We divide through by ๐ ๐๐ฅ . Then ๐ 3 − 3๐ 2 − ๐ + 3 = 0. The trick now is to find the roots. There is a formula for the roots of degree 3 and 4 polynomials but it is very complicated. There is no formula for higher degree polynomials. That does not mean that the roots do not exist. There are always ๐ roots for an ๐ th degree polynomial. They may be repeated and they may be complex. Computers are pretty good at finding roots approximately for reasonable size polynomials. A good place to start is to plot the polynomial and check where it is zero. We can also simply try plugging in. We just start plugging in numbers ๐ = −2, −1, 0, 1, 2, . . . and see if we get a hit (we can also try complex numbers). Even if we do not get a hit, we may get an indication of where the root is. For example, we plug ๐ = −2 into our polynomial and get −15; we plug in ๐ = 0 and get 3. That means there is a root between ๐ = −2 and ๐ = 0, because the sign changed. If we find one root, say ๐1 , then we know (๐ − ๐1 ) is a factor of our polynomial. Polynomial long division can then be used. A good strategy is to begin with ๐ = 0, 1, or −1. These are easy to compute. Our polynomial has two such roots, ๐1 = −1 and ๐2 = 1. There should be 3 roots and the last root is reasonably easy to find. The constant term in a monic∗ polynomial such as this is the multiple of the negations of all the roots because ๐ 3 − 3๐ 2 − ๐ + 3 = (๐ − ๐1 )(๐ − ๐2 )(๐ − ๐3 ). So 3 = (−๐1 )(−๐2 )(−๐3 ) = (1)(−1)(−๐3 ) = ๐3 . You should check that ๐3 = 3 really is a root. Hence ๐ −๐ฅ , ๐ ๐ฅ and ๐ 3๐ฅ are solutions to (2.5). They are linearly independent as can easily be checked, and there are 3 of them, which happens to be exactly the number we need. So the general solution is ๐ฆ = ๐ถ1 ๐ −๐ฅ + ๐ถ2 ๐ ๐ฅ + ๐ถ3 ๐ 3๐ฅ . ∗ The word monic means that the coefficient of the top degree ๐ ๐ , in our case ๐ 3 , is 1. 93 2.3. HIGHER ORDER LINEAR ODES Suppose we were given some initial conditions ๐ฆ(0) = 1, ๐ฆ 0(0) = 2, and ๐ฆ 00(0) = 3. Then 1 = ๐ฆ(0) = ๐ถ1 + ๐ถ2 + ๐ถ3 , 2 = ๐ฆ 0(0) = −๐ถ1 + ๐ถ2 + 3๐ถ3 , 3 = ๐ฆ 00(0) = ๐ถ1 + ๐ถ2 + 9๐ถ3 . It is possible to find the solution by high school algebra, but it would be a pain. The sensible way to solve a system of equations such as this is to use matrix algebra, see § 3.2 or appendix A. For now we note that the solution is ๐ถ1 = −1/4, ๐ถ2 = 1, and ๐ถ3 = 1/4. The specific solution to the ODE is 1 −1 −๐ฅ ๐ + ๐ ๐ฅ + ๐ 3๐ฅ . 4 4 Next, suppose that we have real roots, but they are repeated. Let us say we have a root ๐ repeated ๐ times. In the spirit of the second order solution, and for the same reasons, we have the solutions ๐ ๐๐ฅ , ๐ฅ๐ ๐๐ฅ , ๐ฅ 2 ๐ ๐๐ฅ , . . . , ๐ฅ ๐−1 ๐ ๐๐ฅ . ๐ฆ= We take a linear combination of these solutions to find the general solution. Example 2.3.4: Solve ๐ฆ (4) − 3๐ฆ 000 + 3๐ฆ 00 − ๐ฆ 0 = 0. We note that the characteristic equation is ๐ 4 − 3๐ 3 + 3๐ 2 − ๐ = 0. By inspection we note that ๐ 4 − 3๐ 3 + 3๐ 2 − ๐ = ๐(๐ − 1)3 . Hence the roots given with multiplicity are ๐ = 0, 1, 1, 1. Thus the general solution is ๐ฆ = (๐ถ1 + ๐ถ2 ๐ฅ + ๐ถ3 ๐ฅ 2 ) ๐ ๐ฅ + | {z terms coming from ๐=1 ๐ถ4 . |{z} } from ๐=0 The case of complex roots is similar to second order equations. Complex roots always come in pairs ๐ = ๐ผ ± ๐๐ฝ. Suppose we have two such complex roots, each repeated ๐ times. The corresponding solution is (๐ถ0 + ๐ถ1 ๐ฅ + · · · + ๐ถ ๐−1 ๐ฅ ๐−1 ) ๐ ๐ผ๐ฅ cos(๐ฝ๐ฅ) + (๐ท0 + ๐ท1 ๐ฅ + · · · + ๐ท ๐−1 ๐ฅ ๐−1 ) ๐ ๐ผ๐ฅ sin(๐ฝ๐ฅ). where ๐ถ0 , . . . , ๐ถ ๐−1 , ๐ท0 , . . . , ๐ท ๐−1 are arbitrary constants. Example 2.3.5: Solve ๐ฆ (4) − 4๐ฆ 000 + 8๐ฆ 00 − 8๐ฆ 0 + 4๐ฆ = 0. The characteristic equation is ๐ 4 − 4๐ 3 + 8๐ 2 − 8๐ + 4 = 0, 2 (๐ 2 − 2๐ + 2) = 0, (๐ − 1)2 + 1 2 = 0. 94 CHAPTER 2. HIGHER ORDER LINEAR ODES Hence the roots are 1 ± ๐, both with multiplicity 2. Hence the general solution to the ODE is ๐ฆ = (๐ถ1 + ๐ถ2 ๐ฅ) ๐ ๐ฅ cos ๐ฅ + (๐ถ3 + ๐ถ4 ๐ฅ) ๐ ๐ฅ sin ๐ฅ. The way we solved the characteristic equation above is really by guessing or by inspection. It is not so easy in general. We could also have asked a computer or an advanced calculator for the roots. 2.3.3 Exercises Exercise 2.3.1: Find the general solution for ๐ฆ 000 − ๐ฆ 00 + ๐ฆ 0 − ๐ฆ = 0. Exercise 2.3.2: Find the general solution for ๐ฆ (4) − 5๐ฆ 000 + 6๐ฆ 00 = 0. Exercise 2.3.3: Find the general solution for ๐ฆ 000 + 2๐ฆ 00 + 2๐ฆ 0 = 0. Exercise 2.3.4: Suppose the characteristic equation for an ODE is (๐ − 1)2 (๐ − 2)2 = 0. a) Find such a differential equation. b) Find its general solution. Exercise 2.3.5: Suppose that a fourth order equation has a solution ๐ฆ = 2๐ 4๐ฅ ๐ฅ cos ๐ฅ. a) Find such an equation. b) Find the initial conditions that the given solution satisfies. Exercise 2.3.6: Find the general solution for the equation of Exercise 2.3.5. Exercise 2.3.7: Let ๐ (๐ฅ) = ๐ ๐ฅ − cos ๐ฅ, ๐(๐ฅ) = ๐ ๐ฅ + cos ๐ฅ, and โ(๐ฅ) = cos ๐ฅ. Are ๐ (๐ฅ), ๐(๐ฅ), and โ(๐ฅ) linearly independent? If so, show it, if not, find a linear combination that works. Exercise 2.3.8: Let ๐ (๐ฅ) = 0, ๐(๐ฅ) = cos ๐ฅ, and โ(๐ฅ) = sin ๐ฅ. Are ๐ (๐ฅ), ๐(๐ฅ), and โ(๐ฅ) linearly independent? If so, show it, if not, find a linear combination that works. Exercise 2.3.9: Are ๐ฅ, ๐ฅ 2 , and ๐ฅ 4 linearly independent? If so, show it, if not, find a linear combination that works. Exercise 2.3.10: Are ๐ ๐ฅ , ๐ฅ๐ ๐ฅ , and ๐ฅ 2 ๐ ๐ฅ linearly independent? If so, show it, if not, find a linear combination that works. Exercise 2.3.11: Find an equation such that ๐ฆ = ๐ฅ๐ −2๐ฅ sin(3๐ฅ) is a solution. Exercise 2.3.101: Find the general solution of ๐ฆ (5) − ๐ฆ (4) = 0. 2.3. HIGHER ORDER LINEAR ODES 95 Exercise 2.3.102: Suppose that the characteristic equation of a third order differential equation has roots ±2๐ and 3. a) What is the characteristic equation? b) Find the corresponding differential equation. c) Find the general solution. √ Exercise 2.3.103: Solve 1001๐ฆ 000 + 3.2๐ฆ 00 + ๐๐ฆ 0 − 4๐ฆ = 0, ๐ฆ(0) = 0, ๐ฆ 0(0) = 0, ๐ฆ 00(0) = 0. Exercise 2.3.104: Are ๐ ๐ฅ , ๐ ๐ฅ+1 , ๐ 2๐ฅ , sin(๐ฅ) linearly independent? If so, show it, if not find a linear combination that works. Exercise 2.3.105: Are sin(๐ฅ), ๐ฅ, ๐ฅ sin(๐ฅ) linearly independent? If so, show it, if not find a linear combination that works. Exercise 2.3.106: Find an equation such that ๐ฆ = cos(๐ฅ), ๐ฆ = sin(๐ฅ), ๐ฆ = ๐ ๐ฅ are solutions. 96 CHAPTER 2. HIGHER ORDER LINEAR ODES 2.4 Mechanical vibrations Note: 2 lectures, §3.4 in [EP], §3.7 in [BD] Let us look at some applications of linear second order constant coefficient equations. 2.4.1 Some examples Our first example is a mass on a spring. Suppose we have a ๐ ๐น(๐ก) mass ๐ > 0 (in kilograms) connected by a spring with spring ๐ constant ๐ > 0 (in newtons per meter) to a fixed wall. There may be some external force ๐น(๐ก) (in newtons) acting on the damping ๐ mass. Finally, there is some friction measured by ๐ ≥ 0 (in newton-seconds per meter) as the mass slides along the floor (or perhaps a damper is connected). Let ๐ฅ be the displacement of the mass (๐ฅ = 0 is the rest position), with ๐ฅ growing to the right (away from the wall). The force exerted by the spring is proportional to the compression of the spring by Hooke’s law. Therefore, it is ๐๐ฅ in the negative direction. Similarly the amount of force exerted by friction is proportional to the velocity of the mass. By Newton’s second law we know that force equals mass times acceleration and hence ๐๐ฅ 00 = ๐น(๐ก) − ๐๐ฅ 0 − ๐๐ฅ or ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น(๐ก). This is a linear second order constant coefficient ODE. We say the motion is (i) forced, if ๐น . 0 (if ๐น is not identically zero), (ii) unforced or free, if ๐น ≡ 0 (if ๐น is identically zero), (iii) damped, if ๐ > 0, and (iv) undamped, if ๐ = 0. This system appears in lots of applications even if it does not at first seem like it. Many real-world scenarios can be simplified to a mass on a spring. For example, a bungee jump setup is essentially a mass and spring system (you are the mass). It would be good if someone did the math before you jump off the bridge, right? Let us give two other examples. Here is an example for electrical engineers. Consider the pictured C RLC circuit. There is a resistor with a resistance of ๐ ohms, an inductor E L with an inductance of ๐ฟ henries, and a capacitor with a capacitance R of ๐ถ farads. There is also an electric source (such as a battery) giving a voltage of ๐ธ(๐ก) volts at time ๐ก (measured in seconds). Let ๐(๐ก) be the charge in coulombs on the capacitor and ๐ผ(๐ก) be the current in the circuit. The relation 97 2.4. MECHANICAL VIBRATIONS between the two is ๐ 0 = ๐ผ. By elementary principles we find ๐ฟ๐ผ 0 + ๐ ๐ผ + ๐/๐ถ = ๐ธ. We differentiate to get 1 ๐ฟ๐ผ 00(๐ก) + ๐ ๐ผ 0(๐ก) + ๐ผ(๐ก) = ๐ธ0(๐ก). ๐ถ This is a nonhomogeneous second order constant coefficient linear equation. As ๐ฟ, ๐ , and ๐ถ are all positive, this system behaves just like the mass and spring system. Position of the mass is replaced by current. Mass is replaced by inductance, damping is replaced by resistance, and the spring constant is replaced by one over the capacitance. The change in voltage becomes the forcing function—for constant voltage this is an unforced motion. Our next example behaves like a mass and spring system only approximately. Suppose a mass ๐ hangs on a pendulum ๐ฟ of length ๐ฟ. We seek an equation for the angle ๐(๐ก) (in radians). ๐๐ฟ๐00 ๐ Let ๐ be the force of gravity. Elementary physics mandates that the equation is ๐ ๐ 00 ๐ + sin ๐ = 0. ๐ฟ ๐๐ ๐ ๐ sin ๐ Let us derive this equation using Newton’s second law: force equals mass times acceleration. The acceleration is ๐ฟ๐00 and mass is ๐. So ๐๐ฟ๐00 has to be equal to the tangential component of the force given by the gravity, which is ๐ ๐ sin ๐ in the opposite direction. So ๐๐ฟ๐00 = −๐ ๐ sin ๐. The ๐ curiously cancels from the equation. Now we make our approximation. For small ๐ we have that approximately sin ๐ ≈ ๐. This can be seen by looking at the graph. In Figure 2.1 we can see that for approximately −0.5 < ๐ < 0.5 (in radians) the graphs of sin ๐ and ๐ are almost the same. Therefore, when the swings are small, ๐ is small and we can model the behavior by the simpler linear equation -1.0 ๐ ๐ + ๐ = 0. ๐ฟ -0.5 0.0 0.5 1.0 1.0 1.0 0.5 0.5 0.0 0.0 00 The errors from this approximation build up. So after a long time, the state of the real-world system might be substantially different from our solution. Also we will see that in a mass-spring system, the amplitude is independent of the period. This is not Figure 2.1: The graphs of sin ๐ and ๐ (in radians). true for a pendulum. Nevertheless, for reasonably short periods of time and small swings (that is, only small angles ๐), the approximation is reasonably good. In real-world problems it is often necessary to make these types of simplifications. We must understand both the mathematics and the physics of the situation to see if the simplification is valid in the context of the questions we are trying to answer. -0.5 -0.5 -1.0 -1.0 -1.0 -0.5 0.0 0.5 1.0 98 2.4.2 CHAPTER 2. HIGHER ORDER LINEAR ODES Free undamped motion In this section we only consider free or unforced motion, as we do not know yet how to solve nonhomogeneous equations. Let us start with undamped motion where ๐ = 0. The equation is ๐๐ฅ 00 + ๐๐ฅ = 0. We divide by ๐ and let ๐0 = p ๐/๐ to rewrite the equation as ๐ฅ 00 + ๐02 ๐ฅ = 0. The general solution to this equation is ๐ฅ(๐ก) = ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก). By a trigonometric identity ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก) = ๐ถ cos(๐0 ๐ก − ๐พ), √ for two different constants ๐ถ and ๐พ. It is not hard to compute that ๐ถ = ๐ด2 + ๐ต2 and tan ๐พ = ๐ต/๐ด. Therefore, we let ๐ถ and ๐พ be our arbitrary constants and write ๐ฅ(๐ก) = ๐ถ cos(๐0 ๐ก − ๐พ). Exercise 2.4.1: Justify the identity ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก) = ๐ถ cos(๐0 ๐ก − ๐พ) and verify the equations for ๐ถ and ๐พ. Hint: Start with cos(๐ผ − ๐ฝ) = cos(๐ผ) cos(๐ฝ) + sin(๐ผ) sin(๐ฝ) and multiply by ๐ถ. Then what should ๐ผ and ๐ฝ be? While it is generally easier to use the first form with ๐ด and ๐ต to solve for the initial conditions, the second form is much more natural. The constants ๐ถ and ๐พ have nice physical interpretation. Write the solution as ๐ฅ(๐ก) = ๐ถ cos(๐0 ๐ก − ๐พ). This is a pure-frequency oscillation (a sine wave). The amplitude is ๐ถ, ๐0 is the (angular) frequency, and ๐พ is the so-called phase shift. The phase shift just shifts the graph left or right. We call ๐0 the natural (angular) frequency. This entire setup is called simple harmonic motion. Let us pause to explain the word angular before the word frequency. The units of ๐0 are radians per unit time, not cycles per unit time as is the usual measure of frequency. ๐0 Because one cycle is 2๐ radians, the usual frequency is given by 2๐ . It is simply a matter of where we put the constant 2๐, and that is a matter of taste. The period of the motion is one over the frequency (in cycles per unit time) and hence 2๐ ๐0 . That is the amount of time it takes to complete one full cycle. Example 2.4.1: Suppose that ๐ = 2 kg and ๐ = 8 N/m. The whole mass and spring setup is sitting on a truck that was traveling at 1 m/s. The truck crashes and hence stops. The mass was held in place 0.5 meters forward from the rest position. During the crash the mass gets loose. That is, the mass is now moving forward at 1 m/s, while the other end of the spring is held in place. The mass therefore starts oscillating. What is the 99 2.4. MECHANICAL VIBRATIONS frequency of the resulting oscillation? What is the amplitude? The units are the mks units (meters-kilograms-seconds). The setup means that the mass was at half a meter in the positive direction during the crash and relative to the wall the spring is mounted to, the mass was moving forward (in the positive direction) at 1 m/s. This gives us the initial conditions. So the equation with initial conditions is 2๐ฅ 00 + 8๐ฅ = 0, ๐ฅ(0) = 0.5, ๐ฅ 0(0) = 1. p √ We directly compute ๐0 = ๐/๐ = 4 = 2. Hence the angular frequency is 2. The usual frequency in Hertz (cycles per second) is 2/2๐ = 1/๐ ≈ 0.318. The general solution is ๐ฅ(๐ก) = ๐ด cos(2๐ก) + ๐ต sin(2๐ก). Letting ๐ฅ(0) = 0.5 means ๐ด = 0.5. Then ๐ฅ 0(๐ก) = −2(0.5) ๐ฅ 0(0) = 1 √ sin(2๐ก) +√2๐ต cos(2๐ก). Letting √ we get ๐ต = 0.5. Therefore, the amplitude is ๐ถ = ๐ด2 + ๐ต2 = 0.25 + 0.25 = 0.5 ≈ 0.707. The solution is ๐ฅ(๐ก) = 0.5 cos(2๐ก) + 0.5 sin(2๐ก). A plot of ๐ฅ(๐ก) is shown in Figure 2.2. In general, for free undamped motion, a solution of the form ๐ฅ(๐ก) = ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก), 1.0 0.0 2.5 5.0 7.5 10.0 1.0 0.5 0.5 corresponds to the initial conditions ๐ฅ(0) = ๐ด and ๐ฅ 0(0) = ๐0 ๐ต. Therefore, it is easy to figure out ๐ด and ๐ต from the initial conditions. The amplitude and the phase shift can then be computed from ๐ด and ๐ต. In the example, we have already found the amplitude ๐ถ. Let us compute the phase shift. We know that tan ๐พ = ๐ต/๐ด = 1. We take the Figure 2.2: Simple undamped oscillation. arctangent of 1 and get ๐/4 or approximately 0.785. We still need to check if this ๐พ is in the correct quadrant (and add ๐ to ๐พ if it is not). Since both ๐ด and ๐ต are positive, then ๐พ should be in the first quadrant, ๐/4 radians is in the first quadrant, so ๐พ = ๐/4. Note: Many calculators and computer software have not only the atan function for arctangent, but also what is sometimes called atan2. This function takes two arguments, ๐ต and ๐ด, and returns a ๐พ in the correct quadrant for you. 0.0 0.0 -0.5 -0.5 -1.0 0.0 2.4.3 2.5 Free damped motion Let us now focus on damped motion. Let us rewrite the equation ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, 5.0 7.5 -1.0 10.0 100 CHAPTER 2. HIGHER ORDER LINEAR ODES as ๐ฅ 00 + 2๐๐ฅ 0 + ๐02 ๐ฅ = 0, where r ๐0 = ๐ , ๐ ๐= ๐ . 2๐ The characteristic equation is ๐ 2 + 2๐๐ + ๐02 = 0. Using the quadratic formula we get that the roots are ๐ = −๐ ± q ๐ 2 − ๐02 . The form of the solution depends on whether we get complex or real roots. We get real roots if and only if the following number is nonnegative: ๐ 2 − ๐02 = ๐ 2 2๐ − ๐ ๐ 2 − 4๐๐ = . ๐ 4๐ 2 The sign of ๐ 2 − ๐02 is the same as the sign of ๐ 2 − 4๐๐. Thus we get real roots if and only if ๐ 2 − 4๐๐ is nonnegative, or in other words if ๐ 2 ≥ 4๐๐. Overdamping When ๐ 2 − 4๐๐ > 0, the system is overdamped. In this case, there are two distinct real roots q ๐1 and ๐2 . Both roots are negative: As ๐ 2 − ๐02 is always less than ๐, then 0 25 50 75 100 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 q −๐ ± ๐ 2 − ๐02 is negative in either case. The solution is ๐ฅ(๐ก) = ๐ถ1 ๐ ๐1 ๐ก + ๐ถ2 ๐ ๐2 ๐ก . Since ๐1 , ๐2 are negative, ๐ฅ(๐ก) → 0 as ๐ก → ∞. Thus the mass will tend towards the rest position as time goes to infinity. For a few Figure 2.3: Overdamped motion for several differsample plots for different initial conditions, ent initial conditions. see Figure 2.3. No oscillation happens. In fact, the graph crosses the ๐ฅ-axis at most once. To see why, we try to solve 0 = ๐ถ1 ๐ ๐1 ๐ก + ๐ถ2 ๐ ๐2 ๐ก . Therefore, ๐ถ1 ๐ ๐1 ๐ก = −๐ถ2 ๐ ๐2 ๐ก and using laws of exponents we obtain 0 −๐ถ1 = ๐ (๐2 −๐1 )๐ก . ๐ถ2 25 50 75 100 101 2.4. MECHANICAL VIBRATIONS This equation has at most one solution ๐ก ≥ 0. For some initial conditions the graph never crosses the ๐ฅ-axis, as is evident from the sample graphs. Example 2.4.2: Suppose the mass is released from rest. That is ๐ฅ(0) = ๐ฅ 0 and ๐ฅ 0(0) = 0. Then ๐ฅ0 ๐ 1 ๐ ๐2 ๐ก − ๐ 2 ๐ ๐1 ๐ก . ๐ฅ(๐ก) = ๐1 − ๐2 It is not hard to see that this satisfies the initial conditions. Critical damping When ๐ 2 − 4๐๐ = 0, the system is critically damped. In this case, there is one root of multiplicity 2 and this root is −๐. Our solution is ๐ฅ(๐ก) = ๐ถ1 ๐ −๐๐ก + ๐ถ2 ๐ก๐ −๐๐ก . The behavior of a critically damped system is very similar to an overdamped system. After all a critically damped system is in some sense a limit of overdamped systems. Since these equations are really only an approximation to the real world, in reality we are never critically damped, it is a place we can only reach in theory. We are always a little bit underdamped or a little bit overdamped. It is better not to dwell on critical damping. Underdamping When ๐ 2 − 4๐๐ < 0, the system is underdamped. In this case, the roots are complex. ๐ = −๐ ± q ๐ 2 − ๐02 √ = −๐ ± −1 ๐02 − ๐ 2 0 5 10 15 20 25 30 1.0 1.0 0.5 0.5 0.0 0.0 -0.5 -0.5 q = −๐ ± ๐๐1 , where ๐1 = q ๐02 − ๐ 2 . Our solution is ๐ฅ(๐ก) = ๐ −๐๐ก ๐ด cos(๐1 ๐ก) + ๐ต sin(๐1 ๐ก) , or ๐ฅ(๐ก) = ๐ถ๐ −๐๐ก cos(๐1 ๐ก − ๐พ). -1.0 -1.0 0 5 10 15 20 25 30 Figure 2.4: Underdamped motion with the envelope curves shown. An example plot is given in Figure 2.4. Note that we still have that ๐ฅ(๐ก) → 0 as ๐ก → ∞. The figure also shows the envelope curves ๐ถ๐ −๐๐ก and −๐ถ๐ −๐๐ก . The solution is the oscillating line between the two envelope curves. The envelope curves give the maximum amplitude of the oscillation at any given point in time. For example, if you are bungee jumping, you are really interested in computing the envelope curve as not to hit the concrete with your head. 102 CHAPTER 2. HIGHER ORDER LINEAR ODES The phase shift ๐พ shifts the oscillation left or right, but within the envelope curves (the envelope curves do not change if ๐พ changes). Notice that the angular pseudo-frequency∗ becomes smaller when the damping ๐ (and hence ๐) becomes larger. This makes sense. When we change the damping just a little bit, we do not expect the behavior of the solution to change dramatically. If we keep making ๐ larger, then at some point the solution should start looking like the solution for critical damping or overdamping, where no oscillation happens. So if ๐ 2 approaches 4๐๐, we want ๐1 to approach 0. On the other hand, when ๐ gets smaller, ๐1 approaches ๐0 (๐1 is always smaller than ๐0 ), and the solution looks more and more like the steady periodic motion of the undamped case. The envelope curves become flatter and flatter as ๐ (and hence ๐) goes to 0. 2.4.4 Exercises Exercise 2.4.2: Consider a mass and spring system with a mass ๐ = 2, spring constant ๐ = 3, and damping constant ๐ = 1. a) Set up and find the general solution of the system. b) Is the system underdamped, overdamped or critically damped? c) If the system is not critically damped, find a ๐ that makes the system critically damped. Exercise 2.4.3: Do Exercise 2.4.2 for ๐ = 3, ๐ = 12, and ๐ = 12. Exercise 2.4.4: Using the mks units (meters-kilograms-seconds), suppose you have a spring with spring constant 4 N/m. You want to use it to weigh items. Assume no friction. You place the mass on the spring and put it in motion. a) You count and find that the frequency is 0.8 Hz (cycles per second). What is the mass? b) Find a formula for the mass ๐ given the frequency ๐ in Hz. Exercise 2.4.5: Suppose we add possible friction to Exercise 2.4.4. Further, suppose you do not know the spring constant, but you have two reference weights 1 kg and 2 kg to calibrate your setup. You put each in motion on your spring and measure the frequency. For the 1 kg weight you measured 1.1 Hz, for the 2 kg weight you measured 0.8 Hz. a) Find ๐ (spring constant) and ๐ (damping constant). b) Find a formula for the mass in terms of the frequency in Hz. Note that there may be more than one possible mass for a given frequency. c) For an unknown object you measured 0.2 Hz, what is the mass of the object? Suppose that you know that the mass of the unknown object is more than a kilogram. ∗ We do not call ๐1 a frequency since the solution is not really a periodic function. 2.4. MECHANICAL VIBRATIONS 103 Exercise 2.4.6: Suppose you wish to measure the friction a mass of 0.1 kg experiences as it slides along a floor (you wish to find ๐). You have a spring with spring constant ๐ = 5 N/m. You take the spring, you attach it to the mass and fix it to a wall. Then you pull on the spring and let the mass go. You find that the mass oscillates with frequency 1 Hz. What is the friction? Exercise 2.4.101: A mass of 2 kilograms is on a spring with spring constant ๐ newtons per meter with no damping. Suppose the system is at rest and at time ๐ก = 0 the mass is kicked and starts traveling at 2 meters per second. How large does ๐ have to be to so that the mass does not go further than 3 meters from the rest position? Exercise 2.4.102: Suppose we have an RLC circuit with a resistor of 100 milliohms (0.1 ohms), inductor of inductance of 50 millihenries (0.05 henries), and a capacitor of 5 farads, with constant voltage. a) Set up the ODE equation for the current ๐ผ. b) Find the general solution. c) Solve for ๐ผ(0) = 10 and ๐ผ 0(0) = 0. Exercise 2.4.103: A 5000 kg railcar hits a bumper (a spring) at 1 m/s, and the spring compresses by 0.1 m. Assume no damping. a) Find ๐. b) How far does the spring compress when a 10000 kg railcar hits the spring at the same speed? c) If the spring would break if it compresses further than 0.3 m, what is the maximum mass of a railcar that can hit it at 1 m/s? d) What is the maximum mass of a railcar that can hit the spring without breaking at 2 m/s? Exercise 2.4.104: A mass of ๐ kg is on a spring with ๐ = 3 N/m and ๐ = 2 Ns/m. Find the mass ๐0 for which there is critical damping. If ๐ < ๐0 , does the system oscillate or not, that is, is it underdamped or overdamped? 104 2.5 CHAPTER 2. HIGHER ORDER LINEAR ODES Nonhomogeneous equations Note: 2 lectures, §3.5 in [EP], §3.5 and §3.6 in [BD] 2.5.1 Solving nonhomogeneous equations We have solved linear constant coefficient homogeneous equations. What about nonhomogeneous linear ODEs? For example, the equations for forced mechanical vibrations. That is, suppose we have an equation such as ๐ฆ 00 + 5๐ฆ 0 + 6๐ฆ = 2๐ฅ + 1. (2.6) We will write ๐ฟ๐ฆ = 2๐ฅ + 1 when the exact form of the operator is not important. We solve (2.6) in the following manner. First, we find the general solution ๐ฆ ๐ to the associated homogeneous equation ๐ฆ 00 + 5๐ฆ 0 + 6๐ฆ = 0. (2.7) We call ๐ฆ ๐ the complementary solution. Next, we find a single particular solution ๐ฆ ๐ to (2.6) in some way. Then ๐ฆ = ๐ฆ๐ + ๐ฆ๐ is the general solution to (2.6). We have ๐ฟ๐ฆ ๐ = 0 and ๐ฟ๐ฆ ๐ = 2๐ฅ + 1. As ๐ฟ is a linear operator we verify that ๐ฆ is a solution, ๐ฟ๐ฆ = ๐ฟ(๐ฆ ๐ + ๐ฆ ๐ ) = ๐ฟ๐ฆ ๐ + ๐ฟ๐ฆ ๐ = 0 + (2๐ฅ + 1). Let us see why we obtain the general solution. Let ๐ฆ ๐ and ๐ฆ˜ ๐ be two different particular solutions to (2.6). Write the difference as ๐ค = ๐ฆ ๐ − ๐ฆ˜ ๐ . Then plug ๐ค into the left-hand side of the equation to get ๐ค 00 + 5๐ค 0 + 6๐ค = (๐ฆ ๐00 + 5๐ฆ ๐0 + 6๐ฆ ๐ ) − ( ๐ฆ˜ ๐00 + 5 ๐ฆ˜ ๐0 + 6 ๐ฆ˜ ๐ ) = (2๐ฅ + 1) − (2๐ฅ + 1) = 0. Using the operator notation the calculation becomes simpler. As ๐ฟ is a linear operator we write ๐ฟ๐ค = ๐ฟ(๐ฆ ๐ − ๐ฆ˜ ๐ ) = ๐ฟ๐ฆ ๐ − ๐ฟ ๐ฆ˜ ๐ = (2๐ฅ + 1) − (2๐ฅ + 1) = 0. So ๐ค = ๐ฆ ๐ − ๐ฆ˜ ๐ is a solution to (2.7), that is ๐ฟ๐ค = 0. Any two solutions of (2.6) differ by a solution to the homogeneous equation (2.7). The solution ๐ฆ = ๐ฆ ๐ + ๐ฆ ๐ includes all solutions to (2.6), since ๐ฆ ๐ is the general solution to the associated homogeneous equation. Theorem 2.5.1. Let ๐ฟ๐ฆ = ๐ (๐ฅ) be a linear ODE (not necessarily constant coefficient). Let ๐ฆ ๐ be the complementary solution (the general solution to the associated homogeneous equation ๐ฟ๐ฆ = 0) and let ๐ฆ ๐ be any particular solution to ๐ฟ๐ฆ = ๐ (๐ฅ). Then the general solution to ๐ฟ๐ฆ = ๐ (๐ฅ) is ๐ฆ = ๐ฆ๐ + ๐ฆ๐ . The moral of the story is that we can find the particular solution in any old way. If we find a different particular solution (by a different method, or simply by guessing), then we still get the same general solution. The formula may look different, and the constants we have to choose to satisfy the initial conditions may be different, but it is the same solution. 105 2.5. NONHOMOGENEOUS EQUATIONS 2.5.2 Undetermined coefficients The trick is to somehow, in a smart way, guess one particular solution to (2.6). Note that 2๐ฅ + 1 is a polynomial, and the left-hand side of the equation will be a polynomial if we let ๐ฆ be a polynomial of the same degree. Let us try ๐ฆ ๐ = ๐ด๐ฅ + ๐ต. We plug ๐ฆ ๐ into the left hand side to obtain ๐ฆ ๐00 + 5๐ฆ ๐0 + 6๐ฆ ๐ = (๐ด๐ฅ + ๐ต)00 + 5(๐ด๐ฅ + ๐ต)0 + 6(๐ด๐ฅ + ๐ต) = 0 + 5๐ด + 6๐ด๐ฅ + 6๐ต = 6๐ด๐ฅ + (5๐ด + 6๐ต). So 6๐ด๐ฅ +(5๐ด +6๐ต) = 2๐ฅ +1. Therefore, ๐ด = 1/3 and ๐ต = −1/9. That means ๐ฆ ๐ = Solving the complementary problem (exercise!) we get 1 3 ๐ฅ − 19 = 3๐ฅ−1 9 . ๐ฆ ๐ = ๐ถ1 ๐ −2๐ฅ + ๐ถ2 ๐ −3๐ฅ . Hence the general solution to (2.6) is ๐ฆ = ๐ถ1 ๐ −2๐ฅ + ๐ถ2 ๐ −3๐ฅ + 3๐ฅ − 1 . 9 Now suppose we are further given some initial conditions. For example, ๐ฆ(0) = 0 and ๐ฆ 0(0) = 1/3. First find ๐ฆ 0 = −2๐ถ1 ๐ −2๐ฅ − 3๐ถ2 ๐ −3๐ฅ + 1/3. Then 1 0 = ๐ฆ(0) = ๐ถ1 + ๐ถ2 − , 9 1 1 = ๐ฆ 0(0) = −2๐ถ1 − 3๐ถ2 + . 3 3 We solve to get ๐ถ1 = 1/3 and ๐ถ2 = −2/9. The particular solution we want is ๐ฆ(๐ฅ) = 1 −2๐ฅ 2 −3๐ฅ 3๐ฅ − 1 3๐ −2๐ฅ − 2๐ −3๐ฅ + 3๐ฅ − 1 ๐ − ๐ + = . 3 9 9 9 Exercise 2.5.1: Check that ๐ฆ really solves the equation (2.6) and the given initial conditions. Note: A common mistake is to solve for constants using the initial conditions with ๐ฆ ๐ and only add the particular solution ๐ฆ ๐ after that. That will not work. You need to first compute ๐ฆ = ๐ฆ ๐ + ๐ฆ ๐ and only then solve for the constants using the initial conditions. A right-hand side consisting of exponentials, sines, and cosines can be handled similarly. For example, ๐ฆ 00 + 2๐ฆ 0 + 2๐ฆ = cos(2๐ฅ). Let us find some ๐ฆ ๐ . We start by guessing the solution includes some multiple of cos(2๐ฅ). We may have to also add a multiple of sin(2๐ฅ) to our guess since derivatives of cosine are sines. We try ๐ฆ ๐ = ๐ด cos(2๐ฅ) + ๐ต sin(2๐ฅ). 106 CHAPTER 2. HIGHER ORDER LINEAR ODES We plug ๐ฆ ๐ into the equation and we get −4๐ด cos(2๐ฅ) − 4๐ต sin(2๐ฅ) +2 −2๐ด sin(2๐ฅ) + 2๐ต cos(2๐ฅ) | {z ๐ฆ ๐00 } | {z } ๐ฆ ๐0 + 2 ๐ด cos(2๐ฅ) + 2๐ต sin(2๐ฅ) = cos(2๐ฅ), | {z ๐ฆ๐ } or (−4๐ด + 4๐ต + 2๐ด) cos(2๐ฅ) + (−4๐ต − 4๐ด + 2๐ต) sin(2๐ฅ) = cos(2๐ฅ). The left-hand side must equal to right-hand side. Namely, −4๐ด + 4๐ต + 2๐ด = 1 and −4๐ต − 4๐ด + 2๐ต = 0. So −2๐ด + 4๐ต = 1 and 2๐ด + ๐ต = 0 and hence ๐ด = −1/10 and ๐ต = 1/5. So ๐ฆ ๐ = ๐ด cos(2๐ฅ) + ๐ต sin(2๐ฅ) = − cos(2๐ฅ) + 2 sin(2๐ฅ) . 10 Similarly, if the right-hand side contains exponentials we try exponentials. If ๐ฟ๐ฆ = ๐ 3๐ฅ , we try ๐ฆ = ๐ด๐ 3๐ฅ as our guess and try to solve for ๐ด. When the right-hand side is a multiple of sines, cosines, exponentials, and polynomials, we can use the product rule for differentiation to come up with a guess. We need to guess a form for ๐ฆ ๐ such that ๐ฟ๐ฆ ๐ is of the same form, and has all the terms needed to for the right-hand side. For example, ๐ฟ๐ฆ = (1 + 3๐ฅ 2 ) ๐ −๐ฅ cos(๐๐ฅ). For this equation, we guess ๐ฆ ๐ = (๐ด + ๐ต๐ฅ + ๐ถ๐ฅ 2 ) ๐ −๐ฅ cos(๐๐ฅ) + (๐ท + ๐ธ๐ฅ + ๐น๐ฅ 2 ) ๐ −๐ฅ sin(๐๐ฅ). We plug in and then hopefully get equations that we can solve for ๐ด, ๐ต, ๐ถ, ๐ท, ๐ธ, and ๐น. As you can see this can make for a very long and tedious calculation very quickly. C’est la vie! There is one hiccup in all this. It could be that our guess actually solves the associated homogeneous equation. That is, suppose we have ๐ฆ 00 − 9๐ฆ = ๐ 3๐ฅ . We would love to guess ๐ฆ = ๐ด๐ 3๐ฅ , but if we plug this into the left-hand side of the equation we get ๐ฆ 00 − 9๐ฆ = 9๐ด๐ 3๐ฅ − 9๐ด๐ 3๐ฅ = 0 ≠ ๐ 3๐ฅ . There is no way we can choose ๐ด to make the left-hand side be ๐ 3๐ฅ . The trick in this case is to multiply our guess by ๐ฅ to get rid of duplication with the complementary solution. That is first we compute ๐ฆ ๐ (solution to ๐ฟ๐ฆ = 0) ๐ฆ ๐ = ๐ถ1 ๐ −3๐ฅ + ๐ถ2 ๐ 3๐ฅ , 2.5. NONHOMOGENEOUS EQUATIONS 107 and we note that the ๐ 3๐ฅ term is a duplicate with our desired guess. We modify our guess to ๐ฆ = ๐ด๐ฅ๐ 3๐ฅ so that there is no duplication anymore. Let us try: ๐ฆ 0 = ๐ด๐ 3๐ฅ + 3๐ด๐ฅ๐ 3๐ฅ and ๐ฆ 00 = 6๐ด๐ 3๐ฅ + 9๐ด๐ฅ๐ 3๐ฅ , so ๐ฆ 00 − 9๐ฆ = 6๐ด๐ 3๐ฅ + 9๐ด๐ฅ๐ 3๐ฅ − 9๐ด๐ฅ๐ 3๐ฅ = 6๐ด๐ 3๐ฅ . Thus 6๐ด๐ 3๐ฅ is supposed to equal ๐ 3๐ฅ . Hence, 6๐ด = 1 and so ๐ด = 1/6. We can now write the general solution as 1 ๐ฆ = ๐ฆ ๐ + ๐ฆ ๐ = ๐ถ1 ๐ −3๐ฅ + ๐ถ2 ๐ 3๐ฅ + ๐ฅ๐ 3๐ฅ . 6 It is possible that multiplying by ๐ฅ does not get rid of all duplication. For example, ๐ฆ 00 − 6๐ฆ 0 + 9๐ฆ = ๐ 3๐ฅ . The complementary solution is ๐ฆ ๐ = ๐ถ1 ๐ 3๐ฅ + ๐ถ2 ๐ฅ๐ 3๐ฅ . Guessing ๐ฆ = ๐ด๐ฅ๐ 3๐ฅ would not get us anywhere. In this case we want to guess ๐ฆ ๐ = ๐ด๐ฅ 2 ๐ 3๐ฅ . Basically, we want to multiply our guess by ๐ฅ until all duplication is gone. But no more! Multiplying too many times will not work. Finally, what if the right-hand side has several terms, such as ๐ฟ๐ฆ = ๐ 2๐ฅ + cos ๐ฅ. In this case we find ๐ข that solves ๐ฟ๐ข = ๐ 2๐ฅ and ๐ฃ that solves ๐ฟ๐ฃ = cos ๐ฅ (that is, do each term separately). Then note that if ๐ฆ = ๐ข + ๐ฃ, then ๐ฟ๐ฆ = ๐ 2๐ฅ + cos ๐ฅ. This is because ๐ฟ is linear; we have ๐ฟ๐ฆ = ๐ฟ(๐ข + ๐ฃ) = ๐ฟ๐ข + ๐ฟ๐ฃ = ๐ 2๐ฅ + cos ๐ฅ. 2.5.3 Variation of parameters The method of undetermined coefficients works for many basic problems that crop up. But it does not work all the time. It only works when the right-hand side of the equation ๐ฟ๐ฆ = ๐ (๐ฅ) has finitely many linearly independent derivatives, so that we can write a guess that consists of them all. Some equations are a bit tougher. Consider ๐ฆ 00 + ๐ฆ = tan ๐ฅ. Each new derivative of tan ๐ฅ looks completely different and cannot be written as a linear combination of the previous derivatives. If we start differentiating tan ๐ฅ, we get: sec2 ๐ฅ, 2 sec2 ๐ฅ tan ๐ฅ, 4 sec2 ๐ฅ tan2 ๐ฅ + 2 sec4 ๐ฅ, 8 sec2 ๐ฅ tan3 ๐ฅ + 16 sec4 ๐ฅ tan ๐ฅ, 16 sec2 ๐ฅ tan4 ๐ฅ + 88 sec4 ๐ฅ tan2 ๐ฅ + 16 sec6 ๐ฅ, ... This equation calls for a different method. We present the method of variation of parameters, which handles any equation of the form ๐ฟ๐ฆ = ๐ (๐ฅ), provided we can solve certain integrals. For simplicity, we restrict ourselves to second order constant coefficient 108 CHAPTER 2. HIGHER ORDER LINEAR ODES equations, but the method works for higher order equations just as well (the computations become more tedious). The method also works for equations with nonconstant coefficients, provided we can solve the associated homogeneous equation. Perhaps it is best to explain this method by example. Let us try to solve the equation ๐ฟ๐ฆ = ๐ฆ 00 + ๐ฆ = tan ๐ฅ. First we find the complementary solution (solution to ๐ฟ๐ฆ ๐ = 0). We get ๐ฆ ๐ = ๐ถ1 ๐ฆ1 + ๐ถ2 ๐ฆ2 , where ๐ฆ1 = cos ๐ฅ and ๐ฆ2 = sin ๐ฅ. To find a particular solution to the nonhomogeneous equation we try ๐ฆ ๐ = ๐ฆ = ๐ข1 ๐ฆ1 + ๐ข2 ๐ฆ2 , where ๐ข1 and ๐ข2 are functions and not constants. We are trying to satisfy ๐ฟ๐ฆ = tan ๐ฅ. That gives us one condition on the functions ๐ข1 and ๐ข2 . Compute (note the product rule!) ๐ฆ 0 = (๐ข10 ๐ฆ1 + ๐ข20 ๐ฆ2 ) + (๐ข1 ๐ฆ10 + ๐ข2 ๐ฆ20 ). We can still impose one more condition at our discretion to simplify computations (we have two unknown functions, so we should be allowed two conditions). We require that (๐ข10 ๐ฆ1 + ๐ข20 ๐ฆ2 ) = 0. This makes computing the second derivative easier. ๐ฆ 0 = ๐ข1 ๐ฆ10 + ๐ข2 ๐ฆ20 , ๐ฆ 00 = (๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 ) + (๐ข1 ๐ฆ100 + ๐ข2 ๐ฆ200). Since ๐ฆ1 and ๐ฆ2 are solutions to ๐ฆ 00 + ๐ฆ = 0, we find ๐ฆ100 = −๐ฆ1 and ๐ฆ200 = −๐ฆ2 . (If the equation was a more general ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0, we would have ๐ฆ ๐00 = −๐(๐ฅ)๐ฆ ๐0 − ๐(๐ฅ)๐ฆ ๐ .) So ๐ฆ 00 = (๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 ) − (๐ข1 ๐ฆ1 + ๐ข2 ๐ฆ2 ). We have (๐ข1 ๐ฆ1 + ๐ข2 ๐ฆ2 ) = ๐ฆ and so ๐ฆ 00 = (๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 ) − ๐ฆ, and hence ๐ฆ 00 + ๐ฆ = ๐ฟ๐ฆ = ๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 . For ๐ฆ to satisfy ๐ฟ๐ฆ = ๐ (๐ฅ) we must have ๐ (๐ฅ) = ๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 . What we need to solve are the two equations (conditions) we imposed on ๐ข1 and ๐ข2 : ๐ข10 ๐ฆ1 + ๐ข20 ๐ฆ2 = 0, ๐ข10 ๐ฆ10 + ๐ข20 ๐ฆ20 = ๐ (๐ฅ). We solve for ๐ข10 and ๐ข20 in terms of ๐ (๐ฅ), ๐ฆ1 and ๐ฆ2 . We always get these formulas for any ๐ฟ๐ฆ = ๐ (๐ฅ), where ๐ฟ๐ฆ = ๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ. There is a general formula for the solution we 109 2.5. NONHOMOGENEOUS EQUATIONS could just plug into, but instead of memorizing that, it is better, and easier, to just repeat what we do below. In our case the two equations are ๐ข10 cos(๐ฅ) + ๐ข20 sin(๐ฅ) = 0, −๐ข10 sin(๐ฅ) + ๐ข20 cos(๐ฅ) = tan(๐ฅ). Hence ๐ข10 cos(๐ฅ) sin(๐ฅ) + ๐ข20 sin2 (๐ฅ) = 0, −๐ข10 sin(๐ฅ) cos(๐ฅ) + ๐ข20 cos2 (๐ฅ) = tan(๐ฅ) cos(๐ฅ) = sin(๐ฅ). And thus ๐ข20 sin2 (๐ฅ) + cos2 (๐ฅ) = sin(๐ฅ), ๐ข20 = sin(๐ฅ), ๐ข10 = − sin2 (๐ฅ) = − tan(๐ฅ) sin(๐ฅ). cos(๐ฅ) We integrate ๐ข10 and ๐ข20 to get ๐ข1 and ๐ข2 . ๐ข1 = ๐ข2 = ∫ ๐ข10 ∫ ๐ข20 ๐๐ฅ = ๐๐ฅ = ∫ ∫ − tan(๐ฅ) sin(๐ฅ) ๐๐ฅ = 1 sin(๐ฅ) − 1 ln + sin(๐ฅ), 2 sin(๐ฅ) + 1 sin(๐ฅ) ๐๐ฅ = − cos(๐ฅ). So our particular solution is ๐ฆ ๐ = ๐ข1 ๐ฆ1 + ๐ข2 ๐ฆ2 = 1 sin(๐ฅ) − 1 cos(๐ฅ) ln + cos(๐ฅ) sin(๐ฅ) − cos(๐ฅ) sin(๐ฅ) = 2 sin(๐ฅ) + 1 sin(๐ฅ) − 1 1 . = cos(๐ฅ) ln 2 sin(๐ฅ) + 1 The general solution to ๐ฆ 00 + ๐ฆ = tan ๐ฅ is, therefore, ๐ฆ = ๐ถ1 cos(๐ฅ) + ๐ถ2 sin(๐ฅ) + 2.5.4 1 sin(๐ฅ) − 1 cos(๐ฅ) ln . 2 sin(๐ฅ) + 1 Exercises Exercise 2.5.2: Find a particular solution of ๐ฆ 00 − ๐ฆ 0 − 6๐ฆ = ๐ 2๐ฅ . Exercise 2.5.3: Find a particular solution of ๐ฆ 00 − 4๐ฆ 0 + 4๐ฆ = ๐ 2๐ฅ . Exercise 2.5.4: Solve the initial value problem ๐ฆ 00 + 9๐ฆ = cos(3๐ฅ) + sin(3๐ฅ) for ๐ฆ(0) = 2, ๐ฆ 0(0) = 1. Exercise 2.5.5: Set up the form of the particular solution but do not solve for the coefficients for ๐ฆ (4) − 2๐ฆ 000 + ๐ฆ 00 = ๐ ๐ฅ . Exercise 2.5.6: Set up the form of the particular solution but do not solve for the coefficients for ๐ฆ (4) − 2๐ฆ 000 + ๐ฆ 00 = ๐ ๐ฅ + ๐ฅ + sin ๐ฅ. 110 CHAPTER 2. HIGHER ORDER LINEAR ODES Exercise 2.5.7: a) Using variation of parameters find a particular solution of ๐ฆ 00 − 2๐ฆ 0 + ๐ฆ = ๐ ๐ฅ . b) Find a particular solution using undetermined coefficients. c) Are the two solutions you found the same? See also Exercise 2.5.10. Exercise 2.5.8: Find a particular solution of ๐ฆ 00 − 2๐ฆ 0 + ๐ฆ = sin(๐ฅ 2 ). It is OK to leave the answer as a definite integral. Exercise 2.5.9: For an arbitrary constant ๐ find a particular solution to ๐ฆ 00 − ๐ฆ = ๐ ๐๐ฅ . Hint: Make sure to handle every possible real ๐. Exercise 2.5.10: a) Using variation of parameters find a particular solution of ๐ฆ 00 − ๐ฆ = ๐ ๐ฅ . b) Find a particular solution using undetermined coefficients. c) Are the two solutions you found the same? What is going on? Exercise 2.5.11: Find a polynomial ๐(๐ฅ), so that ๐ฆ = 2๐ฅ 2 + 3๐ฅ + 4 solves ๐ฆ 00 + 5๐ฆ 0 + ๐ฆ = ๐(๐ฅ). Exercise 2.5.101: Find a particular solution to ๐ฆ 00 − ๐ฆ 0 + ๐ฆ = 2 sin(3๐ฅ). Exercise 2.5.102: a) Find a particular solution to ๐ฆ 00 + 2๐ฆ = ๐ ๐ฅ + ๐ฅ 3 . b) Find the general solution. Exercise 2.5.103: Solve ๐ฆ 00 + 2๐ฆ 0 + ๐ฆ = ๐ฅ 2 , ๐ฆ(0) = 1, ๐ฆ 0(0) = 2. Exercise 2.5.104: Use variation of parameters to find a particular solution of ๐ฆ 00 − ๐ฆ = 1 ๐ ๐ฅ +๐ −๐ฅ . Exercise 2.5.105: For an arbitrary constant ๐ find the general solution to ๐ฆ 00 − 2๐ฆ = sin(๐ฅ + ๐). Exercise 2.5.106: Undetermined coefficients can sometimes be used to guess a particular solution to other equations than constant coefficients. Find a polynomial ๐ฆ(๐ฅ) that solves ๐ฆ 0 + ๐ฅ๐ฆ = ๐ฅ 3 + 2๐ฅ 2 + 5๐ฅ + 2. Note: Not every right hand side will allow a polynomial solution, for example, ๐ฆ 0 + ๐ฅ๐ฆ = 1 does not, but a technique based on undetermined coefficients does work, see chapter 7. 111 2.6. FORCED OSCILLATIONS AND RESONANCE 2.6 Forced oscillations and resonance Note: 2 lectures, §3.6 in [EP], §3.8 in [BD] ๐ Let us return back to the example of a mass on a spring. We examine the case of forced oscillations, which we did not yet handle. That is, we consider the equation ๐น(๐ก) ๐ damping ๐ ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น(๐ก), for some nonzero ๐น(๐ก). The setup is again: ๐ is mass, ๐ is friction, ๐ is the spring constant, and ๐น(๐ก) is an external force acting on the mass. We are interested in periodic forcing, such as noncentered rotating parts, or perhaps loud sounds, or other sources of periodic force. Once we learn about Fourier series in chapter 4, we will see that we cover all periodic functions by simply considering ๐น(๐ก) = ๐น0 cos(๐๐ก) (or sine instead of cosine, the calculations are essentially the same). 2.6.1 Undamped forced motion and resonance First let us consider undamped (๐ = 0) motion. We have the equation ๐๐ฅ 00 + ๐๐ฅ = ๐น0 cos(๐๐ก). This equation has the complementary solution (solution to the associated homogeneous equation) ๐ฅ ๐ = ๐ถ1 cos(๐0 ๐ก) + ๐ถ2 sin(๐0 ๐ก), p where ๐0 = ๐/๐ is the natural frequency (angular). It is the frequency at which the system “wants to oscillate” without external interference. Suppose that ๐0 ≠ ๐. We try the solution ๐ฅ ๐ = ๐ด cos(๐๐ก) and solve for ๐ด. We do not need a sine in our trial solution as after plugging in we only have cosines. If you include a sine, it is fine; you will find that its coefficient is zero (I could not find a second rhyme). We solve using the method of undetermined coefficients. We find that ๐ฅ๐ = ๐น0 ๐(๐02 − ๐2 ) cos(๐๐ก). We leave it as an exercise to do the algebra required. The general solution is ๐ฅ = ๐ถ1 cos(๐0 ๐ก) + ๐ถ2 sin(๐0 ๐ก) + ๐น0 ๐(๐02 − ๐2 ) cos(๐๐ก). Written another way ๐ฅ = ๐ถ cos(๐0 ๐ก − ๐พ) + ๐น0 ๐(๐02 − ๐2 ) cos(๐๐ก). The solution is a superposition of two cosine waves at different frequencies. 112 CHAPTER 2. HIGHER ORDER LINEAR ODES Example 2.6.1: Take 0.5๐ฅ 00 + 8๐ฅ = 10 cos(๐๐ก), ๐ฅ 0(0) = 0. ๐ฅ(0) = 0, Let us compute. First we read off the parameters: ๐ = ๐, ๐0 = ๐ = 0.5. The general solution is ๐ฅ = ๐ถ1 cos(4๐ก) + ๐ถ2 sin(4๐ก) + Solve for ๐ถ1 and ๐ถ2 using the initial −20 conditions: ๐ถ1 = 16−๐ 2 and ๐ถ 2 = 0. Hence 20 cos(๐๐ก) − cos(4๐ก) . 16 − ๐2 Do notice the “beating” behavior in Figure 2.5. To see it, use the trigonometric identity ๐ฅ= ๐ด+๐ต ๐ด−๐ต sin = cos ๐ต − cos ๐ด 2 sin 2 2 to get ๐ฅ= p 8/0.5 = 4, ๐น0 = 10, 20 cos(๐๐ก). 16 − ๐2 0 5 10 15 20 10 10 5 5 0 0 -5 -5 -10 -10 0 20 4−๐ 4+๐ 2 sin ๐ก sin ๐ก 2 2 16 − ๐2 . 5 Figure 2.5: Graph of 10 20 16−๐2 15 20 cos(๐๐ก) − cos(4๐ก) . The function ๐ฅ is a high frequency wave modulated by a low frequency wave. Now suppose ๐0 = ๐. Obviously, we cannot try the solution ๐ด cos(๐๐ก) and then use the method of undetermined coefficients. We notice that cos(๐๐ก) solves the associated homogeneous equation. Therefore, we try ๐ฅ ๐ = ๐ด๐ก cos(๐๐ก) + ๐ต๐ก sin(๐๐ก). This time we need the sine term, since the second derivative of ๐ก cos(๐๐ก) contains sines. We write the equation ๐ฅ 00 + ๐ 2 ๐ฅ = ๐น0 cos(๐๐ก). ๐ Plugging ๐ฅ ๐ into the left-hand side we get 2๐ต๐ cos(๐๐ก) − 2๐ด๐ sin(๐๐ก) = Hence ๐ด = 0 and ๐ต = is ๐น0 2๐๐ . Our particular solution is ๐น0 cos(๐๐ก). ๐ ๐น0 2๐๐ ๐ก sin(๐๐ก) and our general solution ๐น0 ๐ก sin(๐๐ก). 2๐๐ The important term is the last one (the particular solution we found). This term grows ๐น0 ๐ก −๐น0 ๐ก without bound as ๐ก → ∞. In fact it oscillates between 2๐๐ and 2๐๐ . The first two terms ๐ฅ = ๐ถ1 cos(๐๐ก) + ๐ถ2 sin(๐๐ก) + q only oscillate between ± ๐ถ12 + ๐ถ22 , which becomes smaller and smaller in proportion to the oscillations of the last term as ๐ก gets larger. In Figure 2.6 on the facing page we see the graph with ๐ถ1 = ๐ถ2 = 0, ๐น0 = 2, ๐ = 1, ๐ = ๐. 113 2.6. FORCED OSCILLATIONS AND RESONANCE By forcing the system in just the right frequency we produce very wild oscillations. This kind of behavior is called resonance or perhaps pure resonance. Sometimes resonance is desired. For example, remember when as a kid you could start swinging by just moving back and forth on the swing seat in the “correct frequency”? You were trying to achieve resonance. The force of each one of your moves was small, but after a while it produced large swings. On the other hand resonance can be deFigure 2.6: Graph of ๐1 ๐ก sin(๐๐ก). structive. In an earthquake some buildings collapse while others may be relatively undamaged. This is due to different buildings having different resonance frequencies. So figuring out the resonance frequency can be very important. A common (but wrong) example of destructive force of resonance is the Tacoma Narrows bridge failure. It turns out there was a different phenomenon at play∗ . 0 5 15 20 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 -5.0 -5.0 0 2.6.2 10 5.0 5 10 15 20 Damped forced motion and practical resonance In real life things are not as simple as they were above. There is, of course, some damping. Our equation becomes ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 cos(๐๐ก), (2.8) for some ๐ > 0. We solved the homogeneous problem before. We let ๐ ๐= , 2๐ r ๐0 = ๐ . ๐ We replace equation (2.8) with ๐น0 cos(๐๐ก). ๐ The roots of q the characteristic equation of the associated homogeneous problem are ๐ฅ 00 + 2๐๐ฅ 0 + ๐02 ๐ฅ = ๐1 , ๐2 = −๐ ± ๐ 2 − ๐02 . The form of the general solution of the associated homogeneous equation depends on the sign of ๐ 2 − ๐02 , or equivalently on the sign of ๐ 2 − 4๐๐, as before: ๏ฃฑ ๏ฃด ๐ถ ๐ ๐1 ๐ก + ๐ถ 2 ๐ ๐2 ๐ก ๏ฃด ๏ฃฒ 1 ๏ฃด ๐ฅ ๐ = ๐ถ1 ๐ −๐๐ก + ๐ถ2 ๐ก๐ −๐๐ก where ๐1 = ∗ K. q ๏ฃด ๏ฃด ๏ฃด ๐ −๐๐ก ๐ถ1 cos(๐1 ๐ก) + ๐ถ2 sin(๐1 ๐ก) ๏ฃณ if ๐ 2 > 4๐๐, if ๐ 2 = 4๐๐, if ๐ 2 < 4๐๐, ๐02 − ๐ 2 . In any case, we see that ๐ฅ ๐ (๐ก) → 0 as ๐ก → ∞. Billah and R. Scanlan, Resonance, Tacoma Narrows Bridge Failure, and Undergraduate Physics Textbooks, American Journal of Physics, 59(2), 1991, 118–124, http://www.ketchum.org/billah/Billah-Scanlan.pdf 114 CHAPTER 2. HIGHER ORDER LINEAR ODES Let us find a particular solution. There can be no conflicts when trying to solve for the undetermined coefficients by trying ๐ฅ ๐ = ๐ด cos(๐๐ก) + ๐ต sin(๐๐ก). Let us plug in and solve for ๐ด and ๐ต. We get (the tedious details are left to reader) (๐02 − ๐2 )๐ต − 2๐๐๐ด sin(๐๐ก) + (๐02 − ๐2 )๐ด + 2๐๐๐ต cos(๐๐ก) = ๐น0 cos(๐๐ก). ๐ We solve for ๐ด and ๐ต: ๐ด= ๐ต= We also compute ๐ถ = √ (๐02 − ๐ 2 )๐น0 2 ๐(2๐๐)2 + ๐(๐02 − ๐ 2 ) 2๐๐๐น0 ๐(2๐๐)2 + ๐(๐02 − ๐ 2 ) 2 , . ๐ด2 + ๐ต2 to be ๐น0 ๐ถ= q 2 ๐ (2๐๐) + . (๐02 − 2 ๐2 ) Thus our particular solution is ๐ฅ๐ = (๐02 − ๐ 2 )๐น0 2 ๐(2๐๐)2 + ๐(๐02 − ๐2 ) cos(๐๐ก) + 2๐๐๐น0 2 ๐(2๐๐)2 + ๐(๐02 − ๐2 ) sin(๐๐ก). Or in the alternative notation we have amplitude ๐ถ and phase shift ๐พ where (if ๐ ≠ ๐0 ) tan ๐พ = 2๐๐ ๐ต = 2 . ๐ด ๐ − ๐2 0 Hence, ๐น0 ๐ฅ๐ = q 2 ๐ (2๐๐) + If ๐ = ๐0 , then ๐ด = 0, ๐ต = ๐ถ = ๐น0 2๐๐๐ , (๐02 − 2 ๐2 ) cos(๐๐ก − ๐พ). and ๐พ = ๐/2. For reasons we will explain in a moment, we call ๐ฅ ๐ the transient solution and denote it by ๐ฅ ๐ก๐ . We call the ๐ฅ ๐ from above the steady periodic solution and denote it by ๐ฅ ๐ ๐ . The general solution is ๐ฅ = ๐ฅ ๐ + ๐ฅ ๐ = ๐ฅ ๐ก๐ + ๐ฅ ๐ ๐ . The transient solution ๐ฅ ๐ = ๐ฅ ๐ก๐ goes to zero as ๐ก → ∞, as all the terms involve an exponential with a negative exponent. So for large ๐ก, the effect of ๐ฅ ๐ก๐ is negligible and we see essentially only ๐ฅ ๐ ๐ . Hence the name transient. Notice that ๐ฅ ๐ ๐ involves no arbitrary constants, and the initial conditions only affect ๐ฅ ๐ก๐ . Thus, the effect of the initial conditions is negligible after some period of time. We might as well focus on the steady periodic solution and ignore the transient solution. See Figure 2.7 on the next page for a graph given several different initial conditions. 115 2.6. FORCED OSCILLATIONS AND RESONANCE The speed at which ๐ฅ ๐ก๐ goes to zero depends on ๐ (and hence ๐). The bigger ๐ is (the bigger ๐ is), the “faster” ๐ฅ ๐ก๐ becomes negligible. So the smaller the damping, the longer the “transient region.” This is consistent with the observation that when ๐ = 0, the initial conditions affect the behavior for all time (i.e. an infinite “transient region”). 0 5 10 15 20 5.0 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 Let us describe what we mean by resonance when damping is present. Since there were no conflicts when solving with undetermined coefficient, there is no term Figure 2.7: Solutions with different initial conthat goes to infinity. We look instead at ditions for parameters ๐ = 1, ๐ = 1, ๐น0 = 1, the maximum value of the amplitude of ๐ = 0.7, and ๐ = 1.1. the steady periodic solution. Let ๐ถ be the amplitude of ๐ฅ ๐ ๐ . If we plot ๐ถ as a function of ๐ (with all other parameters fixed), we can find its maximum. We call the ๐ that achieves this maximum the practical resonance frequency. We call the maximal amplitude ๐ถ(๐) the practical resonance amplitude. Thus when damping is present we talk of practical resonance rather than pure resonance. A sample plot for three different values of ๐ is given in Figure 2.8. As you can see the practical resonance amplitude grows as damping gets smaller, and practical resonance can disappear altogether when damping is large. -5.0 -5.0 0 0.0 0.5 1.0 1.5 5 2.0 10 2.5 15 20 3.0 2.5 2.5 2.0 2.0 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Figure 2.8: Graph of ๐ถ(๐) showing practical resonance with parameters ๐ = 1, ๐ = 1, ๐น0 = 1. The top line is with ๐ = 0.4, the middle line with ๐ = 0.8, and the bottom line with ๐ = 1.6. To find the maximum we need to find the derivative ๐ถ 0(๐). Computation shows ๐ถ 0(๐) = −2๐(2๐ 2 + ๐ 2 − ๐02 )๐น0 2 ๐ (2๐๐) + (๐02 − 2 3/2 ๐2 ) . 116 CHAPTER 2. HIGHER ORDER LINEAR ODES This is zero either when ๐ = 0 or when 2๐ 2 + ๐2 − ๐02 = 0. In other words, ๐ถ 0(๐) = 0 when ๐= q ๐02 − 2๐ 2 or ๐ = 0. q If ๐02 − 2๐ 2 is positive, then ๐02 − 2๐ 2 is the practical resonance frequency (that is the point where ๐ถ(๐) is maximal). This follows by the first derivative test for example as then ๐ถ 0(๐) > 0 for small ๐ in this case. If on the other hand ๐02 − 2๐ 2 is not positive, then ๐ถ(๐) achieves its maximum at ๐ = 0, and there is no practical resonance since we assume ๐ > 0 in our system. In this case the amplitude gets larger as the forcing frequency gets smaller. If practical resonance occurs, the frequency is smaller than ๐0 . As the damping ๐ (and hence ๐) becomes smaller, the practical resonance frequency goes to ๐0 . So when damping is very small, ๐0 is a good estimate of the practical resonance frequency. This behavior agrees with the observation that when ๐ = 0, then ๐0 is the resonance frequency. Another interesting observation to make is that when ๐ → ∞, then ๐ถ → 0. This means that if the forcing frequency gets too high it does not manage to get the mass moving in the mass-spring system. This is quite reasonable intuitively. If we wiggle back and forth really fast while sitting on a swing, we will not get it moving at all, no matter how forceful. Fast vibrations just cancel each other out before the mass has any chance of responding by moving one way or the other. The behavior is more complicated if the forcing function is not an exact cosine wave, but for example a square wave. A general periodic function will be the sum (superposition) of many cosine waves of different frequencies. The reader is encouraged to come back to this section once we have learned about the Fourier series. 2.6.3 Exercises Exercise 2.6.1: Derive a formula for ๐ฅ ๐ ๐ if the equation is ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 sin(๐๐ก). Assume ๐ > 0. Exercise 2.6.2: Derive a formula for ๐ฅ ๐ ๐ if the equation is ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 cos(๐๐ก) + ๐น1 cos(3๐๐ก). Assume ๐ > 0. Exercise 2.6.3: Take ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 cos(๐๐ก). Fix ๐ > 0, ๐ > 0, and ๐น0 > 0. Consider the function ๐ถ(๐). For what values of ๐ (solve in terms of ๐, ๐, and ๐น0 ) will there be no practical resonance (that is, for what values of ๐ is there no maximum of ๐ถ(๐) for ๐ > 0)? Exercise 2.6.4: Take ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 cos(๐๐ก). Fix ๐ > 0, ๐ > 0, and ๐น0 > 0. Consider the function ๐ถ(๐). For what values of ๐ (solve in terms of ๐, ๐, and ๐น0 ) will there be no practical resonance (that is, for what values of ๐ is there no maximum of ๐ถ(๐) for ๐ > 0)? 2.6. FORCED OSCILLATIONS AND RESONANCE 117 Exercise 2.6.5: A water tower in an earthquake acts as a mass-spring system. Assume that the container on top is full and the water does not move around. The container then acts as the mass and the support acts as the spring, where the induced vibrations are horizontal. The container with water has a mass of ๐ = 10, 000 kg. It takes a force of 1000 newtons to displace the container 1 meter. For simplicity assume no friction. When the earthquake hits the water tower is at rest (it is not moving). The earthquake induces an external force ๐น(๐ก) = ๐๐ด๐2 cos(๐๐ก). a) What is the natural frequency of the water tower? b) If ๐ is not the natural frequency, find a formula for the maximal amplitude of the resulting oscillations of the water container (the maximal deviation from the rest position). The motion will be a high frequency wave modulated by a low frequency wave, so simply find the constant in front of the sines. c) Suppose ๐ด = 1 and an earthquake with frequency 0.5 cycles per second comes. What is the amplitude of the oscillations? Suppose that if the water tower moves more than 1.5 meter from the rest position, the tower collapses. Will the tower collapse? Exercise 2.6.101: A mass of 4 kg on a spring with ๐ = 4 N/m and a damping constant ๐ = 1 Ns/m. Suppose that ๐น0 = 2 N. Using forcing function ๐น0 cos(๐๐ก), find the ๐ that causes practical resonance and find the amplitude. Exercise 2.6.102: Derive a formula for ๐ฅ ๐ ๐ for ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐น0 cos(๐๐ก) + ๐ด, where ๐ด is some constant. Assume ๐ > 0. Exercise 2.6.103: Suppose there is no damping in a mass and spring system with ๐ = 5, ๐ = 20, and ๐น0 = 5. Suppose ๐ is chosen to be precisely the resonance frequency. a) Find ๐. b) Find the amplitude of the oscillations at time ๐ก = 100, given the system is at rest at ๐ก = 0. 118 CHAPTER 2. HIGHER ORDER LINEAR ODES Chapter 3 Systems of ODEs 3.1 Introduction to systems of ODEs Note: 1 to 1.5 lectures, §4.1 in [EP], §7.1 in [BD] 3.1.1 Systems Often we do not have just one dependent variable and one equation. And as we will see, we may end up with systems of several equations and several dependent variables even if we start with a single equation. If we have several dependent variables, suppose ๐ฆ1 , ๐ฆ2 , . . . , ๐ฆ๐ , then we can have a differential equation involving all of them and their derivatives with respect to one independent variable ๐ฅ. For example, ๐ฆ100 = ๐ (๐ฆ10 , ๐ฆ20 , ๐ฆ1 , ๐ฆ2 , ๐ฅ). Usually, when we have two dependent variables we have two equations such as ๐ฆ100 = ๐1 (๐ฆ10 , ๐ฆ20 , ๐ฆ1 , ๐ฆ2 , ๐ฅ), ๐ฆ200 = ๐2 (๐ฆ10 , ๐ฆ20 , ๐ฆ1 , ๐ฆ2 , ๐ฅ), for some functions ๐1 and ๐2 . We call the above a system of differential equations. More precisely, the above is a second order system of ODEs as second order derivatives appear. The system ๐ฅ 10 = ๐1 (๐ฅ1 , ๐ฅ2 , ๐ฅ3 , ๐ก), ๐ฅ20 = ๐2 (๐ฅ1 , ๐ฅ2 , ๐ฅ3 , ๐ก), ๐ฅ30 = ๐3 (๐ฅ1 , ๐ฅ2 , ๐ฅ3 , ๐ก), is a first order system, where ๐ฅ1 , ๐ฅ2 , ๐ฅ3 are the dependent variables, and ๐ก is the independent variable. The terminology for systems is essentially the same as for single equations. For the 120 CHAPTER 3. SYSTEMS OF ODES system above, a solution is a set of three functions ๐ฅ1 (๐ก), ๐ฅ2 (๐ก), ๐ฅ3 (๐ก), such that ๐ฅ 10 (๐ก) = ๐1 ๐ฅ1 (๐ก), ๐ฅ2 (๐ก), ๐ฅ3 (๐ก), ๐ก , ๐ฅ 20 (๐ก) = ๐2 ๐ฅ1 (๐ก), ๐ฅ2 (๐ก), ๐ฅ3 (๐ก), ๐ก , 0 ๐ฅ 3 (๐ก) = ๐3 ๐ฅ1 (๐ก), ๐ฅ2 (๐ก), ๐ฅ3 (๐ก), ๐ก . We usually also have an initial condition. Just like for single equations we specify ๐ฅ1 , ๐ฅ2 , and ๐ฅ3 for some fixed ๐ก. For example, ๐ฅ1 (0) = ๐1 , ๐ฅ 2 (0) = ๐ 2 , ๐ฅ3 (0) = ๐3 . For some constants ๐ 1 , ๐ 2 , and ๐ 3 . For the second order system we would also specify the first derivatives at a point. And if we find a solution with constants in it, where by solving for the constants we find a solution for any initial condition, we call this solution the general solution. Best to look at a simple example. Example 3.1.1: Sometimes a system is easy to solve by solving for one variable and then for the second variable. Take the first order system ๐ฆ10 = ๐ฆ1 , ๐ฆ20 = ๐ฆ1 − ๐ฆ2 , with ๐ฆ1 , ๐ฆ2 as the dependent variables and ๐ฅ as the independent variable. And consider initial conditions ๐ฆ1 (0) = 1, ๐ฆ2 (0) = 2. We note that ๐ฆ1 = ๐ถ1 ๐ ๐ฅ is the general solution of the first equation. We then plug this ๐ฆ1 into the second equation and get the equation ๐ฆ20 = ๐ถ1 ๐ ๐ฅ − ๐ฆ2 , which is a linear first order equation that is easily solved for ๐ฆ2 . By the method of integrating factor we get ๐ ๐ฅ ๐ฆ2 = or ๐ฆ2 = ๐ถ1 ๐ฅ 2 ๐ ๐ถ1 2๐ฅ ๐ + ๐ถ2 , 2 + ๐ถ2 ๐ −๐ฅ . The general solution to the system is, therefore, ๐ฆ1 = ๐ถ 1 ๐ ๐ฅ , ๐ฆ2 = ๐ถ1 ๐ฅ ๐ + ๐ถ2 ๐ −๐ฅ . 2 We solve for ๐ถ1 and ๐ถ2 given the initial conditions. We substitute ๐ฅ = 0 and find that ๐ถ1 = 1 and ๐ถ2 = 3/2. Thus the solution is ๐ฆ1 = ๐ ๐ฅ , and ๐ฆ2 = (1/2)๐ ๐ฅ + (3/2)๐ −๐ฅ . Generally, we will not be so lucky to be able to solve for each variable separately as in the example above, and we will have to solve for all variables at once. While we won’t generally be able to solve for one variable and then the next, we will try to salvage as much as possible from this technique. It will turn out that in a certain sense we will still (try to) solve a bunch of single equations and put their solutions together. Let’s not worry right now about how to solve systems yet. We will mostly consider the linear systems. The example above is a so-called linear first order system. It is linear as none of the dependent variables or their derivatives appear in nonlinear functions or with powers higher than one (๐ฅ, ๐ฆ, ๐ฅ 0 and ๐ฆ 0, constants, and 121 3.1. INTRODUCTION TO SYSTEMS OF ODES functions of ๐ก can appear, but not ๐ฅ๐ฆ or (๐ฆ 0)2 or ๐ฅ 3 ). Another, more complicated, example of a linear system is ๐ฆ100 = ๐ ๐ก ๐ฆ10 + ๐ก 2 ๐ฆ1 + 5๐ฆ2 + sin(๐ก), ๐ฆ200 = ๐ก ๐ฆ10 − ๐ฆ20 + 2๐ฆ1 + cos(๐ก). 3.1.2 Applications Let us consider some simple applications of systems and how to set up the equations. Example 3.1.2: First, we consider salt and brine tanks, but this time water flows from one to the other and back. We again consider that the tanks are evenly mixed. ๐ฅ1 Vol. = ๐ ๐ฅ2 ๐ ๐ Vol. = ๐ Figure 3.1: A closed system of two brine tanks. Suppose we have two tanks, each containing volume ๐ liters of salt brine. The amount of salt in the first tank is ๐ฅ1 grams, and the amount of salt in the second tank is ๐ฅ2 grams. The liquid is perfectly mixed and flows at the rate ๐ liters per second out of each tank into the other. See Figure 3.1. The rate of change of ๐ฅ1 , that is ๐ฅ10 , is the rate of salt coming in minus the rate going out. The rate coming in is the density of the salt in tank 2, that is ๐ฅ๐2 , times the rate ๐. The rate coming out is the density of the salt in tank 1, that is ๐ฅ๐1 , times the rate ๐. In other words it is ๐ฅ10 = ๐ฅ2 ๐ฅ1 ๐ ๐ ๐ ๐ − ๐ = ๐ฅ 2 − ๐ฅ1 = (๐ฅ2 − ๐ฅ1 ). ๐ ๐ ๐ ๐ ๐ Similarly we find the rate ๐ฅ20 , where the roles of ๐ฅ1 and ๐ฅ2 are reversed. All in all, the system of ODEs for this problem is ๐ (๐ฅ2 − ๐ฅ1 ), ๐ ๐ ๐ฅ20 = (๐ฅ1 − ๐ฅ2 ). ๐ ๐ฅ10 = In this system we cannot solve for ๐ฅ 1 or ๐ฅ2 separately. We must solve for both ๐ฅ1 and ๐ฅ2 at once, which is intuitively clear since the amount of salt in one tank affects the amount in the other. We can’t know ๐ฅ1 before we know ๐ฅ2 , and vice versa. 122 CHAPTER 3. SYSTEMS OF ODES We don’t yet know how to find all the solutions, but intuitively we can at least find some solutions. Suppose we know that initially the tanks have the same amount of salt. That is, we have an initial condition such as ๐ฅ1 (0) = ๐ฅ2 (0) = ๐ถ. Then clearly the amount of salt coming and out of each tank is the same, so the amounts are not changing. In other words, ๐ฅ 1 = ๐ถ and ๐ฅ 2 = ๐ถ (the constant functions) is a solution: ๐ฅ10 = ๐ฅ20 = 0, and ๐ฅ2 − ๐ฅ1 = ๐ฅ1 − ๐ฅ2 = 0, so the equations are satisfied. Let us think about the setup a little bit more without solving it. Suppose the initial conditions are ๐ฅ 1 (0) = ๐ด and ๐ฅ2 (0) = ๐ต, for two different constants ๐ด and ๐ต. Since no salt is coming in or out of this closed system, the total amount of salt is constant. That is, ๐ฅ1 + ๐ฅ2 is constant, and so it equals ๐ด + ๐ต. Intuitively if ๐ด is bigger than ๐ต, then more salt will flow out of tank one than into it. Eventually, after a long time we would then expect the amount of salt in each tank to equalize. In other words, the solutions of both ๐ฅ 1 and ๐ฅ2 should tend towards ๐ด+๐ต 2 . Once you know how to solve systems you will find out that this really is so. Example 3.1.3: Let us look at a second order example. We return to the mass and spring setup, but this time we consider two masses. Consider one spring with constant ๐ and two masses ๐1 ๐ and ๐2 . Think of the masses as carts that ride along a straight ๐1 ๐2 track with no friction. Let ๐ฅ 1 be the displacement of the first cart and ๐ฅ2 be the displacement of the second cart. That is, we ๐ฅ1 ๐ฅ2 put the two carts somewhere with no tension on the spring, and we mark the position of the first and second cart and call those the zero positions. Then ๐ฅ1 measures how far the first cart is from its zero position, and ๐ฅ2 measures how far the second cart is from its zero position. The force exerted by the spring on the first cart is ๐(๐ฅ2 − ๐ฅ 1 ), since ๐ฅ2 − ๐ฅ1 is how far the string is stretched (or compressed) from the rest position. The force exerted on the second cart is the opposite, thus the same thing with a negative sign. Newton’s second law states that force equals mass times acceleration. So the system of equations is ๐1 ๐ฅ100 = ๐(๐ฅ2 − ๐ฅ1 ), ๐2 ๐ฅ200 = −๐(๐ฅ2 − ๐ฅ1 ). Again, we cannot solve for the ๐ฅ1 or ๐ฅ2 variable separately. That we must solve for both ๐ฅ1 and ๐ฅ2 at once is intuitively clear, since where the first cart goes depends on exactly where the second cart goes and vice versa. 3.1.3 Changing to first order Before we talk about how to handle systems, let us note that in some sense we need only consider first order systems. Let us take an ๐ th order differential equation ๐ฆ (๐) = ๐น(๐ฆ (๐−1) , . . . , ๐ฆ 0 , ๐ฆ, ๐ฅ). 123 3.1. INTRODUCTION TO SYSTEMS OF ODES We define new variables ๐ข1 , ๐ข2 , . . . , ๐ข๐ and write the system ๐ข10 = ๐ข2 , ๐ข20 = ๐ข3 , .. . 0 ๐ข๐−1 = ๐ข๐ , ๐ข๐0 = ๐น(๐ข๐ , ๐ข๐−1 , . . . , ๐ข2 , ๐ข1 , ๐ฅ). We solve this system for ๐ข1 , ๐ข2 , . . . , ๐ข๐ . Once we have solved for the ๐ข, we can discard ๐ข2 through ๐ข๐ and let ๐ฆ = ๐ข1 . This ๐ฆ solves the original equation. Example 3.1.4: Take ๐ฅ 000 = 2๐ฅ 00 + 8๐ฅ 0 + ๐ฅ + ๐ก. Letting ๐ข1 = ๐ฅ, ๐ข2 = ๐ฅ 0, ๐ข3 = ๐ฅ 00, we find the system: ๐ข10 = ๐ข2 , ๐ข20 = ๐ข3 , ๐ข30 = 2๐ข3 + 8๐ข2 + ๐ข1 + ๐ก. A similar process can be followed for a system of higher order differential equations. For example, a system of ๐ differential equations in ๐ unknowns, all of order ๐, can be transformed into a first order system of ๐ × ๐ equations and ๐ × ๐ unknowns. Example 3.1.5: Consider the system from the carts example, ๐1 ๐ฅ 100 = ๐(๐ฅ 2 − ๐ฅ1 ), ๐2 ๐ฅ200 = −๐(๐ฅ2 − ๐ฅ1 ). Let ๐ข1 = ๐ฅ1 , ๐ข2 = ๐ฅ10 , ๐ข3 = ๐ฅ2 , ๐ข4 = ๐ฅ 20 . The second order system becomes the first order system ๐ข10 = ๐ข2 , ๐1 ๐ข20 = ๐(๐ข3 − ๐ข1 ), ๐ข30 = ๐ข4 , ๐2 ๐ข40 = −๐(๐ข3 − ๐ข1 ). Example 3.1.6: The idea works in reverse as well. Consider the system ๐ฅ 0 = 2๐ฆ − ๐ฅ, ๐ฆ 0 = ๐ฅ, where the independent variable is ๐ก. We wish to solve for the initial conditions ๐ฅ(0) = 1, ๐ฆ(0) = 0. If we differentiate the second equation, we get ๐ฆ 00 = ๐ฅ 0. We know what ๐ฅ 0 is in terms of ๐ฅ and ๐ฆ, and we know that ๐ฅ = ๐ฆ 0. So, ๐ฆ 00 = ๐ฅ 0 = 2๐ฆ − ๐ฅ = 2๐ฆ − ๐ฆ 0 . We now have the equation ๐ฆ 00 + ๐ฆ 0 − 2๐ฆ = 0. We know how to solve this equation and we find that ๐ฆ = ๐ถ1 ๐ −2๐ก + ๐ถ2 ๐ ๐ก . Once we have ๐ฆ, we use the equation ๐ฆ 0 = ๐ฅ to get ๐ฅ. ๐ฅ = ๐ฆ 0 = −2๐ถ1 ๐ −2๐ก + ๐ถ2 ๐ ๐ก . We solve for the initial conditions 1 = ๐ฅ(0) = −2๐ถ1 + ๐ถ2 and 0 = ๐ฆ(0) = ๐ถ1 + ๐ถ2 . Hence, ๐ถ1 = −๐ถ2 and 1 = 3๐ถ2 . So ๐ถ1 = −1/3 and ๐ถ2 = 1/3. Our solution is ๐ฅ= 2๐ −2๐ก + ๐ ๐ก , 3 ๐ฆ= −๐ −2๐ก + ๐ ๐ก . 3 124 CHAPTER 3. SYSTEMS OF ODES Exercise 3.1.1: Plug in and check that this really is the solution. It is useful to go back and forth between systems and higher order equations for other reasons. For example, software for solving ODE numerically (approximation) is generally for first order systems. To use it, you take whatever ODE you want to solve and convert it to a first order system. It is not very hard to adapt computer code for the Euler or Runge–Kutta method for first order equations to handle first order systems. We simply treat the dependent variable not as a number but as a vector. In many mathematical computer languages there is almost no distinction in syntax. 3.1.4 Autonomous systems and vector fields A system where the equations do not depend on the independent variable is called an autonomous system. For example the system ๐ฆ 0 = 2๐ฆ − ๐ฅ, ๐ฆ 0 = ๐ฅ is autonomous as ๐ก is the independent variable but does not appear in the equations. For autonomous systems we can draw the so-called direction field or vector field, a plot similar to a slope field, but instead of giving a slope at each point, we give a direction (and a magnitude). The previous example, ๐ฅ 0 = 2๐ฆ − ๐ฅ, ๐ฆ 0 = ๐ฅ, says that at the point (๐ฅ, ๐ฆ) the direction in which we should travel to satisfy the equations should be the direction of the vector (2๐ฆ − ๐ฅ, ๐ฅ) with the speed equal to the magnitude of this vector. So we draw the vector (2๐ฆ − ๐ฅ, ๐ฅ) at the point (๐ฅ, ๐ฆ) and we do this for many points on the ๐ฅ๐ฆ-plane. For example, at the point (1, 2) we draw the vector 2(2) − 1, 1 = (3, 1), a vector pointing to the right and a little bit up, while at the point (2, 1) we draw the vector 2(1) − 2, 2 = (0, 2) a vector that points straight up. When drawing the vectors, we will scale down their size to fit many of them on the same direction field. If we drew the arrows at the actual size, the diagram would be a jumbled mess once you would draw more than a couple of arrows. So we scale them all so that not even the longest one interferes with the others. We are mostly interested in their direction and relative size. See Figure 3.2 on the facing page. We can draw a path of the solution in the plane. Suppose the solution is given by ๐ฅ = ๐ (๐ก), ๐ฆ = ๐(๐ก). We pick an interval of ๐ก (say 0 ≤ ๐ก ≤ 2 for our example) and plot all the points ๐ (๐ก), ๐(๐ก) for ๐ก in the selected range. The resulting picture is called the phase portrait (or phase plane portrait). The particular curve obtained is called the trajectory or solution curve. See an example plot in Figure 3.3 on the next page. In the figure the solution starts at (1, 0) and travels along the vector field for a distance of 2 units of ๐ก. We solved this system precisely, so we compute ๐ฅ(2) and ๐ฆ(2) to find ๐ฅ(2) ≈ 2.475 and ๐ฆ(2) ≈ 2.457. This point corresponds to the top right end of the plotted solution curve in the figure. Notice the similarity to the diagrams we drew for autonomous systems in one dimension. But note how much more complicated things become when we allow just one extra dimension. We can draw phase portraits and trajectories in the ๐ฅ๐ฆ-plane even if the system is not autonomous. In this case, however, we cannot draw the direction field, since the field changes as ๐ก changes. For each ๐ก we would get a different direction field. 125 3.1. INTRODUCTION TO SYSTEMS OF ODES -1 0 1 2 -1 3 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 0 1 2 3 Figure 3.2: The direction field for ๐ฅ 0 = 2๐ฆ − ๐ฅ, ๐ฆ 0 = ๐ฅ. 3.1.5 -1 -1 0 1 2 3 Figure 3.3: The direction field for ๐ฅ 0 = 2๐ฆ − ๐ฅ, ๐ฆ 0 = ๐ฅ with the trajectory of the solution starting at (1, 0) for 0 ≤ ๐ก ≤ 2. Picard’s theorem Perhaps before going further, let us mention that Picard’s theorem on existence and uniqueness still holds for systems of ODE. Let us restate this theorem in the setting of systems. A general first order system is of the form ๐ฅ10 = ๐น1 (๐ฅ1 , ๐ฅ2 , . . . , ๐ฅ ๐ , ๐ก), ๐ฅ 20 = ๐น2 (๐ฅ1 , ๐ฅ2 , . . . , ๐ฅ ๐ , ๐ก), .. . (3.1) ๐ฅ 0๐ = ๐น๐ (๐ฅ1 , ๐ฅ2 , . . . , ๐ฅ ๐ , ๐ก). Theorem 3.1.1 (Picard’s theorem on existence and uniqueness for systems). If for every ๐๐น ๐ = 1, 2, . . . , ๐ and every ๐ = 1, 2, . . . , ๐ each ๐น ๐ is continuous and the derivative ๐๐ฅ ๐ exists and is ๐ continuous near some (๐ฅ10 , ๐ฅ20 , . . . , ๐ฅ ๐0 , ๐ก 0 ), then a solution to (3.1) subject to the initial condition ๐ฅ1 (๐ก 0 ) = ๐ฅ10 , ๐ฅ2 (๐ก 0 ) = ๐ฅ20 , . . . , ๐ฅ ๐ (๐ก 0 ) = ๐ฅ ๐0 exists (at least for ๐ก in some small interval) and is unique. That is, a unique solution exists for any initial condition given that the system is reasonable (๐น ๐ and its partial derivatives in the ๐ฅ variables are continuous). As for single equations we may not have a solution for all time ๐ก, but at least for some short period of time. As we can change any ๐th order ODE into a first order system, then we notice that this theorem provides also the existence and uniqueness of solutions for higher order equations that we have until now not stated explicitly. 126 3.1.6 CHAPTER 3. SYSTEMS OF ODES Exercises Exercise 3.1.2: Find the general solution of ๐ฅ10 = ๐ฅ2 − ๐ฅ1 + ๐ก, ๐ฅ20 = ๐ฅ 2 . Exercise 3.1.3: Find the general solution of ๐ฅ10 = 3๐ฅ 1 − ๐ฅ 2 + ๐ ๐ก , ๐ฅ20 = ๐ฅ 1 . Exercise 3.1.4: Write ๐๐ฆ 00 + ๐๐ฆ 0 + ๐๐ฆ = ๐ (๐ฅ) as a first order system of ODEs. Exercise 3.1.5: Write ๐ฅ 00 + ๐ฆ 2 ๐ฆ 0 − ๐ฅ 3 = sin(๐ก), ๐ฆ 00 + (๐ฅ 0 + ๐ฆ 0)2 − ๐ฅ = 0 as a first order system of ODEs. Exercise 3.1.6: Suppose two masses on carts on frictionless surface are at displacements ๐ฅ1 and ๐ฅ2 as in Example 3.1.3 on page 122. Suppose that a rocket applies force ๐น in the positive direction on cart ๐ฅ1 . Set up the system of equations. Exercise 3.1.7: Suppose the tanks are as in Example 3.1.2 on page 121, starting both at volume ๐, but now the rate of flow from tank 1 to tank 2 is ๐1 , and rate of flow from tank 2 to tank one is ๐2 . Notice that the volumes are now not constant. Set up the system of equations. Exercise 3.1.101: Find the general solution to ๐ฆ10 = 3๐ฆ1 , ๐ฆ20 = ๐ฆ1 + ๐ฆ2 , ๐ฆ30 = ๐ฆ1 + ๐ฆ3 . Exercise 3.1.102: Solve ๐ฆ 0 = 2๐ฅ, ๐ฅ 0 = ๐ฅ + ๐ฆ, ๐ฅ(0) = 1, ๐ฆ(0) = 3. Exercise 3.1.103: Write ๐ฅ 000 = ๐ฅ + ๐ก as a first order system. Exercise 3.1.104: Write ๐ฆ100 + ๐ฆ1 + ๐ฆ2 = ๐ก, ๐ฆ200 + ๐ฆ1 − ๐ฆ2 = ๐ก 2 as a first order system. Exercise 3.1.105: Suppose two masses on carts on frictionless surface are at displacements ๐ฅ1 and ๐ฅ2 as in Example 3.1.3 on page 122. Suppose initial displacement is ๐ฅ1 (0) = ๐ฅ2 (0) = 0, and initial velocity is ๐ฅ 10 (0) = ๐ฅ20 (0) = ๐ for some number ๐. Use your intuition to solve the system, explain your reasoning. Exercise 3.1.106: Suppose the tanks are as in Example 3.1.2 on page 121 except that clean water flows in at the rate ๐ liters per second into tank 1, and brine flows out of tank 2 and into the sewer also at the rate of ๐ liters per second. a) Draw the picture. b) Set up the system of equations. c) Intuitively, what happens as ๐ก goes to infinity, explain. 127 3.2. MATRICES AND LINEAR SYSTEMS 3.2 Matrices and linear systems Note: 1.5 lectures, first part of §5.1 in [EP], §7.2 and §7.3 in [BD], see also appendix A 3.2.1 Matrices and vectors Before we start talking about linear systems of ODEs, we need to talk about matrices, so let us review these briefly. A matrix is an ๐ × ๐ array of numbers (๐ rows and ๐ columns). For example, we denote a 3 × 5 matrix as follows ๏ฃฎ ๐11 ๐12 ๐13 ๐14 ๐15 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด = ๏ฃฏ๏ฃฏ ๐ 21 ๐ 22 ๐ 23 ๐ 24 ๐ 25 ๏ฃบ๏ฃบ . ๏ฃฏ ๐31 ๐32 ๐33 ๐34 ๐35 ๏ฃบ ๏ฃฐ ๏ฃป The numbers ๐ ๐๐ are called elements or entries. By a vector we usually mean a column vector, that is an ๐ × 1 matrix. If we mean a row vector, we will explicitly say so (a row vector is a 1 × ๐ matrix). We usually denote matrices ® By 0® by upper case letters and vectors by lower case letters with an arrow such as ๐ฅ® or ๐. we mean the vector of all zeros. We define some operations on matrices. We want 1 × 1 matrices to really act like numbers, so our operations have to be compatible with this viewpoint. First, we can multiply a matrix by a scalar (a number). We simply multiply each entry in the matrix by the scalar. For example, 1 2 3 2 4 6 2 = . 4 5 6 8 10 12 Matrix addition is also easy. We add matrices element by element. For example, 1 2 3 1 1 −1 2 3 2 + = . 4 5 6 0 2 4 4 7 10 If the sizes do not match, then addition is not defined. If we denote by 0 the matrix with all zero entries, by ๐, ๐ scalars, and by ๐ด, ๐ต, ๐ถ matrices, we have the following familiar rules: ๐ด + 0 = ๐ด = 0 + ๐ด, ๐ด + ๐ต = ๐ต + ๐ด, (๐ด + ๐ต) + ๐ถ = ๐ด + (๐ต + ๐ถ), ๐(๐ด + ๐ต) = ๐๐ด + ๐๐ต, (๐ + ๐)๐ด = ๐๐ด + ๐๐ด. 128 CHAPTER 3. SYSTEMS OF ODES Another useful operation for matrices is the so-called transpose. This operation just swaps rows and columns of a matrix. The transpose of ๐ด is denoted by ๐ด๐ . Example: 3.2.2 1 2 3 4 5 6 ๐ ๏ฃฎ1 4๏ฃน ๏ฃฏ ๏ฃบ = ๏ฃฏ๏ฃฏ2 5๏ฃบ๏ฃบ ๏ฃฏ3 6๏ฃบ ๏ฃฐ ๏ฃป Matrix multiplication Let us now define matrix multiplication. First we define the so-called dot product (or inner product) of two vectors. Usually this will be a row vector multiplied with a column vector of the same size. For the dot product we multiply each pair of entries from the first and the second vector and we sum these products. The result is a single number. For example, ๐1 ๐2 ๏ฃฎ ๏ฃน ๏ฃฏ๐ 1 ๏ฃบ ๐ 3 · ๏ฃฏ๏ฃฏ๐ 2 ๏ฃบ๏ฃบ = ๐ 1 ๐ 1 + ๐ 2 ๐ 2 + ๐ 3 ๐ 3 . ๏ฃฏ๐ 3 ๏ฃบ ๏ฃฐ ๏ฃป Similarly for larger (or smaller) vectors. Armed with the dot product we define the product of matrices. First let us denote by row๐ (๐ด) the ๐ th row of ๐ด and by column ๐ (๐ด) the ๐ th column of ๐ด. For an ๐ × ๐ matrix ๐ด and an ๐ × ๐ matrix ๐ต, we can define the product ๐ด๐ต. We let ๐ด๐ต be an ๐ × ๐ matrix whose ๐๐ th entry is the dot product row๐ (๐ด) · column ๐ (๐ต). Do note how the sizes match up: ๐ × ๐ multiplied by ๐ × ๐ is ๐ × ๐. Example: ๏ฃฎ1 0 −1๏ฃน ๏ฃบ 1 2 3 ๏ฃฏ๏ฃฏ ๏ฃบ= 1 1 1 ๏ฃบ 4 5 6 ๏ฃฏ๏ฃฏ ๏ฃบ 1 0 0 ๏ฃฐ ๏ฃป 1·1+2·1+3·1 = 4·1+5·1+6·1 1·0+2·1+3·0 4·0+5·1+6·0 1 · (−1) + 2 · 1 + 3 · 0 6 2 1 = 4 · (−1) + 5 · 1 + 6 · 0 15 5 1 For multiplication we want an analogue of a 1. This analogue is the so-called identity matrix. The identity matrix is a square matrix with 1s on the diagonal and zeros everywhere else. It is usually denoted by ๐ผ. For each size we have a different identity matrix and so sometimes we may denote the size as a subscript. For example, the ๐ผ3 would be the 3 × 3 identity matrix ๏ฃฎ1 0 0๏ฃน ๏ฃฏ ๏ฃบ ๐ผ = ๐ผ3 = ๏ฃฏ๏ฃฏ0 1 0๏ฃบ๏ฃบ . ๏ฃฏ0 0 1๏ฃบ ๏ฃฐ ๏ฃป 129 3.2. MATRICES AND LINEAR SYSTEMS We have the following rules for matrix multiplication. Suppose that ๐ด, ๐ต, ๐ถ are matrices of the correct sizes so that the following make sense. Let ๐ผ denote a scalar (number). ๐ด(๐ต๐ถ) = (๐ด๐ต)๐ถ, ๐ด(๐ต + ๐ถ) = ๐ด๐ต + ๐ด๐ถ, (๐ต + ๐ถ)๐ด = ๐ต๐ด + ๐ถ๐ด, ๐ผ(๐ด๐ต) = (๐ผ๐ด)๐ต = ๐ด(๐ผ๐ต), ๐ผ๐ด = ๐ด = ๐ด๐ผ. A few warnings are in order. That is, matrices do not (i) ๐ด๐ต ≠ ๐ต๐ด in general (it may be true 1 1by fluke sometimes). 1 0 commute. For example, take ๐ด = 1 1 and ๐ต = 0 2 . (ii) ๐ด๐ต = ๐ด๐ถ does not necessarily imply ๐ต = ๐ถ, even if ๐ด is not 0. (iii) ๐ด๐ต = 0 does not necessarily mean that ๐ด = 0 or ๐ต = 0. Try, for example, ๐ด = ๐ต = 0 1 00 . For the last two items to hold we would need to “divide” by a matrix. This is where the matrix inverse comes in. Suppose that ๐ด and ๐ต are ๐ × ๐ matrices such that ๐ด๐ต = ๐ผ = ๐ต๐ด. Then we call ๐ต the inverse of ๐ด and we denote ๐ต by ๐ด−1 . If the inverse of ๐ด exists, then we call ๐ด invertible. If ๐ด is not invertible, we sometimes say ๐ด is singular. If ๐ด is invertible, then ๐ด๐ต = ๐ด๐ถ does imply that ๐ต = ๐ถ (in particular, the inverse of ๐ด is unique). We just multiply both sides by ๐ด−1 (on the left) to get ๐ด−1 ๐ด๐ต = ๐ด−1 ๐ด๐ถ or −1 ๐ผ๐ต = ๐ผ๐ถ or ๐ต = ๐ถ. It is also not hard to see that (๐ด−1 ) = ๐ด. 3.2.3 The determinant For square matrices we define a useful quantity called the determinant. We define the determinant of a 1 × 1 matrix as the value of its only entry. For a 2 × 2 matrix we define det ๐ ๐ ๐ ๐ def = ๐๐ − ๐๐. Before trying to define the determinant for larger matrices, let us note the meaning of the determinant. Consider an ๐ × ๐ matrix as a mapping of the ๐-dimensional euclidean space โ ๐ to itself, where ๐ฅ® gets sent to ๐ด ๐ฅ®. In particular, a 2 × 2 matrix ๐ด is a mapping of the plane to itself. The determinant of ๐ด is the factor by which the area of objects changes. If we take the unit square (square of side 1) in the plane, then ๐ด takes the square to a parallelogram of area |det(๐ด)|. The sign of det(๐ด) denotes changing of orientation (negative if the axes get flipped). For example, let 1 1 ๐ด= . −1 1 130 CHAPTER 3. SYSTEMS OF ODES Then det(๐ด) = 1 + 1 = 2. Let us see where the (unit) square with vertices (0, 0), (1, 0), (0, 1), and (1, 1) gets sent. Clearly (0, 0) gets sent to (0, 0). 1 1 −1 1 1 1 = , 0 −1 1 1 −1 1 0 1 = , 1 1 1 1 −1 1 1 2 = . 1 0 The image of the square is another√square with vertices (0, 0), (1, −1), (1, 1), and (2, 0). The image square has a side of length 2 and is therefore of area 2. If you think back to high school geometry, you may have seen a formula for computing the area of a parallelogram with vertices (0, 0), (๐, ๐), (๐, ๐) and (๐ + ๐, ๐ + ๐). And it is precisely ๐ ๐ det . ๐ ๐ The vertical lines above mean absolute value. The matrix the given parallelogram. ๐ ๐ ๐ ๐ carries the unit square to Let us look at the determinant for larger matrices. We define ๐ด ๐๐ as the matrix ๐ด with the ๐ th row and the ๐ th column deleted. To compute the determinant of a matrix, pick one row, say the ๐ th row and compute: det(๐ด) = ๐ Õ (−1)๐+๐ ๐ ๐๐ det(๐ด ๐๐ ). ๐=1 For the first row we get ( det(๐ด) = ๐ 11 det(๐ด11 ) − ๐ 12 det(๐ด12 ) + ๐ 13 det(๐ด13 ) − · · · +๐ 1๐ det(๐ด1๐ ) if ๐ is odd, −๐ 1๐ det(๐ด1๐ ) if ๐ even. We alternately add and subtract the determinants of the submatrices ๐ด ๐๐ multiplied by ๐ ๐๐ for a fixed ๐ and all ๐. For a 3 × 3 matrix, picking the first row, we get det(๐ด) = ๐ 11 det(๐ด11 ) − ๐ 12 det(๐ด12 ) + ๐ 13 det(๐ด13 ). For example, ๏ฃฎ1 2 3๏ฃน ๏ฃบª 5 6 4 6 4 5 © ๏ฃฏ๏ฃฏ det ­ ๏ฃฏ4 5 6๏ฃบ๏ฃบ ® = 1 · det − 2 · det + 3 · det 8 9 7 9 7 8 ๏ฃฏ7 8 9๏ฃบ «๏ฃฐ ๏ฃป¬ = 1(5 · 9 − 6 · 8) − 2(4 · 9 − 6 · 7) + 3(4 · 8 − 5 · 7) = 0. The numbers (−1)๐+๐ det(๐ด ๐๐ ) are called cofactors of the matrix and this way of computing the determinant is called the cofactor expansion. No matter which row you pick, you always get the same number. It is also possible to compute the determinant by expanding along columns (picking a column instead of a row above). It is true that det(๐ด) = det(๐ด๐ ). A common notation for the determinant is a pair of vertical lines: ๐ ๐ = det ๐ ๐ ๐ ๐ ๐ ๐ . 131 3.2. MATRICES AND LINEAR SYSTEMS I personally find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. Also think about how to write the absolute value of a determinant. I will not use this notation in this book. Think of the determinants telling you the scaling of a mapping. If ๐ต doubles the sizes of geometric objects and ๐ด triples them, then ๐ด๐ต (which applies ๐ต to an object and then ๐ด) should make size go up by a factor of 6. This is true in general: det(๐ด๐ต) = det(๐ด) det(๐ต). This property is one of the most useful, and it is employed often to actually compute determinants. A particularly interesting consequence is to note what it means for existence of inverses. Take ๐ด and ๐ต to be inverses of each other, that is ๐ด๐ต = ๐ผ. Then det(๐ด) det(๐ต) = det(๐ด๐ต) = det(๐ผ) = 1. Neither det(๐ด) nor det(๐ต) can be zero. Let us state this as a theorem as it will be very important in the context of this course. Theorem 3.2.1. An ๐ × ๐ matrix ๐ด is invertible if and only if det(๐ด) ≠ 0. 1 In fact, det(๐ด−1 ) det(๐ด) = 1 says that det(๐ด−1 ) = det(๐ด) . So we even know what the determinant of ๐ด−1 is before we know how to compute ๐ด−1 . There is a simple formula for the inverse of a 2 × 2 matrix ๐ ๐ ๐ ๐ −1 1 ๐ −๐ = . ๐๐ − ๐๐ −๐ ๐ Notice the determinant of the matrix [ ๐๐ ๐๐ ] in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero. 3.2.4 Solving linear systems One application of matrices we will need is to solve systems of linear equations. This is best shown by example. Suppose that we have the following system of linear equations 2๐ฅ1 + 2๐ฅ2 + 2๐ฅ3 = 2, ๐ฅ1 + ๐ฅ2 + 3๐ฅ3 = 5, ๐ฅ1 + 4๐ฅ2 + ๐ฅ3 = 10. Without changing the solution, we could swap equations in this system, we could multiply any of the equations by a nonzero number, and we could add a multiple of one equation to another equation. It turns out these operations always suffice to find a solution. It is easier to write the system as a matrix equation. The system above can be written as ๏ฃฎ2 2 2๏ฃน ๏ฃฎ๐ฅ1 ๏ฃน ๏ฃฎ 2 ๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 3๏ฃบ ๏ฃฏ๐ฅ2 ๏ฃบ = ๏ฃฏ 5 ๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1 4 1๏ฃบ ๏ฃฏ๐ฅ3 ๏ฃบ ๏ฃฏ10๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป 132 CHAPTER 3. SYSTEMS OF ODES To solve the system we put the coefficient matrix (the matrix on the left-hand side of the equation) together with the vector on the right and side and get the so-called augmented matrix ๏ฃฎ2 2 2 2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 1 1 3 5 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ 1 4 1 10 ๏ฃบ ๏ฃฐ ๏ฃป We apply the following three elementary operations. (i) Swap two rows. (ii) Multiply a row by a nonzero number. (iii) Add a multiple of one row to another row. We keep doing these operations until we get into a state where it is easy to read off the answer, or until we get into a contradiction indicating no solution, for example if we come up with an equation such as 0 = 1. Let us work through the example. First multiply the first row by 1/2 to obtain ๏ฃฎ1 1 1 1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 1 1 3 5 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ 1 4 1 10 ๏ฃบ ๏ฃฐ ๏ฃป Now subtract the first row from the second and third row. ๏ฃฎ1 1 1 1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 2 4๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 3 0 9๏ฃบ ๏ฃฐ ๏ฃป Multiply the last row by 1/3 and the second row by 1/2. ๏ฃฎ1 1 1 1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 1 0 3๏ฃบ ๏ฃฐ ๏ฃป Swap rows 2 and 3. ๏ฃฎ1 1 1 1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 1 0 3๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2๏ฃบ ๏ฃฐ ๏ฃป Subtract the last row from the first, then subtract the second row from the first. ๏ฃฎ 1 0 0 −4 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃฏ0 1 0 3 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2 ๏ฃบ ๏ฃฐ ๏ฃป If we think about what equations this augmented matrix represents, we see that ๐ฅ1 = −4, ๐ฅ2 = 3, and ๐ฅ3 = 2. We try this solution in the original system and, voilà, it works! 133 3.2. MATRICES AND LINEAR SYSTEMS Exercise 3.2.1: Check that the solution above really solves the given equations. We write this equation in matrix notation as ® ๐ด ๐ฅ® = ๐, where ๐ด is the matrix via the inverse, h2 2 2i 113 141 and ๐® is the vector h 2 5 10 i . The solution can also be computed ® ๐ฅ® = ๐ด−1 ๐ด ๐ฅ® = ๐ด−1 ๐. It is possible that the solution is not unique, or that no solution exists. It is easy to tell if a solution does not exist. If during the row reduction you come up with a row where all the entries except the last one are zero (the last entry in a row corresponds to the right-hand side of the equation), then the system is inconsistent and has no solution. For example, for a system of 3 equations and 3 unknowns, if you find a row such as [ 0 0 0 | 1 ] in the augmented matrix, you know the system is inconsistent. That row corresponds to 0 = 1. You generally try to use row operations until the following conditions are satisfied. The first (from the left) nonzero entry in each row is called the leading entry. (i) The leading entry in any row is strictly to the right of the leading entry of the row above. (ii) Any zero rows are below all the nonzero rows. (iii) All leading entries are 1. (iv) All the entries above and below a leading entry are zero. Such a matrix is said to be in reduced row echelon form. The variables corresponding to columns with no leading entries are said to be free variables. Free variables mean that we can pick those variables to be anything we want and then solve for the rest of the unknowns. Example 3.2.1: The following augmented matrix is in reduced row echelon form. ๏ฃฎ1 2 0 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0 0๏ฃบ ๏ฃฐ ๏ฃป Suppose the variables are ๐ฅ 1 , ๐ฅ2 , and ๐ฅ3 . Then ๐ฅ 2 is the free variable, ๐ฅ1 = 3 − 2๐ฅ2 , and ๐ฅ3 = 1. On the other hand if during the row reduction process you come up with the matrix ๏ฃฎ 1 2 13 3 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 0 1 1 ๏ฃบ, ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0 3๏ฃบ ๏ฃฐ ๏ฃป there is no need to go further. The last row corresponds to the equation 0๐ฅ1 + 0๐ฅ2 + 0๐ฅ3 = 3, which is preposterous. Hence, no solution exists. 134 3.2.5 CHAPTER 3. SYSTEMS OF ODES Computing the inverse If the matrix ๐ด is square and there exists a unique solution ๐ฅ® to ๐ด ๐ฅ® = ๐® for any ๐® (there are no free variables), then ๐ด is invertible. Multiplying both sides by ๐ด−1 , you can see that ® So it is useful to compute the inverse if you want to solve the equation for many ๐ฅ® = ๐ด−1 ๐. ® different right-hand sides ๐. We have a formula for the 2 × 2 inverse, but it is also not hard to compute inverses of larger matrices. While we will not have too much occasion to compute inverses for larger matrices than 2 × 2 by hand, let us touch on how to do it. Finding the inverse of ๐ด is actually just solving a bunch of linear equations. If we can solve ๐ด ๐ฅ®๐ = ๐®๐ where ๐®๐ is the vector with all zeros except a 1 at the ๐ th position, then the inverse is the matrix with the columns ๐ฅ®๐ for ๐ = 1, 2, . . . , ๐ (exercise: why?). Therefore, to find the inverse we write a larger ๐ × 2๐ augmented matrix [ ๐ด | ๐ผ ], where ๐ผ is the identity matrix. We then perform row reduction. The reduced row echelon form of [ ๐ด | ๐ผ ] will be of the form [ ๐ผ | ๐ด−1 ] if and only if ๐ด is invertible. We then just read off the inverse ๐ด−1 . 3.2.6 Exercises Exercise 3.2.2: Solve 1 2 34 ๐ฅ® = 5 6 by using matrix inverse. h Exercise 3.2.3: Compute determinant of 9 −2 −6 −8 3 6 10 −2 −6 1 2 3 1 40 5 0 60 7 0 8 0 10 1 Exercise 3.2.4: Compute determinant of to make the calculations simpler. Exercise 3.2.5: Compute inverse of Exercise 3.2.6: For which โ is Exercise 3.2.8: Solve Exercise 3.2.9: Solve h5 3 7i 844 633 . not invertible? Find all such โ. 1 1 0 โ 0 1 1 โ i 3 2 3 0 Exercise 3.2.10: Solve . Hint: Expand along the proper row or column hโ i h1i ๐ฅ® = ๐ฅ® = 3333 0242 2343 not invertible? Is there only one such โ? Are there several? 45 6 78 โ 9 −2 −6 −8 3 6 10 −2 −6 h 111 010 . h1 2 3i Infinitely many? Exercise 3.2.7: For which โ is h1 2 3i i 2 3 h2i 0 0 ๐ฅ® = . . 2 0 4 1 . Exercise 3.2.11: Find 3 nonzero 2 × 2 matrices ๐ด, ๐ต, and ๐ถ such that ๐ด๐ต = ๐ด๐ถ but ๐ต ≠ ๐ถ. Exercise 3.2.101: Compute determinant of h1 1 1 2 3 −5 1 −1 0 i 135 3.2. MATRICES AND LINEAR SYSTEMS Exercise 3.2.102: Find ๐ก such that Exercise 3.2.103: Solve 1 1 1 −1 ๐ฅ® = 1 ๐ก −1 2 10 20 is not invertible. . Exercise 3.2.104: Suppose ๐, ๐, ๐ are nonzero numbers. Let ๐ = a) Compute ๐ −1 . ๐ 0 0 ๐ b) Compute ๐ −1 . ,๐= h๐ 00 0 ๐ 0 0 0 ๐ i . 136 3.3 CHAPTER 3. SYSTEMS OF ODES Linear systems of ODEs Note: less than 1 lecture, second part of §5.1 in [EP], §7.4 in [BD] First let us talk about matrix- or vector-valued functions. Such a function is just a matrix or vector whose entries depend on some variable. If ๐ก is the independent variable, we write a vector-valued function ๐ฅ®(๐ก) as ๏ฃฎ ๐ฅ1 (๐ก) ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๐ฅ2 (๐ก) ๏ฃบ ๏ฃฏ ๐ฅ®(๐ก) = ๏ฃฏ .. ๏ฃบ๏ฃบ . . Similarly a matrix-valued function ๐ด(๐ก) is ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฅ (๐ก)๏ฃบ ๏ฃฐ ๐ ๏ฃป ๏ฃฎ ๐11 (๐ก) ๐12 (๐ก) · · · ๐1๐ (๐ก) ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๐21 (๐ก) ๐22 (๐ก) · · · ๐2๐ (๐ก) ๏ฃบ ๐ด(๐ก) = ๏ฃฏ๏ฃฏ .. .. .. ๏ฃบ๏ฃบ . .. . . . . ๏ฃบ ๏ฃฏ ๏ฃฏ ๐ (๐ก) ๐ (๐ก) · · · ๐ (๐ก)๏ฃบ ๐2 ๐๐ ๏ฃฐ ๐1 ๏ฃป 0 th The derivative ๐ด0(๐ก) or ๐๐ด ๐๐ก is just the matrix-valued function whose ๐๐ entry is ๐ ๐๐ (๐ก). Rules of differentiation of matrix-valued functions are similar to rules for normal functions. Let ๐ด(๐ก) and ๐ต(๐ก) be matrix-valued functions. Let ๐ a scalar and let ๐ถ be a constant matrix. Then 0 ๐ด(๐ก) + ๐ต(๐ก) = ๐ด0(๐ก) + ๐ต0(๐ก), 0 ๐ด(๐ก)๐ต(๐ก) = ๐ด0(๐ก)๐ต(๐ก) + ๐ด(๐ก)๐ต0(๐ก), 0 ๐๐ด(๐ก) = ๐๐ด0(๐ก), 0 ๐ถ๐ด(๐ก) = ๐ถ๐ด0(๐ก), ๐ด(๐ก) ๐ถ 0 = ๐ด0(๐ก) ๐ถ. Note the order of the multiplication in the last two expressions. A first order linear system of ODEs is a system that can be written as the vector equation ๐ฅ®0(๐ก) = ๐(๐ก)๐ฅ®(๐ก) + ๐®(๐ก), where ๐(๐ก) is a matrix-valued function, and ๐ฅ®(๐ก) and ๐®(๐ก) are vector-valued functions. We will often suppress the dependence on ๐ก and only write ๐ฅ®0 = ๐ ๐ฅ® + ๐®. A solution of the system is a vector-valued function ๐ฅ® satisfying the vector equation. For example, the equations ๐ฅ10 = 2๐ก๐ฅ1 + ๐ ๐ก ๐ฅ2 + ๐ก 2 , ๐ฅ1 ๐ฅ20 = − ๐ฅ2 + ๐ ๐ก , ๐ก 137 3.3. LINEAR SYSTEMS OF ODES can be written as 2๐ก ๐ ๐ก ๐ก2 ๐ฅ® = 1 ๐ฅ® + ๐ก . ๐ /๐ก −1 0 We will mostly concentrate on equations that are not just linear, but are in fact constant coefficient equations. That is, the matrix ๐ will be constant; it will not depend on ๐ก. When ๐® = 0® (the zero vector), then we say the system is homogeneous. For homogeneous linear systems we have the principle of superposition, just like for single homogeneous equations. Theorem 3.3.1 (Superposition). Let ๐ฅ®0 = ๐ ๐ฅ® be a linear homogeneous system of ODEs. Suppose that ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ are ๐ solutions of the equation and ๐1 , ๐2 , . . . , ๐ ๐ are any constants, then ๐ฅ® = ๐ 1 ๐ฅ®1 + ๐2 ๐ฅ®2 + · · · + ๐ ๐ ๐ฅ®๐ , (3.2) is also a solution. Furthermore, if this is a system of ๐ equations (๐ is ๐ × ๐), and ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ are linearly independent, then every solution ๐ฅ® can be written as (3.2). Linear independence for vector-valued functions is the same idea as for normal functions. The vector-valued functions ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ are linearly independent when ๐1 ๐ฅ®1 + ๐2 ๐ฅ®2 + · · · + ๐ ๐ ๐ฅ®๐ = 0® has only the solution ๐1 = ๐ 2 = · · · = ๐ ๐ = 0, where the equation must hold for all ๐ก. Example 3.3.1: ๐ฅ®1 = h i ๐ก2 ๐ก , ๐ฅ®2 = h 0 1+๐ก i , ๐ฅ®3 = h −๐ก 2 1 i are linearly dependent because ๐ฅ®1 + ๐ฅ®3 = ๐ฅ®2 , and this holds for all ๐ก. So ๐1 = 1, ๐ 2 = −1, and ๐3 = 1 above will h i work. h i h i 2 2 0 ๐ก On the other hand if we change the example just slightly ๐ฅ®1 = ๐ก , ๐ฅ®2 = ๐ก , ๐ฅ®3 = −๐ก1 , then the functions are linearly independent. First write ๐ 1 ๐ฅ®1 + ๐ 2 ๐ฅ®2 + ๐3 ๐ฅ®3 = 0® and note that it has to hold for all ๐ก. We get that ๐1 ๐ก 2 − ๐3 ๐ก 2 0 ๐ 1 ๐ฅ®1 + ๐2 ๐ฅ®2 + ๐3 ๐ฅ®3 = = . ๐1 ๐ก + ๐2 ๐ก + ๐3 0 In other words ๐1 ๐ก 2 − ๐3 ๐ก 2 = 0 and ๐ 1 ๐ก + ๐2 ๐ก + ๐3 = 0. If we set ๐ก = 0, then the second equation becomes ๐3 = 0. But then the first equation becomes ๐ 1 ๐ก 2 = 0 for all ๐ก and so ๐1 = 0. Thus the second equation is just ๐2 ๐ก = 0, which means ๐ 2 = 0. So ๐1 = ๐ 2 = ๐3 = 0 is the only solution and ๐ฅ®1 , ๐ฅ®2 , and ๐ฅ®3 are linearly independent. The linear combination ๐1 ๐ฅ®1 + ๐ 2 ๐ฅ®2 + · · · + ๐ ๐ ๐ฅ®๐ could always be written as ๐(๐ก) ๐®, where ๐(๐ก) is the matrix with columns ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ , and ๐® is the column vector with entries ๐1 , ๐2 , . . . , ๐ ๐ . Assuming that ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ are linearly independent, the matrix-valued function ๐(๐ก) is called a fundamental matrix, or a fundamental matrix solution. To solve nonhomogeneous first order linear systems, we use the same technique as we applied to solve single linear nonhomogeneous equations. 138 CHAPTER 3. SYSTEMS OF ODES Theorem 3.3.2. Let ๐ฅ®0 = ๐ ๐ฅ® + ๐® be a linear system of ODEs. Suppose ๐ฅ®๐ is one particular solution. Then every solution can be written as ๐ฅ® = ๐ฅ®๐ + ๐ฅ®๐ , where ๐ฅ®๐ is a solution to the associated homogeneous equation (๐ฅ®0 = ๐ ๐ฅ®). The procedure for systems is the same as for single equations. We find a particular solution to the nonhomogeneous equation, then we find the general solution to the associated homogeneous equation, and finally we add the two together. Alright, suppose you have found the general solution of ๐ฅ®0 = ๐ ๐ฅ® + ๐®. Next suppose you are given an initial condition of the form ๐ฅ®(๐ก0 ) = ๐® ® Let ๐(๐ก) be a fundamental matrix solution of for some fixed ๐ก0 and a constant vector ๐. the associated homogeneous equation (i.e. columns of ๐(๐ก) are solutions). The general solution can be written as ๐ฅ®(๐ก) = ๐(๐ก) ๐® + ๐ฅ®๐ (๐ก). We are seeking a vector ๐® such that ๐® = ๐ฅ®(๐ก0 ) = ๐(๐ก0 ) ๐® + ๐ฅ®๐ (๐ก0 ). In other words, we are solving for ๐® the nonhomogeneous system of linear equations ๐(๐ก0 ) ๐® = ๐® − ๐ฅ®๐ (๐ก0 ). Example 3.3.2: In § 3.1 we solved the system ๐ฅ10 = ๐ฅ1 , ๐ฅ20 = ๐ฅ1 − ๐ฅ2 , with initial conditions ๐ฅ1 (0) = 1, ๐ฅ2 (0) = 2. Let us consider this problem in the language of this section. ® We write the system and the initial conditions The system is homogeneous, so ๐®(๐ก) = 0. as 1 0 1 0 ๐ฅ® = ๐ฅ®, ๐ฅ®(0) = . 1 −1 2 We found the general solution is i๐ฅ1 = ๐1 ๐ ๐ก and ๐ฅ2 = h ๐2 = 0, we obtain the solution ๐๐ก (1/2)๐ ๐ก ๐1 ๐ก 2๐ + ๐ 2 ๐ −๐ก . Letting ๐1 = 1 and . Letting ๐1 = 0 and ๐ 2 = 1, we obtain 0 ๐ −๐ก . These two solutions are linearly independent, as can be seen by setting ๐ก = 0, and noting that the resulting constant vectors are linearly independent. In matrix notation, a fundamental matrix solution is, therefore, ๐ก ๐ 0 ๐(๐ก) = 1 ๐ก −๐ก . ๐ 2๐ 139 3.3. LINEAR SYSTEMS OF ODES To solve the initial value problem we solve for ๐® in the equation ® ๐(0) ๐® = ๐, or in other words, 1 0 1 ๐® = . 1 2 2 1 A single elementary row operation shows ๐® = ๐๐ก 0 ๐ฅ®(๐ก) = ๐(๐ก) ๐® = 1 ๐ก −๐ก ๐ 2๐ 1 3/2 1 3 2 . Our solution is ๐๐ก = 1 ๐ก 3 −๐ก . 2๐ + 2๐ This new solution agrees with our previous solution from § 3.1. 3.3.1 Exercises Exercise 3.3.1: Write the system ๐ฅ10 = 2๐ฅ1 − 3๐ก๐ฅ2 + sin ๐ก, ๐ฅ20 = ๐ ๐ก ๐ฅ1 + 3๐ฅ2 + cos ๐ก in the form ๐ฅ®0 = ๐(๐ก)๐ฅ® + ๐®(๐ก). Exercise 3.3.2: a) Verify that the system ๐ฅ®0 = ๐ฅ® has the two solutions 1 3 31 1 1 ๐ 4๐ก and 1 −1 ๐ −2๐ก . b) Write down the general solution. c) Write down the general solution in the form ๐ฅ 1 =?, ๐ฅ2 =? (i.e. write down a formula for each element of the solution). Exercise 3.3.3: Verify that 1 ๐ ๐ก and 1 −1 ๐ ๐ก are linearly independent. Hint: Just plug in ๐ก = 0. Exercise 3.3.4: Verify that h1i ๐๐ก h 1 −1 1 i ๐๐ก 1 1 0 and and h 1 −1 1 i ๐ 2๐ก are linearly independent. Hint: You must be a bit more tricky than in the previous exercise. Exercise 3.3.5: Verify that ๐ก ๐ก2 and h i ๐ก3 ๐ก4 are linearly independent. Exercise 3.3.6: Take the system ๐ฅ10 + ๐ฅ20 = ๐ฅ 1 , ๐ฅ 10 − ๐ฅ 20 = ๐ฅ2 . a) Write it in the form ๐ด ๐ฅ®0 = ๐ต ๐ฅ® for matrices ๐ด and ๐ต. b) Compute ๐ด−1 and use that to write the system in the form ๐ฅ®0 = ๐ ๐ฅ®. Exercise 3.3.101: Are h Exercise 3.3.102: Are cosh(๐ก) ๐ก Exercise 3.3.103: Write ๐ 2๐ก ๐๐ก i and 1 0 ๐ฅ = , h ๐๐ก ๐ 2๐ก ๐ 1 i linearly independent? Justify. ๐ −๐ก 1 ๐ก 0 ๐ ,๐ฆ = , and 3๐ฅ − ๐ฆ + linearly independent? Justify. ๐ก๐ฅ in matrix notation. Exercise 3.3.104: a) Write ๐ฅ10 = 2๐ก๐ฅ2 , ๐ฅ20 = 2๐ก๐ฅ2 in matrix notation. b) Solve and write the solution in matrix notation. 140 3.4 CHAPTER 3. SYSTEMS OF ODES Eigenvalue method Note: 2 lectures, §5.2 in [EP], part of §7.3, §7.5, and §7.6 in [BD] In this section we will learn how to solve linear homogeneous constant coefficient systems of ODEs by the eigenvalue method. Suppose we have such a system ๐ฅ®0 = ๐ ๐ฅ®, where ๐ is a constant square matrix. We wish to adapt the method for the single constant coefficient equation by trying the function ๐ ๐๐ก . However, ๐ฅ® is a vector. So we try ๐ฅ® = ๐ฃ® ๐ ๐๐ก , where ๐ฃ® is an arbitrary constant vector. We plug this ๐ฅ® into the equation to get ๐® ๐ฃ ๐ ๐๐ก = ๐® ๐ฃ ๐ ๐๐ก . |{z} ๐ฅ®0 |{z} ๐ ๐ฅ® We divide by ๐ ๐๐ก and notice that we are looking for a scalar ๐ and a vector ๐ฃ® that satisfy the equation ๐® ๐ฃ = ๐® ๐ฃ. To solve this equation we need a little bit more linear algebra, which we now review. 3.4.1 Eigenvalues and eigenvectors of a matrix Let ๐ด be a constant square matrix. Suppose there is a scalar ๐ and a nonzero vector ๐ฃ® such that ๐ด® ๐ฃ = ๐® ๐ฃ. We call ๐ an eigenvalue of ๐ด and we call ๐ฃ® a corresponding eigenvector. Example 3.4.1: The matrix 1 0 as 2 1 01 has an eigenvalue ๐ = 2 with a corresponding eigenvector 2 1 0 1 1 2 1 = =2 . 0 0 0 Let us see how to compute eigenvalues for any matrix. Rewrite the equation for an eigenvalue as ® (๐ด − ๐๐ผ)® ๐ฃ = 0. This equation has a nonzero solution ๐ฃ® only if ๐ด − ๐๐ผ is not invertible. Were it invertible, ® which implies ๐ฃ® = 0. ® Therefore, ๐ด has we could write (๐ด − ๐๐ผ)−1 (๐ด − ๐๐ผ)® ๐ฃ = (๐ด − ๐๐ผ)−1 0, the eigenvalue ๐ if and only if ๐ solves the equation det(๐ด − ๐๐ผ) = 0. Consequently, we can find an eigenvalue of ๐ด without finding a corresponding eigenvector at the same time. An eigenvector will have to be found later, once ๐ is known. 141 3.4. EIGENVALUE METHOD Example 3.4.2: Find all eigenvalues of We write h2 1 1i 120 002 . ๏ฃฎ2 1 1๏ฃน ๏ฃฎ1 0 0๏ฃน ๏ฃฎ2 − ๐ 1 1 ๏ฃน๏ฃบ ๏ฃบ ๏ฃฏ ๏ฃบª ๏ฃฏ © ๏ฃฏ๏ฃฏ © ª 2−๐ 0 ๏ฃบ๏ฃบ ® = det ­ ๏ฃฏ1 2 0๏ฃบ๏ฃบ − ๐ ๏ฃฏ๏ฃฏ0 1 0๏ฃบ๏ฃบ ® = det ­ ๏ฃฏ๏ฃฏ 1 ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1๏ฃบ ๏ฃฏ 0 2 − ๐๏ฃบ๏ฃป ¬ « ๏ฃฐ0 0 2๏ฃป «๏ฃฐ 0 ๏ฃฐ ๏ฃป¬ 2 = (2 − ๐) (2 − ๐) − 1 = −(๐ − 1)(๐ − 2)(๐ − 3). So the eigenvalues are ๐ = 1, ๐ = 2, and ๐ = 3. For an ๐ × ๐ matrix, the polynomial we get by computing det(๐ด − ๐๐ผ) is of degree ๐, and hence in general, we have ๐ eigenvalues. Some may be repeated, some may be complex. To find an eigenvector corresponding to an eigenvalue ๐, we write ® (๐ด − ๐๐ผ)® ๐ฃ = 0, and solve for a nontrivial (nonzero) vector ๐ฃ® . If ๐ is an eigenvalue, there will be at least one free variable, and so for each distinct eigenvalue ๐, we can always find an eigenvector. Example 3.4.3: Find an eigenvector of We write h2 1 1i 120 002 corresponding to the eigenvalue ๐ = 3. ๏ฃฎ2 1 1๏ฃน ๏ฃฎ1 0 0๏ฃน ๏ฃฎ๐ฃ1 ๏ฃน ๏ฃฎ−1 1 1 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃบª ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ © ๏ฃฏ๏ฃฏ ๏ฃบ (๐ด − ๐๐ผ)® ๐ฃ = ­ ๏ฃฏ1 2 0๏ฃบ − 3 ๏ฃฏ๏ฃฏ0 1 0๏ฃบ๏ฃบ ® ๏ฃฏ๏ฃฏ๐ฃ2 ๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ 1 −1 0 ๏ฃบ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1๏ฃบ ๏ฃฏ๐ฃ3 ๏ฃบ ๏ฃฏ 0 0 −1๏ฃบ « ๏ฃฐ0 0 2๏ฃป ๏ฃฐ ๏ฃป¬ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ๐ฃ 1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฃ2 ๏ฃบ = 0. ® ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฃ 3 ๏ฃบ ๏ฃฐ ๏ฃป It is easy to solve this system of linear equations. We write down the augmented matrix ๏ฃฎ −1 1 1 0 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 1 −1 0 0 ๏ฃบ , ๏ฃบ ๏ฃฏ ๏ฃฏ 0 0 −1 0 ๏ฃบ ๏ฃป ๏ฃฐ and perform row operations (exercise: which ones?) until we get: ๏ฃฎ 1 −1 0 0 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 0 1 0 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0 0๏ฃบ ๏ฃฐ ๏ฃป The entries of ๐ฃ® have to satisfy the equations ๐ฃ1 − ๐ฃ 2 = 0, ๐ฃ3 = 0, and ๐ฃ2 is a free variable. We can pick ๐ฃ 2 to be arbitrary h i(but nonzero), let ๐ฃ1 = ๐ฃ2 , and of course ๐ฃ3 = 0. For example, if we pick ๐ฃ2 = 1, then ๐ฃ® = to ๐ = 3: Yay! It worked. 1 1 0 . Let us verify that ๐ฃ® really is an eigenvector corresponding ๏ฃฎ2 1 1๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ3๏ฃน ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1 2 0๏ฃบ ๏ฃฏ1๏ฃบ = ๏ฃฏ3๏ฃบ = 3 ๏ฃฏ1๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 2๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป 142 CHAPTER 3. SYSTEMS OF ODES Exercise 3.4.1 (easy): Are eigenvectors unique? Can you find a different eigenvector for ๐ = 3 in the example above? How are the two eigenvectors related? Exercise 3.4.2: When the matrix is 2 × 2 you do not need to do row operations when computing an eigenvector, you can read it off from ๐ด − ๐๐ผ (if 2you have computed the eigenvalues correctly). Can 1 you see why? Explain. Try it for the matrix 1 2 . 3.4.2 The eigenvalue method with distinct real eigenvalues OK. We have the system of equations ๐ฅ®0 = ๐ ๐ฅ®. We find the eigenvalues ๐1 , ๐2 , . . . , ๐๐ of the matrix ๐, and corresponding eigenvectors ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . Now we notice that the functions ๐ฃ®1 ๐ ๐1 ๐ก , ๐ฃ®2 ๐ ๐2 ๐ก , . . . , ๐ฃ® ๐ ๐ ๐๐ ๐ก are solutions of the system of equations and hence ๐ฅ® = ๐1 ๐ฃ®1 ๐ ๐1 ๐ก + ๐2 ๐ฃ®2 ๐ ๐2 ๐ก + · · · + ๐ ๐ ๐ฃ® ๐ ๐ ๐๐ ๐ก is a solution. Theorem 3.4.1. Take ๐ฅ®0 = ๐ ๐ฅ®. If ๐ is an ๐ × ๐ constant matrix that has ๐ distinct real eigenvalues ๐1 , ๐2 , . . . , ๐๐ , then there exist ๐ linearly independent corresponding eigenvectors ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ , and the general solution to ๐ฅ®0 = ๐ ๐ฅ® can be written as ๐ฅ® = ๐ 1 ๐ฃ®1 ๐ ๐1 ๐ก + ๐2 ๐ฃ®2 ๐ ๐2 ๐ก + · · · + ๐ ๐ ๐ฃ® ๐ ๐ ๐๐ ๐ก . The corresponding fundamental matrix solution is ๐(๐ก) = ๐ฃ®1 ๐ ๐1 ๐ก ๐ฃ®2 ๐ ๐2 ๐ก ··· ๐ฃ® ๐ ๐ ๐๐ ๐ก . That is, ๐(๐ก) is the matrix whose ๐ th column is ๐ฃ® ๐ ๐ ๐ ๐ ๐ก . Example 3.4.4: Consider the system ๏ฃฎ2 1 1๏ฃน ๏ฃฏ ๏ฃบ ๐ฅ® = ๏ฃฏ๏ฃฏ1 2 0๏ฃบ๏ฃบ ๐ฅ®. ๏ฃฏ0 0 2๏ฃบ ๏ฃฐ ๏ฃป 0 Find the general solution. Earlier, we found the eigenvalues are 1, 2, 3. We found the eigenvector eigenvalue 3. Similarly we find the eigenvector h 1 −1 0 i for the eigenvalue 1, and eigenvalue 2 (exercise: check). Hence our general solution is ๏ฃฎ1๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ ๏ฃน ๐1 ๐ ๐ก + ๐3 ๐ 3๐ก ๏ฃฏ ๏ฃบ ๐ก ๏ฃฏ ๏ฃบ 2๐ก ๏ฃฏ ๏ฃบ 3๐ก ๏ฃฏ ๏ฃบ ๐ก 2๐ก 3๐ก ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๐ฅ® = ๐ 1 ๏ฃฏ−1๏ฃบ ๐ + ๐2 ๏ฃฏ 1 ๏ฃบ ๐ + ๐ 3 ๏ฃฏ1๏ฃบ ๐ = ๏ฃฏ−๐1 ๐ + ๐ 2 ๐ + ๐ 3 ๐ ๏ฃบ๏ฃบ . ๏ฃฏ0๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ −๐ 2 ๐ 2๐ก ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป In terms of a fundamental matrix solution, ๏ฃฎ ๐๐ก 0 ๐ 3๐ก ๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ ๐1 ๏ฃน๏ฃบ ๏ฃฏ ๐ก ๐ 2๐ก ๐ 3๐ก ๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ ๐2 ๏ฃบ๏ฃบ . ๐ฅ® = ๐(๐ก) ๐® = ๏ฃฏ๏ฃฏ−๐ ๏ฃฏ 0 −๐ 2๐ก 0 ๏ฃบ ๏ฃฏ๐3 ๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป h1i h 1 for the 0 i 0 for the 1 −1 143 3.4. EIGENVALUE METHOD Exercise 3.4.3: Check that this ๐ฅ® really solves the system. Note: If we write a single homogeneous linear constant coefficient ๐ th order equation as a first order system (as we did in § 3.1), then the eigenvalue equation det(๐ − ๐๐ผ) = 0 is essentially the same as the characteristic equation we got in § 2.2 and § 2.3. 3.4.3 Complex eigenvalues A matrix may very well have complex eigenvalues even if all the entries are real. Take, for example, 1 1 0 ๐ฅ®. ๐ฅ® = −1 1 Let us compute the eigenvalues of the matrix ๐ = det(๐ − ๐๐ผ) = det 1−๐ 1 −1 1 − ๐ 1 1 −1 1 . = (1 − ๐)2 + 1 = ๐2 − 2๐ + 2 = 0. Thus ๐ = 1 ± ๐. Corresponding eigenvectors are also complex. Start with ๐ = 1 − ๐. ® ๐ − (1 − ๐)๐ผ ๐ฃ® = 0, ๐ 1 ® ๐ฃ® = 0. −1 ๐ The equations ๐๐ฃ1 + ๐ฃ 2 = 0 and −๐ฃ 1 + ๐๐ฃ2 = 0 are multiples of each other. So we only need to consider one of them. After picking ๐ฃ2 = 1, for example, we have an eigenvector ๐ฃ® = 1๐ . In similar fashion we find that −๐ 1 is an eigenvector corresponding to the eigenvalue 1 + ๐. We could write the solution as ๐ฅ® = ๐1 ๐ (1−๐)๐ก −๐ (1+๐)๐ก ๐ ๐๐ (1−๐)๐ก − ๐ 2 ๐๐ (1+๐)๐ก ๐ + ๐2 ๐ = 1 (1−๐)๐ก . 1 1 ๐1 ๐ + ๐ 2 ๐ (1+๐)๐ก We would then need to look for complex values ๐1 and ๐2 to solve any initial conditions. It is perhaps not completely clear that we get a real solution. After solving for ๐ 1 and ๐ 2 , we could use Euler’s formula and do the whole song and dance we did before, but we will not. We will apply the formula in a smarter way first to find independent real solutions. We claim that we did not have to look for a second eigenvector (nor for the second eigenvalue). All complex eigenvalues come in pairs (because the matrix ๐ is real). ๐ง First a small detour. The real part of a complex number ๐ง can be computed as ๐ง+¯ 2 , where the bar above ๐ง means ๐ + ๐๐ = ๐ − ๐๐. This operation is called the complex conjugate. If ๐ is a real number, then ๐¯ = ๐. Similarly we bar whole vectors or matrices by taking 144 CHAPTER 3. SYSTEMS OF ODES the complex conjugate of every entry. Suppose a matrix ๐ is real. Then ๐ = ๐, and so ๐ ๐ฅ® = ๐ ๐ฅ® = ๐ ๐ฅ®. Also the complex conjugate of 0 is still 0, therefore, ¯ ๐ฃ. ๐ฃ = (๐ − ๐๐ผ)® 0® = 0® = (๐ − ๐๐ผ)® In other words, if ๐ = ๐ + ๐๐ is an eigenvalue, then so is ๐¯ = ๐ − ๐๐. And if ๐ฃ® is an eigenvector corresponding to the eigenvalue ๐, then ๐ฃ® is an eigenvector corresponding to the eigenvalue ¯ ๐. Suppose ๐ + ๐๐ is a complex eigenvalue of ๐, and ๐ฃ® is a corresponding eigenvector. Then ๐ฅ®1 = ๐ฃ® ๐ (๐+๐๐)๐ก is a solution (complex-valued) of ๐ฅ®0 = ๐ ๐ฅ®. Euler’s formula shows that ๐ ๐+๐๐ = ๐ ๐−๐๐ , and so ๐ฅ®2 = ๐ฅ®1 = ๐ฃ® ๐ (๐−๐๐)๐ก is also a solution. As ๐ฅ®1 and ๐ฅ®2 are solutions, the function ๐ฅ®3 = Re ๐ฅ®1 = Re ๐ฃ® ๐ (๐+๐๐)๐ก = ๐ฅ®1 + ๐ฅ®1 ๐ฅ®1 + ๐ฅ®2 1 1 = = ๐ฅ®1 + ๐ฅ®2 2 2 2 2 ๐ง is also a solution. And ๐ฅ®3 is real-valued! Similarly as Im ๐ง = ๐ง−¯ 2๐ is the imaginary part, we find that ๐ฅ®1 − ๐ฅ®1 ๐ฅ®1 − ๐ฅ®2 ๐ฅ®4 = Im ๐ฅ®1 = = . 2๐ 2๐ is also a real-valued solution. It turns out that ๐ฅ®3 and ๐ฅ®4 are linearly independent. We will use Euler’s formula to separate out the real and imaginary part. Returning to our problem, ๐ (1−๐)๐ก ๐ ๐ฅ®1 = ๐ = 1 1 Then ๐๐ ๐ก cos ๐ก + ๐ ๐ก sin ๐ก ๐ ๐ก sin ๐ก ๐ ๐ก cos ๐ก ๐ cos ๐ก − ๐๐ sin ๐ก = ๐ก = + ๐ . ๐ cos ๐ก − ๐๐ ๐ก sin ๐ก ๐ ๐ก cos ๐ก −๐ ๐ก sin ๐ก ๐ก ๐ก ๐ ๐ก sin ๐ก Re ๐ฅ®1 = ๐ก , ๐ cos ๐ก and ๐ ๐ก cos ๐ก Im ๐ฅ®1 = , −๐ ๐ก sin ๐ก are the two real-valued linearly independent solutions we seek. Exercise 3.4.4: Check that these really are solutions. The general solution is ๐ฅ® = ๐ 1 ๐ ๐ก sin ๐ก ๐ ๐ก cos ๐ก ๐ 1 ๐ ๐ก sin ๐ก + ๐ 2 ๐ ๐ก cos ๐ก + ๐ = . 2 ๐ ๐ก cos ๐ก −๐ ๐ก sin ๐ก ๐ 1 ๐ ๐ก cos ๐ก − ๐ 2 ๐ ๐ก sin ๐ก This solution is real-valued for real ๐ 1 and ๐2 . At this point, we would solve for any initial conditions we may have to find ๐1 and ๐ 2 . Let us summarize the discussion as a theorem. 145 3.4. EIGENVALUE METHOD Theorem 3.4.2. Let ๐ be a real-valued constant matrix. If ๐ has a complex eigenvalue ๐ + ๐๐ and a corresponding eigenvector ๐ฃ® , then ๐ also has a complex eigenvalue ๐ − ๐๐ with a corresponding eigenvector ๐ฃ® . Furthermore, ๐ฅ®0 = ๐ ๐ฅ® has two linearly independent real-valued solutions ๐ฅ®1 = Re ๐ฃ® ๐ (๐+๐๐)๐ก , ๐ฅ®2 = Im ๐ฃ® ๐ (๐+๐๐)๐ก . and For each pair of complex eigenvalues ๐ + ๐๐ and ๐ − ๐๐, we get two real-valued linearly independent solutions. We then go on to the next eigenvalue, which is either a real eigenvalue or another complex eigenvalue pair. If we have ๐ distinct eigenvalues (real or complex), then we end up with ๐ linearly independent solutions. If we had only two equations (๐ = 2) as in the example above, then once we found two solutions we are finished, and our general solution is ๐ฅ® = ๐ 1 ๐ฅ®1 + ๐2 ๐ฅ®2 = ๐1 Re ๐ฃ® ๐ (๐+๐๐)๐ก + ๐ 2 Im ๐ฃ® ๐ (๐+๐๐)๐ก . We can now find a real-valued general solution to any homogeneous system where the matrix has distinct eigenvalues. When we have repeated eigenvalues, matters get a bit more complicated and we will look at that situation in § 3.7. 3.4.4 Exercises Exercise 3.4.5 (easy): h 1 i Let ๐ด be a 3 × 3 matrix with an eigenvalue of 3 and a corresponding eigenvector ๐ฃ® = −1 . Find ๐ด® ๐ฃ. 3 Exercise 3.4.6: a) Find the general solution of ๐ฅ10 = 2๐ฅ1 , ๐ฅ 20 = 3๐ฅ 2 using the eigenvalue method (first write the system in the form ๐ฅ®0 = ๐ด ๐ฅ®). b) Solve the system by solving each equation separately and verify you get the same general solution. Exercise 3.4.7: Find the general solution of ๐ฅ10 = 3๐ฅ1 + ๐ฅ2 , ๐ฅ20 = 2๐ฅ1 + 4๐ฅ2 using the eigenvalue method. Exercise 3.4.8: Find the general solution of ๐ฅ10 = ๐ฅ 1 − 2๐ฅ2 , ๐ฅ20 = 2๐ฅ1 + ๐ฅ2 using the eigenvalue method. Do not use complex exponentials in your solution. Exercise 3.4.9: a) Compute eigenvalues and eigenvectors of ๐ด = h 9 −2 −6 −8 3 6 10 −2 −6 i . b) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. Exercise 3.4.10: Compute eigenvalues and eigenvectors of h −2 −1 −1 i 3 2 1 −3 −1 0 . 146 CHAPTER 3. SYSTEMS OF ODES Exercise 3.4.11: Let ๐, ๐, ๐, ๐, ๐, ๐ be numbers. Find the eigenvalues of h๐ Exercise 3.4.101: a) Compute eigenvalues and eigenvectors of ๐ด = h 1 03 −1 0 1 2 02 1 1 −1 0 i . b) Solve the system ๐ฅ® 0 = ๐ด ๐ฅ®. Exercise 3.4.102: a) Compute eigenvalues and eigenvectors of ๐ด = . b) Solve the system ๐ฅ® 0 = ๐ด ๐ฅ®. Exercise 3.4.103: Solve ๐ฅ10 = ๐ฅ2 , ๐ฅ20 = ๐ฅ1 using the eigenvalue method. Exercise 3.4.104: Solve ๐ฅ10 = ๐ฅ2 , ๐ฅ20 = −๐ฅ1 using the eigenvalue method. ๐ ๐ 0 ๐ ๐ 0 0 ๐ i . 147 3.5. TWO-DIMENSIONAL SYSTEMS AND THEIR VECTOR FIELDS 3.5 Two-dimensional systems and their vector fields Note: 1 lecture, part of §6.2 in [EP], parts of §7.5 and §7.6 in [BD] Let us take a moment to talk about constant coefficient linear homogeneous systems in the plane. Much intuition can be obtained by studying ๐ ๐ this simple case. We use coordinates (๐ฅ, ๐ฆ) for the plane as usual, and suppose ๐ = ๐ ๐ is a 2 × 2 matrix. Consider the system 0 ๐ฅ ๐ฆ ๐ฅ =๐ ๐ฆ 0 ๐ฅ ๐ฆ or ๐ ๐ = ๐ ๐ ๐ฅ . ๐ฆ (3.3) The system is autonomous (compare this section to § 1.6) and so we can draw a vector field (see the end of § 3.1). We will be able to visually tell what the vector field looks like and how the solutions behave, once we find the eigenvalues and eigenvectors of the matrix ๐. For this section, we assume that ๐ has two eigenvalues and two corresponding eigenvectors. Case 1. Suppose that the eigenvalues of ๐ are real and positive. We find two 1 1 corresponding eigenvectors and plot them in the plane. For example, take the matrix 0 2 . The eigenvalues are 1 and 2 and corresponding eigenvectors are 10 and 11 . See Figure 3.4. Let (๐ฅ, ๐ฆ) be a point on the line deter๐ฃ® for an eigenvalue mined by an ๐ฅeigenvector ๐. That is, ๐ฆ = ๐ผ® ๐ฃ for some scalar ๐ผ. Then -3 0 ๐ฅ ๐ฆ =๐ ๐ฅ = ๐(๐ผ® ๐ฃ ) = ๐ผ(๐® ๐ฃ ) = ๐ผ๐® ๐ฃ. ๐ฆ -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 The derivative is a multiple of ๐ฃ® and hence points along the line determined by ๐ฃ® . As ๐ > 0, the derivative points in the direction of ๐ฃ® when ๐ผ is positive and in the opposite direction when ๐ผ is negative. We draw the lines determined by the eigenvectors, and Figure 3.4: Eigenvectors of ๐. we draw arrows on the lines to indicate the directions. See Figure 3.5 on the next page. We fill in the rest of the arrows for the vector field and we also draw a few solutions. See Figure 3.6 on the following page. The picture looks like a source with arrows coming out from the origin. Hence we call this type of picture a source or sometimes an unstable node. -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 2 3 Case 2. Suppose both eigenvalues are negative. For example, take the negation of the −1 . The eigenvalues are −1 and −2 and corresponding eigenvectors matrix in case 1, −1 0 −2 are the same, 10 and 11 . The calculation and the picture are almost the same. The only difference is that the eigenvalues are negative and hence all arrows are reversed. We get the picture in Figure 3.7 on the next page. We call this kind of picture a sink or a stable node. 1 Case 1 the matrix 1 3. Suppose one eigenvalue is positive and one is negative. For example 1 0 −2 . The eigenvalues are 1 and −2 and corresponding eigenvectors are 0 and −3 . 148 CHAPTER 3. SYSTEMS OF ODES -3 -2 -1 0 1 2 -3 3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 Figure 3.5: Eigenvectors of ๐ with directions. -3 -2 -1 0 1 2 -3 -3 3 -2 -1 0 1 2 3 Figure 3.6: Example source vector field with eigenvectors and solutions. 3 -3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 3 Figure 3.7: Example sink vector field with eigenvectors and solutions. -3 -3 -2 -1 0 1 2 3 Figure 3.8: Example saddle vector field with eigenvectors and solutions. We reverse the arrows on one line (corresponding to the negative eigenvalue) and we obtain the picture in Figure 3.8. We call this picture a saddle point. For the next three cases we will assume the eigenvalues are complex. In this case the eigenvectors are also complex and we cannot just plot them in the plane. Case 0 4. Suppose the eigenvalues are purely imaginary, that is, ±๐๐. For 1example, 1let 1 ๐ = −4 0 . The eigenvalues are ±2๐ and corresponding eigenvectors are 2๐ and −2๐ . Consider the eigenvalue 2๐ and its eigenvector 2๐1 . The real and imaginary parts of ๐ฃ® ๐ 2๐๐ก are 1 2๐๐ก cos(2๐ก) 1 2๐๐ก sin(2๐ก) Re ๐ = , Im ๐ = . 2๐ −2 sin(2๐ก) 2๐ 2 cos(2๐ก) 149 3.5. TWO-DIMENSIONAL SYSTEMS AND THEIR VECTOR FIELDS We can take any linear combination of them to get other solutions, which one we take depends on the initial conditions. Now note that the real part is a parametric equation for an ellipse. Same with the imaginary part and in fact any linear combination of the two. This is what happens in general when the eigenvalues are purely imaginary. So when the eigenvalues are purely imaginary, we get ellipses for the solutions. This type of picture is sometimes called a center. See Figure 3.9. -3 -2 -1 0 1 2 -3 3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 3 Figure 3.9: Example center vector field. -3 -3 -2 -1 0 1 2 3 Figure 3.10: Example spiral source vector field. Case 5. Now suppose the complex eigenvalues have a positive real 1 part. That is, suppose 1 the eigenvalues are ๐ ± ๐๐ for some ๐ > 0. For example, let ๐ = −4 1 . The eigenvalues 1 turn out to be 1 ± 2๐ and eigenvectors are 2๐1 and −2๐ . We take 1 + 2๐ and its eigenvector 1 (1+2๐)๐ก ®๐ are 2๐ and find the real and imaginary parts of ๐ฃ 1 (1+2๐)๐ก cos(2๐ก) Re ๐ = ๐๐ก , 2๐ −2 sin(2๐ก) 1 (1+2๐)๐ก sin(2๐ก) Im ๐ = ๐๐ก . 2๐ 2 cos(2๐ก) Note the ๐ ๐ก in front of the solutions. The solutions grow in magnitude while spinning around the origin. Hence we get a spiral source. See Figure 3.10. Case 6. Finally suppose the complex eigenvalues have a negative real part. is, −1 −1That suppose the eigenvalues are −๐ ± ๐๐ for some ๐ > 0. For example, let ๐ = 4 −1 . The 1 eigenvalues turn out to be −1 ± 2๐ and eigenvectors are −2๐ and 2๐1 . We take −1 − 2๐ and its eigenvector 2๐1 and find the real and imaginary parts of ๐ฃ® ๐ (−1−2๐)๐ก are 1 (−1−2๐)๐ก cos(2๐ก) Re ๐ = ๐ −๐ก , 2๐ 2 sin(2๐ก) 1 (−1−2๐)๐ก − sin(2๐ก) Im ๐ = ๐ −๐ก . 2๐ 2 cos(2๐ก) Note the ๐ −๐ก in front of the solutions. The solutions shrink in magnitude while spinning around the origin. Hence we get a spiral sink. See Figure 3.11 on the next page. 150 CHAPTER 3. SYSTEMS OF ODES -3 -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 2 3 Figure 3.11: Example spiral sink vector field. We summarize the behavior of linear homogeneous two-dimensional systems given by a nonsingular matrix in Table 3.1. Systems where one of the eigenvalues is zero (the matrix is singular) come up in practice from time to time, see Example 3.1.2 on page 121, and the pictures are somewhat different (simpler in a way). See the exercises. Eigenvalues Behavior real and both positive real and both negative real and opposite signs purely imaginary complex with positive real part complex with negative real part source / unstable node sink / stable node saddle center point / ellipses spiral source spiral sink Table 3.1: Summary of behavior of linear homogeneous two-dimensional systems. 3.5.1 Exercises Exercise 3.5.1: Take the equation ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, with ๐ > 0, ๐ ≥ 0, ๐ > 0 for the mass-spring system. a) Convert this to a system of first order equations. b) Classify for what ๐, ๐, ๐ do you get which behavior. c) Explain from physical intuition why you do not get all the different kinds of behavior here? 151 3.5. TWO-DIMENSIONAL SYSTEMS AND THEIR VECTOR FIELDS Exercise 3.5.2: What happens in the case when ๐ = 10 11 ? In this case the eigenvalue is repeated and there is only one independent eigenvector. What picture does this look like? Exercise 3.5.3: What happens in the case when ๐ = we have drawn? 1 1 11 ? Does this look like any of the pictures Exercise 3.5.4: Which behaviors are possible if ๐ is diagonal, that is ๐ = that ๐ and ๐ are not zero. ๐ 0 0 ๐ ? You can assume Exercise 3.5.5: Take the system from Example 3.1.2 on page 121, ๐ฅ10 = ๐๐ (๐ฅ2 − ๐ฅ1 ), ๐ฅ20 = ๐๐ (๐ฅ 1 − ๐ฅ2 ). As we said, one of the eigenvalues is zero. What is the other eigenvalue, how does the picture look like and what happens when ๐ก goes to infinity. Exercise 3.5.101: Describe the behavior of the following systems without solving: a) ๐ฅ 0 = ๐ฅ + ๐ฆ, ๐ฆ 0 = ๐ฅ − ๐ฆ. b) ๐ฅ10 = ๐ฅ1 + ๐ฅ2 , c) ๐ฅ10 = −2๐ฅ 2 , ๐ฅ20 = 2๐ฅ1 . d) ๐ฅ 0 = ๐ฅ + 3๐ฆ, e) ๐ฅ 0 = ๐ฅ − 4๐ฆ, ๐ฅ20 = 2๐ฅ2 . ๐ฆ 0 = −2๐ฅ − 4๐ฆ. ๐ฆ 0 = −4๐ฅ + ๐ฆ. Exercise 3.5.102: Suppose that ๐ฅ® 0 = ๐ด ๐ฅ® where ๐ด is a 2 by 2 matrix with eigenvalues 2 ± ๐. Describe the behavior. Exercise 3.5.103: Take ๐ฅ๐ฆ = 00 10 ๐ฅ๐ฆ . Draw the vector field and describe the behavior. Is it one of the behaviors that we have seen before? 0 152 3.6 CHAPTER 3. SYSTEMS OF ODES Second order systems and applications Note: more than 2 lectures, §5.4 in [EP], not in [BD] 3.6.1 Undamped mass-spring systems While we did say that we will usually only look at first order systems, it is sometimes more convenient to study the system in the way it arises naturally. For example, suppose we have 3 masses connected by springs between two walls. We could pick any higher number, and the math would be essentially the same, but for simplicity we pick 3 right now. Let us also assume no friction, that is, the system is undamped. The masses are ๐1 , ๐2 , and ๐3 and the spring constants are ๐ 1 , ๐ 2 , ๐ 3 , and ๐ 4 . Let ๐ฅ1 be the displacement from rest position of the first mass, and ๐ฅ2 and ๐ฅ3 the displacement of the second and third mass. We make, as usual, positive values go right (as ๐ฅ 1 grows, the first mass is moving right). See Figure 3.12. ๐1 ๐2 ๐1 ๐2 ๐3 ๐3 ๐4 Figure 3.12: System of masses and springs. This simple system turns up in unexpected places. For example, our world really consists of many small particles of matter interacting together. When we try the system above with many more masses, we obtain a good approximation to how an elastic material behaves. By somehow taking a limit of the number of masses going to infinity, we obtain the continuous one-dimensional wave equation (that we study in § 4.7). But we digress. Let us set up the equations for the three mass system. By Hooke’s law, the force acting on the mass equals the spring compression times the spring constant. By Newton’s second law, force is mass times acceleration. So if we sum the forces acting on each mass, put the right sign in front of each term, depending on the direction in which it is acting, and set this equal to mass times the acceleration, we end up with the desired system of equations. ๐1 ๐ฅ 100 = −๐1 ๐ฅ1 + ๐2 (๐ฅ2 − ๐ฅ1 ) = −(๐ 1 + ๐ 2 )๐ฅ1 + ๐ 2 ๐ฅ2 , ๐2 ๐ฅ 200 ๐3 ๐ฅ 300 = −๐2 (๐ฅ2 − ๐ฅ1 ) + ๐ 3 (๐ฅ3 − ๐ฅ2 ) = ๐ 2 ๐ฅ 1 − (๐ 2 + ๐ 3 )๐ฅ2 + ๐ 3 ๐ฅ3 , = −๐ 3 (๐ฅ3 − ๐ฅ2 ) − ๐ 4 ๐ฅ 3 = ๐ 3 ๐ฅ 2 − (๐ 3 + ๐ 4 )๐ฅ3 . We define the matrices ๏ฃฎ ๐1 0 0 ๏ฃน ๏ฃฏ ๏ฃบ ๐ = ๏ฃฏ๏ฃฏ 0 ๐2 0 ๏ฃบ๏ฃบ ๏ฃฏ 0 0 ๐3 ๏ฃบ ๏ฃฐ ๏ฃป and ๏ฃฎ−(๐1 + ๐2 ) ๏ฃน ๐2 0 ๏ฃฏ ๏ฃบ ๏ฃบ. ๐2 −(๐2 + ๐ 3 ) ๐3 ๐พ = ๏ฃฏ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 0 ๐ −(๐ + ๐ ) 3 3 4 ๏ฃฐ ๏ฃป 153 3.6. SECOND ORDER SYSTEMS AND APPLICATIONS We write the equation simply as ๐ ๐ฅ®00 = ๐พ ๐ฅ®. At this point we could introduce 3 new variables and write out a system of 6 first order equations. We claim this simple setup is easier to handle as a second order system. We call ๐ฅ® the displacement vector, ๐ the mass matrix, and ๐พ the stiffness matrix. Exercise 3.6.1: Repeat this setup for 4 masses (find the matrices ๐ and ๐พ). Do it for 5 masses. Can you find a prescription to do it for ๐ masses? As with a single equation we want to “divide by ๐.” This means computing the inverse of ๐. The masses are all nonzero and ๐ is a diagonal matrix, so computing the inverse is easy: ๏ฃฎ ๐1 0 0 ๏ฃน ๏ฃฏ 1 ๏ฃบ ๐ −1 = ๏ฃฏ๏ฃฏ 0 ๐12 0 ๏ฃบ๏ฃบ . ๏ฃฏ0 0 1๏ฃบ ๏ฃฐ ๐3 ๏ฃป This fact follows readily by how we multiply diagonal matrices. As an exercise, you should verify that ๐๐ −1 = ๐ −1 ๐ = ๐ผ. Let ๐ด = ๐ −1 ๐พ. We look at the system ๐ฅ®00 = ๐ −1 ๐พ ๐ฅ®, or ๐ฅ®00 = ๐ด ๐ฅ®. Many real world systems can be modeled by this equation. For simplicity, we will only talk about the given masses-and-springs problem. We try a solution of the form ๐ฅ® = ๐ฃ® ๐ ๐ผ๐ก . We compute that for this guess, ๐ฅ®00 = ๐ผ2 ๐ฃ® ๐ ๐ผ๐ก . We plug our guess into the equation and get ๐ผ2 ๐ฃ® ๐ ๐ผ๐ก = ๐ด® ๐ฃ ๐ ๐ผ๐ก . We divide by ๐ ๐ผ๐ก to arrive at ๐ผ2 ๐ฃ® = ๐ด® ๐ฃ . Hence if ๐ผ2 is an eigenvalue of ๐ด and ๐ฃ® is a corresponding eigenvector, we have found a solution. In our example, and in other common applications, ๐ด has only real negative eigenvalues (and possibly a zero eigenvalue). So we study only this case. When an eigenvalue ๐ is negative, it means that ๐ผ2 = ๐ is negative. Hence there is some real number ๐ such that −๐2 = ๐. Then ๐ผ = ±๐๐. The solution we guessed was ๐ฅ® = ๐ฃ® cos(๐๐ก) + ๐ sin(๐๐ก) . By taking the real and imaginary parts (note that ๐ฃ® is real), we find that ๐ฃ® cos(๐๐ก) and ๐ฃ® sin(๐๐ก) are linearly independent solutions. If an eigenvalue is zero, it turns out that both ๐ฃ® and ๐ฃ® ๐ก are solutions, where ๐ฃ® is an eigenvector corresponding to the eigenvalue 0. 154 CHAPTER 3. SYSTEMS OF ODES Exercise 3.6.2: Show that if ๐ด has a zero eigenvalue and ๐ฃ® is a corresponding eigenvector, then ๐ฅ® = ๐ฃ® (๐ + ๐๐ก) is a solution of ๐ฅ®00 = ๐ด ๐ฅ® for arbitrary constants ๐ and ๐. Theorem 3.6.1. Let ๐ด be a real ๐ × ๐ matrix with ๐ distinct real negative (or zero) eigenvalues we denote by −๐12 > −๐22 > · · · > −๐๐2 , and corresponding eigenvectors by ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . If ๐ด is invertible (that is, if ๐1 > 0), then ๐ฅ®(๐ก) = ๐ Õ ๐ฃ® ๐ ๐ ๐ cos(๐ ๐ ๐ก) + ๐ ๐ sin(๐ ๐ ๐ก) , ๐=1 is the general solution of ๐ฅ®00 = ๐ด ๐ฅ®, for some arbitrary constants ๐ ๐ and ๐ ๐ . If ๐ด has a zero eigenvalue, that is ๐1 = 0, and all other eigenvalues are distinct and negative, then the general solution can be written as ๐ฅ®(๐ก) = ๐ฃ®1 (๐1 + ๐ 1 ๐ก) + ๐ Õ ๐ฃ® ๐ ๐ ๐ cos(๐ ๐ ๐ก) + ๐ ๐ sin(๐ ๐ ๐ก) . ๐=2 We use this solution and the setup from the introduction of this section even when some of the masses and springs are missing. For example, when there are only 2 masses and only 2 springs, simply take only the equations for the two masses and set all the spring constants for the springs that are missing to zero. 3.6.2 Examples Example 3.6.1: Consider the setup in Figure 3.13, with ๐1 = 2 kg, ๐2 = 1 kg, ๐ 1 = 4 N/m, and ๐2 = 2 N/m. ๐1 ๐2 ๐1 ๐2 Figure 3.13: System of masses and springs. The equations we write down are or 2 0 00 −(4 + 2) 2 ๐ฅ® = ๐ฅ®, 0 1 2 −2 −3 1 ๐ฅ® = ๐ฅ®. 2 −2 00 155 3.6. SECOND ORDER SYSTEMS AND APPLICATIONS We find the eigenvalues 1 1of ๐ด to be ๐ = −1, −4 (exercise). We find corresponding eigenvectors to be 2 and −1 respectively (exercise). We check the theorem and note that ๐1 = 1 and ๐2 = 2. Hence the general solution is 1 ๐ฅ® = 2 1 ๐ 1 cos(๐ก) + ๐ 1 sin(๐ก) + −1 ๐ 2 cos(2๐ก) + ๐ 2 sin(2๐ก) . The two terms in the solution represent the two so-called natural or normal modes of oscillation. And the two (angular) frequencies are the natural frequencies. The first natural frequency is 1, and second natural frequency is 2. The two modes are plotted in Figure 3.14. 0.0 2.5 5.0 7.5 10.0 0.0 2.5 5.0 7.5 10.0 2 2 1.0 1.0 1 1 0.5 0.5 0 0 0.0 0.0 -1 -1 -0.5 -0.5 -2 -1.0 -2 0.0 2.5 5.0 7.5 10.0 -1.0 0.0 2.5 5.0 7.5 10.0 Figure 3.14: The two modes of the mass-spring system. In the left plot the masses are moving in unison and in the right plot are masses moving in the opposite direction. Let us write the solution as 1 1 ๐ฅ® = ๐1 cos(๐ก − ๐ผ1 ) + ๐ cos(2๐ก − ๐ผ2 ). 2 −1 2 The first term, 1 ๐ cos(๐ก − ๐ผ1 ) ๐ cos(๐ก − ๐ผ1 ) = 1 , 2 1 2๐1 cos(๐ก − ๐ผ1 ) corresponds to the mode where the masses move synchronously in the same direction. The second term, 1 ๐ 2 cos(2๐ก − ๐ผ2 ) ๐ 2 cos(2๐ก − ๐ผ2 ) = , −1 −๐ 2 cos(2๐ก − ๐ผ2 ) corresponds to the mode where the masses move synchronously but in opposite directions. The general solution is a combination of the two modes. That is, the initial conditions determine the amplitude and phase shift of each mode. As an example, suppose we have initial conditions 1 0 0 ๐ฅ®(0) = , ๐ฅ® (0) = . −1 6 156 CHAPTER 3. SYSTEMS OF ODES We use the ๐ ๐ , ๐ ๐ constants to solve for initial conditions. First 1 1 1 ๐1 + ๐2 = ๐ฅ®(0) = ๐1 + ๐2 = . −1 2 −1 2๐ 1 − ๐ 2 We solve (exercise) to find ๐ 1 = 0, ๐ 2 = 1. To find the ๐ 1 and ๐ 2 , we differentiate first: 1 ๐ฅ® = 2 0 Now we solve: 1 −๐1 sin(๐ก) + ๐ 1 cos(๐ก) + −1 −2๐ 2 sin(2๐ก) + 2๐ 2 cos(2๐ก) . 0 1 1 ๐1 + 2๐2 = ๐ฅ®0(0) = ๐1 + 2๐ 2 = . 6 2 −1 2๐ 1 − 2๐ 2 Again solve (exercise) to find ๐ 1 = 2, ๐ 2 = −1. So our solution is 1 1 ๐ฅ® = 2 sin(๐ก) + 2 −1 2 sin(๐ก) + cos(2๐ก) − sin(2๐ก) cos(2๐ก) − sin(2๐ก) = . 4 sin(๐ก) − cos(2๐ก) + sin(2๐ก) The graphs of the two displacements, ๐ฅ 1 and ๐ฅ2 of the two carts is in Figure 3.15. 0.0 2.5 5.0 7.5 10.0 5.0 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 0.0 2.5 5.0 7.5 10.0 Figure 3.15: Superposition of the two modes given the initial conditions. Example 3.6.2: We have two toy rail cars. Car 1 of mass 2 kg is traveling at 3 m/s towards the second rail car of mass 1 kg. There is a bumper on the second rail car that engages at the moment the cars hit (it connects to two cars) and does not let go. The bumper acts like a spring of spring constant ๐ = 2 N/m. The second car is 10 meters from a wall. See Figure 3.16 on the facing page. We want to ask several questions. At what time after the cars link does impact with the wall happen? What is the speed of car 2 when it hits the wall? OK, let us first set the system up. Let ๐ก = 0 be the time when the two cars link up. Let ๐ฅ 1 be the displacement of the first car from the position at ๐ก = 0, and let ๐ฅ2 be the displacement 3.6. SECOND ORDER SYSTEMS AND APPLICATIONS ๐ ๐1 157 ๐2 10 meters Figure 3.16: The crash of two rail cars. of the second car from its original location. Then the time when ๐ฅ2 (๐ก) = 10 is exactly the time when impact with wall occurs. For this ๐ก, ๐ฅ20 (๐ก) is the speed at impact. This system acts just like the system of the previous example but without ๐1 . Hence the equation is 2 0 00 −2 2 ๐ฅ® = ๐ฅ®, 0 1 2 −2 or −1 1 ๐ฅ®. ๐ฅ® = 2 −2 00 We compute the eigenvalues of ๐ด. It is not hard to see that the eigenvalues are 0 and 1 1 −3 (exercise). Furthermore, eigenvectors are 1 and −2 respectively (exercise). Then √ ๐1 = 0, ๐2 = 3, and by the second part of the theorem the general solution is √ √ 1 1 ๐ฅ® = ๐ 2 cos( 3 ๐ก) + ๐ 2 sin( 3 ๐ก) (๐ 1 + ๐ 1 ๐ก) + 1 −2 √ √ 3 ๐ก) ๐ 1 + ๐1 ๐ก + ๐2 cos(√3 ๐ก) + ๐ 2 sin( √ = . ๐1 + ๐ 1 ๐ก − 2๐2 cos( 3 ๐ก) − 2๐ 2 sin( 3 ๐ก) We now apply the initial conditions. First the cars start at position 0 so ๐ฅ1 (0) = 0 and ๐ฅ2 (0) = 0. The first car is traveling at 3 m/s, so ๐ฅ10 (0) = 3 and the second car starts at rest, so ๐ฅ20 (0) = 0. The first conditions says ๐1 + ๐2 0® = ๐ฅ®(0) = . ๐ 1 − 2๐2 It is not hard to see that ๐1 = ๐ 2 = 0. We set ๐1 = 0 and ๐ 2 = 0 in ๐ฅ®(๐ก) and differentiate to get √ √ ๐ 1 + √3 ๐2 cos( √3 ๐ก) ๐ฅ® (๐ก) = . ๐ 1 − 2 3 ๐ 2 cos( 3 ๐ก) 0 So √ 3 ๐ 1 + √3 ๐2 0 = ๐ฅ® (0) = . 0 ๐1 − 2 3 ๐2 158 CHAPTER 3. SYSTEMS OF ODES Solving these two equations we find ๐ 1 = 2 and ๐ 2 = (until the impact with the wall) " ๐ฅ® = 2๐ก + 2๐ก − √1 3 √2 3 √1 . 3 Hence the position of our cars is √ # sin( 3 ๐ก) √ . sin( 3 ๐ก) Note how the presence of the zero eigenvalue resulted in a term containing ๐ก. This means that the cars will be traveling in the positive direction as time grows, which is what we expect. What we are really √ interested in is the second expression, the one for ๐ฅ2 . We have 2 √ ๐ฅ2 (๐ก) = 2๐ก − sin( 3 ๐ก). See Figure 3.17 for the plot of ๐ฅ2 versus time. 3 Just from the graph we can see that time of impact will be a little more than √ 5 seconds 2 from time zero. For this we have to solve the equation 10 = ๐ฅ2 (๐ก) = 2๐ก − √ sin( 3 ๐ก). Using 3 a computer (or even a graphing calculator) we find that ๐กimpact ≈ 5.22 seconds. The speed of the second car is ๐ฅ 20 = √ 2 − 2 cos( 3 ๐ก). At the time of impact (5.22 seconds from ๐ก = 0) we get ๐ฅ20 (๐กimpact ) ≈ 3.85. The maximum speed is the maximum of √ 2 − 2 cos( 3 ๐ก), which is 4. We are traveling at almost the maximum speed when we hit the wall. 0 1 2 3 4 5 6 12.5 12.5 10.0 10.0 7.5 7.5 5.0 5.0 Suppose that Bob is a tiny person sitting on car 2. Bob has a Martini in his hand and would like not to spill it. Let us suppose Bob would not spill his Martini when the first car links up with car 2, but if car 2 hits Figure 3.17: Position of the second car in time the wall at any speed greater than zero, Bob (ignoring the wall). will spill his drink. Suppose Bob can move car 2 a few meters towards or away from the wall (he cannot go all the way to the wall, nor can he get out of the way of the first car). Is there a “safe” distance for him to be at? A distance such that the impact with the wall is at zero speed? The answer is yes. On Figure 3.17, note the “plateau” between ๐ก = 3 and ๐ก = 4.√There is a point where the speed is zero. To find it we solve ๐ฅ 20 (๐ก) = 0. This is when cos( 3 ๐ก) = 1 2๐ √ or in other words when ๐ก = √ , 4๐ , . . . and so on. We plug in the first value to obtain 2.5 2.5 0.0 0.0 0 ๐ฅ2 2๐ √ 3 3 = 4๐ √ 3 1 2 3 4 5 6 3 ≈ 7.26. So a “safe” distance is about 7 and a quarter meters from the wall. Alternatively Bob could move away from the wall towards the incoming car 2, where another safe distance is ๐ฅ2 ๐ฅ20 (๐ก) 4๐ √ 3 = 8๐ √ 3 ≈ 14.51 and so on. We can use all the different ๐ก such that = 0. Of course ๐ก = 0 is also a solution, corresponding to ๐ฅ2 = 0, but that means standing right at the wall. 159 3.6. SECOND ORDER SYSTEMS AND APPLICATIONS 3.6.3 Forced oscillations Finally we move to forced oscillations. Suppose that now our system is ๐ฅ®00 = ๐ด ๐ฅ® + ๐น® cos(๐๐ก). (3.4) ® That is, we are adding periodic forcing to the system in the direction of the vector ๐น. As before, this system just requires us to find one particular solution ๐ฅ®๐ , add it to the general solution of the associated homogeneous system ๐ฅ®๐ , and we will have the general solution to (3.4). Let us suppose that ๐ is not one of the natural frequencies of ๐ฅ®00 = ๐ด ๐ฅ®, then we can guess ๐ฅ®๐ = ๐® cos(๐๐ก), where ๐® is an unknown constant vector. Note that we do not need to use sine since there are only second derivatives. We solve for ๐® to find ๐ฅ®๐ . This is really just the method of undetermined coefficients for systems. Let us differentiate ๐ฅ®๐ twice to get ๐ฅ®00๐ = −๐ 2 ๐® cos(๐๐ก). Plug ๐ฅ®๐ and ๐ฅ®00๐ into equation (3.4): ๐ฅ®00๐ z ๐ด ๐ฅ®๐ }| { z }| { −๐ 2 ๐® cos(๐๐ก) = ๐ด®๐ cos(๐๐ก) +๐น® cos(๐๐ก). We cancel out the cosine and rearrange the equation to obtain ® (๐ด + ๐ 2 ๐ผ)®๐ = −๐น. So −1 ® ๐® = (๐ด + ๐ 2 ๐ผ) (−๐น). Of course this is possible only if (๐ด + ๐ 2 ๐ผ) = ๐ด − (−๐2 )๐ผ is invertible. That matrix is invertible if and only if −๐2 is not an eigenvalue of ๐ด. That is true if and only if ๐ is not a natural frequency of the system. We simplified things a little bit. If we wish to have the forcing term to be in the units of force, say Newtons, then we must write ® cos(๐๐ก). ๐ ๐ฅ®00 = ๐พ ๐ฅ® + ๐บ If we then write things in terms of ๐ด = ๐ −1 ๐พ, we have ® cos(๐๐ก) ๐ฅ®00 = ๐ −1 ๐พ ๐ฅ® + ๐ −1 ๐บ or ๐ฅ®00 = ๐ด ๐ฅ® + ๐น® cos(๐๐ก), ® where ๐น® = ๐ −1 ๐บ. Example 3.6.3: Let us take the example in Figure 3.13 on page 154 with the same parameters as before: ๐1 = 2, ๐2 = 1, ๐ 1 = 4, and ๐ 2 = 2. Now suppose that there is a force 2 cos(3๐ก) acting on the second cart. 160 CHAPTER 3. SYSTEMS OF ODES The equation is 2 0 00 −4 2 0 ๐ฅ® = ๐ฅ® + cos(3๐ก) 0 1 2 −2 2 0 −3 1 ๐ฅ® + cos(3๐ก). ๐ฅ® = 2 2 −2 00 or We solved the associated homogeneous equation before and found the complementary solution to be 1 ๐ฅ®๐ = 2 1 ๐1 cos(๐ก) + ๐ 1 sin(๐ก) + −1 ๐2 cos(2๐ก) + ๐ 2 sin(2๐ก) . The natural frequencies are 1 and 2. As 3 is not a natural frequency, we try ๐® cos(3๐ก). We invert (๐ด + 32 ๐ผ): −3 1 2 −2 +3 ๐ผ 2 −1 = −1 ® = ๐® = (๐ด + ๐ ๐ผ) (−๐น) −1 2 7 Hence, 2 6 1 7 40 −1 20 −1 40 3 20 = 7 40 −1 20 −1 40 3 20 0 −2 = . 1 20 −3 10 . Combining with the general solution of the associated homogeneous problem, we get that the general solution to ๐ฅ®00 = ๐ด ๐ฅ® + ๐น® cos(๐๐ก) is ๐ฅ® = ๐ฅ®๐ + ๐ฅ®๐ = 1 2 ๐1 cos(๐ก) + ๐ 1 sin(๐ก) + 1 −1 ๐2 cos(2๐ก) + ๐ 2 sin(2๐ก) + 1 20 −3 10 cos(3๐ก). We then solve for the constants ๐1 , ๐2 , ๐ 1 , and ๐ 2 using any initial conditions we are given. Note that given force ๐®, we write the equation as ๐ ๐ฅ®00 = ๐พ ๐ฅ® + ๐® to get the units right. Then we write ๐ฅ®00 = ๐ −1 ๐พ ๐ฅ® + ๐ −1 ๐®. The term ๐® = ๐ −1 ๐® in ๐ฅ®00 = ๐ด ๐ฅ® + ๐® is in units of force per unit mass. If ๐ is a natural frequency of the system, resonance may occur, because we will have to try a particular solution of the form ๐ฅ®๐ = ๐® ๐ก sin(๐๐ก) + ๐® cos(๐๐ก). That is assuming that the eigenvalues of the coefficient matrix are distinct. Next, note that the amplitude of this solution grows without bound as ๐ก grows. 3.6.4 Exercises Exercise 3.6.3: Find a particular solution to −3 1 0 ๐ฅ® = ๐ฅ® + cos(2๐ก). 2 −2 2 00 161 3.6. SECOND ORDER SYSTEMS AND APPLICATIONS Exercise 3.6.4 (challenging): Let us take the example in Figure 3.13 on page 154 with the same parameters as before: ๐1 = 2, ๐ 1 = 4, and ๐ 2 = 2, except for ๐2 , which is unknown. Suppose that there is a force cos(5๐ก) acting on the first mass. Find an ๐2 such that there exists a particular solution where the first mass does not move. Note: This idea is called dynamic damping. In practice there will be a small amount of damping and so any transient solution will disappear and after long enough time, the first mass will always come to a stop. Exercise 3.6.5: Let us take the Example 3.6.2 on page 156, but that at time of impact, car 2 is moving to the left at the speed of 3 m/s. a) Find the behavior of the system after linkup. b) Will the second car hit the wall, or will it be moving away from the wall as time goes on? c) At what speed would the first car have to be traveling for the system to essentially stay in place after linkup? Exercise 3.6.6: Let us take the example in Figure 3.13 on page 154 with parameters ๐1 = ๐2 = 1, ๐1 = ๐ 2 = 1. Does there exist a set of initial conditions for which the first cart moves but the second cart does not? If so, find those conditions. If not, argue why not. Exercise 3.6.101: Find the general solution to h1 0 0i 020 003 ๐ฅ® 00 = h −3 0 0 2 −4 0 0 6 −3 i ๐ฅ® + h cos(2๐ก) i 0 0 . Exercise 3.6.102: Suppose there are three carts of equal mass ๐ and connected by two springs of constant ๐ (and no connections to walls). Set up the system and find its general solution. Exercise 3.6.103: Suppose a cart of mass 2 kg is attached by a spring of constant ๐ = 1 to a cart of mass 3 kg, which is attached to the wall by a spring also of constant ๐ = 1. Suppose that the initial position of the first cart is 1 meter in the positive direction from the rest position, and the second mass starts at the rest position. The masses are not moving and are let go. Find the position of the second mass as a function of time. 162 3.7 CHAPTER 3. SYSTEMS OF ODES Multiple eigenvalues Note: 1 or 1.5 lectures, §5.5 in [EP], §7.8 in [BD] It may happen that a matrix ๐ด has some “repeated” eigenvalues. That is, the characteristic equation det(๐ด − ๐๐ผ) = 0 may have repeated roots. This is actually unlikely to happen for a random matrix. If we take a small perturbation of ๐ด (we change the entries of ๐ด slightly), we get a matrix with distinct eigenvalues. As any system we want to solve in practice is an approximation to reality anyway, it is not absolutely indispensable to know how to solve these corner cases. On the other hand, these cases do come up in applications from time to time. Furthermore, if we have distinct but very close eigenvalues, the behavior is similar to that of repeated eigenvalues, and so understanding that case will give us insight into what is going on. 3.7.1 Geometric multiplicity Take the diagonal matrix 3 0 ๐ด= . 0 3 ๐ด has an eigenvalue 3 of multiplicity 2. We call the multiplicity of the eigenvalue in the characteristic equation the algebraic In this case, there also exist 2 linearly multiplicity. 1 0 independent eigenvectors, 0 and 1 corresponding to the eigenvalue 3. This means that the so-called geometric multiplicity of this eigenvalue is also 2. In all the theorems where we required a matrix to have ๐ distinct eigenvalues, we only really needed to have ๐ linearly independent eigenvectors. For example, ๐ฅ®0 = ๐ด ๐ฅ® has the general solution 0 3๐ก 1 3๐ก ๐ฅ® = ๐1 ๐ + ๐2 ๐ . 0 1 Let us restate the theorem about real eigenvalues. In the following theorem we will repeat eigenvalues according to (algebraic) multiplicity. So for the matrix ๐ด above, we would say that it has eigenvalues 3 and 3. Theorem 3.7.1. Suppose the ๐ × ๐ matrix ๐ has ๐ real eigenvalues (not necessarily distinct), ๐1 , ๐2 , . . . , ๐๐ , and there are ๐ linearly independent corresponding eigenvectors ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . Then the general solution to ๐ฅ®0 = ๐ ๐ฅ® can be written as ๐ฅ® = ๐ 1 ๐ฃ®1 ๐ ๐1 ๐ก + ๐2 ๐ฃ®2 ๐ ๐2 ๐ก + · · · + ๐ ๐ ๐ฃ® ๐ ๐ ๐๐ ๐ก . The geometric multiplicity of an eigenvalue of algebraic multiplicity ๐ is equal to the number of corresponding linearly independent eigenvectors. The geometric multiplicity is always less than or equal to the algebraic multiplicity. The theorem handles the case when these two multiplicities are equal for all eigenvalues. If for an eigenvalue the geometric multiplicity is equal to the algebraic multiplicity, then we say the eigenvalue is complete. 163 3.7. MULTIPLE EIGENVALUES In other words, the hypothesis of the theorem could be stated as saying that if all the eigenvalues of ๐ are complete, then there are ๐ linearly independent eigenvectors and thus we have the given general solution. If the geometric multiplicity of an eigenvalue is 2 or greater, then the set of linearly independent eigenvectors is not unique up to multiples as it was 1 before. 1For example, for 3 0 the diagonal matrix ๐ด = 0 3 we could also pick eigenvectors 1 and −1 , or in fact any pair of two linearly independent vectors. The number of linearly independent eigenvectors corresponding to ๐ is the number of free variables we obtain when solving ๐ด® ๐ฃ = ๐® ๐ฃ . We pick specific values for those free variables to obtain eigenvectors. If you pick different values, you may get different eigenvectors. 3.7.2 Defective eigenvalues If an ๐ × ๐ matrix has less than ๐ linearly independent eigenvectors, it is said to be deficient. Then there is at least one eigenvalue with an algebraic multiplicity that is higher than its geometric multiplicity. We call this eigenvalue defective and the difference between the two multiplicities we call the defect. Example 3.7.1: The matrix 3 1 0 3 has an eigenvalue 3 of algebraic multiplicity 2. Let us try to compute eigenvectors. 0 1 0 0 ๐ฃ1 ® = 0. ๐ฃ2 We must have that ๐ฃ2 = 0. Hence any eigenvector is of the form ๐ฃ01 . Any two such vectors are linearly dependent, and hence the geometric multiplicity of the eigenvalue is 1. Therefore, the defect is 1, and we can no longer apply the eigenvalue method directly to a system of ODEs with such a coefficient matrix. Roughly, the key observation is that if ๐ is an eigenvalue of ๐ด of algebraic multiplicity ๐, then we can find certain ๐ linearly independent vectors solving (๐ด − ๐๐ผ) ๐ ๐ฃ® = 0® for various powers ๐. We will call these generalized eigenvectors. Let us continue with the example ๐ด = 30 13 and the equation ๐ฅ®0 = ๐ด ๐ฅ®. We found an eigenvalue ๐ = 3 of (algebraic) multiplicity 2 and defect 1. We found one eigenvector 1 ๐ฃ® = 0 . We have one solution ๐ฅ®1 = ๐ฃ® ๐ 3๐ก = 1 3๐ก ๐ . 0 We are now stuck, we get no other solutions from standard eigenvectors. But we need two linearly independent solutions to find the general solution of the equation. 164 CHAPTER 3. SYSTEMS OF ODES Let us try (in the spirit of repeated roots of the characteristic equation for a single equation) another solution of the form ๐ฅ®2 = (® ๐ฃ2 + ๐ฃ®1 ๐ก) ๐ 3๐ก . We differentiate to get ๐ฅ®20 = ๐ฃ®1 ๐ 3๐ก + 3(® ๐ฃ 2 + ๐ฃ®1 ๐ก) ๐ 3๐ก = (3® ๐ฃ2 + ๐ฃ®1 ) ๐ 3๐ก + 3® ๐ฃ1 ๐ก๐ 3๐ก . As we are assuming that ๐ฅ®2 is a solution, ๐ฅ®20 must equal ๐ด ๐ฅ®2 . So let’s compute ๐ด ๐ฅ®2 : ๐ด ๐ฅ®2 = ๐ด(® ๐ฃ 2 + ๐ฃ®1 ๐ก) ๐ 3๐ก = ๐ด® ๐ฃ 2 ๐ 3๐ก + ๐ด® ๐ฃ 1 ๐ก๐ 3๐ก . By looking at the coefficients of ๐ 3๐ก and ๐ก๐ 3๐ก we see 3® ๐ฃ2 + ๐ฃ®1 = ๐ด® ๐ฃ2 and 3® ๐ฃ1 = ๐ด® ๐ฃ 1 . This means that ® (๐ด − 3๐ผ)® ๐ฃ 2 = ๐ฃ®1 , and (๐ด − 3๐ผ)® ๐ฃ 1 = 0. Therefore, ๐ฅ®2 is a solution if these two equations are satisfied. The second equation is 1 satisfied if ๐ฃ®1 is an eigenvector, and we found the eigenvector above, so let ๐ฃ®1 = 0 . So, if we can find a ๐ฃ®2 that solves (๐ด − 3๐ผ)® ๐ฃ2 = ๐ฃ®1 , then we are done. This is just a bunch of linear equations to solve and we are by now very good at that. Let us solve (๐ด − 3๐ผ)® ๐ฃ 2 = ๐ฃ®1 . Write 0 1 0 0 ๐ 1 = . ๐ 0 By inspection we see that letting ๐ = 0 (๐ could be anything in fact) and ๐ = 1 does the job. 0 Hence we can take ๐ฃ®2 = 1 . Our general solution to ๐ฅ®0 = ๐ด ๐ฅ® is ๐ฅ® = ๐ 1 1 3๐ก ๐ + ๐2 0 0 1 ๐ ๐ 3๐ก + ๐ 2 ๐ก๐ 3๐ก + ๐ก ๐ 3๐ก = 1 . 1 0 ๐2 ๐ 3๐ก Let us check that we really do have the solution. First ๐ฅ10 = ๐ 1 3๐ 3๐ก + ๐ 2 ๐ 3๐ก + 3๐ 2 ๐ก๐ 3๐ก = 3๐ฅ 1 + ๐ฅ2 . Good. Now ๐ฅ20 = 3๐2 ๐ 3๐ก = 3๐ฅ 2 . Good. In the example, if we plug (๐ด − 3๐ผ)® ๐ฃ 2 = ๐ฃ®1 into (๐ด − 3๐ผ)® ๐ฃ1 = 0® we find ® (๐ด − 3๐ผ)(๐ด − 3๐ผ)® ๐ฃ 2 = 0, or ® (๐ด − 3๐ผ)2 ๐ฃ®2 = 0. ® then (๐ด − 3๐ผ)๐ค ® ≠ 0, ® is an eigenvector, a multiple of ๐ฃ®1 . In this Furthermore, if (๐ด − 3๐ผ)๐ค 2 ® solves (๐ด − 3๐ผ)2 ๐ค ® = 0® 2 × 2 case (๐ด − 3๐ผ) is just the zero matrix (exercise). So any vector ๐ค ® Then we could use ๐ค ® such that (๐ด − 3๐ผ)๐ค ® ≠ 0. ® for ๐ฃ®2 , and (๐ด − 3๐ผ)๐ค ® and we just need a ๐ค for ๐ฃ®1 . Note that the system ๐ฅ®0 = ๐ด ๐ฅ® has a simpler solution since ๐ด is a so-called upper triangular matrix, that is every entry below the diagonal is zero. In particular, the equation for ๐ฅ2 does not depend on ๐ฅ1 . Mind you, not every defective matrix is triangular. 165 3.7. MULTIPLE EIGENVALUES Exercise 3.7.1: Solve ๐ฅ®0 = 30 13 ๐ฅ® by first solving for ๐ฅ2 and then for ๐ฅ 1 independently. Check that you got the same solution as we did above. Let us describe the general algorithm. Suppose that ๐ is an eigenvalue of multiplicity 2, ® Then, find a defect 1. First find an eigenvector ๐ฃ®1 of ๐. That is, ๐ฃ®1 solves (๐ด − ๐๐ผ)® ๐ฃ1 = 0. vector ๐ฃ®2 such that (๐ด − ๐๐ผ)® ๐ฃ2 = ๐ฃ®1 . This gives us two linearly independent solutions ๐ฅ®1 = ๐ฃ®1 ๐ ๐๐ก , ๐ฅ®2 = ๐ฃ®2 + ๐ฃ®1 ๐ก ๐ ๐๐ก . Example 3.7.2: Consider the system ๏ฃฎ 2 −5 0๏ฃน ๏ฃฏ ๏ฃบ 2 0๏ฃบ๏ฃบ ๐ฅ®. ๐ฅ® = ๏ฃฏ๏ฃฏ 0 ๏ฃฏ−1 4 1๏ฃบ ๏ฃฐ ๏ฃป 0 Compute the eigenvalues, ๏ฃฎ2 − ๐ −5 0 ๏ฃน๏ฃบ © ๏ฃฏ๏ฃฏ ª 2−๐ 0 ๏ฃบ๏ฃบ ® = (2 − ๐)2 (1 − ๐). 0 = det(๐ด − ๐๐ผ) = det ­ ๏ฃฏ 0 ๏ฃฏ 4 1 − ๐๏ฃบ๏ฃป ¬ « ๏ฃฐ −1 The eigenvalues are 1 and 2, where 2 has multiplicity 2. We leave it to the reader to find h i that 0 0 1 is an eigenvector for the eigenvalue ๐ = 1. Let’s focus on ๐ = 2. We compute eigenvectors: ๏ฃฎ 0 −5 0 ๏ฃน ๏ฃฎ๐ฃ1 ๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ®0 = (๐ด − 2๐ผ)® 0 0 ๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ๐ฃ 2 ๏ฃบ๏ฃบ . ๐ฃ = ๏ฃฏ๏ฃฏ 0 ๏ฃฏ−1 4 −1๏ฃบ ๏ฃฏ๐ฃ3 ๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป The first equation says that ๐ฃ 2 = 0, so the last equation is −๐ฃ1 − ๐ฃ3 = 0. Let h 1 ๐ฃi3 be the free variable to find that ๐ฃ1 = −๐ฃ 3 . Perhaps let ๐ฃ3 = −1 to find an eigenvector 0 . Problem is −1 that setting ๐ฃ3 to anything else just gets multiples of this vector and so we have a defect of 1. Let ๐ฃ®1 be the eigenvector and let’s look for a generalized eigenvector ๐ฃ®2 : (๐ด − 2๐ผ)® ๐ฃ2 = ๐ฃ®1 , or ๏ฃฎ 0 −5 0 ๏ฃน ๏ฃฎ ๐ ๏ฃน ๏ฃฎ 1 ๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ 0 0 0 ๏ฃบ ๏ฃฏ๐ ๏ฃบ = ๏ฃฏ 0 ๏ฃบ , ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−1 4 −1๏ฃบ ๏ฃฏ ๐ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป where we used ๐, ๐, ๐ as components of ๐ฃ®2 for simplicity. The first equation says −5๐ = 1 so ๐ = −1/5. The second equation says nothing. The last equation is −๐ + 4๐ − ๐ = −1, or 166 CHAPTER 3. SYSTEMS OF ODES ๐ + 4/5 + ๐ = 1, or ๐ + ๐ = 1/5. We let ๐ be the free variable and we choose ๐ = 0. We find ๐ฃ®2 = 1/5 −1/5 . 0 The general solution is therefore, ๏ฃฎ1๏ฃน ๏ฃฎ 1/5 ๏ฃน ๏ฃฎ 1 ๏ฃน ๏ฃฎ0 ๏ฃน ๏ฃฏ ๏ฃบ ๐ก ๏ฃฏ ๏ฃบ 2๐ก ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ª © ๐ฅ® = ๐1 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ ๐ + ๐2 ๏ฃฏ๏ฃฏ 0 ๏ฃบ๏ฃบ ๐ + ๐3 ­ ๏ฃฏ๏ฃฏ−1/5๏ฃบ๏ฃบ + ๏ฃฏ๏ฃฏ 0 ๏ฃบ๏ฃบ ๐ก ® ๐ 2๐ก . ๏ฃฏ1 ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ « ๏ฃฐ 0 ๏ฃป ๏ฃฐ−1๏ฃป ¬ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป This machinery can also be generalized to higher multiplicities and higher defects. We will not go over this method in detail, but let us just sketch the ideas. Suppose that ๐ด has an eigenvalue ๐ of multiplicity ๐. We find vectors such that ® (๐ด − ๐๐ผ) ๐ ๐ฃ® = 0, but ® (๐ด − ๐๐ผ) ๐−1 ๐ฃ® ≠ 0. Such vectors are called generalized eigenvectors (then ๐ฃ®1 = (๐ด − ๐๐ผ) ๐−1 ๐ฃ® is an eigenvector). For the eigenvector ๐ฃ®1 there is a chain of generalized eigenvectors ๐ฃ®2 through ๐ฃ® ๐ such that: ® (๐ด − ๐๐ผ)® ๐ฃ 1 = 0, (๐ด − ๐๐ผ)® ๐ฃ 2 = ๐ฃ®1 , .. . (๐ด − ๐๐ผ)® ๐ฃ ๐ = ๐ฃ® ๐−1 . ® you find the Really once you find the ๐ฃ® ๐ such that (๐ด − ๐๐ผ) ๐ ๐ฃ® ๐ = 0® but (๐ด − ๐๐ผ) ๐−1 ๐ฃ® ๐ ≠ 0, entire chain since you can compute the rest, ๐ฃ® ๐−1 = (๐ด − ๐๐ผ)® ๐ฃ ๐ , ๐ฃ® ๐−2 = (๐ด − ๐๐ผ)® ๐ฃ ๐−1 , etc. We form the linearly independent solutions ๐ฅ®1 = ๐ฃ®1 ๐ ๐๐ก , ๐ฅ®2 = (® ๐ฃ 2 + ๐ฃ®1 ๐ก) ๐ ๐๐ก , .. . ๐ก2 ๐ก ๐−2 ๐ก ๐−1 ๐ฅ®๐ = ๐ฃ® ๐ + ๐ฃ® ๐−1 ๐ก + ๐ฃ® ๐−2 + · · · + ๐ฃ®2 + ๐ฃ®1 ๐ ๐๐ก . 2 (๐ − 2)! (๐ − 1)! Recall that ๐! = 1 · 2 · 3 · · · (๐ − 1) · ๐ is the factorial. If you have an eigenvalue of geometric multiplicity โ , you will have to find โ such chains (some of them might be short: just the single eigenvector equation). We go until we form ๐ linearly independent solutions where ๐ is the algebraic multiplicity. We don’t quite know which specific eigenvectors go with which chain, so start by finding ๐ฃ® ๐ first for the longest possible chain and go from there. For example, if ๐ is an eigenvalue of ๐ด of algebraic multiplicity 3 and defect 2, then solve ® (๐ด − ๐๐ผ)® ๐ฃ 1 = 0, (๐ด − ๐๐ผ)® ๐ฃ2 = ๐ฃ®1 , (๐ด − ๐๐ผ)® ๐ฃ3 = ๐ฃ®2 . 167 3.7. MULTIPLE EIGENVALUES ® but (๐ด − ๐๐ผ)2 ๐ฃ®3 ≠ 0. ® Then you are done as That is, find ๐ฃ®3 such that (๐ด − ๐๐ผ)3 ๐ฃ®3 = 0, ๐ฃ®2 = (๐ด − ๐๐ผ)® ๐ฃ3 and ๐ฃ®1 = (๐ด − ๐๐ผ)® ๐ฃ 2 . The 3 linearly independent solutions are ๐๐ก ๐๐ก ๐ฅ®1 = ๐ฃ®1 ๐ , ๐ฅ®2 = (® ๐ฃ2 + ๐ฃ®1 ๐ก) ๐ , ๐ก 2 ๐๐ก ๐ฅ®3 = ๐ฃ®3 + ๐ฃ®2 ๐ก + ๐ฃ®1 ๐ . 2 If on the other hand ๐ด has an eigenvalue ๐ of algebraic multiplicity 3 and defect 1, then solve ® ® (๐ด − ๐๐ผ)® ๐ฃ 1 = 0, (๐ด − ๐๐ผ)® ๐ฃ2 = 0, (๐ด − ๐๐ผ)® ๐ฃ3 = ๐ฃ®2 . Here ๐ฃ®1 and ๐ฃ®2 are actual honest eigenvectors, and ๐ฃ®3 is a generalized eigenvector. So ® but (๐ด − ๐๐ผ)® ® there are two chains. To solve, first find a ๐ฃ®3 such that (๐ด − ๐๐ผ)2 ๐ฃ®3 = 0, ๐ฃ3 ≠ 0. Then ๐ฃ®2 = (๐ด − ๐๐ผ)® ๐ฃ 3 is going to be an eigenvector. Then solve for an eigenvector ๐ฃ®1 that is linearly independent from ๐ฃ®2 . You get 3 linearly independent solutions ๐ฅ®1 = ๐ฃ®1 ๐ ๐๐ก , 3.7.3 ๐ฅ®2 = ๐ฃ®2 ๐ ๐๐ก , ๐ฅ®3 = (® ๐ฃ3 + ๐ฃ®2 ๐ก) ๐ ๐๐ก . Exercises Exercise 3.7.2: Let ๐ด = 5 −3 Exercise 3.7.3: Let ๐ด = h 3 −1 . Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. 5 −4 4 0 3 0 −2 4 −1 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. Exercise 3.7.4: Let ๐ด = h2 1 0i 020 002 . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ® in two different ways and verify you get the same answer. Exercise 3.7.5: Let ๐ด = h 0 1 2 −1 −2 −2 −4 4 7 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. 168 Exercise 3.7.6: Let ๐ด = CHAPTER 3. SYSTEMS OF ODES h 0 4 −2 −1 −4 1 0 0 −2 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. Exercise 3.7.7: Let ๐ด = h 2 1 −1 −1 0 2 −1 −2 4 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ®0 = ๐ด ๐ฅ®. Exercise 3.7.8: Suppose that ๐ด is a 2 × 2 matrix with a repeated eigenvalue ๐. Suppose that there are two linearly independent eigenvectors. Show that ๐ด = ๐๐ผ. Exercise 3.7.101: Let ๐ด = h1 1 1i 111 111 . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ® 0 = ๐ด ๐ฅ®. Exercise 3.7.102: Let ๐ด = h 1 33 1 10 −1 1 2 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ® 0 = ๐ด ๐ฅ®. Exercise 3.7.103: Let ๐ด = h 2 0 0 −1 −1 9 0 −1 5 i . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of ๐ฅ® 0 = ๐ด ๐ฅ®. Exercise 3.7.104: Let ๐ด = [ ๐๐ ๐๐ ], where ๐, ๐, and ๐ are unknowns. Suppose that 5 is a doubled eigenvalue of defect 1, and suppose that 10 is a corresponding eigenvector. Find ๐ด and show that there is only one such matrix ๐ด. 169 3.8. MATRIX EXPONENTIALS 3.8 Matrix exponentials Note: 2 lectures, §5.6 in [EP], §7.7 in [BD] 3.8.1 Definition There is another way of finding a fundamental matrix solution of a system. Consider the constant coefficient equation ๐ฅ®0 = ๐ ๐ฅ®. If this would be just one equation (when ๐ is a number or a 1 × 1 matrix), then the solution would be ๐ฅ® = ๐ ๐๐ก . That doesn’t make sense if ๐ is a larger matrix, but essentially the same computation that led to the above works for matrices when we define ๐ ๐๐ก properly. First let us write down the Taylor series for ๐ ๐๐ก for some number ๐: Õ (๐๐ก) ๐ (๐๐ก)2 (๐๐ก)3 (๐๐ก)4 = 1 + ๐๐ก + + + +··· = . 2 6 24 ๐! ∞ ๐ ๐๐ก ๐=0 Recall ๐! = 1 · 2 · 3 · · · ๐ is the factorial, and 0! = 1. We differentiate this series term by term (๐๐ก)2 (๐๐ก)3 ๐ ๐๐ก ๐3๐ก2 ๐4๐ก3 2 + + · · · = ๐ 1 + ๐๐ก + + + · · · = ๐๐ ๐๐ก . ๐ =0+๐+๐ ๐ก+ ๐๐ก 2 6 2 6 Maybe we can try the same trick with matrices. For an ๐ × ๐ matrix ๐ด we define the matrix exponential as 1 1 1 def ๐ ๐ด = ๐ผ + ๐ด + ๐ด2 + ๐ด3 + · · · + ๐ด ๐ + · · · 2 6 ๐! Let us not worry about convergence. The series really does always converge. We usually write ๐๐ก as ๐ก๐ by convention when ๐ is a matrix. With this small change and by the exact same calculation as above we have that ๐ ๐ก๐ ๐ = ๐๐ ๐ก๐ . ๐๐ก Now ๐ and hence ๐ ๐ก๐ is an ๐ × ๐ matrix. What we are looking for is a vector. In the 1 × 1 case we would at this point multiply by an arbitrary constant to get the general solution. In the matrix case we multiply by a column vector ๐®. Theorem 3.8.1. Let ๐ be an ๐ × ๐ matrix. Then the general solution to ๐ฅ®0 = ๐ ๐ฅ® is ๐ฅ® = ๐ ๐ก๐ ๐®, where ๐® is an arbitrary constant vector. In fact, ๐ฅ®(0) = ๐®. 170 CHAPTER 3. SYSTEMS OF ODES Let us check: ๐ ๐ก๐ ๐ ® ๐ฅ= ๐ ๐® = ๐๐ ๐ก๐ ๐® = ๐ ๐ฅ®. ๐๐ก ๐๐ก ๐ก๐ Hence ๐ is a fundamental matrix solution of the homogeneous system. So if we can compute the matrix exponential, we have another method of solving constant coefficient homogeneous systems. It also makes it easy to solve for initial conditions. To solve ๐ฅ®0 = ๐ด ๐ฅ®, ® we take the solution ๐ฅ®(0) = ๐, ® ๐ฅ® = ๐ ๐ก๐ด ๐. ® This equation follows because ๐ 0๐ด = ๐ผ, so ๐ฅ®(0) = ๐ 0๐ด ๐® = ๐. We mention a drawback of matrix exponentials. In general ๐ ๐ด+๐ต ≠ ๐ ๐ด ๐ ๐ต . The trouble is that matrices do not commute, that is, in general ๐ด๐ต ≠ ๐ต๐ด. If you try to prove ๐ ๐ด+๐ต ≠ ๐ ๐ด ๐ ๐ต using the Taylor series, you will see why the lack of commutativity becomes a problem. However, it is still true that if ๐ด๐ต = ๐ต๐ด, that is, if ๐ด and ๐ต commute, then ๐ ๐ด+๐ต = ๐ ๐ด ๐ ๐ต . We will find this fact useful. Let us restate this as a theorem to make a point. Theorem 3.8.2. If ๐ด๐ต = ๐ต๐ด, then ๐ ๐ด+๐ต = ๐ ๐ด ๐ ๐ต . Otherwise, ๐ ๐ด+๐ต ≠ ๐ ๐ด ๐ ๐ต in general. 3.8.2 Simple cases In some instances it may work ๐to0 just plug into the series definition. Suppose the matrix is diagonal. For example, ๐ท = 0 ๐ . Then ๐๐ 0 ๐ท๐ = , 0 ๐๐ and 1 1 ๐ ๐ท = ๐ผ + ๐ท + ๐ท2 + ๐ท3 + · · · 2 6 ๐ 1 ๐2 0 1 ๐3 0 ๐ 0 1 0 ๐ 0 = + + + +··· = . 0 1 0 ๐ 0 ๐๐ 2 0 ๐2 6 0 ๐3 So by this rationale ๐ 0 ๐๐ผ = 0 ๐ and ๐ ๐๐ผ ๐๐ 0 = . 0 ๐๐ This makes of certain other matrices easy 5 exponentials 2 4to compute. For example, 0 0 the 2 4 matrix ๐ด = −1 1 can be written as 3๐ผ + ๐ต where ๐ต = −1 −2 . Notice that ๐ต = 0 0 . So ๐ต ๐ = 0 for all ๐ ≥ 2. Therefore, ๐ ๐ต = ๐ผ + ๐ต. Suppose we actually want to compute ๐ ๐ก๐ด . The matrices 3๐ก๐ผ and ๐ก๐ต commute (exercise: check this) and ๐ ๐ก๐ต = ๐ผ + ๐ก๐ต, since (๐ก๐ต)2 = ๐ก 2 ๐ต2 = 0. We write ๐ ๐ก๐ด =๐ 3๐ก๐ผ+๐ก๐ต =๐ 3๐ก๐ผ ๐ก๐ต ๐ ๐ 3๐ก 0 = (๐ผ + ๐ก๐ต) = 0 ๐ 3๐ก ๐ 3๐ก 0 = 0 ๐ 3๐ก 1 + 2๐ก 4๐ก (1 + 2๐ก) ๐ 3๐ก 4๐ก๐ 3๐ก = . −๐ก 1 − 2๐ก −๐ก๐ 3๐ก (1 − 2๐ก) ๐ 3๐ก 171 3.8. MATRIX EXPONENTIALS We found a fundamental matrix solution for the system ๐ฅ®0 = ๐ด ๐ฅ®. Note that this matrix has a repeated eigenvalue with a defect; there is only one eigenvector for the eigenvalue 3. So we found a perhaps easier way to handle this case. In fact, if a matrix ๐ด is 2 × 2 and has an eigenvalue ๐ of multiplicity 2, then either ๐ด = ๐๐ผ, or ๐ด = ๐๐ผ + ๐ต where ๐ต2 = 0. This is a good exercise. Exercise 3.8.1: Suppose that ๐ด is 2 × 2 and ๐ is the only eigenvalue. Show that (๐ด − ๐๐ผ)2 = 0, and therefore that we can write ๐ด = ๐๐ผ + ๐ต, where ๐ต2 = 0 (and possibly ๐ต = 0). Hint: First write down what does it mean for the eigenvalue to be of multiplicity 2. You will get an equation for the entries. Now compute the square of ๐ต. Matrices ๐ต such that ๐ต ๐ = 0 for some ๐ are called nilpotent. Computation of the matrix exponential for nilpotent matrices is easy by just writing down the first ๐ terms of the Taylor series. 3.8.3 General matrices In general, the exponential is not as easy to compute as above. We usually cannot write a matrix as a sum of commuting matrices where the exponential is simple for each one. But fear not, it is still not too difficult provided we can find enough eigenvectors. First we need the following interesting result about matrix exponentials. For two square matrices ๐ด and ๐ต, with ๐ต invertible, we have −1 ๐ ๐ต๐ด๐ต = ๐ต๐ ๐ด ๐ต−1 . This can be seen by writing down the Taylor series. First 2 (๐ต๐ด๐ต−1 ) = ๐ต๐ด๐ต−1 ๐ต๐ด๐ต−1 = ๐ต๐ด๐ผ๐ด๐ต−1 = ๐ต๐ด2 ๐ต−1 . ๐ And by the same reasoning (๐ต๐ด๐ต−1 ) = ๐ต๐ด ๐ ๐ต−1 . Now write the Taylor series for ๐ ๐ต๐ด๐ต : ๐ ๐ต๐ด๐ต −1 −1 1 1 2 3 = ๐ผ + ๐ต๐ด๐ต−1 + (๐ต๐ด๐ต−1 ) + (๐ต๐ด๐ต−1 ) + · · · 2 6 1 1 = ๐ต๐ต−1 + ๐ต๐ด๐ต−1 + ๐ต๐ด2 ๐ต−1 + ๐ต๐ด3 ๐ต−1 + · · · 2 6 −1 1 2 1 3 = ๐ต ๐ผ +๐ด+ ๐ด + ๐ด +··· ๐ต 2 6 ๐ด −1 = ๐ต๐ ๐ต . Given a square matrix ๐ด, we can usually write ๐ด = ๐ธ๐ท๐ธ−1 , where ๐ท is diagonal and ๐ธ invertible. This procedure is called diagonalization. If we can do that, the computation of the exponential becomes easy as ๐ ๐ท is just taking the exponential of the entries on the diagonal. Adding ๐ก into the mix, we can then compute the exponential ๐ ๐ก๐ด = ๐ธ๐ ๐ก๐ท ๐ธ−1 . 172 CHAPTER 3. SYSTEMS OF ODES To diagonalize ๐ด we need ๐ linearly independent eigenvectors of ๐ด. Otherwise, this method of computing the exponential does not work and we need to be trickier, but we will not get into such details. Let ๐ธ be the matrix with the eigenvectors as columns. Let ๐1 , ๐2 , . . . , ๐๐ be the eigenvalues and let ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ be the eigenvectors, then ๐ธ = [ ๐ฃ®1 ๐ฃ®2 · · · ๐ฃ® ๐ ]. Make a diagonal matrix ๐ท with the eigenvalues on the diagonal: ๏ฃฎ๐1 0 ๏ฃฏ ๏ฃฏ 0 ๐2 ๐ท = ๏ฃฏ๏ฃฏ .. .. . ๏ฃฏ. ๏ฃฏ0 0 ๏ฃฐ ··· ··· ... 0 0 .. . ··· ๐ฃ® ๐ ] ๏ฃน ๏ฃบ ๏ฃบ ๏ฃบ. ๏ฃบ ๏ฃบ · · · ๐๐ ๏ฃบ๏ฃป We compute ๐ด๐ธ = ๐ด[ ๐ฃ®1 ๐ฃ®2 = [ ๐ด® ๐ฃ1 ๐ด® ๐ฃ2 = [ ๐1 ๐ฃ®1 ๐2 ๐ฃ®2 = [ ๐ฃ®1 ๐ฃ®2 ··· ··· ··· ๐ด® ๐ฃ๐ ] ๐๐ ๐ฃ® ๐ ] ๐ฃ® ๐ ]๐ท = ๐ธ๐ท. The columns of ๐ธ are linearly independent as these are linearly independent eigenvectors of ๐ด. Hence ๐ธ is invertible. Since ๐ด๐ธ = ๐ธ๐ท, we multiply on the right by ๐ธ−1 and we get ๐ด = ๐ธ๐ท๐ธ−1 . This means that ๐ ๐ด = ๐ธ๐ ๐ท ๐ธ −1 . Multiplying the matrix by ๐ก we obtain ๐ ๐ก๐ด = ๐ธ๐ ๐ก๐ท ๐ธ −1 ๏ฃฎ ๐ ๐1 ๐ก 0 · · · 0 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃฏ 0 ๐ ๐2 ๐ก · · · 0 ๏ฃบ −1 ๏ฃฏ = ๐ธ ๏ฃฏ .. .. .. ๏ฃบ๏ฃบ ๐ธ . ... . . ๏ฃบ ๏ฃฏ . ๏ฃฏ 0 ๐๐ ๐ก ๏ฃบ 0 · · · ๐ ๏ฃฐ ๏ฃป (3.5) The formula (3.5), therefore, gives the formula for computing a fundamental matrix solution ๐ ๐ก๐ด for the system ๐ฅ®0 = ๐ด ๐ฅ®, in the case where we have ๐ linearly independent eigenvectors. This computation still works when the eigenvalues and eigenvectors are complex, though then you have to compute with complex numbers. It is clear from the definition that if ๐ด is real, then ๐ ๐ก๐ด is real. So you will only need complex numbers in the computation and not for the result. You may need to apply Euler’s formula to simplify the result. If simplified properly, the final matrix will not have any complex numbers in it. Example 3.8.1: Compute a fundamental matrix solution using the matrix exponential for the system 0 ๐ฅ 1 2 ๐ฅ = . ๐ฆ 2 1 ๐ฆ Then compute the particular solution for the initial conditions ๐ฅ(0) = 4 and ๐ฆ(0) = 2. 173 3.8. MATRIX EXPONENTIALS Let ๐ด be the coefficient matrix 12 21 . We first compute (exercise) that the eigenvalues 1 are 3 and −1 and corresponding eigenvectors are 11 and −1 . Hence the diagonalization of ๐ด is 1 2 1 1 = 2 1 1 −1 | {z } 3 0 0 −1 1 1 1 −1 −1 . | {z } | {z } | {z } ๐ด ๐ธ ๐ท ๐ธ −1 We write ๐ ๐ก๐ด = ๐ธ๐ ๐ก๐ท −1 ๐ธ −1 ๐ 3๐ก 0 0 ๐ −๐ก ๐ 3๐ก 0 −1 −1 −1 0 ๐ −๐ก 2 −1 1 1 1 = 1 −1 1 1 = 1 −1 −1 ๐ 3๐ก ๐ −๐ก = 2 ๐ 3๐ก −๐ −๐ก 1 1 1 −1 −1 −1 −1 1 −1 −๐ 3๐ก − ๐ −๐ก −๐ 3๐ก + ๐ −๐ก = = 2 −๐ 3๐ก + ๐ −๐ก −๐ 3๐ก − ๐ −๐ก " ๐ 3๐ก +๐ −๐ก 2 ๐ 3๐ก −๐ −๐ก 2 ๐ 3๐ก −๐ −๐ก 2 ๐ 3๐ก +๐ −๐ก 2 # . The initial conditions are ๐ฅ(0) = 4 and ๐ฆ(0) = 2. Hence, by the property that ๐ 0๐ด = ๐ผ we find that the particular solution we are looking for is ๐ ๐ก๐ด ๐® where ๐® is 42 . Then the particular solution we are looking for is ๐ฅ = ๐ฆ 3.8.4 " ๐ 3๐ก +๐ −๐ก 2 ๐ 3๐ก −๐ −๐ก 2 ๐ 3๐ก −๐ −๐ก 2 ๐ 3๐ก +๐ −๐ก 2 # 4 2๐ 3๐ก + 2๐ −๐ก + ๐ 3๐ก − ๐ −๐ก 3๐ 3๐ก + ๐ −๐ก = = . 2 2๐ 3๐ก − 2๐ −๐ก + ๐ 3๐ก + ๐ −๐ก 3๐ 3๐ก − ๐ −๐ก Fundamental matrix solutions We note that if you can compute a fundamental matrix solution in a different way, you can use this to find the matrix exponential ๐ ๐ก๐ด . A fundamental matrix solution of a system of ODEs is not unique. The exponential is the fundamental matrix solution with the property that for ๐ก = 0 we get the identity matrix. So we must find the right fundamental matrix solution. Let ๐ be any fundamental matrix solution to ๐ฅ®0 = ๐ด ๐ฅ®. Then we claim ๐ ๐ก๐ด = ๐(๐ก) [๐(0)]−1 . Clearly, if we plug ๐ก = 0 into ๐(๐ก) [๐(0)]−1 we get the identity. We can multiply a fundamental matrix solution on the right by any constant invertible matrix and we still get a fundamental matrix solution. All we are doing is changing what are the arbitrary constants in the general solution ๐ฅ®(๐ก) = ๐(๐ก) ๐®. 174 3.8.5 CHAPTER 3. SYSTEMS OF ODES Approximations If you think about it, the computation of any fundamental matrix solution ๐ using the eigenvalue method is just as difficult as the computation of ๐ ๐ก๐ด . So perhaps we did not gain much by this new tool. However, the Taylor series expansion actually gives us a way to approximate solutions, which the eigenvalue method did not. The simplest thing we can do is to just compute the series up to a certain number of terms. There are better ways to approximate the exponential∗ . In many cases, however, few terms of the Taylor series give a reasonable approximation for the exponential and may suffice for the application. For example, let us compute the first 4 terms of the series 1 2 for the matrix ๐ด = 2 1 . ๐ ๐ก๐ด 5 1 2 ๐ก2 2 ๐ก3 3 2 2 2 +๐ก ≈ ๐ผ + ๐ก๐ด + ๐ด + ๐ด = ๐ผ + ๐ก + ๐ก3 5 2 6 2 1 2 2 7 6 3 = 7 13 3 6 3 2 ๐ก + 2 ๐ก 2 + 73 ๐ก 3 1 + ๐ก + 25 ๐ก 2 + 13 6 ๐ก 3 2 ๐ก + 2 ๐ก 2 + 73 ๐ก 3 1 + ๐ก + 52 ๐ก 2 + 13 6 ๐ก = 13 . Just like the scalar version of the Taylor series approximation, the approximation will be better for small ๐ก and worse for larger ๐ก. For larger ๐ก, we will generally have to compute more terms. Let us see how we stack up against the real solution with ๐ก = 0.1. The approximate solution is approximately (rounded to 8 decimal places) ๐ 0.1 ๐ด 0.12 2 0.13 3 1.12716667 0.22233333 ๐ด + ๐ด = . ≈ ๐ผ + 0.1 ๐ด + 0.22233333 1.12716667 2 6 And plugging ๐ก = 0.1 into the real solution (rounded to 8 decimal places) we get ๐ 0.1 ๐ด 1.12734811 0.22251069 = . 0.22251069 1.12734811 Not bad at all! Although if we take the same approximation for ๐ก = 1 we get 1 1 6.66666667 6.33333333 , ๐ผ + ๐ด + ๐ด2 + ๐ด3 = 6.33333333 6.66666667 2 6 while the real value is (again rounded to 8 decimal places) 10.22670818 9.85882874 ๐๐ด = . 9.85882874 10.22670818 So the approximation is not very good once we get up to ๐ก = 1. To get a good approximation at ๐ก = 1 (say up to 2 decimal places) we would need to go up to the 11th power (exercise). ∗ C. Moler and C.F. Van Loan, Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later, SIAM Review 45 (1), 2003, 3–49 175 3.8. MATRIX EXPONENTIALS 3.8.6 Exercises Exercise 3.8.2: Using the matrix exponential, find a fundamental matrix solution for the system ๐ฅ 0 = 3๐ฅ + ๐ฆ, ๐ฆ 0 = ๐ฅ + 3๐ฆ. Exercise 3.8.3: Find ๐ ๐ก๐ด for the matrix ๐ด = 2 3 02 . Exercise 3.8.4: Find a fundamental matrix solution for the system ๐ฅ10 = 7๐ฅ1 + 4๐ฅ 2 + 12๐ฅ3 , ๐ฅ20 = ๐ฅ1 + 2๐ฅ 2 + ๐ฅ 3 , ๐ฅ 30 = −3๐ฅ1 − 2๐ฅ2 − 5๐ฅ3 . Then find the solution that satisfies ๐ฅ®(0) = Exercise 3.8.5: Compute the matrix exponential ๐ ๐ด for ๐ด = 1 2 01 h 0 1 −2 i . . Exercise 3.8.6 (challenging): Suppose ๐ด๐ต = ๐ต๐ด. Show that under this assumption, ๐ ๐ด+๐ต = ๐ ๐ด ๐ ๐ต . −1 Exercise 3.8.7: Use Exercise 3.8.6 to show that (๐ ๐ด ) ๐ด is not. = ๐ −๐ด . In particular, ๐ ๐ด is invertible even if Exercise 1 0 3.8.8: Let ๐ด be a 2 × 2 matrix with eigenvalues −1, 1, and corresponding eigenvectors 1 , 1 . a) Find matrix ๐ด with these properties. b) Find a fundamental matrix solution to ๐ฅ®0 = ๐ด ๐ฅ®. c) Solve the system in with initial conditions ๐ฅ®(0) = 2 3 . Exercise 3.8.9: Suppose that ๐ด is an ๐ × ๐ matrix with a repeated eigenvalue ๐ of multiplicity ๐ with ๐ linearly independent eigenvectors. Show that the matrix is diagonal, in fact, ๐ด = ๐๐ผ. Hint: Use diagonalization and the fact that the identity matrix commutes with every other matrix. Exercise 3.8.10: Let ๐ด = −1 −1 1 −3 . a) Find ๐ ๐ก๐ด . Exercise 3.8.11: Let ๐ด = order. b) Solve ๐ฅ®0 = ๐ด ๐ฅ®, ๐ฅ®(0) = 1 2 34 1 −2 . . Approximate ๐ ๐ก๐ด by expanding the power series up to the third Exercise 3.8.12: For any positive integer ๐, find a formula (or a recipe) for ๐ด๐ for the following matrices: 3 0 a) 0 9 5 2 b) 4 7 0 1 c) 0 0 Exercise 3.8.101: Compute ๐ ๐ก๐ด where ๐ด = 1 −2 −2 1 Exercise 3.8.102: Compute ๐ ๐ก๐ด where ๐ด = h 1 −3 2 −2 1 2 −1 −3 4 . i . 2 1 d) 0 2 176 CHAPTER 3. SYSTEMS OF ODES Exercise 3.8.103: a) Compute ๐ ๐ก๐ด where ๐ด = 3 −1 1 1 b) Solve ๐ฅ® 0 = ๐ด ๐ฅ® for ๐ฅ®(0) = . 1 2 . Exercise 3.8.104: the first 3 terms (up to the second degree) of the Taylor expansion of Compute ๐ ๐ก๐ด where ๐ด = 22 32 . Write it as a single matrix. Then use it to approximate ๐ 0.1๐ด . Exercise 3.8.105: For any positive integer ๐, find a formula (or a recipe) for ๐ด๐ for the following matrices: 7 4 a) −5 −2 −3 4 b) −6 −7 0 1 c) 1 0 177 3.9. NONHOMOGENEOUS SYSTEMS 3.9 Nonhomogeneous systems Note: 3 lectures (may have to skip a little), somewhat different from §5.7 in [EP], §7.9 in [BD] 3.9.1 First order constant coefficient Integrating factor Let us first focus on the nonhomogeneous first order equation ๐ฅ®0(๐ก) = ๐ด ๐ฅ®(๐ก) + ๐®(๐ก), where ๐ด is a constant matrix. The first method we look at is the integrating factor method. For simplicity we rewrite the equation as ๐ฅ®0(๐ก) + ๐ ๐ฅ®(๐ก) = ๐®(๐ก), where ๐ = −๐ด. We multiply both sides of the equation by ๐ ๐ก๐ (being mindful that we are dealing with matrices that may not commute) to obtain ๐ ๐ก๐ ๐ฅ®0(๐ก) + ๐ ๐ก๐ ๐ ๐ฅ®(๐ก) = ๐ ๐ก๐ ๐®(๐ก). We notice that ๐๐ ๐ก๐ = ๐ ๐ก๐ ๐. This fact follows by writing down the series definition of ๐ ๐ก๐ : ๐๐ ๐ก๐ 1 1 = ๐ ๐ผ + ๐ก๐ + (๐ก๐)2 + · · · = ๐ + ๐ก๐ 2 + ๐ก 2 ๐ 3 + · · · = 2 2 1 = ๐ผ + ๐ก๐ + (๐ก๐)2 + · · · ๐ = ๐ ๐ก๐ ๐. 2 So ๐ ๐๐ก ๐ ๐ก๐ = ๐๐ ๐ก๐ = ๐ ๐ก๐ ๐. The product rule says ๐ ๐ก๐ ๐ ๐ฅ®(๐ก) = ๐ ๐ก๐ ๐ฅ®0(๐ก) + ๐ ๐ก๐ ๐ ๐ฅ®(๐ก), ๐๐ก and so ๐ ๐ก๐ ๐ ๐ฅ®(๐ก) = ๐ ๐ก๐ ๐®(๐ก). ๐๐ก We can now integrate. That is, we integrate each component of the vector separately ๐ก๐ ๐ ๐ฅ®(๐ก) = −1 Recall from Exercise 3.8.7 that (๐ ๐ก๐ ) ๐ฅ®(๐ก) = ๐ ∫ ๐ ๐ก๐ ๐®(๐ก) ๐๐ก + ๐®. = ๐ −๐ก๐ . Therefore, we obtain −๐ก๐ ∫ ๐ ๐ก๐ ๐®(๐ก) ๐๐ก + ๐ −๐ก๐ ๐®. 178 CHAPTER 3. SYSTEMS OF ODES Perhaps it is better understood as a definite integral. In this case it will be easy to also solve for the initial conditions. Consider the equation with initial conditions ๐ฅ®0(๐ก) + ๐ ๐ฅ®(๐ก) = ๐®(๐ก), ® ๐ฅ®(0) = ๐. The solution can then be written as ๐ฅ®(๐ก) = ๐ ∫ −๐ก๐ ๐ก ® ๐ ๐ ๐ ๐®(๐ ) ๐๐ + ๐ −๐ก๐ ๐. (3.6) 0 Again, the integration means that each component of the vector ๐ ๐ ๐ ๐®(๐ ) is integrated ® separately. It is not hard to see that (3.6) really does satisfy the initial condition ๐ฅ®(0) = ๐. ๐ฅ®(0) = ๐ −0๐ 0 ∫ ® ๐ ๐ ๐ ๐®(๐ ) ๐๐ + ๐ −0๐ ๐® = ๐ผ ๐® = ๐. 0 Example 3.9.1: Suppose that we have the system ๐ฅ10 + 5๐ฅ1 − 3๐ฅ2 = ๐ ๐ก , ๐ฅ20 + 3๐ฅ1 − ๐ฅ2 = 0, with initial conditions ๐ฅ1 (0) = 1, ๐ฅ2 (0) = 0. Let us write the system as 5 −3 ๐๐ก ๐ฅ® + ๐ฅ® = , 3 −1 0 0 ๐ฅ®(0) = 1 . 0 The matrix ๐ = 53 −3 −1 has a doubled eigenvalue 2 with defect 1, and we leave it as an exercise to double check we computed ๐ ๐ก๐ correctly. Once we have ๐ ๐ก๐ , we find ๐ −๐ก๐ , simply by negating ๐ก. ๐ ๐ก๐ (1 + 3๐ก) ๐ 2๐ก −3๐ก๐ 2๐ก = , 3๐ก๐ 2๐ก (1 − 3๐ก) ๐ 2๐ก ๐ −๐ก๐ (1 − 3๐ก) ๐ −2๐ก 3๐ก๐ −2๐ก = . −3๐ก๐ −2๐ก (1 + 3๐ก) ๐ −2๐ก Instead of computing the whole formula at once, let us do it in stages. First ∫ ๐ก ๐ ๐ ๐ ๐®(๐ ) ๐๐ = ๐ก ∫ 0 0 ∫ ๐ก = "∫0 ๐ก (1 + 3๐ ) ๐ 2๐ −3๐ ๐ 2๐ 3๐ ๐ 2๐ (1 − 3๐ ) ๐ 2๐ (1 + 3๐ ) ๐ 3๐ ๐๐ 3๐ ๐ 3๐ ∫๐ก 0 = ๐ 0 ๐๐ (1 + 3๐ ) ๐ 3๐ ๐๐ 0 = ๐ # 3๐ ๐ 3๐ ๐๐ ๐ก๐ 3๐ก (3๐ก−1) ๐ 3๐ก +1 3 (used integration by parts). 179 3.9. NONHOMOGENEOUS SYSTEMS Then ๐ฅ®(๐ก) = ๐ −๐ก๐ ∫ ๐ก ๐ ๐ ๐ ๐®(๐ ) ๐๐ + ๐ −๐ก๐ ๐® 0 (1 − 3๐ก) ๐ −2๐ก 3๐ก๐ −2๐ก = −3๐ก๐ −2๐ก (1 + 3๐ก) ๐ −2๐ก = ๐ก (3๐ก−1) ๐ 3๐ก +1 3 −2๐ก 3๐ก) ๐ (1 − 3๐ก) ๐ −2๐ก 3๐ก๐ −2๐ก + −3๐ก๐ −2๐ก (1 + 3๐ก) ๐ −2๐ก 1 0 ๐ก๐ −2๐ก (1 − −2๐ก + 1 −3๐ก๐ −2๐ก + 3 +๐ก ๐ − ๐3 ๐ก๐ 3๐ก (1 − 2๐ก) ๐ −2๐ก = . ๐ก − ๐3 + 31 − 2๐ก ๐ −2๐ก Phew! Let us check that this really works. ๐ฅ10 + 5๐ฅ1 − 3๐ฅ2 = (4๐ก๐ −2๐ก − 4๐ −2๐ก ) + 5(1 − 2๐ก) ๐ −2๐ก + ๐ ๐ก − (1 − 6๐ก) ๐ −2๐ก = ๐ ๐ก . Similarly (exercise) ๐ฅ 20 + 3๐ฅ1 − ๐ฅ2 = 0. The initial conditions are also satisfied (exercise). For systems, the integrating factor method only works if ๐ does not depend on ๐ก, that is, ๐ is constant. The problem is that in general ๐ h ∫ ๐ ๐๐ก ๐(๐ก) ๐๐ก i ≠ ๐(๐ก) ๐ ∫ ๐(๐ก) ๐๐ก , because matrix multiplication is not commutative. Eigenvector decomposition For the next method, note that eigenvectors of a matrix give the directions in which the matrix acts like a scalar. If we solve the system along these directions, the computations are simpler as we treat the matrix as a scalar. We then put those solutions together to get the general solution for the system. Take the equation ๐ฅ®0(๐ก) = ๐ด ๐ฅ®(๐ก) + ๐®(๐ก). (3.7) Assume ๐ด has ๐ linearly independent eigenvectors ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . Write ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก). (3.8) That is, we wish to write our solution as a linear combination of eigenvectors of ๐ด. If we solve for the scalar functions ๐1 through ๐๐ , we have our solution ๐ฅ®. Let us decompose ๐® in terms of the eigenvectors as well. We wish to write ๐®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก). (3.9) That is, we wish to find ๐1 through ๐๐ that satisfy (3.9). Since all the eigenvectors are independent, the matrix ๐ธ = [ ๐ฃ®1 ๐ฃ®2 · · · ๐ฃ® ๐ ] is invertible. Write the equation (3.9) as 180 CHAPTER 3. SYSTEMS OF ODES ๐® = ๐ธ ๐® , where the components of ๐® are the functions ๐1 through ๐๐ . Then ๐® = ๐ธ−1 ๐®. Hence it is always possible to find ๐® when there are ๐ linearly independent eigenvectors. We plug (3.8) into (3.7), and note that ๐ด® ๐ฃ ๐ = ๐ ๐ ๐ฃ® ๐ : ๐ฃ®1 ๐10 + }| ๐ฃ®2 ๐20 +···+ ๐® ๐ด ๐ฅ® ๐ฅ®0 z { ๐ฃ® ๐ ๐0๐ z }| { z }| { = ๐ด ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ด® ๐ฃ 1 ๐1 + ๐ด® ๐ฃ2 ๐2 + · · · + ๐ด® ๐ฃ ๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ฃ®1 ๐1 ๐1 + ๐ฃ®2 ๐2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ฃ®1 (๐1 ๐1 + ๐1 ) + ๐ฃ®2 (๐2 ๐2 + ๐2 ) + · · · + ๐ฃ® ๐ (๐๐ ๐๐ + ๐๐ ). If we identify the coefficients of the vectors ๐ฃ®1 through ๐ฃ® ๐ , we get the equations ๐10 = ๐1 ๐1 + ๐1 , ๐20 = ๐2 ๐2 + ๐2 , .. . ๐0๐ = ๐๐ ๐๐ + ๐๐ . Each one of these equations is independent of the others. They are all linear first order equations and can easily be solved by the standard integrating factor method for single equations. That is, for the ๐ th equation we write ๐0๐ (๐ก) − ๐ ๐ ๐ ๐ (๐ก) = ๐ ๐ (๐ก). We use the integrating factor ๐ −๐ ๐ ๐ก to find that i ๐ h ๐ ๐ (๐ก) ๐ −๐ ๐ ๐ก = ๐ −๐ ๐ ๐ก ๐ ๐ (๐ก). ๐๐ก We integrate and solve for ๐ ๐ to get ๐ ๐ (๐ก) = ๐ ๐๐ ๐ก ∫ ๐ −๐ ๐ ๐ก ๐ ๐ (๐ก) ๐๐ก + ๐ถ ๐ ๐ ๐ ๐ ๐ก . If we are looking for just any particular solution, we can set ๐ถ ๐ to be zero. If we leave these constants in, we get the general solution. Write ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก), and we are done. As always, it is perhaps better to write these integrals as definite integrals. Suppose that ® Take ๐® = ๐ธ−1 ๐® to find ๐® = ๐ฃ®1 ๐ 1 + ๐ฃ®2 ๐ 2 + · · · + ๐ฃ® ๐ ๐ ๐ , we have an initial condition ๐ฅ®(0) = ๐. just like before. Then if we write ๐ ๐ (๐ก) = ๐ ๐๐ ๐ก ∫ 0 ๐ก ๐ −๐ ๐ ๐ ๐ ๐ (๐ ) ๐๐ + ๐ ๐ ๐ ๐ ๐ ๐ก , 181 3.9. NONHOMOGENEOUS SYSTEMS ® we get the particular solution ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก) satisfying ๐ฅ®(0) = ๐, because ๐ ๐ (0) = ๐ ๐ . Let us remark that the technique we just outlined is the eigenvalue method applied to ® then the equations nonhomogeneous systems. If a system is homogeneous, that is, if ๐® = 0, we get are ๐0๐ = ๐ ๐ ๐ ๐ , and so ๐ ๐ = ๐ถ ๐ ๐ ๐ ๐ ๐ก are the solutions and that’s precisely what we got in § 3.4. Example 3.9.2: Let ๐ด = 1 3 31 . Solve ๐ฅ®0 = ๐ด ๐ฅ® + ๐® where ๐®(๐ก) = 2๐ ๐ก 2๐ก for ๐ฅ®(0) = h 3/16 −5/16 i . 1 The eigenvalues of ๐ด are −2 and 4 and corresponding eigenvectors are −1 and 1 respectively. This calculation is left as an exercise. We write down the matrix ๐ธ of the eigenvectors and compute its inverse (using the inverse formula for 2 × 2 matrices) 1 1 ๐ธ= , −1 1 ๐ธ −1 1 1 1 −1 = . 2 1 1 ๐1 + 11 ๐2 . We first need to write ๐® ๐ก 1 1 in terms of the eigenvectors. That is we wish to write ๐® = 2๐ = ๐ + 1 −1 1 ๐2 . Thus 2๐ก We are looking for a solution of the form ๐ฅ® = 1 −1 1 1 −1 ๐1 2๐ ๐ก = ๐ธ−1 = ๐2 2๐ก 2 1 1 2๐ ๐ก ๐๐ก − ๐ก = ๐ก . 2๐ก ๐ +๐ก So ๐1 = ๐ ๐ก − ๐ก and ๐2 = ๐ ๐ก + ๐ก. We hfurther i need to write ๐ฅ®(0) in terms of the eigenvectors. That is, we wish to write ๐ฅ®(0) = 3/16 −5/16 = 1 −1 ๐1 + 1 1 ๐ 2 . Hence ๐1 ๐2 =๐ธ −1 3 /16 −5/16 = 1/4 . −1/16 So ๐ 1 = 1/4 and ๐ 2 = −1/16. We plug our ๐ฅ® into the equation and get ๐ฅ®0 z }| { ๐® ๐ด ๐ฅ® z }| { z }| { 1 1 0 1 1 1 1 ๐10 + ๐2 = ๐ด ๐1 + ๐ด ๐2 + ๐1 + ๐ −1 1 −1 1 −1 1 2 1 1 1 1 ๐ก = (−2๐1 ) + 4๐2 + (๐ ๐ก − ๐ก) + (๐ + ๐ก). −1 1 −1 1 We get the two equations ๐10 = −2๐1 + ๐ ๐ก − ๐ก, ๐20 = 4๐2 + ๐ ๐ก + ๐ก, 1 , 4 −1 where ๐2 (0) = ๐ 2 = . 16 where ๐1 (0) = ๐ 1 = 182 CHAPTER 3. SYSTEMS OF ODES We solve with integrating factor. Computation of the integral is left as an exercise to the student. You will need integration by parts. ๐1 = ๐ −2๐ก ∫ ๐ 2๐ก (๐ ๐ก − ๐ก) ๐๐ก + ๐ถ1 ๐ −2๐ก = ๐๐ก ๐ก 1 − + + ๐ถ1 ๐ −2๐ก . 3 2 4 ๐ถ1 is the constant of integration. As ๐1 (0) = 1/4, then 1/4 = 1/3 + 1/4 + ๐ถ1 and hence ๐ถ1 = −1/3. Similarly ∫ ๐๐ก ๐ก 1 4๐ก + ๐ถ2 ๐ 4๐ก . ๐2 = ๐ ๐ −4๐ก (๐ ๐ก + ๐ก) ๐๐ก + ๐ถ2 ๐ 4๐ก = − − − 3 4 16 As ๐2 (0) = −1/16 we have −1/16 = −1/3 − 1/16 + ๐ถ2 and hence ๐ถ2 = 1/3. The solution is 1 ๐ฅ®(๐ก) = −1 ๐ ๐ก − ๐ −2๐ก 1 − 2๐ก 1 + + 1 3 4 | That is, ๐ฅ1 = ๐ 4๐ก −๐ −2๐ก 3 {z ๐1 + 3−12๐ก 16 ๐ 4๐ก − ๐ ๐ก 4๐ก + 1 − = 3 16 } | and ๐ฅ2 = ๐ −2๐ก +๐ 4๐ก −2๐ ๐ก 3 {z ๐2 + " ๐ 4๐ก −๐ −2๐ก + 3−12๐ก 3 16 −2๐ก 4๐ก ๐ +๐ −2๐ ๐ก 4๐ก−5 + 3 16 # . } 4๐ก−5 16 . Exercise 3.9.1: Check that ๐ฅ1 and ๐ฅ2 solve the problem. Check both that they satisfy the differential equation and that they satisfy the initial conditions. Undetermined coefficients The method of undetermined coefficients also works for systems. The only difference is that we use unknown vectors rather than just numbers. Same caveats apply to undetermined coefficients for systems as for single equations. This method does not always work. Furthermore, if the right-hand side is complicated, we have to solve for lots of variables. Each element of an unknown vector is an unknown number. In system of 3 equations with say say 4 unknown vectors (this would not be uncommon), we already have 12 unknown numbers to solve for. The method can turn into a lot of tedious work if done by hand. As the method is essentially the same as for single equations, let us just do an example. ๐ก 0 ®0 = ๐ด ๐ฅ® + ๐® where ๐®(๐ก) = ๐๐ก . Example 3.9.3: Let ๐ด = −1 −2 1 . Find a particular solution of ๐ฅ Note that we can solve this system in an easier way (can you see how?), but for the purposes of the example, let us use the eigenvalue method plus undetermined 1coefficients. The eigenvalues of ๐ด are −1 and 1 and corresponding eigenvectors are 1 and 01 respectively. Hence our complementary solution is ๐ฅ®๐ = ๐ผ 1 1 −๐ก 0 ๐ก ๐ + ๐ผ2 ๐ , 1 1 for some arbitrary constants ๐ผ1 and ๐ผ 2 . We would want to guess a particular solution of ® + ๐®. ๐ฅ® = ๐® ๐ ๐ก + ๐๐ก 183 3.9. NONHOMOGENEOUS SYSTEMS However, something of the form ๐® ๐ ๐ก appears in 0the complementary solution. Because we do not yet know if the vector ๐® is a multiple of 1 , we do not know if a conflict arises. It is ® ๐ก . Here we find the possible that there is no conflict, but to be safe we should also try ๐๐ก๐ crux of the difference between a single equation and systems. We try both terms ๐® ๐ ๐ก and ® ๐ก in the solution, not just the term ๐๐ก๐ ® ๐ก . Therefore, we try ๐๐ก๐ ® ๐ก + ๐®๐ก + ๐. ® ๐ฅ® = ๐® ๐ ๐ก + ๐๐ก๐ Thus we have 8 unknowns. We write ๐® = h ๐1 ๐2 i , ๐® = h ๐1 ๐2 i , ๐® = h i ๐1 ๐2 , and ๐® = h ๐1 ๐2 i . We plug ๐ฅ® into the equation. First let us compute ๐ฅ®0. ® + ๐® = ๐ 1 + ๐ 1 ๐ ๐ก + ๐ 1 ๐ก๐ ๐ก + ๐ 1 . ๐ฅ® = ๐® + ๐® ๐ + ๐๐ก๐ ๐2 + ๐2 ๐2 ๐2 0 ๐ก ๐ก Now ๐ฅ®0 must equal ๐ด ๐ฅ® + ๐®, which is ® ๐ก + ๐ด®๐ ๐ก + ๐ด ๐® + ๐® ๐ด ๐ฅ® + ๐® = ๐ด®๐ ๐ ๐ก + ๐ด๐๐ก๐ −๐1 −๐ 1 −๐ 1 −๐1 1 ๐ก 0 ๐ + ๐ก = ๐๐ก + ๐ก๐ ๐ก + ๐ก+ + −2๐ 1 + ๐ 2 −2๐ 1 + ๐ 2 −2๐1 + ๐ 2 −2๐1 + ๐2 0 1 −๐ 1 + 1 −๐ 1 −๐1 −๐1 = ๐๐ก + ๐ก๐ ๐ก + ๐ก+ . −2๐1 + ๐ 2 −2๐ 1 + ๐ 2 −2๐1 + ๐ 2 + 1 −2๐1 + ๐2 We identify the coefficients of ๐ ๐ก , ๐ก๐ ๐ก , ๐ก and any constant vectors in ๐ฅ®0 and in ๐ด ๐ฅ® + ๐® to find the equations: ๐ 1 + ๐ 1 = −๐ 1 + 1, 0 = −๐1 , ๐ 2 + ๐2 = −2๐1 + ๐2 , 0 = −2๐ 1 + ๐ 2 + 1, ๐ 1 = −๐ 1 , ๐ 1 = −๐1 , ๐ 2 = −2๐ 1 + ๐ 2 , ๐ 2 = −2๐1 + ๐2 . We could write the 8 × 9 augmented matrix and start row reduction, but it is easier to just solve the equations in an ad hoc manner. Immediately we see that ๐ 1 = 0, ๐1 = 0, ๐1 = 0. Plugging these back in, we get that ๐2 = −1 and ๐2 = −1. The remaining equations that tell us something are ๐1 = −๐ 1 + 1, ๐ 2 + ๐ 2 = −2๐ 1 + ๐ 2 . So ๐1 = 1/2 and ๐ 2 = −1. Finally, ๐ 2 can be arbitrary and still satisfy the equations. We are looking for just a single solution so presumably the simplest one is when ๐ 2 = 0. Therefore, ® ๐ก + ๐®๐ก + ๐® = ๐ฅ® = ๐® ๐ ๐ก + ๐๐ก๐ 1 ๐ก 0 0 0 2 ๐ ๐๐ก + ๐ก๐ ๐ก + ๐ก+ = . ๐ก 0 −1 −1 −1 −๐ก๐ − ๐ก − 1 1/2 That is, ๐ฅ1 = 12 ๐ ๐ก , ๐ฅ2 = −๐ก๐ ๐ก − ๐ก − 1. We would add this to the complementary solution to ® ๐ก were really needed. get the general solution of the problem. Notice that both ๐® ๐ ๐ก and ๐๐ก๐ 184 CHAPTER 3. SYSTEMS OF ODES Exercise 3.9.2: Check that ๐ฅ1 and ๐ฅ2 solve the problem. Try setting ๐2 = 1 and check we get a solution as well. What is the difference between the two solutions we obtained (one with ๐ 2 = 0 and one with ๐ 2 = 1)? As you can see, other than the handling of conflicts, undetermined coefficients works exactly the same as it did for single equations. However, the computations can get out of hand pretty quickly for systems. The equation we considered was pretty simple. 3.9.2 First order variable coefficient Variation of parameters Just as for a single equation, there is the method of variation of parameters. For constant coefficient systems, it is essentially the same thing as the integrating factor method we discussed earlier. However, this method works for any linear system, even if it is not constant coefficient, provided we somehow solve the associated homogeneous problem. Suppose we have the equation ๐ฅ®0 = ๐ด(๐ก) ๐ฅ® + ๐®(๐ก). (3.10) Further, suppose we solved the associated homogeneous equation ๐ฅ®0 = ๐ด(๐ก) ๐ฅ® and found a fundamental matrix solution ๐(๐ก). The general solution to the associated homogeneous equation is ๐(๐ก)®๐ for a constant vector ๐®. Just like for variation of parameters for single equation we try the solution to the nonhomogeneous equation of the form ๐ฅ®๐ = ๐(๐ก) ๐ข® (๐ก), where ๐ข® (๐ก) is a vector-valued function instead of a constant. We substitute ๐ฅ®๐ into (3.10) to obtain ๐ 0(๐ก) ๐ข® (๐ก) + ๐(๐ก) ๐ข® 0(๐ก) = ๐ด(๐ก) ๐(๐ก) ๐ข® (๐ก) + ๐®(๐ก). | {z } ๐ฅ®0๐ (๐ก) | {z ๐ด(๐ก) ๐ฅ®๐ (๐ก) } But ๐(๐ก) is a fundamental matrix solution to the homogeneous problem. So ๐ 0(๐ก) = ๐ด(๐ก)๐(๐ก), and 0 0 ๐ (๐ก) ๐ข® (๐ก) + ๐(๐ก) ๐ข® 0(๐ก) = ๐ (๐ก) ๐ข® (๐ก) + ๐®(๐ก). Hence ๐(๐ก) ๐ข® 0(๐ก) = ๐®(๐ก). If we compute [๐(๐ก)]−1 , then ๐ข® 0(๐ก) = [๐(๐ก)]−1 ๐®(๐ก). We integrate to obtain ๐ข® and we have the particular solution ๐ฅ®๐ = ๐(๐ก) ๐ข® (๐ก). Let us write this as a formula ๐ฅ®๐ = ๐(๐ก) ∫ [๐(๐ก)]−1 ๐®(๐ก) ๐๐ก. If ๐ด is constant and ๐(๐ก) = ๐ ๐ก๐ด , then [๐(๐ก)]−1 = ๐ −๐ก๐ด . We get a solution ๐ฅ®๐ = ∫ ๐ ๐ก๐ด ๐ −๐ก๐ด ๐®(๐ก) ๐๐ก, which is precisely what we got using the integrating factor method. 185 3.9. NONHOMOGENEOUS SYSTEMS Example 3.9.4: Find a particular solution to 1 ๐ก ๐ก −1 (๐ก 2 + 1). ๐ฅ® + ๐ฅ® = 2 1 ๐ก +1 1 ๐ก 0 (3.11) Here ๐ด = ๐ก 21+1 1๐ก −1 is most definitely not constant. Perhaps by a lucky guess, we find ๐ก 1 −๐ก that ๐ = ๐ก 1 solves ๐ 0(๐ก) = ๐ด(๐ก)๐(๐ก). Once we know the complementary solution we can easily find a solution to (3.11). First we find −1 [๐(๐ก)] 1 1 ๐ก . = 2 ๐ก + 1 −๐ก 1 Next we know a particular solution to (3.11) is ๐ฅ®๐ = ๐(๐ก) ∫ [๐(๐ก)]−1 ๐®(๐ก) ๐๐ก 1 1 ๐ก ๐ก 2 + 1 −๐ก 1 ∫ ∫ 1 −๐ก = ๐ก 1 1 −๐ก = ๐ก 1 1 −๐ก = ๐ก 1 = 1 4 3๐ก 2 3 3๐ก + ๐ก ๐ก (๐ก 2 + 1) ๐๐ก 1 2๐ก ๐๐ก 2 −๐ก + 1 ๐ก2 − 13 ๐ก 3 + ๐ก . Adding the complementary solution we find the general solution to (3.11): 1 −๐ก ๐ฅ® = ๐ก 1 ๐1 + ๐2 Exercise 3.9.3: Check that ๐ฅ1 = 1 4 3๐ก 1 4 3๐ก 2 3 3๐ก + and ๐ฅ2 = ๐1 − ๐2 ๐ก + 13 ๐ก 4 = . ๐ก ๐2 + (๐ 1 + 1) ๐ก + 32 ๐ก 3 2 3 3๐ก + ๐ก really solve (3.11). In the variation of parameters, just like in the integrating factor method we can obtain the general solution by adding in constants of integration. That is, we will add ๐(๐ก)®๐ for a vector of arbitrary constants. But that is precisely the complementary solution. 3.9.3 Second order constant coefficients Undetermined coefficients We have already seen a simple example of the method of undetermined coefficients for second order systems in § 3.6. This method is essentially the same as undetermined coefficients for first order systems. There are some simplifications that we can make, as we did in § 3.6. Let the equation be ® ๐ฅ®00 = ๐ด ๐ฅ® + ๐น(๐ก), 186 CHAPTER 3. SYSTEMS OF ODES ® is of the form ๐น®0 cos(๐๐ก), then as two derivatives of where ๐ด is a constant matrix. If ๐น(๐ก) cosine is again cosine we can try a solution of the form ๐ฅ®๐ = ๐® cos(๐๐ก), and we do not need to introduce sines. If the ๐น® is a sum of cosines, note that we still have the superposition principle. If ® ๐น(๐ก) = ๐น®0 cos(๐0 ๐ก) + ๐น®1 cos(๐1 ๐ก), then we would try ๐® cos(๐0 ๐ก) for the problem ๐ฅ®00 = ๐ด ๐ฅ® + ๐น®0 cos(๐0 ๐ก), and we would try ๐® cos(๐1 ๐ก) for the problem ๐ฅ®00 = ๐ด ๐ฅ® + ๐น®1 cos(๐1 ๐ก). Then we sum the solutions. However, if there is duplication with the complementary solution, or the equation is of ® the form ๐ฅ®00 = ๐ด ๐ฅ®0 + ๐ต ๐ฅ® + ๐น(๐ก), then we need to do the same thing as we do for first order systems. You will never go wrong with putting in more terms than needed into your guess. You will find that the extra coefficients will turn out to be zero. But it is useful to save some time and effort. Eigenvector decomposition If we have the system ๐ฅ®00 = ๐ด ๐ฅ® + ๐®(๐ก), we can do eigenvector decomposition, just like for first order systems. Let ๐1 , ๐2 , . . . , ๐๐ be the eigenvalues and ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ be eigenvectors. Again form the matrix ๐ธ = [ ๐ฃ®1 ๐ฃ®2 · · · ๐ฃ® ๐ ]. Write ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก). Decompose ๐® in terms of the eigenvectors ๐®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก), where, again, ๐® = ๐ธ −1 ๐®. We plug in, and as before we obtain ๐ฃ®1 ๐100 + }| ๐ฃ®2 ๐200 +···+ ๐® ๐ด ๐ฅ® ๐ฅ®00 z { ๐ฃ® ๐ ๐00๐ z }| { z }| { = ๐ด ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ด® ๐ฃ1 ๐1 + ๐ด® ๐ฃ 2 ๐2 + · · · + ๐ด® ๐ฃ ๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ฃ®1 ๐1 ๐1 + ๐ฃ®2 ๐2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ ๐๐ + ๐ฃ®1 ๐1 + ๐ฃ®2 ๐2 + · · · + ๐ฃ® ๐ ๐๐ = ๐ฃ®1 (๐1 ๐1 + ๐1 ) + ๐ฃ®2 (๐2 ๐2 + ๐2 ) + · · · + ๐ฃ® ๐ (๐๐ ๐๐ + ๐๐ ). 187 3.9. NONHOMOGENEOUS SYSTEMS We identify the coefficients of the eigenvectors to get the equations ๐100 = ๐1 ๐1 + ๐1 , ๐200 = ๐2 ๐2 + ๐2 , .. . ๐00๐ = ๐๐ ๐๐ + ๐๐ . Each one of these equations is independent of the others. We solve each equation using the methods of chapter 2. We write ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก), and we are done; we have a particular solution. We find the general solutions for ๐1 through ๐๐ , and again ๐ฅ®(๐ก) = ๐ฃ®1 ๐1 (๐ก) + ๐ฃ®2 ๐2 (๐ก) + · · · + ๐ฃ® ๐ ๐๐ (๐ก) is the general solution (and not just a particular solution). Example 3.9.5: Let us do the example from § 3.6 using this method. The equation is −3 1 0 ๐ฅ® = ๐ฅ® + cos(3๐ก). 2 −2 2 00 The eigenvalues are −1 and −4, with eigenvectors 1 . Therefore, ๐ธ−1 = 31 12 −1 ๐1 ๐2 =๐ธ 1 1 1 ๐ (๐ก) = 3 2 −1 −1 ® 1 2 and 0 2 cos(3๐ก) 1 −1 = . Therefore ๐ธ = 2 3 cos(3๐ก) −2 3 cos(3๐ก) 1 1 2 −1 and . So after the whole song and dance of plugging in, the equations we get are ๐100 = −๐1 + 2 cos(3๐ก), 3 ๐200 = −4 ๐2 − 2 cos(3๐ก). 3 For each equation we use the method of undetermined coefficients. We try ๐ถ1 cos(3๐ก) for the first equation and ๐ถ2 cos(3๐ก) for the second equation. We plug in to get 2 cos(3๐ก), 3 2 −9๐ถ2 cos(3๐ก) = −4๐ถ2 cos(3๐ก) − cos(3๐ก). 3 −9๐ถ1 cos(3๐ก) = −๐ถ1 cos(3๐ก) + We solve each of these equations separately. We get −9๐ถ1 = −๐ถ1 + 2/3 and −9๐ถ2 = −4๐ถ2 − 2/3. And hence ๐ถ1 = −1/12 and ๐ถ2 = 2/15. So our particular solution is 1 ๐ฅ® = 2 −1 1 cos(3๐ก) + −1 12 2 cos(3๐ก) = 15 This solution matches what we got previously in § 3.6. 1/20 −3/10 cos(3๐ก). 188 3.9.4 CHAPTER 3. SYSTEMS OF ODES Exercises Exercise 3.9.4: Find a particular solution to ๐ฅ 0 = ๐ฅ + 2๐ฆ + 2๐ก, ๐ฆ 0 = 3๐ฅ + 2๐ฆ − 4, a) using integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients. Exercise 3.9.5: Find the general solution to ๐ฅ 0 = 4๐ฅ + ๐ฆ − 1, ๐ฆ 0 = ๐ฅ + 4๐ฆ − ๐ ๐ก , a) using integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients. Exercise 3.9.6: Find the general solution to ๐ฅ100 = −6๐ฅ1 + 3๐ฅ2 + cos(๐ก), ๐ฅ200 = 2๐ฅ1 − 7๐ฅ2 + 3 cos(๐ก), a) using eigenvector decomposition, b) using undetermined coefficients. Exercise 3.9.7: Find the general solution to ๐ฅ 100 = −6๐ฅ 1 + 3๐ฅ 2 + cos(2๐ก), ๐ฅ200 = 2๐ฅ1 − 7๐ฅ2 + 3 cos(2๐ก), a) using eigenvector decomposition, 0 Exercise 3.9.8: Take the equation ๐ฅ® = a) Check that ๐ฅ®๐ = ๐1 b) using undetermined coefficients. 1 ๐ก −1 1 1 ๐ก ๐ก2 ๐ฅ® + . −๐ก ๐ก sin ๐ก ๐ก cos ๐ก + ๐2 is the complementary solution. −๐ก cos ๐ก ๐ก sin ๐ก b) Use variation of parameters to find a particular solution. Exercise 3.9.101: Find a particular solution to ๐ฅ 0 = 5๐ฅ + 4๐ฆ + ๐ก, ๐ฆ 0 = ๐ฅ + 8๐ฆ − ๐ก, a) using integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients. Exercise 3.9.102: Find a particular solution to ๐ฅ 0 = ๐ฆ + ๐ ๐ก , ๐ฆ 0 = ๐ฅ + ๐ ๐ก , a) using integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients. Exercise 3.9.103: Solve ๐ฅ10 = ๐ฅ2 + ๐ก, ๐ฅ20 = ๐ฅ1 + ๐ก with initial conditions ๐ฅ 1 (0) = 1, ๐ฅ2 (0) = 2, using eigenvector decomposition. Exercise 3.9.104: Solve ๐ฅ100 = −3๐ฅ1 + ๐ฅ2 + ๐ก, ๐ฅ 200 = 9๐ฅ 1 + 5๐ฅ 2 + cos(๐ก) with initial conditions ๐ฅ1 (0) = 0, ๐ฅ2 (0) = 0, ๐ฅ10 (0) = 0, ๐ฅ20 (0) = 0, using eigenvector decomposition. Chapter 4 Fourier series and PDEs 4.1 Boundary value problems Note: 2 lectures, similar to §3.8 in [EP], §10.1 and §11.1 in [BD] 4.1.1 Boundary value problems Before we tackle the Fourier series, we study the so-called boundary value problems (or endpoint problems). Consider ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = 0, ๐ฅ(๐) = 0, for some constant ๐, where ๐ฅ(๐ก) is defined for ๐ก in the interval [๐, ๐]. Previously we specified the value of the solution and its derivative at a single point. Now we specify the value of the solution at two different points. As ๐ฅ = 0 is a solution, existence of solutions is not a problem. Uniqueness of solutions is another issue. The general solution to ๐ฅ 00 + ๐๐ฅ = 0 has two arbitrary constants† . It is, therefore, natural (but wrong) to believe that requiring two conditions guarantees a unique solution. Example 4.1.1: Take ๐ = 1, ๐ = 0, ๐ = ๐. That is, ๐ฅ 00 + ๐ฅ = 0, ๐ฅ(0) = 0, ๐ฅ(๐) = 0. Then ๐ฅ = sin ๐ก is another solution (besides ๐ฅ = 0) satisfying both boundary conditions. There are more. Write down the general solution of the differential equation, which is ๐ฅ = ๐ด cos ๐ก + ๐ต sin ๐ก. The condition ๐ฅ(0) = 0 forces ๐ด = 0. Letting ๐ฅ(๐) = 0 does not give us any more information as ๐ฅ = ๐ต sin ๐ก already satisfies both boundary conditions. Hence, there are infinitely many solutions of the form ๐ฅ = ๐ต sin ๐ก, where ๐ต is an arbitrary constant. Example 4.1.2: On the other hand, consider ๐ = 2. That is, ๐ฅ 00 + 2๐ฅ = 0, † See ๐ฅ(0) = 0, ๐ฅ(๐) = 0. subsection 0.2.4 on page 13 or Example 2.2.1 on page 85 and Example 2.2.3 on page 88. 190 CHAPTER 4. FOURIER SERIES AND PDES √ √ Then the general solution is ๐ฅ = ๐ด cos( 2 ๐ก) + ๐ต sin( 2 ๐ก).√Letting ๐ฅ(0) = √ 0 still forces ๐ด = 0. We apply the second condition to find 0 = ๐ฅ(๐) = ๐ต sin( 2 ๐). As sin( 2 ๐) ≠ 0 we obtain ๐ต = 0. Therefore ๐ฅ = 0 is the unique solution to this problem. What is going on? We will be interested in finding which constants ๐ allow a nonzero solution, and we will be interested in finding those solutions. This problem is an analogue of finding eigenvalues and eigenvectors of matrices. 4.1.2 Eigenvalue problems For basic Fourier series theory we will need the following three eigenvalue problems. We will consider more general equations and boundary conditions, but we will postpone this until chapter 5. ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = 0, ๐ฅ(๐) = 0, (4.1) ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ 0(๐) = 0, ๐ฅ 0(๐) = 0, (4.2) ๐ฅ 0(๐) = ๐ฅ 0(๐). (4.3) and ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = ๐ฅ(๐), A number ๐ is called an eigenvalue of (4.1) (resp. (4.2) or (4.3)) if and only if there exists a nonzero (not identically zero) solution to (4.1) (resp. (4.2) or (4.3)) given that specific ๐. A nonzero solution is called a corresponding eigenfunction. Note the similarity to eigenvalues and eigenvectors of matrices. The similarity is not just coincidental. If we think of the equations as differential operators, then we are doing the same exact thing. Think of a function ๐ฅ(๐ก) as a vector with infinitely many components 2 (one for each ๐ก). Let ๐ฟ = − ๐ 2 be the linear operator. Then the eigenvalue/eigenfunction ๐๐ก pair should be ๐ and nonzero ๐ฅ such that ๐ฟ๐ฅ = ๐๐ฅ. In other words, we are looking for nonzero functions ๐ฅ satisfying certain endpoint conditions that solve (๐ฟ − ๐)๐ฅ = 0. A lot of the formalism from linear algebra still applies here, though we will not pursue this line of reasoning too far. Example 4.1.3: Let us find the eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(0) = 0, ๐ฅ(๐) = 0. We have to handle the cases ๐ > 0, ๐ = 0, ๐ < 0 separately. First suppose that ๐ > 0. Then the general solution to ๐ฅ 00 + ๐๐ฅ = 0 is √ √ ๐ฅ = ๐ด cos( ๐ ๐ก) + ๐ต sin( ๐ ๐ก). The condition ๐ฅ(0) = 0 implies immediately ๐ด = 0. Next √ 0 = ๐ฅ(๐) = ๐ต sin( ๐ ๐). If ๐ต is zero, then solution. So to get a nonzero solution we must √ ๐ฅ is not a nonzero √ have that sin( ๐ ๐) = 0. Hence, ๐ ๐ must be an integer multiple of ๐. In other words, 191 4.1. BOUNDARY VALUE PROBLEMS √ ๐ = ๐ for a positive integer ๐. Hence the positive eigenvalues are ๐ 2 for all integers ๐ ≥ 1. Corresponding eigenfunctions can be taken as ๐ฅ = sin(๐๐ก). Just like for eigenvectors, constant multiples of an eigenfunction are also eigenfunctions, so we only need to pick one. Now suppose that ๐ = 0. In this case the equation is ๐ฅ 00 = 0, and its general solution is ๐ฅ = ๐ด๐ก + ๐ต. The condition ๐ฅ(0) = 0 implies that ๐ต = 0, and ๐ฅ(๐) = 0 implies that ๐ด = 0. This means that ๐ = 0 is not an eigenvalue. Finally, suppose that ๐ < 0. In this case we have the general solution∗ √ √ ๐ฅ = ๐ด cosh( −๐ ๐ก) + ๐ต sinh( −๐ ๐ก). Letting ๐ฅ(0) =√0 implies that ๐ด = 0 (recall cosh 0 = 1 and sinh 0 = 0). So our solution must be ๐ฅ = ๐ต sinh( −๐ ๐ก) and satisfy ๐ฅ(๐) = 0. This is only possible if ๐ต is zero. Why? Because sinh ๐ is only zero when ๐ = 0. You should plot sinh to see this fact. We can also see this ๐ −๐ ๐ −๐ from the definition of sinh. We get 0 = sinh ๐ = ๐ −๐ 2 . Hence ๐ = ๐ , which implies ๐ = −๐ and that is only true if ๐ = 0. So there are no negative eigenvalues. In summary, the eigenvalues and corresponding eigenfunctions are ๐๐ = ๐2 with an eigenfunction ๐ฅ ๐ = sin(๐๐ก) for all integers ๐ ≥ 1. Example 4.1.4: Let us compute the eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ 0(0) = 0, ๐ฅ 0(๐) = 0. Again we have to handle the cases ๐ > 0, ๐ = 0, ๐ < √ 0 separately. √ First suppose that 00 ๐ > 0. The general solution to ๐ฅ + ๐๐ฅ = 0 is ๐ฅ = ๐ด cos( ๐ ๐ก) + ๐ต sin( ๐ ๐ก). So √ √ √ √ ๐ฅ 0 = −๐ด ๐ sin( ๐ ๐ก) + ๐ต ๐ cos( ๐ ๐ก). The condition ๐ฅ 0(0) = 0 implies immediately ๐ต = 0. Next √ √ 0 = ๐ฅ 0(๐) = −๐ด ๐ sin( ๐ ๐). √ √ Again ๐ด cannot be zero if ๐ is to be an eigenvalue, and sin( ๐ ๐) is only zero if ๐ = ๐ for a positive integer ๐. Hence the positive eigenvalues are again ๐ 2 for all integers ๐ ≥ 1. And the corresponding eigenfunctions can be taken as ๐ฅ = cos(๐๐ก). Now suppose that ๐ = 0. In this case the equation is ๐ฅ 00 = 0 and the general solution is ๐ฅ = ๐ด๐ก + ๐ต so ๐ฅ 0 = ๐ด. The condition ๐ฅ 0(0) = 0 implies that ๐ด = 0. The condition ๐ฅ 0(๐) = 0 also implies ๐ด = 0. Hence ๐ต could be anything (let us take it to be 1). So ๐ = 0 is an eigenvalue and ๐ฅ = 1 is a corresponding eigenfunction. √ √ Finally, let ๐ < 0. In this case the general solution is ๐ฅ = ๐ด cosh( −๐ ๐ก) + ๐ต sinh( −๐ ๐ก) and √ √ √ √ ๐ฅ 0 = ๐ด −๐ sinh( −๐ ๐ก) + ๐ต −๐ cosh( −๐ ๐ก). ∗ Recall that cosh ๐ = 21 (๐ ๐ + ๐ −๐ ) and sinh ๐ = 12 (๐ ๐ − ๐ −๐ ). As an exercise try the computation with the general solution written as ๐ฅ = ๐ด๐ √ −๐ ๐ก √ + ๐ต๐ − −๐ ๐ก (for different ๐ด and ๐ต of course). 192 CHAPTER 4. FOURIER SERIES AND PDES We have already seen (with roles of ๐ด and ๐ต switched) that for this expression to be zero at ๐ก = 0 and ๐ก = ๐, we must have ๐ด = ๐ต = 0. Hence there are no negative eigenvalues. In summary, the eigenvalues and corresponding eigenfunctions are ๐๐ = ๐2 ๐ฅ ๐ = cos(๐๐ก) with an eigenfunction for all integers ๐ ≥ 1, and there is another eigenvalue ๐0 = 0 with an eigenfunction ๐ฅ0 = 1. The following problem is the one that leads to the general Fourier series. Example 4.1.5: Let us compute the eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(−๐) = ๐ฅ(๐), ๐ฅ 0(−๐) = ๐ฅ 0(๐). We have not specified the values or the derivatives at the endpoints, but rather that they are the same at the beginning and at the end of the interval. Let us skip ๐ < 0. The computations are the same as before, and again we find that there are no negative eigenvalues. For ๐ = 0, the general solution is ๐ฅ = ๐ด๐ก + ๐ต. The condition ๐ฅ(−๐) = ๐ฅ(๐) implies that ๐ด = 0 (๐ด๐ + ๐ต = −๐ด๐ + ๐ต implies ๐ด = 0). The second condition ๐ฅ 0(−๐) = ๐ฅ 0(๐) says nothing about ๐ต and hence ๐ = 0 is an eigenvalue with a corresponding eigenfunction ๐ฅ = 1. √ √ For ๐ > 0 we get that ๐ฅ = ๐ด cos( ๐ ๐ก) + ๐ต sin( ๐ ๐ก). Now √ √ √ √ ๐ด cos(− ๐ ๐) + ๐ต sin(− ๐ ๐) = ๐ด cos( ๐ ๐) + ๐ต sin( ๐ ๐) . | {z ๐ฅ(−๐) } | {z ๐ฅ(๐) } We remember that cos(−๐) = cos(๐) and sin(−๐) = − sin(๐). Therefore, √ √ √ √ ๐ด cos( ๐ ๐) − ๐ต sin( ๐ ๐) = ๐ด cos( ๐ ๐) + ๐ต sin( ๐ ๐). √ Hence either ๐ต = 0 or sin( ๐ ๐) = 0. Similarly (exercise) if we differentiate ๐ฅ and plug in √ the second condition we find that ๐ด = 0 or sin( ๐ ๐) = 0. Therefore, unless we√want ๐ด √ and ๐ต to both be zero (which we do not) we must have sin( ๐ ๐) = 0. Hence, ๐ is an integer and the eigenvalues are yet again ๐ = ๐ 2 for an integer ๐ ≥ 1. In this case, however, ๐ฅ = ๐ด cos(๐๐ก) + ๐ต sin(๐๐ก) is an eigenfunction for any ๐ด and any ๐ต. So we have two linearly independent eigenfunctions sin(๐๐ก) and cos(๐๐ก). Remember that for a matrix we can also have two eigenvectors corresponding to a single eigenvalue if the eigenvalue is repeated. In summary, the eigenvalues and corresponding eigenfunctions are ๐๐ = ๐2 with eigenfunctions cos(๐๐ก) ๐0 = 0 with an eigenfunction ๐ฅ0 = 1. and sin(๐๐ก) for all integers ๐ ≥ 1, 193 4.1. BOUNDARY VALUE PROBLEMS 4.1.3 Orthogonality of eigenfunctions Something that will be very useful in the next section is the orthogonality property of the eigenfunctions. This is an analogue of the following fact about eigenvectors of a matrix. A matrix is called symmetric if ๐ด = ๐ด๐ (it is equal to its transpose). Eigenvectors for two distinct eigenvalues of a symmetric matrix are orthogonal. The differential operators we are dealing with act much like a symmetric matrix. We, therefore, get the following theorem. Theorem 4.1.1. Suppose that ๐ฅ1 (๐ก) and ๐ฅ2 (๐ก) are two eigenfunctions of the problem (4.1), (4.2) or (4.3) for two different eigenvalues ๐1 and ๐2 . Then they are orthogonal in the sense that ∫ ๐ ๐ ๐ฅ1 (๐ก)๐ฅ2 (๐ก) ๐๐ก = 0. The terminology comes from the fact that the integral is a type of inner product. We will expand on this in the next section. The theorem has a very short, elegant, and illuminating proof so let us give it here. First, we have the following two equations. ๐ฅ100 + ๐1 ๐ฅ1 = 0 ๐ฅ 200 + ๐2 ๐ฅ2 = 0. and Multiply the first by ๐ฅ2 and the second by ๐ฅ1 and subtract to get (๐1 − ๐2 )๐ฅ1 ๐ฅ2 = ๐ฅ200 ๐ฅ1 − ๐ฅ2 ๐ฅ100 . Now integrate both sides of the equation: (๐1 − ๐2 ) ∫ ๐ ๐ ๐ฅ1 ๐ฅ2 ๐๐ก = ∫ ๐ ๐ฅ200 ๐ฅ 1 − ๐ฅ2 ๐ฅ100 ๐๐ก ๐ ∫ = ๐ ๐ ๐ 0 ๐ฅ2 ๐ฅ1 − ๐ฅ 2 ๐ฅ10 ๐๐ก ๐๐ก h = ๐ฅ20 ๐ฅ1 − ๐ฅ2 ๐ฅ10 i๐ ๐ก=๐ = 0. The last equality holds because of the boundary conditions. For example, if we consider (4.1) we have ๐ฅ 1 (๐) = ๐ฅ 1 (๐) = ๐ฅ2 (๐) = ๐ฅ2 (๐) = 0 and so ๐ฅ20 ๐ฅ1 − ๐ฅ2 ๐ฅ10 is zero at both ๐ and ๐. As ๐1 ≠ ๐2 , the theorem follows. Exercise 4.1.1 (easy): Finish the proof of the theorem (check the last equality in the proof) for the cases (4.2) and (4.3). The function sin(๐๐ก) is an eigenfunction for the problem ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(0) = 0, ๐ฅ(๐) = 0. Hence for positive integers ๐ and ๐ we have the integrals ∫ 0 ๐ sin(๐๐ก) sin(๐๐ก) ๐๐ก = 0, when ๐ ≠ ๐. 194 CHAPTER 4. FOURIER SERIES AND PDES Similarly, ๐ ∫ cos(๐๐ก) cos(๐๐ก) ๐๐ก = 0, ∫ when ๐ ≠ ๐, ๐ and cos(๐๐ก) ๐๐ก = 0. 0 0 And finally we also get ∫ ๐ sin(๐๐ก) sin(๐๐ก) ๐๐ก = 0, when ๐ ≠ ๐, and ๐ cos(๐๐ก) cos(๐๐ก) ๐๐ก = 0, ∫ when ๐ ≠ ๐, ๐ and cos(๐๐ก) ๐๐ก = 0, −๐ −๐ and sin(๐๐ก) ๐๐ก = 0, −๐ −๐ ∫ ๐ ∫ ∫ ๐ cos(๐๐ก) sin(๐๐ก) ๐๐ก = 0 (even if ๐ = ๐). −๐ 4.1.4 Fredholm alternative We now touch on a very useful theorem in the theory of differential equations. The theorem holds in a more general setting than we are going to state it, but for our purposes the following statement is sufficient. We will give a slightly more general version in chapter 5. Theorem 4.1.2 (Fredholm alternative∗ ). Exactly one of the following statements holds. Either ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = 0, ๐ฅ(๐) = 0 (4.4) has a nonzero solution, or ๐ฅ 00 + ๐๐ฅ = ๐ (๐ก), ๐ฅ(๐) = 0, ๐ฅ(๐) = 0 (4.5) has a unique solution for every function ๐ continuous on [๐, ๐]. The theorem is also true for the other types of boundary conditions we considered. The theorem means that if ๐ is not an eigenvalue, the nonhomogeneous equation (4.5) has a unique solution for every right-hand side. On the other hand if ๐ is an eigenvalue, then (4.5) need not have a solution for every ๐ , and furthermore, even if it happens to have a solution, the solution is not unique. We also want to reinforce the idea here that linear differential operators have much in common with matrices. So it is no surprise that there is a finite-dimensional version of Fredholm alternative for matrices as well. Let ๐ด be an ๐ × ๐ matrix. The Fredholm alternative then states that either (๐ด − ๐๐ผ)๐ฅ® = 0® has a nontrivial solution, or (๐ด − ๐๐ผ)๐ฅ® = ๐® ® has a unique solution for every ๐. A lot of intuition from linear algebra can be applied to linear differential operators, but one must be careful of course. For example, one difference we have already seen is that in general a differential operator will have infinitely many eigenvalues, while a matrix has only finitely many. ∗ Named after the Swedish mathematician Erik Ivar Fredholm (1866–1927). 195 4.1. BOUNDARY VALUE PROBLEMS 4.1.5 Application Let us consider a physical application of an endpoint problem. Suppose we have a tightly stretched quickly spinning elastic string or rope of uniform linear density ๐, for example in kg/m. Let us put this problem into the ๐ฅ๐ฆ-plane and both ๐ฅ and ๐ฆ are in meters. The ๐ฅ-axis represents the position on the string. The string rotates at angular velocity ๐, in radians/s. Imagine that the whole ๐ฅ๐ฆ-plane rotates at angular velocity ๐. This way, the string stays in this ๐ฅ ๐ฆ-plane and ๐ฆ measures its deflection from the equilibrium position, ๐ฆ = 0, on the ๐ฅ-axis. Hence the graph of ๐ฆ gives the shape of the string. We consider an ideal string with no volume, just a mathematical curve. We suppose the tension on the string is a constant ๐ in Newtons. Assuming that the deflection is small, we can use Newton’s second law (let us skip the derivation) to get the equation ๐ ๐ฆ 00 + ๐๐2 ๐ฆ = 0. To check the units notice that the units of ๐ฆ 00 are m/m2 , as the derivative is in terms of ๐ฅ. Let ๐ฟ be the length of the string (in meters) and the string is fixed at the beginning and end points. Hence, ๐ฆ(0) = 0 and ๐ฆ(๐ฟ) = 0. See Figure 4.1. ๐ฆ ๐ฆ ๐ฟ 0 ๐ฅ Figure 4.1: Whirling string. ๐๐ 2 We rewrite the equation as ๐ฆ 00 + ๐ ๐ฆ = 0. The setup is similar to Example 4.1.3 on page 190, except for the interval length being ๐ฟ instead of ๐. We are looking for ๐๐2 eigenvalues of ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ(0) = 0, ๐ฆ(๐ฟ) = 0 where ๐ = ๐ . As before there are no nonpositive eigenvalues. With ๐ > 0, the general solution to the equation is ๐ฆ = √ √ ๐ด cos( ๐ ๐ฅ) + ๐ต sin( ๐ ๐ฅ). The condition ๐ฆ(0) = 0 implies that ๐ด = 0 as before. The √ √ condition ๐ฆ(๐ฟ) = 0 implies that sin( ๐ ๐ฟ) = 0 and hence ๐ ๐ฟ = ๐๐ for some integer ๐ > 0, so ๐๐2 ๐ 2 ๐2 =๐= 2 . ๐ ๐ฟ What does this say about the shape of the string? It says that for all parameters ๐, ๐, ๐ not satisfying the equation above, the string is in the equilibrium position, ๐ฆ = 0. When ๐๐ 2 ๐ = ๐ ๐ฟ๐2 , then the string will “pop out” some distance ๐ต. We cannot compute ๐ต with the information we have. 2 2 196 CHAPTER 4. FOURIER SERIES AND PDES Let us assume that ๐ and ๐ are fixed and we are changing ๐. For most values √ of ๐ the √ ๐ , then string is in the equilibrium state. When the angular velocity ๐ hits a value ๐ = ๐๐ ๐ฟ ๐ the string pops out and has the shape of a sin wave crossing the ๐ฅ-axis ๐ − 1 times between the end points. For example, at ๐ = 1, the string does not cross the ๐ฅ-axis and the shape looks like in Figure 4.1 on the preceding page. On the other hand, when ๐ = 3 the string crosses the ๐ฅ-axis 2 times, see Figure 4.2. When ๐ changes again, the string returns to the equilibrium position. The higher the angular velocity, the more times it crosses the ๐ฅ-axis when it is popped out. ๐ฆ 0 ๐ฟ ๐ฅ Figure 4.2: Whirling string at the third eigenvalue (๐ = 3). For another example, if you have a spinning jump rope (then ๐ = 1 as it is completely “popped out”) and you pull on the ends to increase the tension, then the velocity also increases for the rope to stay “popped out”. 4.1.6 Exercises Hint for the following exercises: Note that when ๐ > 0, then cos ๐) are also solutions of the homogeneous equation. √ √ ๐ (๐ก − ๐) and sin ๐ (๐ก − Exercise 4.1.2: Compute all eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = 0, ๐ฅ(๐) = 0 (assume ๐ < ๐). Exercise 4.1.3: Compute all eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ 0(๐) = 0, ๐ฅ 0(๐) = 0 (assume ๐ < ๐). Exercise 4.1.4: Compute all eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ 0(๐) = 0, ๐ฅ(๐) = 0 (assume ๐ < ๐). Exercise 4.1.5: Compute all eigenvalues and eigenfunctions of ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(๐) = ๐ฅ(๐), ๐ฅ 0(๐) = ๐ฅ 0(๐) (assume ๐ < ๐). Exercise 4.1.6: We skipped the case of ๐ < 0 for the boundary value problem ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(−๐) = ๐ฅ(๐), ๐ฅ 0(−๐) = ๐ฅ 0(๐). Finish the calculation and show that there are no negative eigenvalues. Exercise 4.1.101: Consider a spinning string of length 2 and linear density 0.1 and tension 3. Find smallest angular velocity when the string pops out. 4.1. BOUNDARY VALUE PROBLEMS 197 Exercise 4.1.102: Suppose ๐ฅ 00 + ๐๐ฅ = 0 and ๐ฅ(0) = 1, ๐ฅ(1) = 1. Find all ๐ for which there is more than one solution. Also find the corresponding solutions (only for the eigenvalues). Exercise 4.1.103: Suppose ๐ฅ 00 + ๐ฅ = 0 and ๐ฅ(0) = 0, ๐ฅ 0(๐) = 1. Find all the solution(s) if any exist. Exercise 4.1.104: Consider ๐ฅ 0 + ๐๐ฅ = 0 and ๐ฅ(0) = 0, ๐ฅ(1) = 0. Why does it not have any eigenvalues? Why does any first order equation with two endpoint conditions such as above have no eigenvalues? Exercise 4.1.105 (challenging): Suppose ๐ฅ 000 + ๐๐ฅ = 0 and ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, ๐ฅ(1) =√0. 3 Suppose that ๐ > 0. Find an equation that all such eigenvalues must satisfy. Hint: Note that − ๐ is a root of ๐ 3 + ๐ = 0. 198 4.2 CHAPTER 4. FOURIER SERIES AND PDES The trigonometric series Note: 2 lectures, §9.1 in [EP], §10.2 in [BD] 4.2.1 Periodic functions and motivation As motivation for studying Fourier series, suppose we have the problem ๐ฅ 00 + ๐02 ๐ฅ = ๐ (๐ก), (4.6) for some periodic function ๐ (๐ก). We already solved ๐ฅ 00 + ๐02 ๐ฅ = ๐น0 cos(๐๐ก). (4.7) One way to solve (4.6) is to decompose ๐ (๐ก) as a sum of cosines (and sines) and then solve many problems of the form (4.7). We then use the principle of superposition, to sum up all the solutions we got to get a solution to (4.6). Before we proceed, let us talk a little bit more in detail about periodic functions. A function is said to be periodic with period ๐ if ๐ (๐ก) = ๐ (๐ก + ๐) for all ๐ก. For brevity we say ๐ (๐ก) is ๐-periodic. Note that a ๐-periodic function is also 2๐-periodic, 3๐-periodic and so on. For example, cos(๐ก) and sin(๐ก) are 2๐-periodic. So are cos(๐๐ก) and sin(๐๐ก) for all integers ๐. The constant functions are an extreme example. They are periodic for any period (exercise). Normally we start with a function ๐ (๐ก) defined on some interval [−๐ฟ, ๐ฟ], and we want to extend ๐ (๐ก) periodically to make it a 2๐ฟ-periodic function. We do this extension by defining a new function ๐น(๐ก) such that for ๐ก in [−๐ฟ, ๐ฟ], ๐น(๐ก) = ๐ (๐ก). For ๐ก in [๐ฟ, 3๐ฟ], we define ๐น(๐ก) = ๐ (๐ก − 2๐ฟ), for ๐ก in [−3๐ฟ, −๐ฟ], ๐น(๐ก) = ๐ (๐ก + 2๐ฟ), and so on. To make that work we needed ๐ (−๐ฟ) = ๐ (๐ฟ). We could have also started with ๐ defined only on the half-open interval (−๐ฟ, ๐ฟ] and then define ๐ (−๐ฟ) = ๐ (๐ฟ). Example 4.2.1: Define ๐ (๐ก) = 1 − ๐ก 2 on [−1, 1]. Now extend ๐ (๐ก) periodically to a 2-periodic function. See Figure 4.3 on the facing page. You should be careful to distinguish between ๐ (๐ก) and its extension. A common mistake is to assume that a formula for ๐ (๐ก) holds for its extension. It can be confusing when the formula for ๐ (๐ก) is periodic, but with perhaps a different period. Exercise 4.2.1: Define ๐ (๐ก) = cos ๐ก on [−๐/2, ๐/2]. Take the ๐-periodic extension and sketch its graph. How does it compare to the graph of cos ๐ก? 4.2.2 Inner product and eigenvector decomposition Suppose we have a symmetric matrix, that is ๐ด๐ = ๐ด. As we remarked before, eigenvectors of ® are two eigenvectors ๐ด are then orthogonal. Here the word orthogonal means that if ๐ฃ® and ๐ค 199 4.2. THE TRIGONOMETRIC SERIES -3 -2 -1 0 1 2 3 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 -0.5 -0.5 -3 -2 -1 0 1 2 3 Figure 4.3: Periodic extension of the function 1 − ๐ก 2 . ® = 0. In this case the inner product h® ® is the of ๐ด for distinct eigenvalues, then h® ๐ฃ , ๐คi ๐ฃ , ๐คi ๐ ® dot product, which can be computed as ๐ฃ® ๐ค. ® 1 and ๐ค ® 2 we write To decompose a vector ๐ฃ® in terms of mutually orthogonal vectors ๐ค ® 1 + ๐2 ๐ค ® 2. ๐ฃ® = ๐ 1 ๐ค Let us find the formula for ๐ 1 and ๐ 2 . First let us compute ® 1 + ๐2 ๐ค ® 2 , ๐ค®1 i = ๐ 1 h๐ค ® 1 , ๐ค®1 i + ๐ 2 h๐ค ® 2 , ๐ค®1 i = ๐ 1 h๐ค ® 1 , ๐ค®1 i. h® ๐ฃ , ๐ค®1 i = h๐ 1 ๐ค | {z } =0 Therefore, ๐1 = h® ๐ฃ , ๐ค®1 i . ® 1 , ๐ค®1 i h๐ค ๐2 = h® ๐ฃ , ๐ค®2 i . ® 2 , ๐ค®2 i h๐ค Similarly You probably remember this formula from vector calculus. 1 Example 4.2.2: Write ๐ฃ® = 23 as a linear combination of ๐ค®1 = −1 and ๐ค®2 = 11 . ® 1 and ๐ค ® 2 are orthogonal as h๐ค ®1, ๐ค ® 2 i = 1(1) + (−1)1 = 0. Then First note that ๐ค h® ๐ฃ , ๐ค®1 i 2(1) + 3(−1) −1 = = , 2 ® 1 , ๐ค®1 i 1(1) + (−1)(−1) h๐ค h® ๐ฃ , ๐ค®2 i 2+3 5 ๐2 = = = . ® 2 , ๐ค®2 i 1 + 1 2 h๐ค ๐1 = Hence −1 1 5 1 2 = + . 3 2 −1 2 1 200 4.2.3 CHAPTER 4. FOURIER SERIES AND PDES The trigonometric series Instead of decomposing a vector in terms of eigenvectors of a matrix, we decompose a function in terms of eigenfunctions of a certain eigenvalue problem. The eigenvalue problem we use for the Fourier series is ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(−๐) = ๐ฅ(๐), ๐ฅ 0(−๐) = ๐ฅ 0(๐). We computed that eigenfunctions are 1, cos(๐๐ก), sin(๐๐ก). That is, we want to find a representation of a 2๐-periodic function ๐ (๐ก) as ∞ ๐0 Õ + ๐ (๐ก) = ๐ ๐ cos(๐๐ก) + ๐ ๐ sin(๐๐ก). 2 ๐=1 This series is called the Fourier series∗ or the trigonometric series for ๐ (๐ก). We write the coefficient of the eigenfunction 1 as ๐20 for convenience. We could also think of 1 = cos(0๐ก), so that we only need to look at cos(๐๐ก) and sin(๐๐ก). As for matrices we want to find a projection of ๐ (๐ก) onto the subspaces given by the eigenfunctions. So we want to define an inner product of functions. For example, to find ๐ ๐ we want to compute h ๐ (๐ก) , cos(๐๐ก) i. We define the inner product as def h ๐ (๐ก) , ๐(๐ก) i = ∫ ๐ ๐ (๐ก) ๐(๐ก) ๐๐ก. −๐ With this definition of the inner product, we saw in the previous section that the eigenfunctions cos(๐๐ก) (including the constant eigenfunction), and sin(๐๐ก) are orthogonal in the sense that h cos(๐๐ก) , cos(๐๐ก) i = 0 for ๐ ≠ ๐, h sin(๐๐ก) , sin(๐๐ก) i = 0 for ๐ ≠ ๐, h sin(๐๐ก) , cos(๐๐ก) i = 0 for all ๐ and ๐. For ๐ = 1, 2, 3, . . . we have h cos(๐๐ก) , cos(๐๐ก) i = h sin(๐๐ก) , sin(๐๐ก) i = ∫ ๐ ∫−๐๐ cos(๐๐ก) cos(๐๐ก) ๐๐ก = ๐, sin(๐๐ก) sin(๐๐ก) ๐๐ก = ๐, −๐ by elementary calculus. For the constant we get h1, 1i = ∫ ๐ 1 · 1 ๐๐ก = 2๐. −๐ ∗ Named after the French mathematician Jean Baptiste Joseph Fourier (1768–1830). 201 4.2. THE TRIGONOMETRIC SERIES The coefficients are given by ๐ h ๐ (๐ก) , cos(๐๐ก) i 1 = ๐๐ = ๐ (๐ก) cos(๐๐ก) ๐๐ก, h cos(๐๐ก) , cos(๐๐ก) i ๐ −๐ ∫ ๐ h ๐ (๐ก) , sin(๐๐ก) i 1 = ๐๐ = ๐ (๐ก) sin(๐๐ก) ๐๐ก. h sin(๐๐ก) , sin(๐๐ก) i ๐ −๐ ∫ Compare these expressions with the finite-dimensional example. For ๐0 we get a similar formula ∫ ๐ h ๐ (๐ก) , 1 i 1 ๐ (๐ก) ๐๐ก. ๐0 = 2 = ๐ −๐ h1, 1i Let us check the formulas using the orthogonality properties. Suppose for a moment that ∞ ๐0 Õ + ๐ ๐ cos(๐๐ก) + ๐ ๐ sin(๐๐ก). ๐ (๐ก) = 2 ๐=1 Then for ๐ ≥ 1 we have h ๐ (๐ก) , cos(๐๐ก) i = D๐ 0 2 + ∞ Õ ๐ ๐ cos(๐๐ก) + ๐ ๐ sin(๐๐ก) , cos(๐๐ก) E ๐=1 ∞ Õ ๐0 = h 1 , cos(๐๐ก) i + ๐ ๐ h cos(๐๐ก) , cos(๐๐ก) i + ๐ ๐ h sin(๐๐ก) , cos(๐๐ก) i 2 ๐=1 = ๐ ๐ h cos(๐๐ก) , cos(๐๐ก) i. And hence ๐ ๐ = h ๐ (๐ก) , cos(๐๐ก) i . h cos(๐๐ก) , cos(๐๐ก) i Exercise 4.2.2: Carry out the calculation for ๐ 0 and ๐ ๐ . Example 4.2.3: Take the function ๐ (๐ก) = ๐ก for ๐ก in (−๐, ๐]. Extend ๐ (๐ก) periodically and write it as a Fourier series. This function is called the sawtooth. The plot of the extended periodic function is given in Figure 4.4 on the next page. Let us compute the coefficients. We start with ๐ 0 , 1 ๐0 = ๐ ∫ ๐ ๐ก ๐๐ก = 0. −๐ We will often use the result from calculus that says that the integral of an odd function over a symmetric interval is zero. Recall that an odd function is a function ๐(๐ก) such that ๐(−๐ก) = −๐(๐ก). For example the functions ๐ก, sin ๐ก, or (importantly for us) ๐ก cos(๐๐ก) are all odd functions. Thus ∫ ๐ 1 ๐๐ = ๐ก cos(๐๐ก) ๐๐ก = 0. ๐ −๐ 202 CHAPTER 4. FOURIER SERIES AND PDES -5.0 -2.5 0.0 2.5 5.0 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -5.0 -2.5 0.0 2.5 5.0 Figure 4.4: The graph of the sawtooth function. Let us move to ๐ ๐ . Another useful fact from calculus is that the integral of an even function over a symmetric interval is twice the integral of the same function over half the interval. Recall an even function is a function ๐(๐ก) such that ๐(−๐ก) = ๐(๐ก). For example ๐ก sin(๐๐ก) is even. ๐ 1 ๐๐ = ๐ก sin(๐๐ก) ๐๐ก ๐ −๐ ∫ ๐ 2 = ๐ก sin(๐๐ก) ๐๐ก ๐ 0 ∫ 2 = ๐ −๐ก cos(๐๐ก) ๐ ๐ 1 + ๐ ๐ก=0 2 −๐ cos(๐๐) = +0 ๐ ๐ = ∫ ๐ cos(๐๐ก) ๐๐ก 0 −2 cos(๐๐) 2 (−1)๐+1 = . ๐ ๐ We have used the fact that ๐ ( cos(๐๐) = (−1) = The series, therefore, is ∞ Õ 2 (−1)๐+1 ๐=1 ๐ 1 if ๐ even, −1 if ๐ odd. sin(๐๐ก). Let us write out the first 3 harmonics of the series for ๐ (๐ก). 2 sin(๐ก) − sin(2๐ก) + 2 sin(3๐ก) + · · · 3 203 4.2. THE TRIGONOMETRIC SERIES The plot of these first three terms of the series, along with a plot of the first 20 terms is given in Figure 4.5. -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 Figure 4.5: First 3 (left graph) and 20 (right graph) harmonics of the sawtooth function. Example 4.2.4: Take the function ( ๐ (๐ก) = 0 if −๐ < ๐ก ≤ 0, ๐ if 0 < ๐ก ≤ ๐. Extend ๐ (๐ก) periodically and write it as a Fourier series. This function or its variants appear often in applications and the function is called the square wave. -5.0 -2.5 0.0 2.5 5.0 3 3 2 2 1 1 0 0 -5.0 -2.5 0.0 2.5 5.0 Figure 4.6: The graph of the square wave function. The plot of the extended periodic function is given in Figure 4.6. Now we compute the 204 CHAPTER 4. FOURIER SERIES AND PDES coefficients. We start with ๐ 0 Next, 1 ๐๐ = ๐ ∫ ๐ −๐ ∫ ๐ ๐ 1 ๐ (๐ก) ๐๐ก = ๐ ∫ 1 ๐ (๐ก) cos(๐๐ก) ๐๐ก = ๐ ∫ 1 ๐0 = ๐ −๐ ๐ ๐๐ก = ๐. 0 ๐ ๐ cos(๐๐ก) ๐๐ก = 0. 0 And finally, ๐ 1 ๐๐ = ๐ (๐ก) sin(๐๐ก) ๐๐ก ๐ −๐ ∫ ๐ 1 = ๐ sin(๐๐ก) ๐๐ก ๐ 0 ∫ − cos(๐๐ก) = ๐ ๐ ๐ก=0 2 1 − cos(๐๐) 1 − (−1)๐ = = = ๐ ๐ ๐ 0 ( if ๐ is odd, if ๐ is even. The Fourier series is ∞ ∞ ๐ Õ 2 ๐ Õ 2 + sin(๐๐ก) = + sin (2๐ − 1) ๐ก . 2 ๐ 2 2๐ − 1 ๐=1 ๐ odd ๐=1 Let us write out the first 3 harmonics of the series for ๐ (๐ก): ๐ 2 + 2 sin(๐ก) + sin(3๐ก) + · · · 2 3 The plot of these first three and also of the first 20 terms of the series is given in Figure 4.7 on the facing page. We have so far skirted the issue of convergence. For example, if ๐ (๐ก) is the square wave function, the equation ∞ ๐ Õ 2 ๐ (๐ก) = + sin (2๐ − 1) ๐ก . 2 2๐ − 1 ๐=1 is only an equality for such ๐ก where ๐ (๐ก) is continuous. We do not get an equality for ๐ก = −๐, 0, ๐ and all the other discontinuities of ๐ (๐ก). It is not hard to see that when ๐ก is an integer multiple of ๐ (which gives all the discontinuities), then ∞ ๐ ๐ Õ 2 + sin (2๐ − 1) ๐ก = . 2 2๐ − 1 2 ๐=1 205 4.2. THE TRIGONOMETRIC SERIES -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 Figure 4.7: First 3 (left graph) and 20 (right graph) harmonics of the square wave function. We redefine ๐ (๐ก) on [−๐, ๐] as ๏ฃฑ ๏ฃด 0 ๏ฃด ๏ฃฒ ๏ฃด ๐ (๐ก) = ๐ if −๐ < ๐ก < 0, if ๏ฃด ๏ฃด ๏ฃด ๐/2 if ๏ฃณ 0 < ๐ก < ๐, ๐ก = −๐, ๐ก = 0, or ๐ก = ๐, and extend periodically. The series equals this new extended ๐ (๐ก) everywhere, including the discontinuities. We will generally not worry about changing the function values at several (finitely many) points. We will say more about convergence in the next section. Let us, however, briefly mention an effect of the discontinuity. Zoom in near the discontinuity in the square wave. Further, plot the first 100 harmonics, see Figure 4.8 on the next page. While the series is a very good approximation away from the discontinuities, the error (the overshoot) near the discontinuity at ๐ก = ๐ does not seem to be getting any smaller as we take more and more harmonics. This behavior is known as the Gibbs phenomenon. The region where the error is large does get smaller, however, the more terms in the series we take. We can think of a periodic function as a “signal” being a superposition of many signals of pure frequency. For example, we could think of the square wave as a tone of certain base frequency. This base frequency is called the fundamental frequency. The square wave will be a superposition of many different pure tones of frequencies that are multiples of the fundamental frequency. In music, the higher frequencies are called the overtones. All the frequencies that appear are called the spectrum of the signal. On the other hand a simple sine wave is only the pure tone (no overtones). The simplest way to make sound using a computer is the square wave, and the sound is very different from a pure tone. If you ever played video games from the 1980s or so, then you heard what square waves sound like. 206 CHAPTER 4. FOURIER SERIES AND PDES 1.75 2.00 2.25 2.50 2.75 3.00 3.25 3.50 3.50 3.25 3.25 3.00 3.00 2.75 2.75 1.75 2.00 2.25 2.50 2.75 3.00 3.25 Figure 4.8: Gibbs phenomenon in action. 4.2.4 Exercises Exercise 4.2.3: Suppose ๐ (๐ก) is defined on [−๐, ๐] as sin(5๐ก) + cos(3๐ก). Extend periodically and compute the Fourier series of ๐ (๐ก). Exercise 4.2.4: Suppose ๐ (๐ก) is defined on [−๐, ๐] as |๐ก|. Extend periodically and compute the Fourier series of ๐ (๐ก). Exercise 4.2.5: Suppose ๐ (๐ก) is defined on [−๐, ๐] as |๐ก | 3 . Extend periodically and compute the Fourier series of ๐ (๐ก). Exercise 4.2.6: Suppose ๐ (๐ก) is defined on (−๐, ๐] as ( ๐ (๐ก) = −1 if −๐ < ๐ก ≤ 0, 1 if 0 < ๐ก ≤ ๐. Extend periodically and compute the Fourier series of ๐ (๐ก). Exercise 4.2.7: Suppose ๐ (๐ก) is defined on (−๐, ๐] as ๐ก 3 . Extend periodically and compute the Fourier series of ๐ (๐ก). Exercise 4.2.8: Suppose ๐ (๐ก) is defined on [−๐, ๐] as ๐ก 2 . Extend periodically and compute the Fourier series of ๐ (๐ก). There is another form of the Fourier series using complex exponentials ๐ ๐๐ก for ๐ = . . . , −2, −1, 0, 1, 2, . . . instead of cos(๐๐ก) and sin(๐๐ก) for positive ๐. This form may be easier to work with sometimes. It is certainly more compact to write, and there is only one formula for the coefficients. On the downside, the coefficients are complex numbers. 207 4.2. THE TRIGONOMETRIC SERIES Exercise 4.2.9: Let ∞ ๐0 Õ + ๐ ๐ cos(๐๐ก) + ๐ ๐ sin(๐๐ก). ๐ (๐ก) = 2 ๐=1 Use Euler’s formula ๐ ๐๐ = cos(๐) + ๐ sin(๐) to show that there exist complex numbers ๐ ๐ such that ๐ (๐ก) = ∞ Õ ๐ ๐ ๐ ๐๐๐ก . ๐=−∞ Note that the sum now ranges over all the integers including negative ones. Do not worry about convergence in this calculation. Hint: It may be better to start from the complex exponential form and write the series as ๐0 + ∞ Õ ๐๐ ๐ ๐๐๐ก + ๐ −๐ ๐ −๐๐๐ก . ๐=1 Exercise 4.2.101: Suppose ๐ (๐ก) is defined on [−๐, ๐] as ๐ (๐ก) = sin(๐ก). Extend periodically and compute the Fourier series. Exercise 4.2.102: Suppose ๐ (๐ก) is defined on (−๐, ๐] as ๐ (๐ก) = sin(๐๐ก). Extend periodically and compute the Fourier series. Exercise 4.2.103: Suppose ๐ (๐ก) is defined on (−๐, ๐] as ๐ (๐ก) = sin2 (๐ก). Extend periodically and compute the Fourier series. Exercise 4.2.104: Suppose ๐ (๐ก) is defined on (−๐, ๐] as ๐ (๐ก) = ๐ก 4 . Extend periodically and compute the Fourier series. 208 4.3 CHAPTER 4. FOURIER SERIES AND PDES More on the Fourier series Note: 2 lectures, §9.2–§9.3 in [EP], §10.3 in [BD] 4.3.1 2๐ฟ-periodic functions We have computed the Fourier series for a 2๐-periodic function, but what about functions of different periods. Well, fear not, the computation is a simple case of change of variables. We just rescale the independent axis. Suppose we have a 2๐ฟ-periodic function ๐ (๐ก). Then ๐ฟ is called the half period. Let ๐ = ๐๐ฟ ๐ก. Then the function ๐ฟ ๐(๐ ) = ๐ ๐ ๐ is 2๐-periodic. We must also rescale all our sines and cosines. In the series we use ๐๐ฟ ๐ก as the variable. That is, we want to write ∞ ๐๐ ๐๐ ๐0 Õ ๐ ๐ cos ๐ (๐ก) = + ๐ก + ๐ ๐ sin ๐ก . 2 ๐ฟ ๐ฟ ๐=1 If we change variables to ๐ , we see that ∞ ๐0 Õ ๐(๐ ) = + ๐ ๐ cos(๐๐ ) + ๐ ๐ sin(๐๐ ). 2 ๐=1 We compute ๐ ๐ and ๐ ๐ as before. After we write down the integrals, we change variables from ๐ back to ๐ก, noting also that ๐๐ = ๐๐ฟ ๐๐ก. 1 ๐0 = ๐ 1 ๐๐ = ๐ ๐๐ = 1 ๐ ∫ ๐ −๐ ∫ ๐ −๐ ∫ ๐ −๐ 1 ๐(๐ ) ๐๐ = ๐ฟ ∫ ๐ฟ ๐ (๐ก) ๐๐ก, −๐ฟ 1 ๐(๐ ) cos(๐๐ ) ๐๐ = ๐ฟ ๐(๐ ) sin(๐๐ ) ๐๐ = 1 ๐ฟ ∫ ๐ฟ −๐ฟ ∫ ๐ฟ −๐ฟ ๐ (๐ก) cos ๐ (๐ก) sin ๐๐ ๐ฟ ๐ก ๐๐ก, ๐๐ ๐ฟ ๐ก ๐๐ก. The two most common half periods that show up in examples are ๐ and 1 because of the simplicity of the formulas. We should stress that we have done no new mathematics, we have only changed variables. If you understand the Fourier series for 2๐-periodic functions, you understand it for 2๐ฟ-periodic functions. You can think of it as just using different units for time. All that we are doing is moving some constants around, but all the mathematics is the same. 209 4.3. MORE ON THE FOURIER SERIES Example 4.3.1: Let ๐ (๐ก) = |๐ก | for −1 < ๐ก ≤ 1, extended periodically. The plot of the periodic extension is given in Figure 4.9. Compute the Fourier series of ๐ (๐ก). -2 -1 0 1 2 1.00 1.00 0.75 0.75 0.50 0.50 0.25 0.25 0.00 0.00 -2 -1 0 1 2 Figure 4.9: Periodic extension of the function ๐ (๐ก). We want to write ๐ (๐ก) = ๐20 + |๐ก| cos(๐๐๐ก) is even and hence ๐๐ = 1 ∫ Í∞ ๐=1 ๐ ๐ cos(๐๐๐ก) + ๐ ๐ sin(๐๐๐ก). For ๐ ≥ 1 we note that ๐ (๐ก) cos(๐๐๐ก) ๐๐ก −1 ∫ =2 1 ๐ก cos(๐๐๐ก) ๐๐ก 0 ๐ก =2 sin(๐๐๐ก) ๐๐ 1 1 ∫ 1 sin(๐๐๐ก) ๐๐ก ๐๐ −2 ๐ก=0 0 i1 2 (−1)๐ − 1 0 1 h = 0 + 2 2 cos(๐๐๐ก) = = −4 ๐ก=0 ๐ ๐ ๐ 2 ๐2 ๐ 2 ๐2 Next we find ๐0 : ๐0 = ∫ 1 ( if ๐ is even, if ๐ is odd. |๐ก | ๐๐ก = 1. −1 You should be able to find this integral by thinking about the integral as the area under the graph without doing any computation at all. Finally we can find ๐ ๐ . Here, we notice that |๐ก| sin(๐๐๐ก) is odd and, therefore, ๐๐ = ∫ 1 −1 ๐ (๐ก) sin(๐๐๐ก) ๐๐ก = 0. 210 CHAPTER 4. FOURIER SERIES AND PDES Hence, the series is ∞ 1 Õ −4 + cos(๐๐๐ก). 2 ๐2 2 ๐ ๐=1 ๐ odd Let us explicitly write down the first few terms of the series up to the 3rd harmonic. 4 1 4 − 2 cos(๐๐ก) − 2 cos(3๐๐ก) − · · · 2 ๐ 9๐ The plot of these few terms and also a plot up to the 20th harmonic is given in Figure 4.10. You should notice how close the graph is to the real function. You should also notice that there is no “Gibbs phenomenon” present as there are no discontinuities. -2 -1 0 1 2 -2 -1 0 1 2 1.00 1.00 1.00 1.00 0.75 0.75 0.75 0.75 0.50 0.50 0.50 0.50 0.25 0.25 0.25 0.25 0.00 0.00 0.00 0.00 -2 -1 0 1 2 -2 -1 0 1 2 Figure 4.10: Fourier series of ๐ (๐ก) up to the 3rd harmonic (left graph) and up to the 20th harmonic (right graph). 4.3.2 Convergence We will need the one sided limits of functions. We will use the following notation ๐ (๐−) = lim ๐ (๐ก), and ๐ก↑๐ ๐ (๐+) = lim ๐ (๐ก). ๐ก↓๐ If you are unfamiliar with this notation, lim๐ก↑๐ ๐ (๐ก) means we are taking a limit of ๐ (๐ก) as ๐ก approaches ๐ from below (i.e. ๐ก < ๐) and lim๐ก↓๐ ๐ (๐ก) means we are taking a limit of ๐ (๐ก) as ๐ก approaches ๐ from above (i.e. ๐ก > ๐). For example, for the square wave function ( ๐ (๐ก) = we have ๐ (0−) = 0 and ๐ (0+) = ๐. 0 if −๐ < ๐ก ≤ 0, ๐ if 0 < ๐ก ≤ ๐, (4.8) 211 4.3. MORE ON THE FOURIER SERIES Let ๐ (๐ก) be a function defined on an interval [๐, ๐]. Suppose that we find finitely many points ๐ = ๐ก0 , ๐ก1 , ๐ก2 , . . . , ๐ก ๐ = ๐ in the interval, such that ๐ (๐ก) is continuous on the intervals (๐ก0 , ๐ก1 ), (๐ก1 , ๐ก2 ), . . . , (๐ก ๐−1 , ๐ก ๐ ). Also suppose that all the one sided limits exist, that is, all of ๐ (๐ก0 +), ๐ (๐ก1 −), ๐ (๐ก1 +), ๐ (๐ก2 −), ๐ (๐ก2 +), . . . , ๐ (๐ก ๐ −) exist and are finite. Then we say ๐ (๐ก) is piecewise continuous. If moreover, ๐ (๐ก) is differentiable at all but finitely many points, and ๐ 0(๐ก) is piecewise continuous, then ๐ (๐ก) is said to be piecewise smooth. Example 4.3.2: The square wave function (4.8) is piecewise smooth on [−๐, ๐] or any other interval. In such a case we simply say that the function is piecewise smooth. Example 4.3.3: The function ๐ (๐ก) = |๐ก| is piecewise smooth. Example 4.3.4: The function ๐ (๐ก) = 1๐ก is not piecewise smooth on [−1, 1] (or any other interval containing zero). In fact, it is not even piecewise continuous. √ Example 4.3.5: The function ๐ (๐ก) = 3 ๐ก is not piecewise smooth on [−1, 1] (or any other interval containing zero). ๐ (๐ก) is continuous, but the derivative of ๐ (๐ก) is unbounded near zero and hence not piecewise continuous. Piecewise smooth functions have an easy answer on the convergence of the Fourier series. Theorem 4.3.1. Suppose ๐ (๐ก) is a 2๐ฟ-periodic piecewise smooth function. Let ∞ ๐๐ ๐๐ ๐0 Õ + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก 2 ๐ฟ ๐ฟ ๐=1 be the Fourier series for ๐ (๐ก). Then the series converges for all ๐ก. If ๐ (๐ก) is continuous at ๐ก, then ∞ ๐๐ ๐๐ ๐0 Õ ๐ (๐ก) = + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก . 2 ๐ฟ ๐ฟ ๐=1 Otherwise, ∞ ๐๐ ๐๐ ๐ (๐ก−) + ๐ (๐ก+) ๐ 0 Õ = + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก . 2 2 ๐ฟ ๐ฟ ๐=1 ๐ (๐ก−)+ ๐ (๐ก+) If we happen to have that ๐ (๐ก) = at all the discontinuities, the Fourier series 2 converges to ๐ (๐ก) everywhere. We can always just redefine ๐ (๐ก) by changing the value at each discontinuity appropriately. Then we can write an equals sign between ๐ (๐ก) and the series without any worry. We mentioned this fact briefly at the end last section. The theorem does not say how fast the series converges. Think back to the discussion of the Gibbs phenomenon in the last section. The closer you get to the discontinuity, the more terms you need to take to get an accurate approximation to the function. 212 4.3.3 CHAPTER 4. FOURIER SERIES AND PDES Differentiation and integration of Fourier series Not only does Fourier series converge nicely, but it is easy to differentiate and integrate the series. We can do this just by differentiating or integrating term by term. Theorem 4.3.2. Suppose ∞ ๐๐ ๐๐ ๐0 Õ ๐ (๐ก) = + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก 2 ๐ฟ ๐ฟ ๐=1 is a piecewise smooth continuous function and the derivative ๐ 0(๐ก) is piecewise smooth. Then the derivative can be obtained by differentiating term by term, ๐ 0(๐ก) = ∞ Õ −๐ ๐ ๐๐ ๐=1 ๐ฟ sin ๐๐ ๐ฟ ๐ก + ๐๐ ๐ ๐ ๐๐ cos ๐ก . ๐ฟ ๐ฟ It is important that the function is continuous. It can have corners, but no jumps. Otherwise, the differentiated series will fail to converge. For an exercise, take the series obtained for the square wave and try to differentiate the series. Similarly, we can also integrate a Fourier series. Theorem 4.3.3. Suppose ∞ ๐๐ ๐๐ ๐0 Õ ๐ (๐ก) = + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก 2 ๐ฟ ๐ฟ ๐=1 is a piecewise smooth function. Then the antiderivative is obtained by antidifferentiating term by term and so ∞ ๐๐ −๐ ๐ฟ ๐๐ Õ ๐๐ ๐ฟ ๐0 ๐ก ๐ +๐ถ+ sin ๐ก + cos ๐ก , ๐น(๐ก) = 2 ๐๐ ๐ฟ ๐๐ ๐ฟ ๐=1 where ๐น0(๐ก) = ๐ (๐ก) and ๐ถ is an arbitrary constant. Note that the series for ๐น(๐ก) is no longer a Fourier series as it contains the ๐20 ๐ก term. The antiderivative of a periodic function need no longer be periodic and so we should not expect a Fourier series. 4.3.4 Rates of convergence and smoothness Let us do an example of a periodic function with one derivative everywhere. Example 4.3.6: Take the function ( ๐ (๐ก) = (๐ก + 1) ๐ก if −1 < ๐ก ≤ 0, (1 − ๐ก) ๐ก if 0 < ๐ก ≤ 1, and extend to a 2-periodic function. The plot is given in Figure 4.11 on the facing page. This function has one derivative everywhere, but it does not have a second derivative whenever ๐ก is an integer. 213 4.3. MORE ON THE FOURIER SERIES -2 -1 0 1 2 0.50 0.50 0.25 0.25 0.00 0.00 -0.25 -0.25 -0.50 -0.50 -2 -1 0 1 2 Figure 4.11: Smooth 2-periodic function. Exercise 4.3.1: Compute ๐ 00(0+) and ๐ 00(0−). Let us compute the Fourier series coefficients. The actual computation involves several integration by parts and is left to student. ๐0 = ๐๐ = ๐๐ = ∫ 1 −1 ∫ 1 −1 ∫ 1 ๐ (๐ก) ๐๐ก = ∫ 0 (๐ก + 1) ๐ก ๐๐ก + ∫ −1 ๐ (๐ก) cos(๐๐๐ก) ๐๐ก = ๐ (๐ก) sin(๐๐๐ก) ๐๐ก = −1 (1 − ๐ก) ๐ก ๐๐ก = 0, 0 ∫ 0 (๐ก + 1) ๐ก cos(๐๐๐ก) ๐๐ก + −1 ∫ 0 (๐ก + 1) ๐ก sin(๐๐๐ก) ๐๐ก + ∫ ( 1 0 ∫ 1 −1 8 4(1 − (−1)๐ ) ๐3 ๐ 3 = = ๐3 ๐ 3 0 That is, the series is 1 (1 − ๐ก) ๐ก cos(๐๐๐ก) ๐๐ก = 0, (1 − ๐ก) ๐ก sin(๐๐๐ก) ๐๐ก 0 if ๐ is odd, if ๐ is even. ∞ Õ ๐=1 ๐ odd 8 sin(๐๐๐ก). ๐3 ๐ 3 This series converges very fast. If you plot up to the third harmonic, that is the function 8 8 sin(๐๐ก) + sin(3๐๐ก), 3 ๐ 27๐3 it is almost indistinguishable from the plot of ๐ (๐ก) in Figure 4.11. In fact, the coefficient 8 is already just 0.0096 (approximately). The reason for this behavior is the ๐ 3 term in 27๐3 the denominator. The coefficients ๐ ๐ in this case go to zero as fast as 1/๐ 3 goes to zero. For functions constructed piecewise from polynomials as above, it is generally true that if you have one derivative, the Fourier coefficients will go to zero approximately like 214 CHAPTER 4. FOURIER SERIES AND PDES 1/๐ 3 . If you have only a continuous function, then the Fourier coefficients will go to zero as If you have discontinuities, then the Fourier coefficients will go to zero approximately 1 as /๐ . For more general functions the story is somewhat more complicated but the same idea holds, the more derivatives you have, the faster the coefficients go to zero. Similar reasoning works in reverse. If the coefficients go to zero like 1/๐ 2 , you always obtain a continuous function. If they go to zero like 1/๐ 3 , you obtain an everywhere differentiable function. To justify this behavior, take for example the function defined by the Fourier series 1/๐ 2 . ๐ (๐ก) = ∞ Õ 1 ๐=1 ๐3 sin(๐๐ก). When we differentiate term by term we notice 0 ๐ (๐ก) = ∞ Õ 1 ๐=1 cos(๐๐ก). ๐2 Therefore, the coefficients now go down like 1/๐ 2 , which means that we have a continuous function. The derivative of ๐ 0(๐ก) is defined at most points, but there are points where ๐ 0(๐ก) is not differentiable. It has corners, but no jumps. If we differentiate again (where we can), we find that the function ๐ 00(๐ก), now fails to be continuous (has jumps) 00 ๐ (๐ก) = ∞ Õ −1 ๐=1 ๐ sin(๐๐ก). This function is similar to the sawtooth. If we tried to differentiate the series again, we would obtain ∞ Õ − cos(๐๐ก), ๐=1 which does not converge! Exercise 4.3.2: Use a computer to plot the series we obtained for ๐ (๐ก), ๐ 0(๐ก) and ๐ 00(๐ก). That is, plot say the first 5 harmonics of the functions. At what points does ๐ 00(๐ก) have the discontinuities? 4.3.5 Exercises Exercise 4.3.3: Let ( ๐ (๐ก) = 0 if −1 < ๐ก ≤ 0, ๐ก if 0 < ๐ก ≤ 1, extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. 215 4.3. MORE ON THE FOURIER SERIES Exercise 4.3.4: Let ( ๐ (๐ก) = −๐ก if −1 < ๐ก ≤ 0, ๐ก2 if 0 < ๐ก ≤ 1, extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. Exercise 4.3.5: Let ( ๐ (๐ก) = −๐ก 10 ๐ก 10 if −10 < ๐ก ≤ 0, 0 < ๐ก ≤ 10, if extended periodically (period is 20). a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. 1 Exercise 4.3.6: Let ๐ (๐ก) = ∞ ๐=1 ๐ 3 cos(๐๐ก). Is ๐ (๐ก) continuous and differentiable everywhere? Find the derivative (if it exists everywhere) or justify why ๐ (๐ก) is not differentiable everywhere. Í ๐ (−1) Exercise 4.3.7: Let ๐ (๐ก) = ∞ ๐=1 ๐ sin(๐๐ก). Is ๐ (๐ก) differentiable everywhere? Find the derivative (if it exists everywhere) or justify why ๐ (๐ก) is not differentiable everywhere. Í Exercise 4.3.8: Let ๏ฃฑ ๏ฃด 0 ๏ฃด ๏ฃฒ ๏ฃด ๐ (๐ก) = ๐ก if −2 < ๐ก ≤ 0, if 0 < ๐ก ≤ 1, ๏ฃด ๏ฃด ๏ฃด −๐ก + 2 if ๏ฃณ 1 < ๐ก ≤ 2, extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. Exercise 4.3.9: Let ๐ (๐ก) = ๐ ๐ก for −1 < ๐ก ≤ 1 extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. c) What does the series converge to at ๐ก = 1. 216 CHAPTER 4. FOURIER SERIES AND PDES Exercise 4.3.10: Let ๐ (๐ก) = ๐ก 2 for −1 < ๐ก ≤ 1 extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) By plugging in ๐ก = 0, evaluate ∞ Õ (−1)๐ ๐2 ๐=1 c) Now evaluate ∞ Õ 1 ๐=1 ๐2 =1+ =1− 1 1 + − ···. 4 9 1 1 + + ···. 4 9 Exercise 4.3.11: Let ( ๐ (๐ก) = 0 if −3 < ๐ก ≤ 0, ๐ก if 0 < ๐ก ≤ 3, extended periodically. Suppose ๐น(๐ก) is the function given by the Fourier series of ๐ . Without computing the Fourier series evaluate a) ๐น(2) b) ๐น(−2) c) ๐น(4) d) ๐น(−4) e) ๐น(3) f) ๐น(−9) Exercise 4.3.101: Let ๐ (๐ก) = ๐ก 2 for −2 < ๐ก ≤ 2 extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. Exercise 4.3.102: Let ๐ (๐ก) = ๐ก for −๐ < ๐ก ≤ ๐ (for some ๐ > 0) extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Write out the series explicitly up to the 3rd harmonic. Exercise 4.3.103: Let ∞ 1 Õ 1 ๐ (๐ก) = + sin(๐๐๐ก). 2 2 ๐(๐ + 1) ๐=1 Compute ๐ 0(๐ก). 217 4.3. MORE ON THE FOURIER SERIES Exercise 4.3.104: Let ∞ 1 Õ 1 cos(๐๐ก). ๐ (๐ก) = + 2 ๐3 ๐=1 a) Find the antiderivative. b) Is the antiderivative periodic? Exercise 4.3.105: Let ๐ (๐ก) = ๐ก/2 for −๐ < ๐ก < ๐ extended periodically. a) Compute the Fourier series for ๐ (๐ก). b) Plug in ๐ก = ๐/2 to find a series representation for ๐/4. c) Using the first 4 terms of the result from part b) approximate ๐/4. Exercise 4.3.106: Let ( ๐ (๐ก) = 0 if −2 < ๐ก ≤ 0, 2 if 0 < ๐ก ≤ 2, extended periodically. Suppose ๐น(๐ก) is the function given by the Fourier series of ๐ . Without computing the Fourier series evaluate a) ๐น(0) b) ๐น(−1) c) ๐น(1) d) ๐น(−2) e) ๐น(4) f) ๐น(−8) 218 4.4 CHAPTER 4. FOURIER SERIES AND PDES Sine and cosine series Note: 2 lectures, §9.3 in [EP], §10.4 in [BD] 4.4.1 Odd and even periodic functions You may have noticed by now that an odd function has no cosine terms in the Fourier series and an even function has no sine terms in the Fourier series. This observation is not a coincidence. Let us look at even and odd periodic function in more detail. Recall that a function ๐ (๐ก) is odd if ๐ (−๐ก) = − ๐ (๐ก). A function ๐ (๐ก) is even if ๐ (−๐ก) = ๐ (๐ก). For example, cos(๐๐ก) is even and sin(๐๐ก) is odd. Similarly the function ๐ก ๐ is even if ๐ is even and odd when ๐ is odd. Exercise 4.4.1: Take two functions ๐ (๐ก) and ๐(๐ก) and define their product โ(๐ก) = ๐ (๐ก)๐(๐ก). a) Suppose both ๐ (๐ก) and ๐(๐ก) are odd. Is โ(๐ก) odd or even? b) Suppose one is even and one is odd. Is โ(๐ก) odd or even? c) Suppose both are even. Is โ(๐ก) odd or even? If ๐ (๐ก) and ๐(๐ก) are both odd, then ๐ (๐ก) + ๐(๐ก) is odd. Similarly for even functions. On the other hand, if ๐ (๐ก) is odd and ๐(๐ก) even, then we cannot say anything about the sum ๐ (๐ก) + ๐(๐ก). In fact, the Fourier series of any function is a sum of an odd (the sine terms) and an even (the cosine terms) function. In this section we consider odd and even periodic functions. We have previously defined the 2๐ฟ-periodic extension of a function defined on the interval [−๐ฟ, ๐ฟ]. Sometimes we are only interested in the function on the range [0, ๐ฟ] and it would be convenient to have an odd (resp. even) function. If the function is odd (resp. even), all the cosine (resp. sine) terms disappear. What we will do is take the odd (resp. even) extension of the function to [−๐ฟ, ๐ฟ] and then extend periodically to a 2๐ฟ-periodic function. Take a function ๐ (๐ก) defined on [0, ๐ฟ]. On (−๐ฟ, ๐ฟ] define the functions def ( ๐นodd (๐ก) = def ๐นeven (๐ก) = ๐ (๐ก) if 0 ≤ ๐ก ≤ ๐ฟ, − ๐ (−๐ก) if −๐ฟ < ๐ก < 0, ( ๐ (๐ก) if 0 ≤ ๐ก ≤ ๐ฟ, ๐ (−๐ก) if −๐ฟ < ๐ก < 0. Extend ๐นodd (๐ก) and ๐นeven (๐ก) to be 2๐ฟ-periodic. Then ๐นodd (๐ก) is called the odd periodic extension of ๐ (๐ก), and ๐นeven (๐ก) is called the even periodic extension of ๐ (๐ก). For the odd extension we generally assume that ๐ (0) = ๐ (๐ฟ) = 0. Exercise 4.4.2: Check that ๐นodd (๐ก) is odd and ๐นeven (๐ก) is even. For ๐นodd , assume ๐ (0) = ๐ (๐ฟ) = 0. Example 4.4.1: Take the function ๐ (๐ก) = ๐ก (1 − ๐ก) defined on [0, 1]. Figure 4.12 on the facing page shows the plots of the odd and even periodic extensions of ๐ (๐ก). 219 4.4. SINE AND COSINE SERIES -2 -1 0 1 2 -2 -1 0 1 2 0.3 0.3 0.3 0.3 0.2 0.2 0.2 0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -0.1 -0.1 -0.1 -0.1 -0.2 -0.2 -0.2 -0.2 -0.3 -0.3 -0.3 -2 -1 0 1 2 -0.3 -2 -1 0 1 2 Figure 4.12: Odd and even 2-periodic extension of ๐ (๐ก) = ๐ก (1 − ๐ก), 0 ≤ ๐ก ≤ 1. 4.4.2 Sine and cosine series Let ๐ (๐ก) be an odd 2๐ฟ-periodic function. We write the Fourier series for ๐ (๐ก). First, we compute the coefficients ๐ ๐ (including ๐ = 0) and get 1 ๐๐ = ๐ฟ ∫ ๐ฟ ๐ (๐ก) cos ๐๐ ๐ฟ −๐ฟ ๐ก ๐๐ก = 0. That is, there are no cosine terms in the Fourier series of an odd function. The integral is zero because ๐ (๐ก) cos (๐๐๐ฟ๐ก) is an odd function (product of an odd and an even function is odd) and the integral of an odd function over a symmetric interval is always zero. The integral of an even function over a symmetric interval [−๐ฟ, ๐ฟ] is twice the integral of the ๐๐ function over the interval [0, ๐ฟ]. The function ๐ (๐ก) sin ๐ฟ ๐ก is the product of two odd functions and hence is even. 1 ๐๐ = ๐ฟ ∫ ๐ฟ −๐ฟ ๐ (๐ก) sin ๐๐ 2 ๐ก ๐๐ก = ๐ฟ ๐ฟ ∫ ๐ฟ 0 ๐ (๐ก) sin ๐๐ ๐ฟ ๐ก ๐๐ก. We now write the Fourier series of ๐ (๐ก) as ∞ Õ ๐ ๐ sin ๐๐ ๐ฟ ๐=1 ๐ก . Similarly, if ๐ (๐ก) is an even 2๐ฟ-periodic function. For the same exact reasons as above, we find that ๐ ๐ = 0 and ∫ ๐๐ 2 ๐ฟ ๐ (๐ก) cos ๐๐ = ๐ก ๐๐ก. ๐ฟ 0 ๐ฟ The formula still works for ๐ = 0, in which case it becomes 2 ๐0 = ๐ฟ ∫ 0 ๐ฟ ๐ (๐ก) ๐๐ก. 220 CHAPTER 4. FOURIER SERIES AND PDES The Fourier series is then ∞ ๐๐ ๐0 Õ + ๐ ๐ cos ๐ก . 2 ๐ฟ ๐=1 An interesting consequence is that the coefficients of the Fourier series of an odd (or even) function can be computed by just integrating over the half interval [0, ๐ฟ]. Therefore, we can compute the Fourier series of the odd (or even) extension of a function by computing certain integrals over the interval where the original function is defined. Theorem 4.4.1. Let ๐ (๐ก) be a piecewise smooth function defined on [0, ๐ฟ]. Then the odd periodic extension of ๐ (๐ก) has the Fourier series ๐นodd (๐ก) = ∞ Õ ๐ ๐ sin ๐๐ ๐ฟ ๐=1 ๐ก , where 2 ๐๐ = ๐ฟ ∫ ๐ฟ ๐ (๐ก) sin 0 ๐๐ ๐ฟ ๐ก ๐๐ก. The even periodic extension of ๐ (๐ก) has the Fourier series ∞ ๐๐ ๐0 Õ ๐นeven (๐ก) = + ๐ ๐ cos ๐ก , 2 ๐ฟ ๐=1 where 2 ๐๐ = ๐ฟ ∫ ๐ฟ ๐ (๐ก) cos 0 ๐๐ ๐ฟ ๐ก ๐๐ก. ๐0 ∞ ๐๐ We call the series ๐=1 ๐ ๐ sin ๐ฟ ๐ก the sine series of ๐ (๐ก) and we call the series 2 + Í∞ ๐๐ ๐=1 ๐ ๐ cos ๐ฟ ๐ก the cosine series of ๐ (๐ก). We often do not actually care what happens outside of [0, ๐ฟ]. In this case, we pick whichever series fits our problem better. It is not necessary to start with the full Fourier series to obtain the sine and cosine series. The sine series is really the eigenfunction expansion of ๐ (๐ก) using eigenfunctions of the eigenvalue problem ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ(0) = 0, ๐ฅ(๐ฟ) = ๐ฟ. The cosine series is the eigenfunction expansion of ๐ (๐ก) using eigenfunctions of the eigenvalue problem ๐ฅ 00 + ๐๐ฅ = 0, ๐ฅ 0(0) = 0, ๐ฅ 0(๐ฟ) = ๐ฟ. We could have, therefore, gotten the same formulas by defining the inner product Í h ๐ (๐ก), ๐(๐ก)i = ∫ ๐ฟ ๐ (๐ก)๐(๐ก) ๐๐ก, 0 and following the procedure of § 4.2. This point of view is useful, as we commonly use a specific series that arose because our underlying question led to a certain eigenvalue problem. If the eigenvalue problem is not one of the three we covered so far, you can still 221 4.4. SINE AND COSINE SERIES do an eigenfunction expansion, generalizing the results of this chapter. We will deal with such a generalization in chapter 5. Example 4.4.2: Find the Fourier series of the even periodic extension of the function ๐ (๐ก) = ๐ก 2 for 0 ≤ ๐ก ≤ ๐. We want to write ∞ ๐0 Õ ๐ (๐ก) = + ๐ ๐ cos(๐๐ก), 2 ๐=1 where 2 ๐0 = ๐ ๐ 0 2๐2 , 3 ๐ ∫ ๐ก 2 ๐๐ก = and 2 ๐๐ = ๐ ∫ ๐ 0 2 21 ๐ก cos(๐๐ก) ๐๐ก = ๐ก sin(๐๐ก) ๐ ๐ 2 i๐ 4 h 4 = 2 ๐ก cos(๐๐ก) + 2 0 ๐ ๐ ๐ ๐ ∫ ๐ 0 4 − ๐๐ cos(๐๐ก) ๐๐ก = 0 ∫ ๐ ๐ก sin(๐๐ก) ๐๐ก 0 ๐ 4(−1) . ๐2 Note that we have “detected” the continuity of the extension since the coefficients decay as ๐12 . That is, the even periodic extension of ๐ก 2 has no jump discontinuities. It does have corners, since the derivative, which is an odd function and a sine series, has jumps; it has a Fourier series whose coefficients decay only as ๐1 . Explicitly, the first few terms of the series are ๐2 4 − 4 cos(๐ก) + cos(2๐ก) − cos(3๐ก) + · · · 3 9 Exercise 4.4.3: a) Compute the derivative of the even periodic extension of ๐ (๐ก) above and verify it has jump discontinuities. Use the actual definition of ๐ (๐ก), not its cosine series! b) Why is it that the derivative of the even periodic extension of ๐ (๐ก) is the odd periodic extension of ๐ 0(๐ก)? 4.4.3 Application Fourier series ties in to the boundary value problems we studied earlier. Let us see this connection in an application. Consider the boundary value problem for 0 < ๐ก < ๐ฟ, ๐ฅ 00(๐ก) + ๐ ๐ฅ(๐ก) = ๐ (๐ก), for the Dirichlet boundary conditions ๐ฅ(0) = 0, ๐ฅ(๐ฟ) = 0. The Fredholm alternative (Theorem 4.1.2 on page 194) says that as long as ๐ is not an eigenvalue of the underlying homogeneous problem, there exists a unique solution. Eigenfunctions of this 222 CHAPTER 4. FOURIER SERIES AND PDES eigenvalue problem are the functions sin ๐๐ ๐ฟ ๐ก . Therefore, to find the solution, we first find the Fourier sine series for ๐ (๐ก). We write ๐ฅ also as a sine series, but with unknown coefficients. We substitute the series for ๐ฅ into the equation and solve for the unknown coefficients. If we have the Neumann boundary conditions ๐ฅ 0(0) = 0, ๐ฅ 0(๐ฟ) = 0, we do the same procedure using the cosine series. Let us see how this method works on examples. Example 4.4.3: Take the boundary value problem for 0 < ๐ก < 1, ๐ฅ 00(๐ก) + 2๐ฅ(๐ก) = ๐ (๐ก), where ๐ (๐ก) = ๐ก on 0 < ๐ก < 1, and satisfying the Dirichlet boundary conditions ๐ฅ(0) = 0, ๐ฅ(1) = 0. We write ๐ (๐ก) as a sine series ๐ (๐ก) = ∞ Õ ๐ ๐ sin(๐๐๐ก). ๐=1 Compute ๐๐ = 2 1 ∫ ๐ก sin(๐๐๐ก) ๐๐ก = 0 2 (−1)๐+1 . ๐๐ We write ๐ฅ(๐ก) as ๐ฅ(๐ก) = ∞ Õ ๐ ๐ sin(๐๐๐ก). ๐=1 We plug in to obtain 00 ๐ฅ (๐ก) + 2๐ฅ(๐ก) = ∞ Õ −๐ ๐ ๐ ๐ sin(๐๐๐ก) + 2 2 2 ๐=1 = ๐ ๐ sin(๐๐๐ก) ๐=1 | {z } ๐ฅ 00 ∞ Õ ∞ Õ | ๐ ๐ (2 − ๐ 2 ๐2 ) sin(๐๐๐ก) ๐=1 = ๐ (๐ก) = ∞ Õ 2 (−1)๐+1 ๐=1 Therefore, ๐๐ sin(๐๐๐ก). 2 (−1)๐+1 ๐ ๐ (2 − ๐ ๐ ) = ๐๐ 2 2 or 2 (−1)๐+1 ๐๐ = . ๐๐(2 − ๐ 2 ๐2 ) {z ๐ฅ } 223 4.4. SINE AND COSINE SERIES That 2 − ๐ 2 ๐2 is not zero for any ๐, and that we can solve for ๐ ๐ , is precisely because 2 is not an eigenvalue of the problem. We have thus obtained a Fourier series for the solution ๐ฅ(๐ก) = ∞ Õ ๐=1 2 (−1)๐+1 sin(๐๐๐ก). ๐๐ (2 − ๐ 2 ๐2 ) See Figure 4.13 for a graph of the solution. Notice that because the eigenfunctions satisfy the boundary conditions, and ๐ฅ is written in terms of the boundary conditions, then ๐ฅ satisfies the boundary conditions. 0.00 0.25 0.50 0.75 1.00 0.00 0.00 -0.02 -0.02 -0.04 -0.04 -0.06 -0.06 -0.08 -0.08 0.00 0.25 0.50 0.75 1.00 Figure 4.13: Plot of the solution of ๐ฅ 00 + 2๐ฅ = ๐ก, ๐ฅ(0) = 0, ๐ฅ(1) = 0. Example 4.4.4: Similarly we handle the Neumann conditions. Take the boundary value problem for 0 < ๐ก < 1, ๐ฅ 00(๐ก) + 2๐ฅ(๐ก) = ๐ (๐ก), where again ๐ (๐ก) = ๐ก on 0 < ๐ก < 1, but now satisfying the Neumann boundary conditions ๐ฅ 0(0) = 0, ๐ฅ 0(1) = 0. We write ๐ (๐ก) as a cosine series ∞ ๐0 Õ ๐ (๐ก) = + ๐ ๐ cos(๐๐๐ก), 2 ๐=1 where ๐0 = 2 1 ∫ ๐ก ๐๐ก = 1, 0 and ๐๐ = 2 ∫ 1 ๐ก cos(๐๐๐ก) ๐๐ก = 0 2 (−1)๐ − 1 ๐2 ๐ 2 ( = −4 ๐2 ๐ 2 0 We write ๐ฅ(๐ก) as a cosine series ∞ ๐0 Õ ๐ฅ(๐ก) = + ๐ ๐ cos(๐๐๐ก). 2 ๐=1 if ๐ odd, if ๐ even. 224 CHAPTER 4. FOURIER SERIES AND PDES We plug in to obtain 00 ๐ฅ (๐ก) + 2๐ฅ(๐ก) = ∞ h Õ i −๐ ๐ ๐ ๐ cos(๐๐๐ก) + ๐0 + 2 2 2 ๐=1 = ๐0 + ∞ h Õ ๐ ๐ cos(๐๐๐ก) i ๐=1 ∞ Õ ๐ ๐ (2 − ๐ 2 ๐2 ) cos(๐๐๐ก) ๐=1 ∞ Õ 1 −4 = ๐ (๐ก) = + cos(๐๐๐ก). 2๐2 2 ๐ ๐=1 ๐ odd Therefore, ๐ 0 = 12 , ๐ ๐ = 0 for ๐ even (๐ ≥ 2) and for ๐ odd we have ๐ ๐ (2 − ๐ 2 ๐2 ) = or ๐๐ = −4 , ๐2 ๐ 2 −4 . − ๐ 2 ๐2 ) ๐ 2 ๐2 (2 The Fourier series for the solution ๐ฅ(๐ก) is ∞ Õ 1 −4 ๐ฅ(๐ก) = + cos(๐๐๐ก). 2 2 4 ๐ ๐ (2 − ๐ 2 ๐2 ) ๐=1 ๐ odd 4.4.4 Exercises Exercise 4.4.4: Take ๐ (๐ก) = (๐ก − 1)2 defined on 0 ≤ ๐ก ≤ 1. a) Sketch the plot of the even periodic extension of ๐ . b) Sketch the plot of the odd periodic extension of ๐ . Exercise 4.4.5: Find the Fourier series of both the odd and even periodic extension of the function ๐ (๐ก) = (๐ก − 1)2 for 0 ≤ ๐ก ≤ 1. Can you tell which extension is continuous from the Fourier series coefficients? Exercise 4.4.6: Find the Fourier series of both the odd and even periodic extension of the function ๐ (๐ก) = ๐ก for 0 ≤ ๐ก ≤ ๐. Exercise 4.4.7: Find the Fourier series of the even periodic extension of the function ๐ (๐ก) = sin ๐ก for 0 ≤ ๐ก ≤ ๐. 225 4.4. SINE AND COSINE SERIES Exercise 4.4.8: Consider ๐ฅ 00(๐ก) + 4๐ฅ(๐ก) = ๐ (๐ก), where ๐ (๐ก) = 1 on 0 < ๐ก < 1. a) Solve for the Dirichlet conditions ๐ฅ(0) = 0, ๐ฅ(1) = 0. b) Solve for the Neumann conditions ๐ฅ 0(0) = 0, ๐ฅ 0(1) = 0. Exercise 4.4.9: Consider ๐ฅ 00(๐ก) + 9๐ฅ(๐ก) = ๐ (๐ก), for ๐ (๐ก) = sin(2๐๐ก) on 0 < ๐ก < 1. a) Solve for the Dirichlet conditions ๐ฅ(0) = 0, ๐ฅ(1) = 0. b) Solve for the Neumann conditions ๐ฅ 0(0) = 0, ๐ฅ 0(1) = 0. Exercise 4.4.10: Consider ๐ฅ 00(๐ก) + 3๐ฅ(๐ก) = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ(1) = 0, where ๐ (๐ก) = ∞ ๐=1 ๐ ๐ sin(๐๐๐ก). Write the solution ๐ฅ(๐ก) as a Fourier series, where the coefficients are given in terms of ๐ ๐ . Í Exercise 4.4.11: Let ๐ (๐ก) = ๐ก 2 (2 − ๐ก) for 0 ≤ ๐ก ≤ 2. Let ๐น(๐ก) be the odd periodic extension. Compute ๐น(1), ๐น(2), ๐น(3), ๐น(−1), ๐น(9/2), ๐น(101), ๐น(103). Note: Do not compute using the sine series. Exercise 4.4.101: Let ๐ (๐ก) = ๐ก/3 on 0 ≤ ๐ก < 3. a) Find the Fourier series of the even periodic extension. b) Find the Fourier series of the odd periodic extension. Exercise 4.4.102: Let ๐ (๐ก) = cos(2๐ก) on 0 ≤ ๐ก < ๐. a) Find the Fourier series of the even periodic extension. b) Find the Fourier series of the odd periodic extension. Exercise 4.4.103: Let ๐ (๐ก) be defined on 0 ≤ ๐ก < 1. Now take the average of the two extensions even (๐ก) ๐(๐ก) = ๐นodd (๐ก)+๐น . 2 a) What is ๐(๐ก) if 0 ≤ ๐ก < 1 (Justify!) Exercise 4.4.104: Let ๐ (๐ก) = ๐ฅ(0) = 0 and ๐ฅ(๐) = 0. Í∞ 1 ๐=1 ๐ 2 b) What is ๐(๐ก) if −1 < ๐ก < 0 (Justify!) sin(๐๐ก). Solve ๐ฅ 00 − ๐ฅ = ๐ (๐ก) for the Dirichlet conditions 1 00 Exercise 4.4.105 (challenging): Let ๐ (๐ก) = ๐ก + ∞ ๐=1 2๐ sin(๐๐ก). Solve ๐ฅ + ๐๐ฅ = ๐ (๐ก) for the Dirichlet conditions ๐ฅ(0) = 0 and ๐ฅ(๐) = 1. Hint: Note that ๐๐ก satisfies the given Dirichlet conditions. Í 226 4.5 CHAPTER 4. FOURIER SERIES AND PDES Applications of Fourier series Note: 2 lectures, §9.4 in [EP], not in [BD] 4.5.1 Periodically forced oscillation Let us return to the forced oscillations. Consider a mass๐ spring system as before, where we have a mass ๐ on a spring ๐ with spring constant ๐, with damping ๐, and a force ๐น(๐ก) applied to the mass. Suppose the forcing function ๐น(๐ก) is damping ๐ 2๐ฟ-periodic for some ๐ฟ > 0. We saw this problem in chapter 2 with ๐น(๐ก) = ๐น0 cos(๐๐ก). The equation that governs this particular setup is ๐๐ฅ 00(๐ก) + ๐๐ฅ 0(๐ก) + ๐๐ฅ(๐ก) = ๐น(๐ก). ๐น(๐ก) (4.9) The general solution of (4.9) consists of the complementary solution ๐ฅ ๐ , which solves the associated homogeneous equation ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, and a particular solution of (4.9) we call ๐ฅ ๐ . For ๐ > 0, the complementary solution ๐ฅ ๐ will decay as time goes by. Therefore, we are mostly interested in a particular solution ๐ฅ ๐ that does not decay and is periodic with the same period as ๐น(๐ก). We call this particular solution the steady periodic solution and we write it as ๐ฅ ๐ ๐ as before. What is new in this section is that we consider an arbitrary forcing function ๐น(๐ก) instead of a simple cosine. For simplicity, suppose ๐ = 0. The problem with ๐ > 0 is very similar. The equation ๐๐ฅ 00 + ๐๐ฅ = 0 has the general solution ๐ฅ(๐ก) = ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก), q where ๐0 = ๐๐ . Any solution to ๐๐ฅ 00(๐ก) + ๐๐ฅ(๐ก) = ๐น(๐ก) is of the form ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก) + ๐ฅ ๐ ๐ . The steady periodic solution ๐ฅ ๐ ๐ has the same period as ๐น(๐ก). In the spirit of the last section and the idea of undetermined coefficients we first write ∞ ๐๐ ๐๐ ๐0 Õ ๐น(๐ก) = + ๐ ๐ cos ๐ก + ๐๐ sin ๐ก . 2 ๐ฟ ๐ฟ ๐=1 Then we write a proposed steady periodic solution ๐ฅ as ∞ ๐๐ ๐๐ ๐0 Õ ๐ฅ(๐ก) = + ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก , 2 ๐ฟ ๐ฟ ๐=1 where ๐ ๐ and ๐ ๐ are unknowns. We plug ๐ฅ into the differential equation and solve for ๐ ๐ and ๐ ๐ in terms of ๐ ๐ and ๐๐ . This process is perhaps best understood by example. 227 4.5. APPLICATIONS OF FOURIER SERIES Example 4.5.1: Suppose that ๐ = 2, and ๐ = 1. The units are again the mks units (meterskilograms-seconds). There is a jetpack strapped to the mass, which fires with a force of 1 newton for 1 second and then is off for 1 second, and so on. We want to find the steady periodic solution. The equation is, therefore, ๐ฅ 00 + 2๐ฅ = ๐น(๐ก), where ๐น(๐ก) is the step function ( ๐น(๐ก) = 0 if −1 < ๐ก < 0, 1 if 0 < ๐ก < 1, extended periodically. We write ∞ ๐0 Õ ๐ ๐ cos(๐๐๐ก) + ๐๐ sin(๐๐๐ก). + ๐น(๐ก) = 2 ๐=1 We compute ๐๐ = ๐0 = ๐๐ = ∫ 1 −1 ∫ 1 −1 ∫ 1 −1 ∫ 1 = ๐น(๐ก) cos(๐๐๐ก) ๐๐ก = ∫ 1 cos(๐๐๐ก) ๐๐ก = 0 for ๐ ≥ 1, 0 ๐น(๐ก) ๐๐ก = ∫ 1 ๐๐ก = 1, 0 ๐น(๐ก) sin(๐๐๐ก) ๐๐ก sin(๐๐๐ก) ๐๐ก 0 − cos(๐๐๐ก) = ๐๐ ๐ = So 1 (๐ก=0 2 1 − (−1) = ๐๐ ๐๐ 0 if ๐ odd, if ๐ even. ∞ 1 Õ 2 ๐น(๐ก) = + sin(๐๐๐ก). 2 ๐๐ ๐=1 ๐ odd We want to try ∞ ๐0 Õ ๐ฅ(๐ก) = + ๐ ๐ cos(๐๐๐ก) + ๐ ๐ sin(๐๐๐ก). 2 ๐=1 Once we plug ๐ฅ into the differential equation ๐ฅ 00 + 2๐ฅ = ๐น(๐ก), it is clear that ๐ ๐ = 0 for ๐ ≥ 1 as there are no corresponding terms in the series for ๐น(๐ก). Similarly ๐ ๐ = 0 for ๐ even. 228 CHAPTER 4. FOURIER SERIES AND PDES Hence we try ๐ฅ(๐ก) = ∞ Õ ๐0 + ๐ ๐ sin(๐๐๐ก). 2 ๐=1 ๐ odd We plug into the differential equation and obtain 00 ๐ฅ + 2๐ฅ = ∞ h Õ i −๐ ๐ ๐ ๐ sin(๐๐๐ก) + ๐0 + 2 2 2 ๐=1 ๐ odd = ๐0 + ∞ h Õ ๐ ๐ sin(๐๐๐ก) i ๐=1 ๐ odd ∞ Õ ๐ ๐ (2 − ๐ 2 ๐2 ) sin(๐๐๐ก) ๐=1 ๐ odd ∞ 1 Õ 2 sin(๐๐๐ก). = ๐น(๐ก) = + 2 ๐๐ ๐=1 ๐ odd So ๐ 0 = 21 , ๐ ๐ = 0 for even ๐, and for odd ๐ we get ๐๐ = 2 . ๐๐(2 − ๐ 2 ๐2 ) The steady periodic solution has the Fourier series ∞ 1 Õ 2 ๐ฅ ๐ ๐ (๐ก) = + sin(๐๐๐ก). 2 ๐2 ) 4 ๐๐(2 − ๐ ๐=1 ๐ odd We know this is the steady periodic solution as it contains no terms of the complementary solution and it is periodic with the same period as ๐น(๐ก) itself. See Figure 4.14 on the next page for the plot of this solution. 4.5.2 Resonance Just as when the forcing function was a simple cosine, we may encounter resonance. Assume ๐ = 0 and let us discuss only pure resonance. Let ๐น(๐ก) be 2๐ฟ-periodic and consider ๐๐ฅ 00(๐ก) + ๐๐ฅ(๐ก) = ๐น(๐ก). When we expand ๐น(๐ก) and find that some of its terms coincide with the complementary solution to ๐๐ฅ 00 + ๐๐ฅ = 0, we cannot use those terms in the guess. Just like before, they disappear when we plug them into the left-hand side and we get a contradictory equation (such as 0 = 1). That is, suppose ๐ฅ ๐ = ๐ด cos(๐0 ๐ก) + ๐ต sin(๐0 ๐ก), 229 4.5. APPLICATIONS OF FOURIER SERIES 0.5 0.0 2.5 5.0 7.5 10.0 0.5 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0.0 0.0 2.5 5.0 0.0 10.0 7.5 Figure 4.14: Plot of the steady periodic solution ๐ฅ ๐ ๐ of Example 4.5.1. where ๐0 = ๐๐ ๐ฟ for some positive integer ๐. We have to modify our guess and try ๐๐ ๐๐ ๐0 + ๐ก ๐ ๐ cos ๐ก + ๐ ๐ sin ๐ก ๐ฅ(๐ก) = 2 ๐ฟ ๐ฟ + ∞ Õ ๐ ๐ cos ๐=1 ๐≠๐ ๐๐ ๐๐ ๐ฟ ๐ฟ ๐ก + ๐ ๐ sin ๐ก . In other words, we multiply the offending term by ๐ก. From then on, we proceed as before. Of course, the solution is not a Fourier series (it is not even since periodic) ๐๐ it contains ๐๐ these terms multiplied by ๐ก. Further, the terms ๐ก ๐ ๐ cos ๐ฟ ๐ก + ๐ ๐ sin ๐ฟ ๐ก eventually dominate and lead to wild oscillations. As before, this behavior is called pure resonance or just resonance. Note that there now may be infinitely many resonance frequencies to hit. That is, as we change the frequency of ๐น (we change ๐ฟ), different terms from the Fourier series of ๐น may interfere with the complementary solution and cause resonance. However, we should note that since everything is an approximation and in particular ๐ is never actually zero but something very close to zero, only the first few resonance frequencies matter in real life. Example 4.5.2: We want to solve the equation 2๐ฅ 00 + 18๐2 ๐ฅ = ๐น(๐ก), where ( ๐น(๐ก) = −1 if −1 < ๐ก < 0, 1 if 0 < ๐ก < 1, extended periodically. We note that ๐น(๐ก) = ∞ Õ 4 ๐=1 ๐ odd ๐๐ sin(๐๐๐ก). (4.10) 230 CHAPTER 4. FOURIER SERIES AND PDES Exercise 4.5.1: Compute the Fourier series of ๐น to verify the equation above. As q ๐ ๐ = q 18๐2 2 = 3๐, the solution to (4.10) is ๐ฅ(๐ก) = ๐1 cos(3๐๐ก) + ๐2 sin(3๐๐ก) + ๐ฅ ๐ (๐ก) for some particular solution ๐ฅ ๐ . If we just try an ๐ฅ ๐ given as a Fourier series with sin(๐๐๐ก) as usual, the complementary equation, 2๐ฅ 00 + 18๐2 ๐ฅ = 0, eats our 3rd harmonic. That is, the term with sin(3๐๐ก) is already in in our complementary solution. Therefore, we pull that term out and multiply it by ๐ก. We also add a cosine term to get everything right. That is, we try ๐ฅ ๐ (๐ก) = ๐ 3 ๐ก cos(3๐๐ก) + ๐ 3 ๐ก sin(3๐๐ก) + ∞ Õ ๐ ๐ sin(๐๐๐ก). ๐=1 ๐ odd ๐≠3 Let us compute the second derivative. ๐ฅ 00๐ (๐ก) = −6๐ 3 ๐ sin(3๐๐ก) − 9๐2 ๐3 ๐ก cos(3๐๐ก) + 6๐ 3 ๐ cos(3๐๐ก) − 9๐2 ๐3 ๐ก sin(3๐๐ก) + ∞ Õ (−๐ 2 ๐2 ๐ ๐ ) sin(๐๐๐ก). ๐=1 ๐ odd ๐≠3 We now plug into the left-hand side of the differential equation. 2๐ฅ 00๐ + 18๐2 ๐ฅ ๐ = − 12๐ 3 ๐ sin(3๐๐ก) − 18๐2 ๐ 3 ๐ก cos(3๐๐ก) + 12๐3 ๐ cos(3๐๐ก) − 18๐2 ๐ 3 ๐ก sin(3๐๐ก) + 18๐2 ๐ 3 ๐ก cos(3๐๐ก) + ∞ Õ + 18๐2 ๐ 3 ๐ก sin(3๐๐ก) (−2๐ 2 ๐2 ๐ ๐ + 18๐2 ๐ ๐ ) sin(๐๐๐ก). ๐=1 ๐ odd ๐≠3 We simplify, 2๐ฅ 00๐ + 18๐ ๐ฅ ๐ = −12๐ 3 ๐ sin(3๐๐ก) + 12๐3 ๐ cos(3๐๐ก) + 2 ∞ Õ (−2๐ 2 ๐2 ๐ ๐ + 18๐2 ๐ ๐ ) sin(๐๐๐ก). ๐=1 ๐ odd ๐≠3 This series has to equal to the series for ๐น(๐ก). We equate the coefficients and solve for ๐3 and ๐ ๐ . 4/(3๐) −1 = , −12๐ 9๐2 ๐ 3 = 0, 4 2 ๐๐ = = ๐๐(18๐2 − 2๐ 2 ๐2 ) ๐3 ๐(9 − ๐ 2 ) ๐3 = for ๐ odd and ๐ ≠ 3. 231 4.5. APPLICATIONS OF FOURIER SERIES That is, ∞ Õ 2 −1 ๐ฅ ๐ (๐ก) = ๐ก cos(3๐๐ก) + sin(๐๐๐ก). 2 3 2) 9๐ ๐ ๐(9 − ๐ ๐=1 ๐ odd ๐≠3 When ๐ > 0, you do not have to worry about pure resonance. That is, there are never any conflicts and you do not need to multiply any terms by ๐ก. There is a corresponding concept of practical resonance and it is very similar to the ideas we already explored in chapter 2. Basically what happens in practical resonance is that one of the coefficients in the series for ๐ฅ ๐ ๐ can get very big. Let us not go into details here. 4.5.3 Exercises 1 00 Exercise 4.5.2: Let ๐น(๐ก) = 12 + ∞ ๐=1 ๐ 2 cos(๐๐๐ก). Find the steady periodic solution to ๐ฅ + 2๐ฅ = ๐น(๐ก). Express your solution as a Fourier series. Í 1 00 0 Exercise 4.5.3: Let ๐น(๐ก) = ∞ ๐=1 ๐ 3 sin(๐๐๐ก). Find the steady periodic solution to ๐ฅ +๐ฅ +๐ฅ = ๐น(๐ก). Express your solution as a Fourier series. Í 1 00 Exercise 4.5.4: Let ๐น(๐ก) = ∞ ๐=1 ๐ 2 cos(๐๐๐ก). Find the steady periodic solution to ๐ฅ + 4๐ฅ = ๐น(๐ก). Express your solution as a Fourier series. Í Exercise 4.5.5: Let ๐น(๐ก) = ๐ก for −1 < ๐ก < 1 and extended periodically. Find the steady periodic solution to ๐ฅ 00 + ๐ฅ = ๐น(๐ก). Express your solution as a series. Exercise 4.5.6: Let ๐น(๐ก) = ๐ก for −1 < ๐ก < 1 and extended periodically. Find the steady periodic solution to ๐ฅ 00 + ๐2 ๐ฅ = ๐น(๐ก). Express your solution as a series. Exercise √ 4.5.101: Let ๐น(๐ก) = sin(2๐๐ก) + 0.1 cos(10๐๐ก). Find the steady periodic solution to 00 ๐ฅ + 2 ๐ฅ = ๐น(๐ก). Express your solution as a Fourier series. −๐ cos(2๐๐ก). Find the steady periodic solution to ๐ฅ 00 + 3๐ฅ = Exercise 4.5.102: Let ๐น(๐ก) = ∞ ๐=1 ๐ ๐น(๐ก). Express your solution as a Fourier series. Í Exercise 4.5.103: √ Let ๐น(๐ก) = |๐ก | for −1 ≤ ๐ก ≤ 1 extended periodically. Find the steady periodic 00 solution to ๐ฅ + 3 ๐ฅ = ๐น(๐ก). Express your solution as a series. Exercise 4.5.104: Let ๐น(๐ก) = |๐ก | for −1 ≤ ๐ก ≤ 1 extended periodically. Find the steady periodic solution to ๐ฅ 00 + ๐2 ๐ฅ = ๐น(๐ก). Express your solution as a series. 232 4.6 CHAPTER 4. FOURIER SERIES AND PDES PDEs, separation of variables, and the heat equation Note: 2 lectures, §9.5 in [EP], §10.5 in [BD] Let us recall that a partial differential equation or PDE is an equation containing the partial derivatives with respect to several independent variables. Solving PDEs will be our main application of Fourier series. A PDE is said to be linear if the dependent variable and its derivatives appear at most to the first power and in no functions. We will only talk about linear PDEs. Together with a PDE, we usually specify some boundary conditions, where the value of the solution or its derivatives is given along the boundary of a region, and/or some initial conditions where the value of the solution or its derivatives is given for some initial time. Sometimes such conditions are mixed together and we will refer to them simply as side conditions. We will study three specific partial differential equations, each one representing a general class of equations. First, we will study the heat equation, which is an example of a parabolic PDE. Next, we will study the wave equation, which is an example of a hyperbolic PDE. Finally, we will study the Laplace equation, which is an example of an elliptic PDE. Each of our examples will illustrate behavior that is typical for the whole class. 4.6.1 Heat on an insulated wire Let us start with the heat equation. Consider a wire (or a thin metal rod) of length ๐ฟ that is insulated except at the endpoints. Let ๐ฅ denote the position along the wire and let ๐ก denote time. See Figure 4.15. temperature ๐ข 0 ๐ฟ ๐ฅ insulation Figure 4.15: Insulated wire. Let ๐ข(๐ฅ, ๐ก) denote the temperature at point ๐ฅ at time ๐ก. The equation governing this setup is the so-called one-dimensional heat equation: ๐๐ข ๐2 ๐ข = ๐ 2, ๐๐ก ๐๐ฅ where ๐ > 0 is a constant (the thermal conductivity of the material). That is, the change in heat at a specific point is proportional to the second derivative of the heat along the wire. 4.6. PDES, SEPARATION OF VARIABLES, AND THE HEAT EQUATION 233 This makes sense; if at a fixed ๐ก the graph of the heat distribution has a maximum (the graph is concave down), then heat flows away from the maximum. And vice versa. We generally use a more convenient notation for partial derivatives. We write ๐ข๐ก instead 2 ๐๐ข of ๐๐ก , and we write ๐ข๐ฅ๐ฅ instead of ๐๐๐ฅ๐ข2 . With this notation the heat equation becomes ๐ข๐ก = ๐๐ข๐ฅ๐ฅ . For the heat equation, we must also have some boundary conditions. We assume that the ends of the wire are either exposed and touching some body of constant heat, or the ends are insulated. If the ends of the wire are kept at temperature 0, then the conditions are ๐ข(0, ๐ก) = 0 and ๐ข(๐ฟ, ๐ก) = 0. If, on the other hand, the ends are also insulated, the conditions are ๐ข๐ฅ (0, ๐ก) = 0 and ๐ข๐ฅ (๐ฟ, ๐ก) = 0. Let us see why that is so. If ๐ข๐ฅ is positive at some point ๐ฅ0 , then at a particular time, ๐ข is smaller to the left of ๐ฅ0 , and higher to the right of ๐ฅ0 . Heat is flowing from high heat to low heat, that is to the left. On the other hand if ๐ข๐ฅ is negative then heat is again flowing from high heat to low heat, that is to the right. So when ๐ข๐ฅ is zero, that is a point through which heat is not flowing. In other words, ๐ข๐ฅ (0, ๐ก) = 0 means no heat is flowing in or out of the wire at the point ๐ฅ = 0. We have two conditions along the ๐ฅ-axis as there are two derivatives in the ๐ฅ direction. These side conditions are said to be homogeneous (i.e., ๐ข or a derivative of ๐ข is set to zero). We also need an initial condition—the temperature distribution at time ๐ก = 0. That is, ๐ข(๐ฅ, 0) = ๐ (๐ฅ), for some known function ๐ (๐ฅ). This initial condition is not a homogeneous side condition. 4.6.2 Separation of variables The heat equation is linear as ๐ข and its derivatives do not appear to any powers or in any functions. Thus the principle of superposition still applies for the heat equation (without side conditions): If ๐ข1 and ๐ข2 are solutions and ๐1 , ๐2 are constants, then ๐ข = ๐1 ๐ข1 + ๐2 ๐ข2 is also a solution. Exercise 4.6.1: Verify the principle of superposition for the heat equation. Superposition preserves some of the side conditions. In particular, if ๐ข1 and ๐ข2 are solutions that satisfy ๐ข(0, ๐ก) = 0 and ๐ข(๐ฟ, ๐ก) = 0, and ๐ 1 , ๐2 are constants, then ๐ข = ๐ 1 ๐ข1 + ๐2 ๐ข2 is still a solution that satisfies ๐ข(0, ๐ก) = 0 and ๐ข(๐ฟ, ๐ก) = 0. Similarly for the side conditions ๐ข๐ฅ (0, ๐ก) = 0 and ๐ข๐ฅ (๐ฟ, ๐ก) = 0. In general, superposition preserves all homogeneous side conditions. 234 CHAPTER 4. FOURIER SERIES AND PDES The method of separation of variables is to try to find solutions that are products of functions of one variable. For the heat equation, we try to find solutions of the form ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก). That the desired solution we are looking for is of this form is too much to hope for. What is perfectly reasonable to ask, however, is to find enough “building-block” solutions of the form ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก) using this procedure so that the desired solution to the PDE is somehow constructed from these building blocks by the use of superposition. Let us try to solve the heat equation ๐ข๐ก = ๐๐ข๐ฅ๐ฅ with ๐ข(0, ๐ก) = 0, ๐ข(๐ฟ, ๐ก) = 0, and ๐ข(๐ฅ, 0) = ๐ (๐ฅ). We guess ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก). We will try to make this guess satisfy the differential equation, ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , and the homogeneous side conditions, ๐ข(0, ๐ก) = 0 and ๐ข(๐ฟ, ๐ก) = 0. Then, as superposition preserves the differential equation and the homogeneous side conditions, we will try to build up a solution from these building blocks to solve the nonhomogeneous initial condition ๐ข(๐ฅ, 0) = ๐ (๐ฅ). First we plug ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก) into the heat equation to obtain ๐(๐ฅ)๐ 0(๐ก) = ๐๐ 00(๐ฅ)๐(๐ก). We rewrite as ๐ 0(๐ก) ๐ 00(๐ฅ) = . ๐๐(๐ก) ๐(๐ฅ) This equation must hold for all ๐ฅ and all ๐ก. But the left-hand side does not depend on ๐ฅ and the right-hand side does not depend on ๐ก. Hence, each side must be a constant. Let us call this constant −๐ (the minus sign is for convenience later). We obtain the two equations ๐ 0(๐ก) ๐ 00(๐ฅ) = −๐ = . ๐๐(๐ก) ๐(๐ฅ) In other words, ๐ 00(๐ฅ) + ๐๐(๐ฅ) = 0, ๐ 0(๐ก) + ๐๐๐(๐ก) = 0. The boundary condition ๐ข(0, ๐ก) = 0 implies ๐(0)๐(๐ก) = 0. We are looking for a nontrivial solution and so we can assume that ๐(๐ก) is not identically zero. Hence ๐(0) = 0. Similarly, ๐ข(๐ฟ, ๐ก) = 0 implies ๐(๐ฟ) = 0. We are looking for nontrivial solutions ๐ of the eigenvalue problem ๐ 00 + ๐๐ = 0, ๐(0) = 0, ๐(๐ฟ) = 0. We have previously found that the only 2 2 eigenvalues are ๐๐ = ๐๐ฟ๐2 , for integers ๐ ≥ 1, where eigenfunctions are sin ๐๐ ๐ฟ ๐ฅ . Hence, let us pick the solutions ๐๐ ๐๐ (๐ฅ) = sin ๐ฅ . ๐ฟ 4.6. PDES, SEPARATION OF VARIABLES, AND THE HEAT EQUATION 235 The corresponding ๐๐ must satisfy the equation ๐๐0 (๐ก) + ๐ 2 ๐2 ๐๐๐ (๐ก) = 0. ๐ฟ2 This is one of our fundamental equations, and the solution is just an exponential: ๐๐ (๐ก) = ๐ −๐ 2 ๐2 ๐ฟ2 ๐๐ก . It will be useful to note that ๐๐ (0) = 1. Our building-block solutions are ๐ข๐ (๐ฅ, ๐ก) = ๐๐ (๐ฅ)๐๐ (๐ก) = sin We note that ๐ข๐ (๐ฅ, 0) = sin ๐๐ ๐ฟ ๐ฅ ๐๐ ๐ฟ ๐ฅ ๐ −๐ 2 ๐2 ๐ฟ2 ๐๐ก . . Let us write ๐ (๐ฅ) as the sine series ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin ๐=1 ๐๐ ๐ฟ ๐ฅ . That is, we find the Fourier series of the odd periodic extension of ๐ (๐ฅ). We used the sine series as it corresponds to the eigenvalue problem for ๐(๐ฅ) above. Finally, we use superposition to write the solution as ๐ข(๐ฅ, ๐ก) = ∞ Õ ๐ ๐ ๐ข๐ (๐ฅ, ๐ก) = ๐=1 ∞ Õ ๐ ๐ sin ๐=1 ๐๐ ๐ฟ ๐ฅ ๐ −๐ 2 ๐2 ๐ฟ2 ๐๐ก . Why does this solution work? First note that it is a solution to the heat equation by superposition. It satisfies ๐ข(0, ๐ก) = 0 and ๐ข(๐ฟ, ๐ก) = 0, because ๐ฅ = 0 or ๐ฅ = ๐ฟ makes all the sines vanish. Finally, plugging in ๐ก = 0, we notice that ๐๐ (0) = 1 and so ๐ข(๐ฅ, 0) = ∞ Õ ๐ ๐ ๐ข๐ (๐ฅ, 0) = ๐=1 ∞ Õ ๐=1 ๐ ๐ sin ๐๐ ๐ฟ ๐ฅ = ๐ (๐ฅ). Example 4.6.1: Consider an insulated wire of length 1 whose ends are embedded in ice (temperature 0). Let ๐ = 0.003 and let the initial heat distribution be ๐ข(๐ฅ, 0) = 50 ๐ฅ (1 − ๐ฅ). See Figure 4.16 on the next page. Suppose we want to find the temperature function ๐ข(๐ฅ, ๐ก). Let us also suppose we want to find when (at what ๐ก) does the maximum temperature in the wire drop to one half of the initial maximum of 12.5. We are solving the following PDE problem: ๐ข๐ก = 0.003 ๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ข(1, ๐ก) = 0, ๐ข(๐ฅ, 0) = 50 ๐ฅ (1 − ๐ฅ) for 0 < ๐ฅ < 1. 236 CHAPTER 4. FOURIER SERIES AND PDES 0.00 0.25 0.50 0.75 1.00 12.5 12.5 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 0.0 0.00 0.0 0.25 0.50 0.75 1.00 Figure 4.16: Initial distribution of temperature in the wire. We write ๐ (๐ฅ) = 50 ๐ฅ (1 − ๐ฅ) for 0 < ๐ฅ < 1 as a sine series. That is, ๐ (๐ฅ) = where ๐๐ = 2 ∫ 1 ๐ 50 ๐ฅ (1 − ๐ฅ) sin(๐๐๐ฅ) ๐๐ฅ = 0 ( 0 200 (−1) 200 − = 400 ๐3 ๐ 3 ๐3 ๐ 3 ๐3 ๐ 3 Í∞ ๐=1 ๐ ๐ sin(๐๐๐ฅ), if ๐ even, if ๐ odd. The solution ๐ข(๐ฅ, ๐ก), plotted in Figure 4.17 on the facing page for 0 ≤ ๐ก ≤ 100, is given by the series: ∞ Õ 2 2 400 ๐ข(๐ฅ, ๐ก) = sin(๐๐๐ฅ) ๐ −๐ ๐ 0.003 ๐ก . 3 3 ๐ ๐ ๐=1 ๐ odd Finally, let us answer the question about the maximum temperature. It is relatively easy to see that the maximum temperature at any fixed time is always at ๐ฅ = 0.5, in the middle of the wire. The plot of ๐ข(๐ฅ, ๐ก) confirms this intuition. If we plug in ๐ฅ = 0.5, we get ๐ข(0.5, ๐ก) = ∞ Õ 400 ๐=1 ๐ odd ๐3 ๐ 3 sin(๐๐ 0.5) ๐ −๐ 2 ๐2 0.003 ๐ก . For ๐ = 3 and higher (remember ๐ is only odd), the terms of the series are insignificant compared to the first term. The first term in the series is already a very good approximation of the function. Hence 2 400 ๐ข(0.5, ๐ก) ≈ 3 ๐ −๐ 0.003 ๐ก . ๐ The approximation gets better and better as ๐ก gets larger as the other terms decay much faster. Let us plot the function ๐ข(0.5, ๐ก), the temperature at the midpoint of the wire at time ๐ก, in Figure 4.18 on the next page. The figure also plots the approximation by the first term. After ๐ก = 5 or so it would be hard to tell the difference between the first term of the series for ๐ข(๐ฅ, ๐ก) and the real solution ๐ข(๐ฅ, ๐ก). This behavior is a general feature of solving 4.6. PDES, SEPARATION OF VARIABLES, AND THE HEAT EQUATION 0.00 0 237 t 20 40 0.25 x 60 0.50 80 u(x,t) 100 0.75 1.00 12.5 12.5 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 0.0 0.0 11.700 10.400 9.100 7.800 6.500 5.200 3.900 2.600 1.300 0.000 0.25 0 20 0.50 40 x 0.75 60 80 t 100 1.00 Figure 4.17: Plot of the temperature of the wire at position ๐ฅ at time ๐ก. 0 25 50 75 100 12.5 12.5 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 0 25 50 75 100 Figure 4.18: Temperature at the midpoint of the wire (the bottom curve), and the approximation of this temperature by using only the first term in the series (top curve). the heat equation. If you are interested in behavior for large enough ๐ก, only the first one or two terms may be necessary. 238 CHAPTER 4. FOURIER SERIES AND PDES Let us get back to the question of when is the maximum temperature one half of the initial maximum temperature. That is, when is the temperature at the midpoint 12.5/2 = 6.25. We notice on the graph that if we use the approximation by the first term we will be close enough. We solve 2 400 6.25 = 3 ๐ −๐ 0.003 ๐ก . ๐ That is, ๐3 ln 6.25 400 ๐ก= ≈ 24.5. −๐2 0.003 So the maximum temperature drops to half at about ๐ก = 24.5. We mention an interesting behavior of the solution to the heat equation. The heat equation “smoothes” out the function ๐ (๐ฅ) as ๐ก grows. For a fixed ๐ก, the solution is a Fourier −๐ 2 ๐2 ๐๐ก series with coefficients ๐ ๐ ๐ ๐ฟ2 . If ๐ก > 0, then these coefficients go to zero faster than any ๐1๐ for any power ๐. In other words, the Fourier series has infinitely many derivatives everywhere. Thus even if the function ๐ (๐ฅ) has jumps and corners, then for a fixed ๐ก > 0, the solution ๐ข(๐ฅ, ๐ก) as a function of ๐ฅ is as smooth as we want it to be. Example 4.6.2: When the initial condition is already a sine series, then there is no need to compute anything, you just need to plug in. Consider ๐ข๐ก = 0.3 ๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ข(1, ๐ก) = 0, ๐ข(๐ฅ, 0) = 0.1 sin(๐๐ก) + sin(2๐๐ก). The solution is then ๐ข(๐ฅ, ๐ก) = 0.1 sin(๐๐ก)๐ −0.3๐ ๐ก + sin(2๐๐ก)๐ −1.2๐ ๐ก . 2 4.6.3 2 Insulated ends Now suppose the ends of the wire are insulated. In this case, we are solving the equation ๐ข๐ก = ๐๐ข๐ฅ๐ฅ with ๐ข๐ฅ (0, ๐ก) = 0, ๐ข๐ฅ (๐ฟ, ๐ก) = 0, and ๐ข(๐ฅ, 0) = ๐ (๐ฅ). Yet again we try a solution of the form ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก). By the same procedure as before we plug into the heat equation and arrive at the following two equations ๐ 00(๐ฅ) + ๐๐(๐ฅ) = 0, ๐ 0(๐ก) + ๐๐๐(๐ก) = 0. At this point the story changes slightly. The boundary condition ๐ข๐ฅ (0, ๐ก) = 0 implies ๐ 0(0)๐(๐ก) = 0. Hence ๐ 0(0) = 0. Similarly, ๐ข๐ฅ (๐ฟ, ๐ก) = 0 implies ๐ 0(๐ฟ) = 0. We are looking for nontrivial solutions ๐ of the eigenvalue problem ๐ 00 + ๐๐ = 0, ๐ 0(0) = 0, ๐ 0(๐ฟ) = 0. We 2 2 have previously found that the only eigenvalues are ๐๐ = ๐๐ฟ๐2 , for integers ๐ ≥ 0, where 4.6. PDES, SEPARATION OF VARIABLES, AND THE HEAT EQUATION eigenfunctions are cos solutions ๐๐ ๐ฟ ๐ฅ 239 (we include the constant eigenfunction). Hence, let us pick ๐๐ (๐ฅ) = cos ๐๐ ๐ฟ ๐ฅ ๐0 (๐ฅ) = 1. and The corresponding ๐๐ must satisfy the equation ๐๐0 (๐ก) + ๐ 2 ๐2 ๐๐๐ (๐ก) = 0. ๐ฟ2 For ๐ ≥ 1, as before, ๐๐ (๐ก) = ๐ −๐ 2 ๐2 ๐ฟ2 ๐๐ก . For ๐ = 0, we have ๐00(๐ก) = 0 and hence ๐0 (๐ก) = 1. Our building-block solutions are ๐ข๐ (๐ฅ, ๐ก) = ๐๐ (๐ฅ)๐๐ (๐ก) = cos ๐๐ ๐ฟ ๐ฅ ๐ −๐ 2 ๐2 ๐ฟ2 ๐๐ก , and ๐ข0 (๐ฅ, ๐ก) = 1. We note that ๐ข๐ (๐ฅ, 0) = cos ๐๐ ๐ฟ ๐ฅ . Let us write ๐ using the cosine series ∞ ๐๐ ๐0 Õ ๐ ๐ cos + ๐ฅ . ๐ (๐ฅ) = 2 ๐ฟ ๐=1 That is, we find the Fourier series of the even periodic extension of ๐ (๐ฅ). We use superposition to write the solution as ๐ข(๐ฅ, ๐ก) = ∞ ∞ ๐=1 ๐=1 ๐๐ −๐2 ๐2 ๐0 Õ ๐0 Õ ๐๐ก + ๐ ๐ ๐ข๐ (๐ฅ, ๐ก) = + ๐ ๐ cos ๐ฅ ๐ ๐ฟ2 . 2 2 ๐ฟ Example 4.6.3: Let us try the same equation as before, but for insulated ends. We are solving the following PDE problem ๐ข๐ก = 0.003 ๐ข๐ฅ๐ฅ , ๐ข๐ฅ (0, ๐ก) = ๐ข๐ฅ (1, ๐ก) = 0, ๐ข(๐ฅ, 0) = 50 ๐ฅ (1 − ๐ฅ) for 0 < ๐ฅ < 1. For this problem, we must find the cosine series of ๐ข(๐ฅ, 0). For 0 < ๐ฅ < 1 we have ∞ Õ 25 −200 + cos(๐๐๐ฅ). 50 ๐ฅ (1 − ๐ฅ) = 3 ๐2 ๐ 2 ๐=2 ๐ even 240 CHAPTER 4. FOURIER SERIES AND PDES 0.00 0 x 5 0.25 t 10 0.50 15 20 0.75 u(x,t) 25 1.00 30 12.5 12.5 10.0 10.0 7.5 7.5 5.0 11.700 10.400 9.100 7.800 6.500 5.200 3.900 2.600 1.300 0.000 5.0 2.5 2.5 0.0 0 0.0 0.00 5 0.25 10 15 0.50 20 t 0.75 25 x 30 1.00 Figure 4.19: Plot of the temperature of the insulated wire at position ๐ฅ at time ๐ก. The calculation is left to the reader. Hence, the solution to the PDE problem, plotted in Figure 4.19, is given by the series ∞ Õ 25 −200 −๐ 2 ๐2 0.003 ๐ก ๐ข(๐ฅ, ๐ก) = cos(๐๐๐ฅ) ๐ . + 2๐2 3 ๐ ๐=2 ๐ even Note in the graph that as time goes on, the temperature evens out across the wire. Eventually, all the terms except the constant die out, and you will be left with a uniform temperature of 25 3 ≈ 8.33 along the entire length of the wire. Let us expand on the last point. The constant term in the series is ๐0 1 = 2 ๐ฟ ∫ ๐ฟ ๐ (๐ฅ) ๐๐ฅ. 0 In other words, ๐20 is the average value of ๐ (๐ฅ), that is, the average of the initial temperature. As the wire is insulated everywhere, no heat can get out, no heat can get in. So the temperature tries to distribute evenly over time, and the average temperature must always be the same, in particular it is always ๐20 . As time goes to infinity, the temperature goes to the constant ๐20 everywhere. 4.6. PDES, SEPARATION OF VARIABLES, AND THE HEAT EQUATION 4.6.4 241 Exercises Exercise 4.6.2: Consider a wire of length 2, with ๐ = 0.001 and an initial temperature distribution ๐ข(๐ฅ, 0) = 50๐ฅ. Both ends are embedded in ice (temperature 0). Find the solution as a series. Exercise 4.6.3: Find a series solution of ๐ข๐ก = ๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ข(1, ๐ก) = 0, ๐ข(๐ฅ, 0) = 100 for 0 < ๐ฅ < 1. Exercise 4.6.4: Find a series solution of ๐ข๐ก = ๐ข๐ฅ๐ฅ , ๐ข๐ฅ (0, ๐ก) = ๐ข๐ฅ (๐, ๐ก) = 0, ๐ข(๐ฅ, 0) = 3 cos(๐ฅ) + cos(3๐ฅ) for 0 < ๐ฅ < ๐. Exercise 4.6.5: Find a series solution of 1 ๐ข๐ก = ๐ข๐ฅ๐ฅ , 3 ๐ข๐ฅ (0, ๐ก) = ๐ข๐ฅ (๐, ๐ก) = 0, 10๐ฅ ๐ข(๐ฅ, 0) = for 0 < ๐ฅ < ๐. ๐ Exercise 4.6.6: Find a series solution of ๐ข๐ก = ๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = 0, ๐ข(1, ๐ก) = 100, ๐ข(๐ฅ, 0) = sin(๐๐ฅ) for 0 < ๐ฅ < 1. Hint: Use the fact that ๐ข(๐ฅ, ๐ก) = 100๐ฅ is a solution satisfying ๐ข๐ก = ๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = 0, ๐ข(1, ๐ก) = 100. Then use superposition. Exercise 4.6.7: Find the steady state temperature solution as a function of ๐ฅ alone, by letting ๐ก → ∞ in the solution from exercises 4.6.5 and 4.6.6. Verify that it satisfies the equation ๐ข๐ฅ๐ฅ = 0. Exercise 4.6.8: Use separation variables to find a nontrivial solution to ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, where ๐ข(๐ฅ, 0) = 0 and ๐ข(0, ๐ฆ) = 0. Hint: Try ๐ข(๐ฅ, ๐ฆ) = ๐(๐ฅ)๐(๐ฆ). Exercise 4.6.9 (challenging): Suppose that one end of the wire is insulated (say at ๐ฅ = 0) and the other end is kept at zero temperature. That is, find a series solution of ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , ๐ข๐ฅ (0, ๐ก) = ๐ข(๐ฟ, ๐ก) = 0, ๐ข(๐ฅ, 0) = ๐ (๐ฅ) for 0 < ๐ฅ < ๐ฟ. Express any coefficients in the series by integrals of ๐ (๐ฅ). 242 CHAPTER 4. FOURIER SERIES AND PDES Exercise 4.6.10 (challenging): Suppose that the wire is circular and insulated, so there are no ends. You can think of this as simply connecting the two ends and making sure the solution matches up at the ends. That is, find a series solution of ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ข(๐ฟ, ๐ก), ๐ข(๐ฅ, 0) = ๐ (๐ฅ) ๐ข๐ฅ (0, ๐ก) = ๐ข๐ฅ (๐ฟ, ๐ก), for 0 < ๐ฅ < ๐ฟ. Express any coefficients in the series by integrals of ๐ (๐ฅ). Exercise 4.6.11: Consider a wire insulated on both ends, ๐ฟ = 1, ๐ = 1, and ๐ข(๐ฅ, 0) = cos2 (๐๐ฅ). a) Find the solution ๐ข(๐ฅ, ๐ก). Hint: a trig identity. b) Find the average temperature. c) Initially the temperature variation is 1 (maximum minus the minimum). Find the time when the variation is 1/2. Exercise 4.6.101: Find a series solution of ๐ข๐ก = 3๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ข(๐, ๐ก) = 0, ๐ข(๐ฅ, 0) = 5 sin(๐ฅ) + 2 sin(5๐ฅ) for 0 < ๐ฅ < ๐. Exercise 4.6.102: Find a series solution of ๐ข๐ก = 0.1๐ข๐ฅ๐ฅ , ๐ข๐ฅ (0, ๐ก) = ๐ข๐ฅ (๐, ๐ก) = 0, ๐ข(๐ฅ, 0) = 1 + 2 cos(๐ฅ) for 0 < ๐ฅ < ๐. Exercise 4.6.103: Use separation of variables to find a nontrivial solution to ๐ข๐ฅ๐ก = ๐ข๐ฅ๐ฅ . Exercise 4.6.104: Use separation of variables to find a nontrivial solution to ๐ข๐ฅ + ๐ข๐ก = ๐ข. Hint: Try ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ) + ๐(๐ก). Exercise 4.6.105: Suppose that the temperature on the wire is fixed at 0 at the ends, ๐ฟ = 1, ๐ = 1, and ๐ข(๐ฅ, 0) = 100 sin(2๐๐ฅ). a) What is the temperature at ๐ฅ = 1/2 at any time. b) What is the maximum and the minimum temperature on the wire at ๐ก = 0. c) At what time is the maximum temperature on the wire exactly one half of the initial maximum at ๐ก = 0. 243 4.7. ONE-DIMENSIONAL WAVE EQUATION 4.7 One-dimensional wave equation Note: 1 lecture, §9.6 in [EP], §10.7 in [BD] Imagine we have a tensioned guitar string of length ๐ฟ. Let us only consider vibrations in one direction. Let ๐ฅ denote the position along the string, let ๐ก denote time, and let ๐ฆ denote the displacement of the string from the rest position. See Figure 4.20. ๐ฆ ๐ฆ ๐ฟ 0 ๐ฅ Figure 4.20: Vibrating string of length ๐ฟ, ๐ฅ is position, ๐ฆ is displacement. The equation that governs this setup is the so-called one-dimensional wave equation: ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ , for some constant ๐ > 0. The intuition is similar to the heat equation, replacing velocity with acceleration: the acceleration at a specific point is proportional to the second derivative of the shape of the string. In other words when the string is concave down then ๐ข๐ฅ๐ฅ is negative and the string wants to accelerate downwards, so ๐ข๐ก๐ก should be negative. And vice versa. The wave equation is an example of a hyperbolic PDE. Assume that the ends of the string are fixed in place as on the guitar: ๐ฆ(0, ๐ก) = 0 and ๐ฆ(๐ฟ, ๐ก) = 0. Note that we have two conditions along the ๐ฅ-axis as there are two derivatives in the ๐ฅ direction. There are also two derivatives along the ๐ก direction and hence we need two further conditions here. We need to know the initial position and the initial velocity of the string. That is, for some known functions ๐ (๐ฅ) and ๐(๐ฅ), we impose ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) and ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ). The equation is linear, so superposition works just as it did for the heat equation. And again we will use separation of variables to find enough building-block solutions to get the overall solution. There is one change however. It will be easier to solve two separate problems and add their solutions. 244 CHAPTER 4. FOURIER SERIES AND PDES The two problems we will solve are and ๐ค ๐ก๐ก = ๐ 2 ๐ค ๐ฅ๐ฅ , ๐ค(0, ๐ก) = ๐ค(๐ฟ, ๐ก) = 0, ๐ค(๐ฅ, 0) = 0 ๐ค ๐ก (๐ฅ, 0) = ๐(๐ฅ) for 0 < ๐ฅ < ๐ฟ, for 0 < ๐ฅ < ๐ฟ, (4.11) ๐ง ๐ก๐ก = ๐ 2 ๐ง ๐ฅ๐ฅ , ๐ง(0, ๐ก) = ๐ง(๐ฟ, ๐ก) = 0, ๐ง(๐ฅ, 0) = ๐ (๐ฅ) ๐ง ๐ก (๐ฅ, 0) = 0 for 0 < ๐ฅ < ๐ฟ, for 0 < ๐ฅ < ๐ฟ. (4.12) The principle of superposition implies that ๐ฆ = ๐ค + ๐ง solves the wave equation and furthermore ๐ฆ(๐ฅ, 0) = ๐ค(๐ฅ, 0) + ๐ง(๐ฅ, 0) = ๐ (๐ฅ) and ๐ฆ๐ก (๐ฅ, 0) = ๐ค ๐ก (๐ฅ, 0) + ๐ง ๐ก (๐ฅ, 0) = ๐(๐ฅ). Hence, ๐ฆ is a solution to ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(๐ฟ, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ) for 0 < ๐ฅ < ๐ฟ, for 0 < ๐ฅ < ๐ฟ. (4.13) The reason for all this complexity is that superposition only works for homogeneous conditions such as ๐ฆ(0, ๐ก) = ๐ฆ(๐ฟ, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = 0, or ๐ฆ๐ก (๐ฅ, 0) = 0. Therefore, we can use separation of variables to find many building-block solutions solving all the homogeneous conditions. We can then use them to construct a solution satisfying the remaining nonhomogeneous condition. Let us start with (4.11). We try a solution of the form ๐ค(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก) again. We plug into the wave equation to obtain ๐(๐ฅ)๐ 00(๐ก) = ๐ 2 ๐ 00(๐ฅ)๐(๐ก). Rewriting we get ๐ 00(๐ก) ๐ 00(๐ฅ) = . ๐(๐ฅ) ๐ 2๐(๐ก) Again, left-hand side depends only on ๐ก and the right-hand side depends only on ๐ฅ. So both sides equal a constant, which we denote by −๐: ๐ 00(๐ก) ๐ 00(๐ฅ) = −๐ = . ๐(๐ฅ) ๐ 2๐(๐ก) We solve to get two ordinary differential equations ๐ 00(๐ฅ) + ๐๐(๐ฅ) = 0, ๐ 00(๐ก) + ๐๐ 2๐(๐ก) = 0. 245 4.7. ONE-DIMENSIONAL WAVE EQUATION The conditions 0 = ๐ค(0, ๐ก) = ๐(0)๐(๐ก) implies ๐(0) = 0 and ๐ค(๐ฟ, ๐ก) = 0 implies that ๐(๐ฟ) = 0. 2 2 Therefore, the only nontrivial solutions for the first equation are when ๐ = ๐๐ = ๐๐ฟ๐2 and they are ๐๐ ๐๐ (๐ฅ) = sin ๐ฅ . ๐ฟ The general solution for ๐ for this particular ๐๐ is ๐๐ (๐ก) = ๐ด cos ๐๐๐ ๐๐๐ ๐ฟ ๐ฟ ๐ก + ๐ต sin ๐ก . We also have the condition that ๐ค(๐ฅ, 0) = 0 or ๐(๐ฅ)๐(0) = 0. This implies that ๐(0) = 0, ๐ฟ which in turn forces ๐ด = 0. It is convenient to pick ๐ต = ๐๐๐ (you will see why in a moment) and hence ๐๐๐ ๐ฟ ๐๐ (๐ก) = sin ๐ก . ๐๐๐ ๐ฟ Our building-block solutions are ๐ค ๐ (๐ฅ, ๐ก) = We differentiate in ๐ก: ๐๐ ๐๐๐ ๐ฟ sin ๐ฅ sin ๐ก . ๐๐๐ ๐ฟ ๐ฟ ๐๐ ๐๐๐ ๐๐ค ๐ (๐ฅ, ๐ก) = sin ๐ฅ cos ๐ก . ๐ฟ ๐ฟ ๐๐ก Hence, ๐๐ ๐๐ค ๐ (๐ฅ, 0) = sin ๐ฅ . ๐ฟ ๐๐ก We expand ๐(๐ฅ) in terms of these sines as ๐(๐ฅ) = ∞ Õ ๐ ๐ sin ๐๐ ๐ฟ ๐=1 ๐ฅ . Using superposition we write the solution to (4.11) as a series ๐ค(๐ฅ, ๐ก) = ∞ Õ ๐=1 ๐ ๐ ๐ค ๐ (๐ฅ, ๐ก) = ∞ Õ ๐๐ ๐=1 ๐๐ ๐๐๐ ๐ฟ sin ๐ฅ sin ๐ก . ๐๐๐ ๐ฟ ๐ฟ Exercise 4.7.1: Check that ๐ค(๐ฅ, 0) = 0 and ๐ค ๐ก (๐ฅ, 0) = ๐(๐ฅ). We solve (4.12) similarly. We again try ๐ง(๐ฅ, ๐ฆ) = ๐(๐ฅ)๐(๐ก). The procedure works exactly the same at first. We obtain ๐ 00(๐ฅ) + ๐๐(๐ฅ) = 0, ๐ 00(๐ก) + ๐๐ 2๐(๐ก) = 0, and the conditions ๐(0) = 0, ๐(๐ฟ) = 0. So again ๐ = ๐๐ = ๐๐ (๐ฅ) = sin ๐๐ ๐ฟ ๐ฅ . ๐ 2 ๐2 ๐ฟ2 and 246 CHAPTER 4. FOURIER SERIES AND PDES This time the condition on ๐ is ๐ 0(0) = 0. Thus we get that ๐ต = 0 and we take ๐๐ (๐ก) = cos ๐๐๐ ๐ก . ๐ฟ Our building-block solution is ๐ง ๐ (๐ฅ, ๐ก) = sin As ๐ง ๐ (๐ฅ, 0) = sin ๐๐ ๐ฟ ๐ฅ ๐๐ ๐๐๐ ๐ฟ ๐ฟ ๐ฅ cos ๐ก . , we expand ๐ (๐ฅ) in terms of these sines as ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin ๐=1 ๐๐ ๐ฟ ๐ฅ . And we write down the solution to (4.12) as a series ๐ง(๐ฅ, ๐ก) = ∞ Õ ๐ ๐ ๐ง ๐ (๐ฅ, ๐ก) = ๐=1 ∞ Õ ๐=1 ๐ ๐ sin ๐๐ ๐๐๐ ๐ฟ ๐ฟ ๐ฅ cos ๐ก . Exercise 4.7.2: Fill in the details in the derivation of the solution of (4.12). Check that the solution satisfies all the side conditions. Putting these two solutions together, let us state the result as a theorem. Theorem 4.7.1. Take the equation ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(๐ฟ, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ) where ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin ๐๐ ๐ฟ ๐=1 ๐ฅ and (4.14) for 0 < ๐ฅ < ๐ฟ, for 0 < ๐ฅ < ๐ฟ, ๐(๐ฅ) = ∞ Õ ๐ ๐ sin ๐=1 ๐๐ ๐ฟ ๐ฅ . Then the solution ๐ฆ(๐ฅ, ๐ก) can be written as a sum of the solutions of (4.11) and (4.12): ๐ฆ(๐ฅ, ๐ก) = ∞ Õ ๐=1 = ∞ Õ ๐=1 ๐๐ ๐๐๐ ๐๐ ๐๐๐ ๐ฟ ๐๐ sin ๐ฅ sin ๐ก + ๐ ๐ sin ๐ฅ cos ๐ก ๐๐๐ ๐ฟ ๐ฟ ๐ฟ ๐ฟ sin ๐๐ ๐ฟ ๐ฅ ๐๐๐ ๐๐๐ ๐ฟ ๐๐ sin ๐ก + ๐ ๐ cos ๐ก . ๐๐๐ ๐ฟ ๐ฟ Example 4.7.1: Consider a string of length 2 plucked in the middle, it has an initial shape given in Figure 4.21 on the facing page. That is, ( ๐ (๐ฅ) = 0.1 ๐ฅ if 0 ≤ ๐ฅ ≤ 1, 0.1 (2 − ๐ฅ) if 1 < ๐ฅ ≤ 2. 247 4.7. ONE-DIMENSIONAL WAVE EQUATION ๐ฆ 0.1 0 ๐ฅ 2 Figure 4.21: Initial shape of a plucked string from Example 4.7.1. Let the string start at rest (๐(๐ฅ) = 0), and let ๐ = 1 for simplicity. In other words, we wish to solve the problem: ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(2, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = 0. and We leave it to the reader to compute the sine series of ๐ (๐ฅ). The series will be ๐ (๐ฅ) = ∞ Õ 0.8 ๐=1 Note that sin ๐๐ 2 ๐ 2 ๐2 sin ๐๐ 2 sin ๐๐ ๐ฅ . 2 is the sequence 1, 0, −1, 0, 1, 0, −1, . . . for ๐ = 1, 2, 3, 4, . . .. Therefore, ๐ 0.8 0.8 0.8 3๐ 5๐ ๐ฅ − 2 sin ๐ฅ + ๐ฅ −··· ๐ (๐ฅ) = 2 sin sin 2 2 2 ๐ 9๐ 25๐2 The solution ๐ฆ(๐ฅ, ๐ก) is given by ๐ฆ(๐ฅ, ๐ก) = ∞ Õ 0.8 ๐=1 ๐ 2 ๐2 sin ๐๐ 2 ∞ Õ 0.8(−1)๐+1 sin ๐๐ ๐๐ 2 2 ๐ฅ cos ๐ก (2๐ − 1)๐ (2๐ − 1)๐ = sin ๐ฅ cos ๐ก 2 2 2 2 (2๐ − 1) ๐ ๐=1 ๐ ๐ 0.8 0.8 3๐ 3๐ = 2 sin ๐ฅ cos ๐ก − 2 sin ๐ฅ cos ๐ก 2 2 2 2 ๐ 9๐ 0.8 5๐ 5๐ sin + ๐ฅ cos ๐ก −··· 2 2 25๐2 See Figure 4.22 on the next page for a plot for 0 < ๐ก < 3. Notice that unlike the heat equation, the solution does not become “smoother,” the “sharp edges” remain. We will see the reason for this behavior in the next section where we derive the solution to the wave equation in a different way. 248 CHAPTER 4. FOURIER SERIES AND PDES 0.0 0 t 1 0.5 2 x 1.0 y(x,t) 3 0.10 1.5 y 0.10 0.05 0.05 0.00 0.00 -0.05 -0.05 -0.10 y 2.0 0.110 0.088 0.066 0.044 0.022 0.000 -0.022 -0.044 -0.066 -0.088 -0.110 0.0 0.5 -0.10 0 1.0 x 1 1.5 t 2 2.0 3 Figure 4.22: Shape of the plucked string for 0 < ๐ก < 3. Make sure you understand what the plot, such as the one in the figure, is telling you. For each fixed ๐ก, you can think of the function ๐ฆ(๐ฅ, ๐ก) as just a function of ๐ฅ. This function gives you the shape of the string at time ๐ก. See Figure 4.23 on the facing page for plots of at ๐ฆ as a function of ๐ฅ at several different values of ๐ก. On this plot you can see the sharp edges remaining much better. One thing to take away from all this is how a guitar sounds. Notice that the (angular) frequencies that come up in the solution are ๐ ๐๐ ๐ฟ . That is, there is a certain base fundamental ๐๐ frequency ๐ฟ , and then we also get all the multiples of this frequency, which in music are called the overtones. Which overtones appear and with what amplitude is what musicians call the timbre of the note. Mathematicians usually call this the spectrum. Because all the frequencies are multiples of one frequency (the fundamental) we get a nice pleasing sound. The fundamental frequency ๐๐ ๐ฟ increases as we decrease length ๐ฟ. That is, if we place a finger on the fingerboard and then pluck a string we get a higher note. The constant ๐ is given by s ๐= ๐ , ๐ where ๐ is tension and ๐ is the linear density of the string. Tightening the string (turning 249 4.7. ONE-DIMENSIONAL WAVE EQUATION 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 0.10 0.10 0.10 0.10 0.05 0.05 0.05 0.05 0.00 0.00 0.00 0.00 -0.05 -0.05 -0.05 -0.05 -0.10 -0.10 -0.10 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 -0.10 0.0 0.5 1.0 1.5 2.0 0.0 0.5 1.0 1.5 2.0 0.10 0.10 0.10 0.10 0.05 0.05 0.05 0.05 0.00 0.00 0.00 0.00 -0.05 -0.05 -0.05 -0.05 -0.10 -0.10 -0.10 0.0 0.5 1.0 1.5 2.0 -0.10 0.0 0.5 1.0 1.5 2.0 Figure 4.23: Plucked string for ๐ก = 0, ๐ก = 0.4, ๐ก = 0.8, and ๐ก = 1.2. the tuning peg on a guitar) increases ๐ and hence produces a higher fundamental frequency (a higher note). On the other hand using a heavier string reduces ๐ and produces a lower fundamental frequency (a lower note). A bass guitar has longer thicker strings, while a ukulele has short strings made of lighter material. Something rather interesting is the almost symmetry between space and time. In its simplest form we see this symmetry in the solutions sin ๐๐ ๐๐๐ ๐ฟ ๐ฟ ๐ฅ sin ๐ก . Except for the ๐, time and space are just the same. In general, the solution for a fixed ๐ฅ is a Fourier series in ๐ก, for a fixed ๐ก it is a Fourier series in ๐ฅ, and the coefficients are related. If the shape ๐ (๐ฅ) or the initial velocity have lots of corners, then the sound wave will have lots of corners. That is because the Fourier coefficients of the initial shape decay to zero (as ๐ → ∞) at the same rate as the Fourier coefficients of the wave in time (for some fixed ๐ฅ). So if you use a sharp object to pick the string, you get a sharper sound with lots of high frequency components, while if you use your thumb, you get a softer sound without so many high overtones. Similarly if you pluck 250 CHAPTER 4. FOURIER SERIES AND PDES close to the bridge, you are getting a pluck that looks more like the sawtooth, and you get an even sharper sound. In fact, if you look at the formula for the solution, you see that for any fixed ๐ฅ we get an almost arbitrary Fourier series in ๐ก, everything except the constant term. You can essentially obtain any sound you want by plucking the string in just the right way. Of course we are considering an ideal string of no stiffness and no air resistance. Those variables clearly impact the sound as well. 4.7.1 Exercises Exercise 4.7.3: Solve ๐ฆ๐ก๐ก = 9๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(3๐๐ฅ) + 41 sin(6๐๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = 0 for 0 < ๐ฅ < 1, for 0 < ๐ฅ < 1. Exercise 4.7.4: Solve ๐ฆ๐ก๐ก = 4๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(3๐๐ฅ) + 14 sin(6๐๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = sin(9๐๐ฅ) for 0 < ๐ฅ < 1, for 0 < ๐ฅ < 1. Exercise 4.7.5: Derive the solution for a general plucked string of length ๐ฟ and any constant ๐ (in the equation ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ ), where we raise the string some distance ๐ at the midpoint and let go. Exercise 4.7.6: Imagine that a stringed musical instrument falls on the floor. Suppose that the length of the string is 1 and ๐ = 1. When the musical instrument hits the ground the string was in rest position and hence ๐ฆ(๐ฅ, 0) = 0. However, the string was moving at some velocity at impact (๐ก = 0), say ๐ฆ๐ก (๐ฅ, 0) = −1. Find the solution ๐ฆ(๐ฅ, ๐ก) for the shape of the string at time ๐ก. Exercise 4.7.7 (challenging): Suppose that you have a vibrating string and that there is air resistance proportional to the velocity. That is, you have ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ − ๐ ๐ฆ๐ก , ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = 0 for 0 < ๐ฅ < 1, for 0 < ๐ฅ < 1. Suppose that 0 < ๐ < 2๐๐. Derive a series solution to the problem. Any coefficients in the series should be expressed as integrals of ๐ (๐ฅ). Exercise 4.7.8: Suppose you touch the guitar string exactly in the middle to ensure another condition ๐ข(๐ฟ/2, ๐ก) = 0 for all time. Which multiples of the fundamental frequency ๐๐ ๐ฟ show up in the solution? 251 4.7. ONE-DIMENSIONAL WAVE EQUATION Exercise 4.7.101: Solve ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(๐ฅ) ๐ฆ๐ก (๐ฅ, 0) = sin(๐ฅ) for 0 < ๐ฅ < ๐, for 0 < ๐ฅ < ๐. Exercise 4.7.102: Solve ๐ฆ๐ก๐ก = 25๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(2, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = 0 ๐ฆ๐ก (๐ฅ, 0) = sin(๐๐ก) + 0.1 sin(2๐๐ก) for 0 < ๐ฅ < 2, for 0 < ๐ฅ < 2. Exercise 4.7.103: Solve ๐ฆ๐ก๐ก = 2๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ฅ ๐ฆ๐ก (๐ฅ, 0) = 0 for 0 < ๐ฅ < ๐, for 0 < ๐ฅ < ๐. Exercise 4.7.104: Let’s see what happens when ๐ = 0. Find a solution to ๐ฆ๐ก๐ก = 0, ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(2๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = sin(๐ฅ). 252 4.8 CHAPTER 4. FOURIER SERIES AND PDES D’Alembert solution of the wave equation Note: 1 lecture, different from §9.6 in [EP], part of §10.7 in [BD] We have solved the wave equation by using Fourier series. But it is often more convenient to use the so-called d’Alembert solution to the wave equation∗ . While this solution can be derived using Fourier series as well, it is really an awkward use of those concepts. It is easier and more instructive to derive this solution by making a correct change of variables to get an equation that can be solved by simple integration. Suppose we wish to solve the wave equation ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ (4.15) subject to the side conditions ๐ฆ(0, ๐ก) = ๐ฆ(๐ฟ, ๐ก) = 0 for all ๐ก, 4.8.1 ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) 0 < ๐ฅ < ๐ฟ, ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ) 0 < ๐ฅ < ๐ฟ. (4.16) Change of variables We will transform the equation into a simpler form where it can be solved by simple integration. We change variables to ๐ = ๐ฅ − ๐๐ก, ๐ = ๐ฅ + ๐๐ก. The chain rule says: ๐๐ ๐ ๐๐ ๐ ๐ ๐ ๐ = + = + , ๐๐ฅ ๐๐ฅ ๐๐ ๐๐ฅ ๐๐ ๐๐ ๐๐ ๐๐ ๐ ๐ ๐๐ ๐ ๐ ๐ = + = −๐ +๐ . ๐๐ก ๐๐ก ๐๐ ๐๐ก ๐๐ ๐๐ ๐๐ We compute ๐2 ๐ฆ ๐๐ฆ ๐๐ฆ ๐2 ๐ฆ ๐2 ๐ฆ ๐2 ๐ฆ ๐ ๐ ๐ฆ ๐ฅ๐ฅ = = + + = +2 + , ๐๐ ๐๐ ๐๐ ๐๐ ๐๐๐๐ ๐๐2 ๐๐ฅ 2 ๐๐2 ๐2 ๐ฆ ๐๐ฆ ๐๐ฆ ๐2 ๐ฆ ๐2 ๐ฆ ๐2 ๐ฆ ๐ ๐ ๐ฆ๐ก๐ก = 2 = −๐ +๐ −๐ +๐ = ๐ 2 2 − 2๐ 2 + ๐2 2 . ๐๐ ๐๐ ๐๐ ๐๐ ๐๐๐๐ ๐๐ก ๐๐ ๐๐ In the computations above, we used the fact from calculus that we got into the wave equation, 0 = ๐ 2 ๐ฆ ๐ฅ๐ฅ − ๐ฆ๐ก๐ก = 4๐ 2 ๐2 ๐ฆ ๐๐๐๐ = ๐2 ๐ฆ . ๐๐๐๐ We plug what ๐2 ๐ฆ = 4๐ 2 ๐ฆ๐๐ . ๐๐๐๐ Therefore, the wave equation (4.15) transforms into ๐ฆ๐๐ = 0. It is easy to find the general solution to this equation by integrating twice. Keeping ๐ constant, we integrate with respect ∗ Named after the French mathematician Jean le Rond d’Alembert (1717–1783). 253 4.8. D’ALEMBERT SOLUTION OF THE WAVE EQUATION to ๐ first∗ and notice that the constant of integration depends on ๐; for each ๐ we might get a different constant of integration. We get ๐ฆ๐ = ๐ถ(๐). Next, we integrate with respect to ๐ ∫ and notice that the constant of integration depends on ๐. Thus, ๐ฆ = ๐ถ(๐) ๐๐ + ๐ต(๐). The solution must, therefore, be of the following form for some functions ๐ด(๐) and ๐ต(๐): ๐ฆ = ๐ด(๐) + ๐ต(๐) = ๐ด(๐ฅ − ๐๐ก) + ๐ต(๐ฅ + ๐๐ก). The solution is a superposition of two functions (waves) traveling at speed ๐ in opposite directions. The coordinates ๐ and ๐ are called the characteristic coordinates, and a similar technique can be applied to more complicated hyperbolic PDE. And in fact, in § 1.9 it is used to solve first order linear PDE. Basically, to solve the wave equation (or more general hyperbolic equations) we find certain characteristic curves along which the equation is really just an ODE, or a pair of ODEs. In this case these are the curves where ๐ and ๐ are constant. 4.8.2 D’Alembert’s formula We know what any solution must look like, but we need to solve for the given side conditions. We will just give the formula and see that it works. First let ๐น(๐ฅ) denote the odd periodic extension of ๐ (๐ฅ), and let ๐บ(๐ฅ) denote the odd periodic extension of ๐(๐ฅ). Define 1 1 ๐ด(๐ฅ) = ๐น(๐ฅ) − 2 2๐ ๐ฅ ∫ ∫ 1 1 ๐ต(๐ฅ) = ๐น(๐ฅ) + 2 2๐ ๐บ(๐ ) ๐๐ , 0 ๐ฅ ๐บ(๐ ) ๐๐ . 0 We claim this ๐ด(๐ฅ) and ๐ต(๐ฅ) give the solution. Explicitly, the solution is ๐ฆ(๐ฅ, ๐ก) = ๐ด(๐ฅ − ๐๐ก) + ๐ต(๐ฅ + ๐๐ก) or in other words: 1 1 ๐ฆ(๐ฅ, ๐ก) = ๐น(๐ฅ − ๐๐ก) − 2 2๐ ∫ 0 ๐ฅ−๐๐ก 1 1 ๐บ(๐ ) ๐๐ + ๐น(๐ฅ + ๐๐ก) + 2 2๐ 1 ๐น(๐ฅ − ๐๐ก) + ๐น(๐ฅ + ๐๐ก) + = 2 2๐ ∫ ๐ฅ+๐๐ก ∫ ๐ฅ+๐๐ก ๐บ(๐ ) ๐๐ 0 (4.17) ๐บ(๐ ) ๐๐ . ๐ฅ−๐๐ก Let us check that the d’Alembert formula really works. ๐น(๐ฅ) + ๐น(๐ฅ) 1 ๐ฆ(๐ฅ, 0) = + 2 2๐ ∫ ๐ฅ ๐บ(๐ ) ๐๐ = ๐น(๐ฅ). ๐ฅ So far so good. Assume for simplicity ๐น is differentiable. And we use the first form of (4.17) as it is easier to differentiate. By the fundamental theorem of calculus we have ๐ฆ๐ก (๐ฅ, ๐ก) = −๐ 0 1 ๐ 1 ๐น (๐ฅ − ๐๐ก) + ๐บ(๐ฅ − ๐๐ก) + ๐น0(๐ฅ + ๐๐ก) + ๐บ(๐ฅ + ๐๐ก). 2 2 2 2 So ๐ฆ๐ก (๐ฅ, 0) = ∗ There −๐ 0 1 ๐ 1 ๐น (๐ฅ) + ๐บ(๐ฅ) + ๐น0(๐ฅ) + ๐บ(๐ฅ) = ๐บ(๐ฅ). 2 2 2 2 is nothing special about ๐, you can integrate with ๐ first, if you wish. 254 CHAPTER 4. FOURIER SERIES AND PDES Yay! We’re smoking now. OK, now the boundary conditions. Note that ๐น(๐ฅ) and ๐บ(๐ฅ) are odd. So 1 ๐น(−๐๐ก) + ๐น(๐๐ก) + ๐ฆ(0, ๐ก) = 2 2๐ ∫ ๐๐ก −๐๐ก −๐น(๐๐ก) + ๐น(๐๐ก) 1 ๐บ(๐ ) ๐๐ = + 2 2๐ ∫ ๐๐ก ๐บ(๐ ) ๐๐ = 0 + 0 = 0. −๐๐ก Now ๐น(๐ฅ) is odd and 2๐ฟ-periodic, so ๐น(๐ฟ − ๐๐ก) + ๐น(๐ฟ + ๐๐ก) = ๐น(−๐ฟ − ๐๐ก) + ๐น(๐ฟ + ๐๐ก) = −๐น(๐ฟ + ๐๐ก) + ๐น(๐ฟ + ๐๐ก) = 0. Next, ๐บ(๐ ) is odd and 2๐ฟ-periodic, so we change variables ๐ฃ = ๐ − ๐ฟ. We then notice that ๐บ(๐ฃ + ๐ฟ) = ๐บ(๐ฃ − ๐ฟ) = −๐บ(−๐ฃ + ๐ฟ), so ๐บ(๐ฃ + ๐ฟ) is odd as a function of ๐ฃ: ∫ ๐ฟ+๐๐ก ๐บ(๐ ) ๐๐ = ๐ฟ−๐๐ก ∫ ๐๐ก ๐บ(๐ฃ + ๐ฟ) ๐๐ฃ = 0. −๐๐ก Hence 1 ๐น(๐ฟ − ๐๐ก) + ๐น(๐ฟ + ๐๐ก) ๐ฆ(๐ฟ, ๐ก) = + 2 2๐ And voilà, it works. ∫ ๐ฟ+๐๐ก ๐ฟ−๐๐ก ๐บ(๐ ) ๐๐ = 0 + 0 = 0. Example 4.8.1: D’Alembert says that the solution is a superposition of two functions (waves) moving in the opposite direction at “speed” ๐. To get an idea of how it works, let us work out an example. Consider the simpler setup ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = 0. Here ๐ (๐ฅ) is an impulse of height 1 centered at ๐ฅ = 0.5: ๐ (๐ฅ) = ๏ฃฑ 0 ๏ฃด ๏ฃด ๏ฃด ๏ฃด ๏ฃฒ ๏ฃด if 20 (๐ฅ − 0.45) 0 ≤ ๐ฅ < 0.45, if 0.45 ≤ ๐ฅ < 0.5, ๏ฃด 20 (0.55 − ๐ฅ) if 0.5 ≤ ๐ฅ < 0.55, ๏ฃด ๏ฃด ๏ฃด ๏ฃด0 if 0.55 ≤ ๐ฅ ≤ 1. ๏ฃณ The graph of this impulse is the top left plot in Figure 4.24 on the next page. Let ๐น(๐ฅ) be the odd periodic extension of ๐ (๐ฅ). Then (4.17) says that the solution is ๐ฆ(๐ฅ, ๐ก) = ๐น(๐ฅ − ๐ก) + ๐น(๐ฅ + ๐ก) . 2 It is not hard to compute specific values of ๐ฆ(๐ฅ, ๐ก). For example, to compute ๐ฆ(0.1, 0.6) we notice ๐ฅ − ๐ก = −0.5 and ๐ฅ + ๐ก = 0.7. Now ๐น(−0.5) = − ๐ (0.5) = −20 (0.55 − 0.5) = −1 and ๐น(0.7) = ๐ (0.7) = 0. Hence ๐ฆ(0.1, 0.6) = −1+0 2 = −0.5. As you can see the d’Alembert solution is much easier to actually compute and to plot than the Fourier series solution. See Figure 4.24 on the facing page for plots of the solution ๐ฆ for several different ๐ก. 255 4.8. D’ALEMBERT SOLUTION OF THE WAVE EQUATION 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 -0.5 -0.5 -0.5 -0.5 -1.0 -1.0 -1.0 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 -1.0 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 1.0 1.0 1.0 1.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 -0.5 -0.5 -0.5 -0.5 -1.0 -1.0 -1.0 0.00 0.25 0.50 0.75 1.00 0.00 -1.0 0.25 0.50 0.75 1.00 Figure 4.24: Plot of the d’Alembert solution for ๐ก = 0, ๐ก = 0.2, ๐ก = 0.4, and ๐ก = 0.6. 4.8.3 Another way to solve for the side conditions It is perhaps easier and more useful to memorize the procedure rather than the formula itself. The important thing to remember is that a solution to the wave equation is a superposition of two waves traveling in opposite directions. That is, ๐ฆ(๐ฅ, ๐ก) = ๐ด(๐ฅ − ๐๐ก) + ๐ต(๐ฅ + ๐๐ก). If you think about it, the exact formulas for ๐ด and ๐ต are not hard to guess once you realize what kind of side conditions ๐ฆ(๐ฅ, ๐ก) is supposed to satisfy. Let us find the formula again, but slightly differently. Best approach is to do it in stages. When ๐(๐ฅ) = 0 (and hence ๐บ(๐ฅ) = 0) the solution is ๐น(๐ฅ − ๐๐ก) + ๐น(๐ฅ + ๐๐ก) . 2 On the other hand, when ๐ (๐ฅ) = 0 (and hence ๐น(๐ฅ) = 0), we let ๐ป(๐ฅ) = ∫ 0 ๐ฅ ๐บ(๐ ) ๐๐ . 256 CHAPTER 4. FOURIER SERIES AND PDES The solution in this case is 1 2๐ ∫ ๐ฅ+๐๐ก ๐ฅ−๐๐ก ๐บ(๐ ) ๐๐ = −๐ป(๐ฅ − ๐๐ก) + ๐ป(๐ฅ + ๐๐ก) . 2๐ By superposition we get a solution for the general side conditions (4.16) (when neither ๐ (๐ฅ) nor ๐(๐ฅ) are identically zero). ๐ฆ(๐ฅ, ๐ก) = ๐น(๐ฅ − ๐๐ก) + ๐น(๐ฅ + ๐๐ก) −๐ป(๐ฅ − ๐๐ก) + ๐ป(๐ฅ + ๐๐ก) + . 2 2๐ (4.18) Do note the minus sign before the ๐ป, and the ๐ in the second denominator. Exercise 4.8.1: Check that the new formula (4.18) satisfies the side conditions (4.16). Warning: Make sure you use the odd periodic extensions ๐น(๐ฅ) and ๐บ(๐ฅ), when you have formulas for ๐ (๐ฅ) and ๐(๐ฅ). The thing is, those formulas in general hold only for 0 < ๐ฅ < ๐ฟ, and are not usually equal to ๐น(๐ฅ) and ๐บ(๐ฅ) for other ๐ฅ. 4.8.4 Some remarks Let us remark that the formula ๐ฆ(๐ฅ, ๐ก) = ๐ด(๐ฅ − ๐๐ก) + ๐ต(๐ฅ + ๐๐ก) is the reason why the solution of the wave equation doesn’t get “nicer” as time goes on, that is, why in the examples where the initial conditions had corners, the solution also has corners at every time ๐ก. The corners bring us to another interesting remark. Nobody ever notices at first that our example solutions are not even differentiable (they have corners): In Example 4.8.1 above, the solution is not differentiable whenever ๐ฅ = ๐ก + 0.5 or ๐ฅ = −๐ก + 0.5 for example. Really to be able to compute ๐ข๐ฅ๐ฅ or ๐ข๐ก๐ก , you need not one, but two derivatives. Fear not, we could think of a shape that is very nearly ๐น(๐ฅ) but does have two derivatives by rounding the corners a little bit, and then the solution would be very nearly ๐น(๐ฅ−๐ก)+๐น(๐ฅ+๐ก) and nobody 2 would notice the switch. One final remark is what the d’Alembert solution tells us about what part of the initial conditions influence the solution at a certain point. We can figure this out by “traveling backwards along the characteristics.” Let us suppose that the string is very long (perhaps infinite) for simplicity. Since the solution at time ๐ก is ๐น(๐ฅ − ๐๐ก) + ๐น(๐ฅ + ๐๐ก) 1 ๐ฆ(๐ฅ, ๐ก) = + 2 2๐ ∫ ๐ฅ+๐๐ก ๐บ(๐ ) ๐๐ , ๐ฅ−๐๐ก we notice that we have only used the initial conditions in the interval [๐ฅ − ๐๐ก, ๐ฅ + ๐๐ก]. These two endpoints are called the wavefronts, as that is where the wave front is given an initial (๐ก = 0) disturbance at ๐ฅ. So if ๐ = 1, an observer sitting at ๐ฅ = 0 at time ๐ก = 1 has only seen the initial conditions for ๐ฅ in the range [−1, 1] and is blissfully unaware of anything else. This is why for example we do not know that a supernova has occurred in the universe until we see its light, millions of years from the time when it did in fact happen. 257 4.8. D’ALEMBERT SOLUTION OF THE WAVE EQUATION 4.8.5 Exercises Exercise 4.8.2: Using the d’Alembert solution solve ๐ฆ๐ก๐ก = 4๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < ๐, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin ๐ฅ, and ๐ฆ๐ก (๐ฅ, 0) = sin ๐ฅ. Hint: Note that sin ๐ฅ is the odd periodic extension of ๐ฆ(๐ฅ, 0) and ๐ฆ๐ก (๐ฅ, 0). Exercise 4.8.3: Using the d’Alembert solution solve ๐ฆ๐ก๐ก = 2๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < 1, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin5 (๐๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = sin3 (๐๐ฅ). Exercise 4.8.4: Take ๐ฆ๐ก๐ก = 4๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < ๐, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ฅ(๐ − ๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = 0. a) Solve using the d’Alembert formula. Hint: You can use the sine series for ๐ฆ(๐ฅ, 0). b) Find the solution as a function of ๐ฅ for a fixed ๐ก = 0.5, ๐ก = 1, and ๐ก = 2. Do not use the sine series here. Exercise 4.8.5: Derive the d’Alembert solution for ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < ๐, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(๐, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = 0, using the Fourier series solution of the wave equation, by applying an appropriate trigonometric identity. Hint: it first Do๐๐๐ for a single term of the Fourier ๐๐ series solution, in particular do it when ๐ฆ is sin ๐ฟ ๐ฅ sin ๐ฟ ๐ก . Exercise 4.8.6: The d’Alembert solution still works if there are no boundary conditions and the initial condition is defined on the whole real line. Suppose that ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ (for all ๐ฅ on the real line and ๐ก ≥ 0), ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = 0, where ๐ (๐ฅ) = ๏ฃฑ 0 ๏ฃด ๏ฃด ๏ฃด ๏ฃด ๏ฃฒ ๏ฃด ๐ฅ+1 if ๐ฅ < −1, if −1 ≤ ๐ฅ < 0, ๏ฃด −๐ฅ + 1 if ๏ฃด ๏ฃด ๏ฃด ๏ฃด0 if ๏ฃณ 0 ≤ ๐ฅ < 1, 1 < ๐ฅ. Solve using the d’Alembert solution. That is, write down a piecewise definition for the solution. Then sketch the solution for ๐ก = 0, ๐ก = 1/2, ๐ก = 1, and ๐ก = 2. Exercise 4.8.101: Using the d’Alembert solution solve ๐ฆ๐ก๐ก = 9๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < 1, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(2๐๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = sin(3๐๐ฅ). Exercise 4.8.102: Take ๐ฆ๐ก๐ก = 4๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < 1, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ฅ − ๐ฅ 2 , and ๐ฆ๐ก (๐ฅ, 0) = 0. Using the d’Alembert solution find the solution at a) ๐ก = 0.1, b) ๐ก = 1/2, c) ๐ก = 1. You may have to split your answer up by cases. Exercise 4.8.103: Take ๐ฆ๐ก๐ก = 100๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < 4, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ฆ(4, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐น(๐ฅ), and ๐ฆ๐ก (๐ฅ, 0) = 0. Suppose that ๐น(0) = 0, ๐น(1) = 2, ๐น(2) = 3, ๐น(3) = 1. Using the d’Alembert solution find a) ๐ฆ(1, 1), b) ๐ฆ(4, 3), c) ๐ฆ(3, 9). 258 4.9 CHAPTER 4. FOURIER SERIES AND PDES Steady state temperature and the Laplacian Note: 1 lecture, §9.7 in [EP], §10.8 in [BD] Consider an insulated wire, a plate, or a 3-dimensional object. We apply certain fixed temperatures on the ends of the wire, the edges of the plate, or on all sides of the 3-dimensional object. We wish to find out what is the steady state temperature distribution. That is, we wish to know what will be the temperature after long enough period of time. We are really looking for a solution to the heat equation that is not dependent on time. Let us first solve the problem in one space variable. We are looking for a function ๐ข that satisfies ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , but such that ๐ข๐ก = 0 for all ๐ฅ and ๐ก. Hence, we are looking for a function of ๐ฅ alone that satisfies ๐ข๐ฅ๐ฅ = 0. It is easy to solve this equation by integration and we see that ๐ข = ๐ด๐ฅ + ๐ต for some constants ๐ด and ๐ต. Consider an insulated wire where we apply constant temperature ๐1 at one end (say where ๐ฅ = 0) and ๐2 on the other end (at ๐ฅ = ๐ฟ where ๐ฟ is the length of the wire). Our steady state solution is ๐2 − ๐1 ๐ข(๐ฅ) = ๐ฅ + ๐1 . ๐ฟ This solution agrees with our common sense intuition with how the heat should be distributed in the wire. So in one dimension, the steady state solutions are basically just straight lines. Things are more complicated in two or more space dimensions. Let us restrict to two space dimensions for simplicity. The heat equation in two space variables is ๐ข๐ก = ๐(๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ ), (4.19) or more commonly written as ๐ข๐ก = ๐Δ๐ข or ๐ข๐ก = ๐∇2 ๐ข. Here the Δ and ∇2 symbols mean ๐2 ๐2 + ๐๐ฆ 2 . We will use Δ from now on. The reason for using such a notation is that you ๐๐ฅ 2 can define Δ to be the right thing for any number of space dimensions and then the heat equation is always ๐ข๐ก = ๐Δ๐ข. The operator Δ is called the Laplacian. OK, now that we have notation out of the way, let us see what does an equation for the steady state solution look like. We are looking for a solution to (4.19) that does not depend on ๐ก, or in other words ๐ข๐ก = 0. Hence we are looking for a function ๐ข(๐ฅ, ๐ฆ) such that Δ๐ข = ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0. This equation is called the Laplace equation∗ , and is an example of an elliptic equation. Solutions to the Laplace equation are called harmonic functions and have many nice properties and applications far beyond the steady state heat problem. ∗ Named after the French mathematician Pierre-Simon, marquis de Laplace (1749–1827). 259 4.9. STEADY STATE TEMPERATURE AND THE LAPLACIAN Harmonic functions in two variables are no longer just linear (plane graphs). For example, you can check that the functions ๐ฅ 2 − ๐ฆ 2 and ๐ฅ๐ฆ are harmonic. However, note that if ๐ข๐ฅ๐ฅ is positive, ๐ข is concave up in the ๐ฅ direction, then ๐ข ๐ฆ ๐ฆ must be negative and ๐ข must be concave down in the ๐ฆ direction. A harmonic function can never have any “hilltop” or “valley” on the graph. This observation is consistent with our intuitive idea of steady state heat distribution; the hottest or coldest spot will not be inside. Commonly the Laplace equation is part of a so-called Dirichlet problem∗ . That is, we have a region in the ๐ฅ๐ฆ-plane and we specify certain values along the boundaries of the region. We then try to find a solution ๐ข to the Laplace equation defined on this region such that ๐ข agrees with the values we specified on the boundary. In this section we consider a rectangular region. For simplicity we specify boundary values to be zero at 3 of the four edges and only specify an arbitrary function at one edge. As we still have the principle of superposition, we can use this simpler solution to derive the general solution for arbitrary boundary values by solving 4 different problems, one for each edge, and adding those solutions together. This setup is left as an exercise. We wish to solve the following problem. Let โ and ๐ค be the height and width of our rectangle, with one corner at the origin and lying in the first quadrant. Δ๐ข = 0, (0, โ) ๐ข=0 ๐ข=0 Δ๐ข = 0 (0, 0) ๐ข = ๐ (๐ฅ) (4.20) ๐ข(0, ๐ฆ) = 0 for 0 < ๐ฆ < โ, (4.21) ๐ข(๐ฅ, โ) = 0 for 0 < ๐ฅ < ๐ค, (4.22) ๐ข(๐ค, ๐ฆ) = 0 for 0 < ๐ฆ < โ, (4.23) (๐ค, โ) ๐ข=0 ๐ข(๐ฅ, 0) = ๐ (๐ฅ) for 0 < ๐ฅ < ๐ค. (4.24) (๐ค, 0) The method we apply is separation of variables. Again, we will come up with enough building-block solutions satisfying all the homogeneous boundary conditions (all conditions except (4.24)). We notice that superposition still works for the equation and all the homogeneous conditions. Therefore, we can use the Fourier series for ๐ (๐ฅ) to solve the problem as before. We try ๐ข(๐ฅ, ๐ฆ) = ๐(๐ฅ)๐(๐ฆ). We plug ๐ข into the equation to get ๐ 00๐ + ๐๐ 00 = 0. We put the ๐s on one side and the ๐s on the other to get − ∗ Named ๐ 00 ๐ 00 = . ๐ ๐ after the German mathematician Johann Peter Gustav Lejeune Dirichlet (1805–1859). 260 CHAPTER 4. FOURIER SERIES AND PDES The left-hand side only depends on ๐ฅ and the right-hand side only depends on ๐ฆ. Therefore, 00 ๐ 00 there is some constant ๐ such that ๐ = −๐ ๐ = ๐ . And we get two equations ๐ 00 + ๐๐ = 0, ๐ 00 − ๐๐ = 0. Furthermore, the homogeneous boundary conditions imply that ๐(0) = ๐(๐ค) = 0 and ๐(โ) = 0. Taking the equation for ๐ we have already seen that we have a nontrivial solution 2 2 if and only if ๐ = ๐๐ = ๐๐ค๐2 and the solution is a multiple of ๐๐ (๐ฅ) = sin ๐๐ ๐ค ๐ฅ . For these given ๐๐ , the general solution for ๐ (one for each ๐) is ๐๐ (๐ฆ) = ๐ด๐ cosh ๐๐ ๐ค ๐ฆ + ๐ต๐ sinh ๐๐ ๐ค ๐ฆ . (4.25) There is only one condition on ๐๐ and hence we can pick one of ๐ด๐ or ๐ต๐ to be something convenient. It will be useful to have ๐๐ (0) = 1, so let ๐ด๐ = 1. Setting ๐๐ (โ) = 0 and solving for ๐ต๐ , we get ๐๐โ ๐ค − cosh ๐ต๐ = sinh ๐๐โ ๐ค . After we plug the ๐ด๐ and ๐ต๐ we into (4.25) and simplify by using the identity sinh(๐ผ − ๐ฝ) = sinh(๐ผ) cosh(๐ฝ) − cosh(๐ผ) sinh(๐ฝ), we find ๐๐ (๐ฆ) = sinh sinh ๐๐(โ−๐ฆ) ๐ค ๐๐โ ๐ค . We define ๐ข๐ (๐ฅ, ๐ฆ) = ๐๐ (๐ฅ)๐๐ (๐ฆ). And note that ๐ข๐ satisfies (4.20)–(4.23). Observe ๐ข๐ (๐ฅ, 0) = ๐๐ (๐ฅ)๐๐ (0) = sin Suppose ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin ๐=1 ๐๐ ๐๐๐ฅ ๐ค ๐ค ๐ฅ . . Then we get a solution of (4.20)–(4.24) of the following form. ๐๐(โ−๐ฆ) ๐๐ © sinh ª ๐ค ๐ข(๐ฅ, ๐ฆ) = ๐ ๐ ๐ข๐ (๐ฅ, ๐ฆ) = ๐ ๐ sin ๐ฅ ­­ ®® . ๐ค sinh ๐๐โ ๐=1 ๐=1 ๐ค « ¬ ∞ Õ ∞ Õ As ๐ข๐ satisfies (4.20)–(4.23) and any linear combination (finite or infinite) of ๐ข๐ also satisfies (4.20)–(4.23), then ๐ข satisfies (4.20)–(4.23). We plug in ๐ฆ = 0 to see ๐ข satisfies (4.24) as well. 261 4.9. STEADY STATE TEMPERATURE AND THE LAPLACIAN Example 4.9.1: Take ๐ค = โ = ๐ and let ๐ (๐ฅ) = ๐. Let us compute the sine series for the function ๐ (same as the series for the square wave). For 0 < ๐ฅ < ๐, we have ๐ (๐ฅ) = ∞ Õ 4 ๐=1 ๐ odd ๐ sin(๐๐ฅ). The solution ๐ข(๐ฅ, ๐ฆ), see Figure 4.25, to the corresponding Dirichlet problem is given as ๐ข(๐ฅ, ๐ฆ) = ∞ Õ 4 ๐=1 ๐ odd 0.0 ๐ sin(๐๐ฅ) sinh(๐๐) 0.0 . y 0.5 1.0 0.5 x sinh ๐(๐ − ๐ฆ) 1.5 1.0 2.0 2.5 1.5 3.0 u(x,y) 2.0 2.5 3.0 3.0 2.5 3.0 2.0 2.5 1.5 2.0 1.0 1.5 3.142 2.828 2.514 2.199 1.885 1.571 1.257 0.943 0.628 0.314 0.000 0.5 1.0 0.0 0.5 0.0 0.5 0.0 1.0 0.0 1.5 0.5 1.0 2.0 1.5 2.5 2.0 2.5 y 3.0 x 3.0 Figure 4.25: Steady state temperature of a square plate, three sides held at zero and one side held at ๐. This scenario corresponds to the steady state temperature on a square plate of width ๐ with 3 sides held at 0 degrees and one side held at ๐ degrees. If we have arbitrary initial data on all sides, then we solve four problems, each using one piece of nonhomogeneous data. Then we use the principle of superposition to add up all four solutions to have a solution to the original problem. 262 CHAPTER 4. FOURIER SERIES AND PDES A different way to visualize solutions of the Laplace equation is to take a wire and bend it so that it corresponds to the graph of the temperature above the boundary of your region. Cut a rubber sheet in the shape of your region—a square in our case—and stretch it fixing the edges of the sheet to the wire. The rubber sheet is a good approximation of the graph of the solution to the Laplace equation with the given boundary data. 4.9.1 Exercises Exercise 4.9.1: Let ๐ be the region described by 0 < ๐ฅ < ๐ and 0 < ๐ฆ < ๐. Solve the problem Δ๐ข = 0, ๐ข(๐ฅ, 0) = sin ๐ฅ, ๐ข(๐ฅ, ๐) = 0, ๐ข(0, ๐ฆ) = 0, ๐ข(๐, ๐ฆ) = 0. Exercise 4.9.2: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 1. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = sin(๐๐ฅ) − sin(2๐๐ฅ), ๐ข(0, ๐ฆ) = 0, ๐ข(๐ฅ, 1) = 0, ๐ข(1, ๐ฆ) = 0. Exercise 4.9.3: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 1. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = ๐ข(๐ฅ, 1) = ๐ข(0, ๐ฆ) = ๐ข(1, ๐ฆ) = ๐ถ. for some constant ๐ถ. Hint: Guess, then check your intuition. Exercise 4.9.4: Let ๐ be the region described by 0 < ๐ฅ < ๐ and 0 < ๐ฆ < ๐. Solve Δ๐ข = 0, ๐ข(๐ฅ, 0) = 0, ๐ข(๐ฅ, ๐) = ๐, ๐ข(0, ๐ฆ) = ๐ฆ, ๐ข(๐, ๐ฆ) = ๐ฆ. Hint: Try a solution of the form ๐ข(๐ฅ, ๐ฆ) = ๐(๐ฅ) + ๐(๐ฆ) (different separation of variables). Exercise 4.9.5: Use the solution of Exercise 4.9.4 to solve Δ๐ข = 0, ๐ข(๐ฅ, 0) = sin ๐ฅ, ๐ข(๐ฅ, ๐) = ๐, ๐ข(0, ๐ฆ) = ๐ฆ, ๐ข(๐, ๐ฆ) = ๐ฆ. Hint: Use superposition. Exercise 4.9.6: Let ๐ be the region described by 0 < ๐ฅ < ๐ค and 0 < ๐ฆ < โ. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = 0, ๐ข(๐ฅ, โ) = ๐ (๐ฅ), ๐ข(0, ๐ฆ) = 0, ๐ข(๐ค, ๐ฆ) = 0. The solution should be in series form using the Fourier series coefficients of ๐ (๐ฅ). 263 4.9. STEADY STATE TEMPERATURE AND THE LAPLACIAN Exercise 4.9.7: Let ๐ be the region described by 0 < ๐ฅ < ๐ค and 0 < ๐ฆ < โ. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = 0, ๐ข(๐ฅ, โ) = 0, ๐ข(0, ๐ฆ) = ๐ (๐ฆ), ๐ข(๐ค, ๐ฆ) = 0. The solution should be in series form using the Fourier series coefficients of ๐ (๐ฆ). Exercise 4.9.8: Let ๐ be the region described by 0 < ๐ฅ < ๐ค and 0 < ๐ฆ < โ. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = 0, ๐ข(๐ฅ, โ) = 0, ๐ข(0, ๐ฆ) = 0, ๐ข(๐ค, ๐ฆ) = ๐ (๐ฆ). The solution should be in series form using the Fourier series coefficients of ๐ (๐ฆ). Exercise 4.9.9: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 1. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = sin(9๐๐ฅ), ๐ข(0, ๐ฆ) = 0, ๐ข(๐ฅ, 1) = sin(2๐๐ฅ), ๐ข(1, ๐ฆ) = 0. Hint: Use superposition. Exercise 4.9.10: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 1. Solve the problem ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 0, ๐ข(๐ฅ, 0) = sin(๐๐ฅ), ๐ข(๐ฅ, 1) = sin(๐๐ฅ), ๐ข(0, ๐ฆ) = sin(๐๐ฆ), ๐ข(1, ๐ฆ) = sin(๐๐ฆ). Hint: Use superposition. Exercise 4.9.11 (challenging): Using only your intuition find ๐ข(1/2, 1/2), for the problem Δ๐ข = 0, where ๐ข(0, ๐ฆ) = ๐ข(1, ๐ฆ) = 100 for 0 < ๐ฆ < 1, and ๐ข(๐ฅ, 0) = ๐ข(๐ฅ, 1) = 0 for 0 < ๐ฅ < 1. Explain. Exercise 4.9.101: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 1. Solve the problem Δ๐ข = 0, ๐ข(๐ฅ, 0) = ∞ Õ 1 ๐=1 ๐2 sin(๐๐๐ฅ), ๐ข(๐ฅ, 1) = 0, ๐ข(0, ๐ฆ) = 0, ๐ข(1, ๐ฆ) = 0. Exercise 4.9.102: Let ๐ be the region described by 0 < ๐ฅ < 1 and 0 < ๐ฆ < 2. Solve the problem Δ๐ข = 0, ๐ข(๐ฅ, 0) = 0.1 sin(๐๐ฅ), ๐ข(๐ฅ, 2) = 0, ๐ข(0, ๐ฆ) = 0, ๐ข(1, ๐ฆ) = 0. 264 CHAPTER 4. FOURIER SERIES AND PDES 4.10 Dirichlet problem in the circle and the Poisson kernel Note: 2 lectures, §9.7 in [EP], §10.8 in [BD] 4.10.1 Laplace in polar coordinates A more natural setting for the Laplace equation Δ๐ข = 0 is a circle rather than a rectangle. On the other hand, what makes the problem somewhat more difficult is that we need polar coordinates. Recall that the polar coordinates for the (๐ฅ, ๐ฆ)-plane are (๐, ๐): (๐, ๐) ๐ ๐ฅ = ๐ cos ๐, ๐ฆ = ๐ sin ๐, ๐ where ๐ ≥ 0 and −๐ < ๐ ≤ ๐. So the point (๐ฅ, ๐ฆ) is distance ๐ from the origin at an angle ๐ from the positive ๐ฅ-axis. Now that we know our coordinates, let us give the problem we wish to solve. We have a circular region of radius 1, and we are interested in the Dirichlet problem for the Laplace equation for this region. Let ๐ข(๐, ๐) denote the temperature at the point (๐, ๐) in polar coordinates. We have the problem: ๐ข(1, ๐) = ๐(๐) Δ๐ข = 0, for ๐ < 1, (4.26) ๐ข(1, ๐) = ๐(๐), for −๐ < ๐ ≤ ๐. Δ๐ข = 0 The first issue we face is that we do not know the Laplacian in polar coordinates. Normally we would find ๐ข๐ฅ๐ฅ and ๐ข ๐ฆ ๐ฆ in terms of the derivatives in ๐ and ๐. radius 1 We would need to solve for ๐ and ๐ in terms of ๐ฅ and ๐ฆ. In this case it is more convenient to work in reverse. We compute derivatives in ๐ and ๐ in terms of derivatives in ๐ฅ and ๐ฆ and then we solve. The computations are easier this way. First ๐ฅ ๐ = cos ๐, ๐ฅ ๐ = −๐ sin ๐, ๐ฆ๐ = sin ๐, ๐ฆ๐ = ๐ cos ๐. Next by chain rule we obtain ๐ข๐ = ๐ข๐ฅ ๐ฅ ๐ + ๐ข ๐ฆ ๐ฆ๐ = cos(๐)๐ข๐ฅ + sin(๐)๐ข ๐ฆ , ๐ข๐๐ = cos(๐)(๐ข๐ฅ๐ฅ ๐ฅ ๐ + ๐ข๐ฅ ๐ฆ ๐ฆ๐ ) + sin(๐)(๐ข ๐ฆ๐ฅ ๐ฅ ๐ + ๐ข ๐ฆ ๐ฆ ๐ฆ๐ ) = cos2 (๐)๐ข๐ฅ๐ฅ + 2 cos(๐) sin(๐)๐ข๐ฅ ๐ฆ + sin2 (๐)๐ข ๐ฆ ๐ฆ . 4.10. DIRICHLET PROBLEM IN THE CIRCLE AND THE POISSON KERNEL 265 Similarly for the ๐ derivative. Note that we have to use the product rule for the second derivative. ๐ข๐ = ๐ข๐ฅ ๐ฅ ๐ + ๐ข ๐ฆ ๐ฆ๐ = −๐ sin(๐)๐ข๐ฅ + ๐ cos(๐)๐ข ๐ฆ , ๐ข๐๐ = −๐ cos(๐)๐ข๐ฅ − ๐ sin(๐)(๐ข๐ฅ๐ฅ ๐ฅ ๐ + ๐ข๐ฅ ๐ฆ ๐ฆ๐ ) − ๐ sin(๐)๐ข ๐ฆ + ๐ cos(๐)(๐ข ๐ฆ๐ฅ ๐ฅ ๐ + ๐ข ๐ฆ ๐ฆ ๐ฆ๐ ) = −๐ cos(๐)๐ข๐ฅ − ๐ sin(๐)๐ข ๐ฆ + ๐ 2 sin2 (๐)๐ข๐ฅ๐ฅ − ๐ 2 2 sin(๐) cos(๐)๐ข๐ฅ ๐ฆ + ๐ 2 cos2 (๐)๐ข ๐ฆ ๐ฆ . Let us now try to solve for ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ . We start with ๐12 ๐ข๐๐ to get rid of those pesky ๐ 2 . If we add ๐ข๐๐ and use the fact that cos2 (๐) + sin2 (๐) = 1, we get 1 1 1 ๐ข๐๐ + ๐ข๐๐ = ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ − cos(๐)๐ข๐ฅ − sin(๐)๐ข ๐ฆ . 2 ๐ ๐ ๐ We’re not quite there yet, but all we are lacking is 1๐ ๐ข๐ . Adding it we obtain the Laplacian in polar coordinates: 1 1 Δ๐ข = ๐ข๐ฅ๐ฅ + ๐ข ๐ฆ ๐ฆ = 2 ๐ข๐๐ + ๐ข๐ + ๐ข๐๐ . ๐ ๐ Notice that the Laplacian in polar coordinates no longer has constant coefficients. 4.10.2 Series solution Let us separate variables as usual. That is let us try ๐ข(๐, ๐) = ๐ (๐)Θ(๐). Then 0 = Δ๐ข = 1 1 ๐ Θ00 + ๐ 0 Θ + ๐ 00 Θ. 2 ๐ ๐ Let us put ๐ on one side and Θ on the other and conclude that both sides must be constant. 1 1 ๐ Θ00 = − ๐ 0 + ๐ 00 Θ 2 ๐ ๐ 00 Θ ๐๐ 0 + ๐ 2 ๐ 00 =− = −๐ Θ ๐ We get two equations: Θ00 + ๐Θ = 0, ๐ 2 ๐ 00 + ๐๐ 0 − ๐๐ = 0. Let us first focus on Θ. We know that ๐ข(๐, ๐) ought to be 2๐-periodic in ๐, that is, ๐ข(๐, ๐) = ๐ข(๐, ๐ + 2๐). Therefore, the solution to Θ00 + ๐Θ = 0 must be 2๐-periodic. We have seen such a problem in Example 4.1.5. We conclude that ๐ = ๐ 2 for a nonnegative integer ๐ = 0, 1, 2, 3, . . .. The equation becomes Θ00 + ๐ 2 Θ = 0. When ๐ = 0 the equation is just Θ00 = 0, so we have the general solution ๐ด๐ + ๐ต. As Θ is periodic, ๐ด = 0. For convenience we write this solution as ๐0 Θ0 = 2 266 CHAPTER 4. FOURIER SERIES AND PDES for some constant ๐ 0 . For positive ๐, the solution to Θ00 + ๐ 2 Θ = 0 is Θ๐ = ๐ ๐ cos(๐๐) + ๐ ๐ sin(๐๐), for some constants ๐ ๐ and ๐ ๐ . Next, we consider the equation for ๐ , ๐ 2 ๐ 00 + ๐๐ 0 − ๐ 2 ๐ = 0. This equation appeared in exercises before—we solved it in Exercise 2.1.6 and Exercise 2.1.7 on page 83. The idea is to try a solution ๐ ๐ and if that does not give us two solutions, also try a solution of the form ๐ ๐ ln ๐. Let us name the solution for ๐ ๐ . When ๐ = 0 we obtain ๐ 0 = ๐ด๐ 0 + ๐ต๐ 0 ln ๐ = ๐ด + ๐ต ln ๐, and if ๐ > 0, we get ๐ ๐ = ๐ด๐ ๐ + ๐ต๐ −๐ . The function ๐ข(๐, ๐) must be finite at the origin, that is, when ๐ = 0. So ๐ต = 0 in both cases. Set ๐ด = 1 in both cases as well; the constants in Θ๐ will pick up the slack so nothing is lost. Let ๐ 0 = 1, and ๐ ๐ = ๐ ๐ . Hence our building block solutions are ๐ข0 (๐, ๐) = ๐0 , 2 ๐ข๐ (๐, ๐) = ๐ ๐ ๐ ๐ cos(๐๐) + ๐ ๐ ๐ ๐ sin(๐๐). Putting everything together our solution is: ∞ ๐0 Õ ๐ข(๐, ๐) = + ๐ ๐ ๐ ๐ cos(๐๐) + ๐ ๐ ๐ ๐ sin(๐๐). 2 ๐=1 We look at the boundary condition in (4.26), ∞ ๐(๐) = ๐ข(1, ๐) = ๐0 Õ + ๐ ๐ cos(๐๐) + ๐ ๐ sin(๐๐). 2 ๐=1 Therefore, to solve (4.26) we expand ๐(๐), which is a 2๐-periodic function, as a Fourier series, and then multiply the ๐ th term by ๐ ๐ . To find the ๐ ๐ and the ๐ ๐ we compute 1 ๐๐ = ๐ ∫ ๐ ๐(๐) cos(๐๐) ๐๐, and −๐ 1 ๐๐ = ๐ ∫ ๐ ๐(๐) sin(๐๐) ๐๐. −๐ Example 4.10.1: Suppose we wish to solve Δ๐ข = 0, 0 ≤ ๐ < 1, ๐ข(1, ๐) = cos(10 ๐), −๐ < ๐ ≤ ๐, −๐ < ๐ ≤ ๐. 4.10. DIRICHLET PROBLEM IN THE CIRCLE AND THE POISSON KERNEL 267 The solution is ๐ข(๐, ๐) = ๐ 10 cos(10 ๐). See the plot in Figure 4.26. The thing to notice in this example is that the effect of a high frequency is mostly felt at the boundary. In the middle of the disc, the solution is very close to zero. That is because ๐ 10 is rather small when ๐ is close to 0. 1.0 -1.0 x -0.5 y 0.5 0.0 0.5 0.0 1.0 u(r,theta) 1.5 -0.5 -1.0 1.0 1.5 0.5 1.0 0.0 0.5 -0.5 0.0 1.200 0.900 0.600 0.300 0.000 -0.300 -0.600 -0.900 -1.200 -1.500 -1.0 -0.5 -1.5 -1.0 1.0 0.5 -1.5 -1.0 0.0 -0.5 0.0 -0.5 y 0.5 1.0 -1.0 x Figure 4.26: The solution of the Dirichlet problem in the disc with cos(10 ๐) as boundary data. Example 4.10.2: Let us solve a more difficult problem. Consider a long rod with circular cross section of radius 1. Suppose we wish to solve the steady state heat problem in the rod. If the rod is long enough, we simply need to solve the Laplace equation in two dimensions. Let us put the center of the rod at the origin and we have exactly the region we are currently studying—a circle of radius 1. For the boundary conditions, suppose in Cartesian coordinates ๐ฅ and ๐ฆ, the temperature on the boundary is 0 when ๐ฆ < 0, and it is 2๐ฆ when ๐ฆ > 0. Let us set the problem up. As ๐ฆ = ๐ sin(๐), then on the circle of radius 1, that is, where ๐ = 1, we have 2๐ฆ = 2 sin(๐). So 0 ≤ ๐ < 1, Δ๐ข = 0, ( ๐ข(1, ๐) = −๐ < ๐ ≤ ๐, 0 ≤ ๐ ≤ ๐, 2 sin(๐) if 0 if −๐ < ๐ < 0. 268 CHAPTER 4. FOURIER SERIES AND PDES We must now compute the Fourier series for the boundary condition. By now the reader has plentiful experience in computing Fourier series and so we simply state that ∞ Õ 2 −4 ๐ข(1, ๐) = + sin(๐) + cos(2๐๐). ๐ ๐(4๐ 2 − 1) ๐=1 Exercise 4.10.1: Compute the series for ๐ข(1, ๐) and verify that it really is what we have just claimed. Hint: Be careful, make sure not to divide by zero. We now simply write the solution (see Figure 4.27) by multiplying by ๐ ๐ in the right places. ∞ Õ −4๐ 2๐ 2 ๐ข(๐, ๐) = + ๐ sin(๐) + cos(2๐๐). ๐ ๐(4๐ 2 − 1) ๐=1 x 1.0 -0.5 0.5 y 0.0 0.5 0.0 1.0 u(r,theta) 2.0 -0.5 2.0 1.5 1.5 1.0 1.0 0.5 0.5 2.000 1.800 1.600 1.400 1.200 1.000 0.800 0.600 0.400 0.200 0.000 0.0 1.0 0.5 0.0 0.0 -0.5 0.0 -0.5 y 0.5 x 1.0 Figure 4.27: The solution of the Dirichlet problem with boundary data 0 for ๐ฆ < 0 and 2๐ฆ for ๐ฆ > 0. 269 4.10. DIRICHLET PROBLEM IN THE CIRCLE AND THE POISSON KERNEL 4.10.3 Poisson kernel There is another way to solve the Dirichlet problem with the help of an integral kernel. That is, we will find a function ๐(๐, ๐, ๐ผ) called the Poisson kernel∗ such that 1 ๐ข(๐, ๐) = 2๐ ∫ ๐ ๐(๐, ๐, ๐ผ) ๐(๐ผ) ๐๐ผ. −๐ While the integral will generally not be solvable analytically, it can be evaluated numerically. In fact, unless the boundary data is given as a Fourier series already, it may be much easier to numerically evaluate this formula as there is only one integral to evaluate. The formula also has theoretical applications. For instance, as ๐(๐, ๐, ๐ผ) will have infinitely many derivatives, then via differentiating under the integral we find that the solution ๐ข(๐, ๐) has infinitely many derivatives, at least when inside the circle, ๐ < 1. By “having infinitely many derivatives,” what you should think of is that ๐ข(๐, ๐) has “no corners” and all of its partial derivatives of all orders exist and also have “no corners.” We will compute the formula for ๐(๐, ๐, ๐ผ) from the series solution, and this idea can be applied anytime you have a convenient series solution where the coefficients are obtained via integration. Hence you can apply this reasoning to obtain such integral kernels for other equations, such as the heat equation. The computation is long and tedious, but not overly difficult. Since the ideas are often applied in similar contexts, it is good to understand how this computation works. What we do is start with the series solution and replace the coefficients with the integrals that compute them. Then we try to write everything as a single integral. We must use a different dummy variable for the integration and hence we use ๐ผ instead of ๐. ∞ ๐ข(๐, ๐) = ๐0 Õ ๐ ๐ ๐ ๐ cos(๐๐) + ๐ ๐ ๐ ๐ sin(๐๐) + 2 1 = 2๐ ๐=1 ๐ ∫ ๐(๐ผ) ๐๐ผ + −๐ | {z ๐0 2 ∫ 1 + ๐ } ๐ ∫ 1 2๐ ∫ = ๐(๐ผ) cos(๐๐ผ) ๐๐ผ ๐ ๐ cos(๐๐)+ −๐ {z ๐๐ } −๐ ๐๐ ๐(๐ผ) + 2 −๐ ∞ Õ } ! ๐(๐ผ) cos(๐๐ผ) ๐ ๐ cos(๐๐) + ๐(๐ผ) sin(๐๐ผ) ๐ ๐ sin(๐๐) ๐๐ผ ๐=1 ๐ 1+2 −๐ ∞ Õ ! ๐ ๐ cos(๐๐ผ) cos(๐๐) + sin(๐๐ผ) sin(๐๐) ๐=1 | ∗ Named {z ๐ ๐ ๐=1 | ๐ ๐(๐ผ) sin(๐๐ผ) ๐๐ผ ๐ ๐ sin(๐๐) | 1 = 2๐ ∞ ∫ Õ 1 {z ๐(๐,๐,๐ผ) for the French mathematician Siméon Denis Poisson (1781–1840). } ๐(๐ผ) ๐๐ผ 270 CHAPTER 4. FOURIER SERIES AND PDES OK, so we have what we wanted, the expression in the parentheses is the Poisson kernel, ๐(๐, ๐, ๐ผ). However, we can do a lot better. It is still given as a series, and we would really like to have a nice simple expression for it. We must work a little harder. The trick is to rewrite everything in terms of complex exponentials. Let us work just on the kernel. ๐(๐, ๐, ๐ผ) = 1 + 2 ∞ Õ ๐ ๐ cos(๐๐ผ) cos(๐๐) + sin(๐๐ผ) sin(๐๐) ๐=1 =1+2 ∞ Õ ๐ ๐ cos ๐(๐ − ๐ผ) ๐=1 =1+ ∞ Õ ๐ ๐ ๐ ๐๐(๐−๐ผ) + ๐ −๐๐(๐−๐ผ) ๐=1 =1+ ∞ Õ ๐๐ ๐(๐−๐ผ) ๐ + ๐=1 ∞ Õ ๐ ๐๐ −๐(๐−๐ผ) . ๐=1 In the expression above, we recognize the geometric series. Recall from calculus that if ๐ง is a complex number where |๐ง| < 1, then ∞ Õ ๐ง๐ = ๐=1 ๐ง . 1−๐ง Note that ๐ starts at 1 and that is why we have the ๐ง in the numerator. It is the standard geometric series multiplied by ๐ง. We can use ๐ง = ๐๐ ๐(๐−๐ผ) , as lo and behold |๐๐ ๐(๐−๐ผ) | = ๐ < 1. Let us continue with the computation. ๐(๐, ๐, ๐ผ) = 1 + ∞ Õ ๐๐ ๐(๐−๐ผ) ๐=1 =1+ = ๐๐ ๐(๐−๐ผ) ๐ + ∞ Õ ๐๐ −๐(๐−๐ผ) ๐ ๐=1 ๐๐ −๐(๐−๐ผ) + 1 − ๐๐ ๐(๐−๐ผ) 1 − ๐๐ −๐(๐−๐ผ) ๐(๐−๐ผ) 1 − ๐๐ 1 − ๐๐ −๐(๐−๐ผ) + 1 − ๐๐ −๐(๐−๐ผ) ๐๐ ๐(๐−๐ผ) + 1 − ๐๐ ๐(๐−๐ผ) ๐๐ −๐(๐−๐ผ) 1 − ๐๐ ๐(๐−๐ผ) 1 − ๐๐ −๐(๐−๐ผ) 1 − ๐2 1 − ๐๐ ๐(๐−๐ผ) − ๐๐ −๐(๐−๐ผ) + ๐ 2 1 − ๐2 = . 1 − 2๐ cos(๐ − ๐ผ) + ๐ 2 = That’s a formula we can live with. The solution to the Dirichlet problem using the Poisson kernel is ∫ ๐ 1 1 − ๐2 ๐ข(๐, ๐) = ๐(๐ผ) ๐๐ผ. 2๐ −๐ 1 − 2๐ cos(๐ − ๐ผ) + ๐ 2 4.10. DIRICHLET PROBLEM IN THE CIRCLE AND THE POISSON KERNEL 271 1 Sometimes the formula for the Poisson kernel is given together with the constant 2๐ , in which case we should of course not leave it in front of the integral. Also, often the limits of the integral are given as 0 to 2๐; everything inside is 2๐-periodic in ๐ผ, so this does not change the integral. Let us not leave the Poisson kernel without explaining ๐ its geometric meaning. Let ๐ be the distance from (๐, ๐) to (1, ๐ผ) (๐, ๐) (1, ๐ผ). You may recall from calculus that this distance ๐ in polar coordinates is given precisely by the square root of 1 ๐ 1 − 2๐ cos(๐ − ๐ผ) + ๐ 2 . That is, the Poisson kernel is really the formula 1 − ๐2 . ๐ 2 One final note we make about the formula is that it is really a weighted average of the boundary values. First let us look at what happens at the origin, that is when ๐ = 0. ๐ 1 1 − 02 ๐ข(0, 0) = ๐(๐ผ) ๐๐ผ 2๐ −๐ 1 − 2(0) cos(๐ − ๐ผ) + 02 ∫ ๐ 1 = ๐(๐ผ) ๐๐ผ. 2๐ −๐ ∫ So ๐ข(0, 0) is precisely the average value of ๐(๐) and therefore the average value of ๐ข on the boundary. This is a general feature of harmonic functions, the value at some point ๐ is equal to the average of the values on a circle centered at ๐. What the formula says is that the value of the solution at any point in the circle is a weighted average of the boundary data ๐(๐). The kernel is bigger when (1, ๐ผ) is closer to (๐, ๐). Therefore when computing ๐ข(๐, ๐) we give more weight to the values ๐(๐ผ) when (1, ๐ผ) is closer to (๐, ๐) and less weight to the values ๐(๐ผ) when (1, ๐ผ) far from (๐, ๐). 4.10.4 Exercises Exercise 4.10.2: Using series solve Δ๐ข = 0, ๐ข(1, ๐) = |๐|, for −๐ < ๐ ≤ ๐. Exercise 4.10.3: Using series solve Δ๐ข = 0, ๐ข(1, ๐) = ๐(๐) for the following data. Hint: trig identities. a) ๐(๐) = 1/2 + 3 sin(๐) + cos(3๐) b) ๐(๐) = 3 cos(3๐) + 3 sin(3๐) + sin(9๐) c) ๐(๐) = 2 cos(๐ + 1) d) ๐(๐) = sin2 (๐) Exercise 4.10.4: Using the Poisson kernel, give the solution to Δ๐ข = 0, where ๐ข(1, ๐) is zero for ๐ outside the interval [−๐/4, ๐/4] and ๐ข(1, ๐) is 1 for ๐ on the interval [−๐/4, ๐/4]. 272 CHAPTER 4. FOURIER SERIES AND PDES Exercise 4.10.5: a) Draw a graph for the Poisson kernel as a function of ๐ผ when ๐ = 1/2 and ๐ = 0. b) Describe what happens to the graph when you make ๐ bigger (as it approaches 1). c) Knowing that the solution ๐ข(๐, ๐) is the weighted average of ๐(๐) with Poisson kernel as the weight, explain what your answer to part b) means. Exercise 4.10.6: Let ๐(๐) be the function ๐ฅ๐ฆ = cos ๐ sin ๐ on the boundary. Use the series solution to find a solution to the Dirichlet problem Δ๐ข = 0, ๐ข(1, ๐) = ๐(๐). Now convert the solution to Cartesian coordinates ๐ฅ and ๐ฆ. Is this solution surprising? Hint: use your trig identities. Exercise 4.10.7: Carry out the computation we needed in the separation of variables and solve ๐ 2 ๐ 00 + ๐๐ 0 − ๐ 2 ๐ = 0, for ๐ = 0, 1, 2, 3, . . .. Exercise 4.10.8 (challenging): Derive the series solution to the Dirichlet problem if the region is a circle of radius ๐ rather than 1. That is, solve Δ๐ข = 0, ๐ข(๐, ๐) = ๐(๐). Exercise 4.10.9 (challenging): a) Find the solution for Δ๐ข = 0, ๐ข(1, ๐) = ๐ฅ 2 ๐ฆ 3 + 5๐ฅ 2 . Write the answer in Cartesian coordinates. b) Now solve Δ๐ข = 0, ๐ข(1, ๐) = ๐ฅ ๐ ๐ฆโ . Write the solution in Cartesian coordinates. ๐ ๐ ๐ c) Suppose you have a polynomial ๐(๐ฅ, ๐ฆ) = ๐ ๐=0 ๐=0 ๐ ๐,๐ ๐ฅ ๐ฆ , solve Δ๐ข = 0, ๐ข(1, ๐) = ๐(๐ฅ, ๐ฆ) (that is, write down the formula for the answer). Write the answer in Cartesian coordinates. Í Í Notice the answer is again a polynomial in ๐ฅ and ๐ฆ. See also Exercise 4.10.6. Exercise 4.10.101: Using series solve Δ๐ข = 0, ๐ข(1, ๐) = 1 + ∞ Í ๐=1 1 ๐2 sin(๐๐). Exercise 4.10.102: Using the series solution find the solution to Δ๐ข = 0, ๐ข(1, ๐) = 1 − cos(๐). Express the solution in Cartesian coordinates (that is, using ๐ฅ and ๐ฆ). Exercise 4.10.103: a) Try and guess a solution to Δ๐ข = −1, ๐ข(1, ๐) = 0. Hint: try a solution that only depends on ๐. Also first, don’t worry about the boundary condition. b) Now solve Δ๐ข = −1, ๐ข(1, ๐) = sin(2๐) using superposition. Exercise 4.10.104 (challenging): Derive the Poisson kernel solution if the region is a circle of radius ๐ rather than 1. That is, solve Δ๐ข = 0, ๐ข(๐, ๐) = ๐(๐). Chapter 5 More on eigenvalue problems 5.1 Sturm–Liouville problems Note: 2 lectures, §10.1 in [EP], §11.2 in [BD] 5.1.1 Boundary value problems In chapter 4 we encountered several different eigenvalue problems such as: ๐ 00(๐ฅ) + ๐๐(๐ฅ) = 0, with different boundary conditions ๐(0) = 0 ๐ 0(0) = 0 ๐ 0(0) = 0 ๐(0) = 0 ๐(๐ฟ) = 0 ๐ 0(๐ฟ) = 0 ๐(๐ฟ) = 0 ๐ 0(๐ฟ) = 0 (Dirichlet), or (Neumann), or (Mixed), or (Mixed), . . . For example, these boundary problems came up in the study of the heat equation ๐ข๐ก = ๐๐ข๐ฅ๐ฅ when we were trying to solve the equation by the method of separation of variables in § 4.6. Dirichlet conditions correspond to applying a zero temperature at the ends, Neumann means insulating the ends, etc. Other types of endpoint conditions also arise naturally, such as the Robin boundary conditions โ๐(0) − ๐ 0(0) = 0, โ๐(๐ฟ) + ๐ 0(๐ฟ) = 0, for some constant โ. These conditions come up when the ends are immersed in some medium. In the separation of variables computation we encountered an eigenvalue problem and found the eigenfunctions ๐๐ (๐ฅ). We then found the eigenfunction decomposition of the initial temperature ๐ (๐ฅ) = ๐ข(๐ฅ, 0), ๐ (๐ฅ) = ∞ Õ ๐=1 ๐ ๐ ๐๐ (๐ฅ). 274 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Once we had this decomposition and found suitable ๐๐ (๐ก) such that ๐๐ (0) = 1 and such that ๐๐ (๐ก)๐๐ (๐ฅ) were solutions to the heat equation, we wrote the solution to the original problem, including the initial condition, as ๐ข(๐ฅ, ๐ก) = ∞ Õ ๐ ๐ ๐๐ (๐ก)๐๐ (๐ฅ). ๐=1 To study more general problems with this method, we must study more general eigenvalue problems. First, we study second order linear equations of the form ๐๐ฆ ๐ ๐(๐ฅ) − ๐(๐ฅ)๐ฆ + ๐๐(๐ฅ)๐ฆ = 0. ๐๐ฅ ๐๐ฅ (5.1) Essentially any second order linear equation of the form ๐(๐ฅ)๐ฆ 00 +๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ +๐๐(๐ฅ)๐ฆ = 0 can be written as (5.1) after multiplying by a proper factor. Example 5.1.1 (Bessel): Put the following equation into the form (5.1): 2 00 0 ๐ฅ ๐ฆ + ๐ฅ๐ฆ + ๐๐ฅ − ๐ Multiply both sides by 1 ๐ฅ 2 2 ๐ฆ = 0. to obtain 1 2 00 ๐2 0 2 2 00 0 ๐ฅ ๐ฆ + ๐ฅ๐ฆ + ๐๐ฅ − ๐ ๐ฆ = ๐ฅ๐ฆ + ๐ฆ + ๐๐ฅ − ๐ฆ ๐ฅ ๐ฅ ๐๐ฆ ๐ ๐2 = ๐ฅ − ๐ฆ + ๐๐ฅ๐ฆ = 0. ๐๐ฅ ๐๐ฅ ๐ฅ The Bessel equation turns up for example in the solution of the two-dimensional wave equation. If you want to see how one solves the equation, you can look at subsection 7.3.3. The so-called Sturm–Liouville problem∗ is to seek nontrivial solutions to ๐๐ฆ ๐ ๐(๐ฅ) − ๐(๐ฅ)๐ฆ + ๐๐(๐ฅ)๐ฆ = 0, ๐๐ฅ ๐๐ฅ ๐ผ1 ๐ฆ(๐) − ๐ผ2 ๐ฆ 0(๐) = 0, ๐ < ๐ฅ < ๐, (5.2) ๐ฝ 1 ๐ฆ(๐) + ๐ฝ 2 ๐ฆ 0(๐) = 0. In particular, we seek ๐s that allow for nontrivial solutions. The ๐s that admit nontrivial solutions are called the eigenvalues and the corresponding nontrivial solutions are called eigenfunctions. The constants ๐ผ1 and ๐ผ 2 should not be both zero, same for ๐ฝ1 and ๐ฝ 2 . ∗ Named after the French mathematicians Jacques Charles François Sturm (1803–1855) and Joseph Liouville (1809–1882). 275 5.1. STURM–LIOUVILLE PROBLEMS Theorem 5.1.1. Suppose ๐(๐ฅ), ๐ 0(๐ฅ), ๐(๐ฅ) and ๐(๐ฅ) are continuous on [๐, ๐] and suppose ๐(๐ฅ) > 0 and ๐(๐ฅ) > 0 for all ๐ฅ in [๐, ๐]. Then the Sturm–Liouville problem (5.2) has an increasing sequence of eigenvalues ๐1 < ๐2 < ๐3 < · · · such that lim ๐๐ = +∞ ๐→∞ and such that to each ๐๐ there is (up to a constant multiple) a single eigenfunction ๐ฆ๐ (๐ฅ). Moreover, if ๐(๐ฅ) ≥ 0 and ๐ผ1 , ๐ผ2 , ๐ฝ 1 , ๐ฝ 2 ≥ 0, then ๐๐ ≥ 0 for all ๐. Problems satisfying the hypothesis of the theorem (including the “Moreover”) are called regular Sturm–Liouville problems, and we will only consider such problems here. That is, a regular problem is one where ๐(๐ฅ), ๐ 0(๐ฅ), ๐(๐ฅ) and ๐(๐ฅ) are continuous, ๐(๐ฅ) > 0, ๐(๐ฅ) > 0, ๐(๐ฅ) ≥ 0, and ๐ผ1 , ๐ผ2 , ๐ฝ 1 , ๐ฝ 2 ≥ 0, where neither ๐ผ1 and ๐ผ2 are both zero, nor ๐ฝ 1 and ๐ฝ 2 are both zero. Note: Be careful about the signs. Also be careful about the inequalities for ๐ and ๐, they must be strict for all ๐ฅ in the interval [๐, ๐], including the endpoints! When zero is an eigenvalue, we usually start labeling the eigenvalues at 0 rather than at 1 for convenience. That is we label the eigenvalues ๐0 < ๐1 < ๐2 < · · · . Example 5.1.2: The problem ๐ฆ 00 + ๐๐ฆ, 0 < ๐ฅ < ๐ฟ, ๐ฆ(0) = 0, and ๐ฆ(๐ฟ) = 0 is a regular Sturm–Liouville problem: ๐(๐ฅ) = 1, ๐(๐ฅ) = 0, ๐(๐ฅ) = 1, and we have ๐(๐ฅ) = 1 > 0 and ๐(๐ฅ) = 1 > 0. We also have ๐ = 0, ๐ = ๐ฟ, ๐ผ1 = ๐ฝ 1 = 1, ๐ผ2 = ๐ฝ2 = 0. The eigenvalues are 2 2 ๐๐ = ๐๐ฟ๐2 and eigenfunctions are ๐ฆ๐ (๐ฅ) = sin ๐๐ ๐ฅ . All eigenvalues are nonnegative as ๐ฟ predicted by the theorem. Exercise 5.1.1: Find eigenvalues and eigenfunctions for ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ 0(0) = 0, ๐ฆ 0(1) = 0. Identify the ๐, ๐, ๐, ๐ผ ๐ , ๐ฝ ๐ . Can you use the theorem above to make the search for eigenvalues easier? Hint: Consider the condition −๐ฆ 0(0) = 0. Example 5.1.3: Find eigenvalues and eigenfunctions of the problem ๐ฆ 00 + ๐๐ฆ = 0, 0 0 < ๐ฅ < 1, โ๐ฆ(0) − ๐ฆ (0) = 0, ๐ฆ 0(1) = 0, โ > 0. These equations give a regular Sturm–Liouville problem. Exercise 5.1.2: Identify ๐, ๐, ๐, ๐ผ ๐ , ๐ฝ ๐ in the example above. By Theorem 5.1.1, ๐ ≥ 0. So the general solution (without boundary conditions) is √ √ ๐ฆ(๐ฅ) = ๐ด cos( ๐ ๐ฅ) + ๐ต sin( ๐ ๐ฅ) if ๐ > 0, ๐ฆ(๐ฅ) = ๐ด๐ฅ + ๐ต if ๐ = 0. 276 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Let us see if ๐ = 0 is an eigenvalue: We must satisfy 0 = โ๐ต − ๐ด and ๐ด = 0, hence ๐ต = 0 (as โ > 0). Therefore, 0 is not an eigenvalue (no nonzero solution, so no eigenfunction). Now let us try ๐ > 0. We plug in the boundary conditions: √ 0 = โ๐ด − ๐ ๐ต, √ √ √ √ 0 = −๐ด ๐ sin( ๐) + ๐ต ๐ cos( ๐). If ๐ด = 0, then ๐ต = 0 and vice versa, hence both are nonzero. So ๐ต = √ √ √ √ −๐ด ๐ sin( ๐) + √โ๐ด ๐ cos( ๐). As ๐ด ≠ 0 we get โ๐ด √ , ๐ and 0 = ๐ √ √ √ 0 = − ๐ sin( ๐) + โ cos( ๐), or √ โ √ = tan ๐. ๐ We use a computer to find ๐๐ . There are tables available, though using a computer or a graphing calculator is far more convenient nowadays. Easiest method is to plot the functions โ/๐ฅ and tan ๐ฅ and see for which ๐ฅ they √ intersect. There is an infinite √ number of intersections. Denote the first√intersection√by ๐1 , the second intersection by ๐2 , etc. For example, when โ = 1, we get ๐1 ≈ 0.86, ๐2 ≈ 3.43, . . . . That is ๐1 ≈ 0.74, ๐2 ≈ 11.73, . . . . A plot for โ = 1 is given in Figure 5.1 on the next page. The appropriate eigenfunction (let √ ๐ด = 1 for convenience, then ๐ต = โ/ ๐) is p p โ ๐ฆ๐ (๐ฅ) = cos( ๐๐ ๐ฅ) + √ sin( ๐๐ ๐ฅ). ๐๐ When โ = 1 we get (approximately) ๐ฆ1 (๐ฅ) ≈ cos(0.86 ๐ฅ) + 5.1.2 1 sin(0.86 ๐ฅ), 0.86 ๐ฆ2 (๐ฅ) ≈ cos(3.43 ๐ฅ) + 1 sin(3.43 ๐ฅ), 3.43 .... Orthogonality We have seen the notion of orthogonality before. For example, we have shown that sin(๐๐ฅ) are orthogonal for distinct ๐ on [0, ๐]. For general Sturm–Liouville problems we need a more general setup. Let ๐(๐ฅ) be a weight function (any function, though generally we assume it is positive) on [๐, ๐]. Two functions ๐ (๐ฅ), ๐(๐ฅ) are said to be orthogonal with respect to the weight function ๐(๐ฅ) when ∫ ๐ ๐ ๐ (๐ฅ) ๐(๐ฅ) ๐(๐ฅ) ๐๐ฅ = 0. 277 5.1. STURM–LIOUVILLE PROBLEMS 0 2 4 6 4 4 2 2 0 0 -2 -2 -4 -4 0 2 4 Figure 5.1: Plot of 1 ๐ฅ 6 and tan ๐ฅ. In this setting, we define the inner product as def h ๐ , ๐i = ∫ ๐ ๐ (๐ฅ) ๐(๐ฅ) ๐(๐ฅ) ๐๐ฅ, ๐ and then say ๐ and ๐ are orthogonal whenever h ๐ , ๐i = 0. The results and concepts are again analogous to finite-dimensional linear algebra. The idea of the given inner product is that those ๐ฅ where ๐(๐ฅ) is greater have more weight. Nontrivial (nonconstant) ๐(๐ฅ) arise naturally, for example from a change of variables. Hence, you could think of a change of variables such that ๐๐ = ๐(๐ฅ) ๐๐ฅ. Eigenfunctions of a regular Sturm–Liouville problem satisfy an orthogonality property, just like the eigenfunctions in § 4.1. Its proof is very similar to the analogous Theorem 4.1.1 on page 193. Theorem 5.1.2. Suppose we have a regular Sturm–Liouville problem ๐๐ฆ ๐ ๐(๐ฅ) − ๐(๐ฅ)๐ฆ + ๐๐(๐ฅ)๐ฆ = 0, ๐๐ฅ ๐๐ฅ ๐ผ1 ๐ฆ(๐) − ๐ผ2 ๐ฆ 0(๐) = 0, ๐ฝ 1 ๐ฆ(๐) + ๐ฝ 2 ๐ฆ 0(๐) = 0. Let ๐ฆ ๐ and ๐ฆ ๐ be two distinct eigenfunctions for two distinct eigenvalues ๐ ๐ and ๐ ๐ . Then ∫ ๐ ๐ ๐ฆ ๐ (๐ฅ) ๐ฆ ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ = 0, that is, ๐ฆ ๐ and ๐ฆ ๐ are orthogonal with respect to the weight function ๐. 278 5.1.3 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Fredholm alternative The Fredholm alternative theorem we talked about before (Theorem 4.1.2 on page 194) holds for all regular Sturm–Liouville problems. We state it here for completeness. Theorem 5.1.3 (Fredholm alternative). Suppose that we have a regular Sturm–Liouville problem. Then either ๐๐ฆ ๐ ๐(๐ฅ) − ๐(๐ฅ)๐ฆ + ๐๐(๐ฅ)๐ฆ = 0, ๐๐ฅ ๐๐ฅ ๐ผ1 ๐ฆ(๐) − ๐ผ2 ๐ฆ 0(๐) = 0, ๐ฝ 1 ๐ฆ(๐) + ๐ฝ 2 ๐ฆ 0(๐) = 0, has a nonzero solution (๐ is an eigenvalue), or ๐๐ฆ ๐ ๐(๐ฅ) − ๐(๐ฅ)๐ฆ + ๐๐(๐ฅ)๐ฆ = ๐ (๐ฅ), ๐๐ฅ ๐๐ฅ ๐ผ1 ๐ฆ(๐) − ๐ผ2 ๐ฆ 0(๐) = 0, ๐ฝ 1 ๐ฆ(๐) + ๐ฝ 2 ๐ฆ 0(๐) = 0, has a unique solution for any ๐ (๐ฅ) continuous on [๐, ๐]. This theorem is used in much the same way as we did before in § 4.4. It is used when solving more general nonhomogeneous boundary value problems. The theorem does not help us solve the problem, but it tells us when a unique solution exists, so that we know when to spend time looking for it. To solve the problem we decompose ๐ (๐ฅ) and ๐ฆ(๐ฅ) in terms of eigenfunctions of the homogeneous problem, and then solve for the coefficients of the series for ๐ฆ(๐ฅ). 5.1.4 Eigenfunction series What we want to do with the eigenfunctions once we have them is to compute the eigenfunction decomposition of an arbitrary function ๐ (๐ฅ). That is, we wish to write ๐ (๐ฅ) = ∞ Õ ๐ ๐ ๐ฆ๐ (๐ฅ), (5.3) ๐=1 where ๐ฆ๐ (๐ฅ) are eigenfunctions. We wish to find out if we can represent any function ๐ (๐ฅ) in this way, and if so, we wish to calculate ๐ ๐ (and of course we would want to know if the sum converges). OK, so imagine we could write ๐ (๐ฅ) as (5.3). We will assume convergence 279 5.1. STURM–LIOUVILLE PROBLEMS and the ability to integrate the series term by term. Because of orthogonality we have h ๐ , ๐ฆ๐ i = ∫ ๐ ๐ (๐ฅ) ๐ฆ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ = ∫ ๐ = ๐ ∞ Õ ๐ ๐=1 ∞ Õ ∫ ๐๐ ๐ ๐ ๐ฆ๐ (๐ฅ) ๐ฆ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ ๐ ๐ฆ๐ (๐ฅ) ๐ฆ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ ๐ ๐=1 = ๐๐ ! ๐ ∫ ๐ฆ๐ (๐ฅ) ๐ฆ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ = ๐ ๐ h๐ฆ๐ , ๐ฆ๐ i. ๐ Hence, ∫๐ ๐ (๐ฅ) ๐ฆ๐ (๐ฅ) ๐(๐ฅ) ๐๐ฅ h ๐ , ๐ฆ๐ i ๐๐ = = ∫๐ ๐ . 2 h๐ฆ๐ , ๐ฆ๐ i ๐ฆ (๐ฅ) ๐(๐ฅ) ๐๐ฅ ๐ (5.4) ๐ Note that ๐ฆ๐ are known up to a constant multiple, so we could have picked a scalar multiple of an eigenfunction such that h๐ฆ๐ , ๐ฆ๐ i = 1 (if we had an arbitrary eigenfunction p ๐ฆ˜ ๐ , divide it by h ๐ฆ˜ ๐ , ๐ฆ˜ ๐ i). When h๐ฆ๐ , ๐ฆ๐ i = 1 we have the simpler form ๐ ๐ = h ๐ , ๐ฆ๐ i. The following theorem holds more generally, but the statement given is enough for our purposes. Theorem 5.1.4. Suppose ๐ is a piecewise smooth continuous function on [๐, ๐]. If ๐ฆ1 , ๐ฆ2 , . . . are eigenfunctions of a regular Sturm–Liouville problem, one for each eigenvalue, then there exist real constants ๐ 1 , ๐2 , . . . given by (5.4) such that (5.3) converges and holds for ๐ < ๐ฅ < ๐. Example 5.1.4: Consider ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ(0) = 0, 0 < ๐ฅ < ๐/2 , ๐ฆ 0(๐/2) = 0. The above is a regular Sturm–Liouville problem, and Theorem 5.1.1 on page 275 says that if ๐ is an eigenvalue then ๐ ≥ 0. Suppose ๐ = 0. The general solution is ๐ฆ(๐ฅ) = ๐ด๐ฅ + ๐ต. We plug in the initial conditions to get 0 = ๐ฆ(0) = ๐ต, and 0 = ๐ฆ 0(๐/2) = ๐ด. Hence ๐ = 0 is not an eigenvalue. So let us consider ๐ > 0, where the general solution is √ √ ๐ฆ(๐ฅ) = ๐ด cos( ๐ ๐ฅ) + ๐ต sin( ๐ ๐ฅ). √ √ Plugging in the boundary conditions we get 0 = ๐ฆ(0) = ๐ด and 0 = ๐ฆ 0(๐/2) = ๐ ๐ต cos ๐ ๐2 . √ √ Since ๐ด is zero, then ๐ต cannot be zero. Hence cos ๐ ๐2 = 0. This means that ๐ ๐2 is an √ odd integral multiple of ๐/2, i.e. (2๐ − 1) ๐2 = ๐๐ ๐2 . Solving for ๐๐ we get ๐๐ = (2๐ − 1)2 . We can take ๐ต = 1. Our eigenfunctions are ๐ฆ๐ (๐ฅ) = sin (2๐ − 1)๐ฅ . 280 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS A little bit of calculus shows ∫ ๐ 2 sin (2๐ − 1)๐ฅ 2 ๐๐ฅ = 0 ๐ . 4 So any piecewise smooth function ๐ (๐ฅ) on [0, ๐/2] can be written as ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin (2๐ − 1)๐ฅ , ๐=1 where ∫ ๐ ∫ 2 ๐ (๐ฅ) sin (2๐ − 1)๐ฅ ๐๐ฅ h ๐ , ๐ฆ๐ i 4 0 ๐๐ = = ∫๐ = 2 ๐ 0 h๐ฆ๐ , ๐ฆ๐ i 2 sin (2๐ − 1)๐ฅ ๐๐ฅ 0 ๐ 2 ๐ (๐ฅ) sin (2๐ − 1)๐ฅ ๐๐ฅ. Note that the series converges to an odd 2๐-periodic extension of ๐ (๐ฅ). With the regular sine series we would expect a function with period 2 ๐2 = ๐. Exercise 5.1.3 (challenging): In the example above, the function is defined on 0 < ๐ฅ < ๐/2, yet the series with respect to the eigenfunctions sin (2๐ − 1)๐ฅ converges to an odd 2๐-periodic extension of ๐ (๐ฅ). Find out how is the extension defined for ๐/2 < ๐ฅ < ๐. Let us compute an example. Consider ๐ (๐ฅ) = ๐ฅ for 0 < ๐ฅ < ๐/2. Some calculus later we find ∫ ๐ 2 4 4(−1)๐+1 ๐๐ = ๐ (๐ฅ) sin (2๐ − 1)๐ฅ ๐๐ฅ = , ๐ 0 ๐(2๐ − 1)2 and so for ๐ฅ in [0, ๐/2], ๐ (๐ฅ) = ∞ Õ 4(−1)๐+1 ๐=1 ๐(2๐ − 1) sin (2๐ − 1)๐ฅ . 2 This is different from the ๐-periodic regular sine series which can be computed to be ๐ (๐ฅ) = ∞ Õ (−1)๐+1 ๐=1 ๐ sin(2๐๐ฅ). Both sums converge are equal to ๐ (๐ฅ) for 0 < ๐ฅ < ๐/2, but the eigenfunctions involved come from different eigenvalue problems. 5.1.5 Exercises Exercise 5.1.4: Find eigenvalues and eigenfunctions of ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ(0) − ๐ฆ 0(0) = 0, ๐ฆ(1) = 0. 281 5.1. STURM–LIOUVILLE PROBLEMS Exercise 5.1.5: Expand the function ๐ (๐ฅ) = ๐ฅ on 0 ≤ ๐ฅ ≤ 1 using eigenfunctions of the system ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ 0(0) = 0, ๐ฆ(1) = 0. Exercise 5.1.6: Suppose that you had a Sturm–Liouville problem on the interval [0, 1] and came up with ๐ฆ๐ (๐ฅ) = sin(๐พ๐๐ฅ), where ๐พ > 0 is some constant. Decompose ๐ (๐ฅ) = ๐ฅ, 0 < ๐ฅ < 1 in terms of these eigenfunctions. Exercise 5.1.7: Find eigenvalues and eigenfunctions of ๐ฆ (4) + ๐๐ฆ = 0, ๐ฆ(0) = 0, ๐ฆ 0(0) = 0, ๐ฆ(1) = 0, ๐ฆ 0(1) = 0. This problem is not a Sturm–Liouville problem, but the idea is the same. Exercise 5.1.8 (more challenging): Find eigenvalues and eigenfunctions for ๐ ๐ฅ 0 (๐ ๐ฆ ) + ๐๐ ๐ฅ ๐ฆ = 0, ๐๐ฅ ๐ฆ(0) = 0, ๐ฆ(1) = 0. Hint: First write the system as a constant coefficient system to find general solutions. Do note that Theorem 5.1.1 on page 275 guarantees ๐ ≥ 0. Exercise 5.1.101: Find eigenvalues and eigenfunctions of ๐ฆ 00 + ๐๐ฆ = 0, ๐ฆ(−1) = 0, ๐ฆ(1) = 0. Exercise 5.1.102: Put the following problems into the standard form for Sturm–Liouville problems, that is, find ๐(๐ฅ), ๐(๐ฅ), ๐(๐ฅ), ๐ผ1 , ๐ผ2 , ๐ฝ 1 , and ๐ฝ 2 , and decide if the problems are regular or not. a) ๐ฅ ๐ฆ 00 + ๐๐ฆ = 0 for 0 < ๐ฅ < 1, ๐ฆ(0) = 0, ๐ฆ(1) = 0. b) (1 + ๐ฅ 2 )๐ฆ 00 + 2๐ฅ๐ฆ 0 + (๐ − ๐ฅ 2 )๐ฆ = 0 for −1 < ๐ฅ < 1, ๐ฆ(−1) = 0, ๐ฆ(1) + ๐ฆ 0(1) = 0.∗ ∗ In an earlier version of this book, a typo rendered the equation as (1 + ๐ฅ 2 )๐ฆ 00 − 2๐ฅ ๐ฆ 0 + (๐ − ๐ฅ 2 )๐ฆ = 0 ending up with something harder than intended. Try this equation for a further challenge. 282 5.2 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Higher order eigenvalue problems Note: 1 lecture, §10.2 in [EP], exercises in §11.2 in [BD] The eigenfunction series can arise even from higher order equations. Consider an elastic beam (say made of steel). We will study the transversal vibrations of the beam. That is, suppose the beam lies along the ๐ฅ-axis and let ๐ฆ(๐ฅ, ๐ก) measure the displacement of the point ๐ฅ on the beam at time ๐ก. See Figure 5.2. ๐ฆ ๐ฆ ๐ฅ Figure 5.2: Transversal vibrations of a beam. The equation that governs this setup is ๐4 ๐4 ๐ฆ ๐2 ๐ฆ + = 0, ๐๐ฅ 4 ๐๐ก 2 for some constant ๐ > 0, let us not worry about the physics∗ . Suppose the beam is of length 1 simply supported (hinged) at the ends. The beam is displaced by some function ๐ (๐ฅ) at time ๐ก = 0 and then let go (initial velocity is 0). Then ๐ฆ satisfies: ๐ 4 ๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ + ๐ฆ๐ก๐ก = 0 (0 < ๐ฅ < 1, ๐ก > 0), ๐ฆ(0, ๐ก) = ๐ฆ ๐ฅ๐ฅ (0, ๐ก) = 0, (5.5) ๐ฆ(1, ๐ก) = ๐ฆ ๐ฅ๐ฅ (1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = 0. Again we try ๐ฆ(๐ฅ, ๐ก) = ๐(๐ฅ)๐(๐ก) and plug in to get ๐ 4 ๐ (4)๐ + ๐๐ 00 = 0 or ๐ (4) −๐ 00 = 4 = ๐. ๐ ๐ ๐ The equations are ๐ 00 + ๐๐ 4๐ = 0, ๐ (4) − ๐๐ = 0. you are interested, ๐ 4 = ๐ธ๐ผ ๐ , where ๐ธ is the elastic modulus, ๐ผ is the second moment of area of the cross section, and ๐ is linear density. ∗ If 283 5.2. HIGHER ORDER EIGENVALUE PROBLEMS The boundary conditions ๐ฆ(0, ๐ก) = ๐ฆ ๐ฅ๐ฅ (0, ๐ก) = 0 and ๐ฆ(1, ๐ก) = ๐ฆ ๐ฅ๐ฅ (1, ๐ก) = 0 imply ๐(0) = ๐ 00(0) = 0, ๐(1) = ๐ 00(1) = 0. and The initial homogeneous condition ๐ฆ๐ก (๐ฅ, 0) = 0 implies ๐ 0(0) = 0. As usual, we leave the nonhomogeneous ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ) for later. Considering the equation for ๐, that is, ๐ 00 + ๐๐ 4๐ = 0, and physical intuition leads us to the fact that if ๐ is an eigenvalue then ๐ > 0: We expect vibration and not exponential growth nor decay in the ๐ก direction (there is no friction in our model for instance). So there are no negative eigenvalues. Similarly ๐ = 0 is not an eigenvalue. Exercise 5.2.1: Justify ๐ > 0 just from the equation for ๐ and the boundary conditions. √4 Let ๐ = ๐, that is ๐ 4 = ๐, to avoid writing the fourth root all the time. Notice ๐ > 0. The general solution to ๐ (4) − ๐ 4 ๐ = 0 is ๐(๐ฅ) = ๐ด๐ ๐๐ฅ + ๐ต๐ −๐๐ฅ + ๐ถ sin(๐๐ฅ) + ๐ท cos(๐๐ฅ). Now 0 = ๐(0) = ๐ด + ๐ต + ๐ท, 0 = ๐ 00(0) = ๐ 2 (๐ด + ๐ต − ๐ท). Solving, ๐ท = 0 and ๐ต = −๐ด. So ๐(๐ฅ) = ๐ด๐ ๐๐ฅ − ๐ด๐ −๐๐ฅ + ๐ถ sin(๐๐ฅ). Also 0 = ๐(1) = ๐ด(๐ ๐ − ๐ −๐ ) + ๐ถ sin ๐, and 0 = ๐ 00(1) = ๐ด๐ 2 (๐ ๐ − ๐ −๐ ) − ๐ถ๐2 sin ๐. This means that ๐ถ sin ๐ = 0 and ๐ด(๐ ๐ − ๐ −๐ ) = 2๐ด sinh ๐ = 0. If ๐ > 0, then sinh ๐ ≠ 0 and so ๐ด = 0. Thus ๐ถ ≠ 0, otherwise ๐ is not an eigenvalue. Also, ๐ must be an integer multiple of ๐. Hence ๐ = ๐๐ and ๐ ≥ 1 (as ๐ > 0). We can take ๐ถ = 1. So the eigenvalues are ๐๐ = ๐ 4 ๐4 and corresponding eigenfunctions are sin(๐๐๐ฅ). Now ๐ 00 + ๐ 4 ๐4 ๐ 4๐ = 0. The general solution is ๐(๐ก) = ๐ด sin(๐ 2 ๐2 ๐ 2 ๐ก) + ๐ต cos(๐ 2 ๐2 ๐ 2 ๐ก). But ๐ 0(0) = 0 and hence ๐ด = 0. We take ๐ต = 1 to make ๐(0) = 1 for convenience. So our solutions are ๐๐ (๐ก) = cos(๐ 2 ๐2 ๐ 2 ๐ก). The eigenfunctions are just the sines, so we decompose the function ๐ (๐ฅ) using the sine series. That is, we find numbers ๐ ๐ such that for 0 < ๐ฅ < 1, ๐ (๐ฅ) = ∞ Õ ๐ ๐ sin(๐๐๐ฅ). ๐=1 Then the solution to (5.5) is ๐ฆ(๐ฅ, ๐ก) = ∞ Õ ๐=1 ๐ ๐ ๐๐ (๐ฅ)๐๐ (๐ก) = ∞ Õ ๐=1 ๐ ๐ sin(๐๐๐ฅ) cos(๐ 2 ๐2 ๐ 2 ๐ก). 284 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS The point is that ๐๐ ๐๐ is a solution that satisfies all the homogeneous conditions (all conditions except the initial position). And since ๐๐ (0) = 1, ๐ฆ(๐ฅ, 0) = ∞ Õ ๐ ๐ ๐๐ (๐ฅ)๐๐ (0) = ๐=1 ∞ Õ ๐ ๐ ๐๐ (๐ฅ) = ๐=1 ∞ Õ ๐ ๐ sin(๐๐๐ฅ) = ๐ (๐ฅ). ๐=1 So ๐ฆ(๐ฅ, ๐ก) solves (5.5). The natural (angular) frequencies of the system are ๐ 2 ๐2 ๐ 2 . These frequencies are all integer multiples of the fundamental frequency ๐2 ๐ 2 , so we get a nice musical note. The exact frequencies and their amplitude are what musicians call the timbre of the note (outside of music it is called the spectrum). The timbre of a beam is different than for a vibrating string where we get “more” of the lower frequencies since we get all integer multiples, 1, 2, 3, 4, 5, . . .. For a steel beam we get only the square multiples 1, 4, 9, 16, 25, . . .. That is why when you hit a steel beam you hear a very pure sound. The sound of a xylophone or vibraphone is, therefore, very different from a guitar or piano. Example 5.2.1: Consider ๐ (๐ฅ) = ๐ฅ(๐ฅ−1) 10 . ๐ (๐ฅ) = On 0 < ๐ฅ < 1 (you know how to do this by now) ∞ Õ ๐=1 ๐ odd 4 sin(๐๐๐ฅ). 5๐3 ๐ 3 Hence, the solution to (5.5) with the given initial position ๐ (๐ฅ) is ๐ฆ(๐ฅ, ๐ก) = ∞ Õ ๐=1 ๐ odd 4 sin(๐๐๐ฅ) cos(๐ 2 ๐2 ๐ 2 ๐ก). 5๐3 ๐ 3 There are other boundary conditions than just hinged ends. There are three basic possibilities: hinged, free, or fixed. Let us consider the end at ๐ฅ = 0. For the other end, it is the same idea. If the end is hinged, then ๐ข(0, ๐ก) = ๐ข๐ฅ๐ฅ (0, ๐ก) = 0. If the end is free, that is, it is just floating in air, then ๐ข๐ฅ๐ฅ (0, ๐ก) = ๐ข๐ฅ๐ฅ๐ฅ (0, ๐ก) = 0. And finally, if the end is clamped or fixed, for example it is welded to a wall, then ๐ข(0, ๐ก) = ๐ข๐ฅ (0, ๐ก) = 0. 5.2. HIGHER ORDER EIGENVALUE PROBLEMS 5.2.1 285 Exercises Exercise 5.2.2: Suppose you have a beam of length 5 with free ends. Let ๐ฆ be the transverse deviation of the beam at position ๐ฅ on the beam (0 < ๐ฅ < 5). You know that the constants are such that this satisfies the equation ๐ฆ๐ก๐ก + 4๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ = 0. Suppose you know that the initial shape of the beam is the graph of ๐ฅ(5 − ๐ฅ), and the initial velocity is uniformly equal to 2 (same for each ๐ฅ) in the positive ๐ฆ direction. Set up the equation together with the boundary and initial conditions. Just set up, do not solve. Exercise 5.2.3: Suppose you have a beam of length 5 with one end free and one end fixed (the fixed end is at ๐ฅ = 5). Let ๐ข be the longitudinal deviation of the beam at position ๐ฅ on the beam (0 < ๐ฅ < 5). You know that the constants are such that this satisfies the equation ๐ข๐ก๐ก = 4๐ข๐ฅ๐ฅ . −(๐ฅ−5) Suppose you know that the initial displacement of the beam is ๐ฅ−5 50 , and the initial velocity is 100 in the positive ๐ข direction. Set up the equation together with the boundary and initial conditions. Just set up, do not solve. Exercise 5.2.4: Suppose the beam is ๐ฟ units long, everything else kept the same as in (5.5). What is the equation and the series solution? Exercise 5.2.5: Suppose you have ๐ 4 ๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ + ๐ฆ๐ก๐ก = 0 (0 < ๐ฅ < 1, ๐ก > 0), ๐ฆ(0, ๐ก) = ๐ฆ ๐ฅ๐ฅ (0, ๐ก) = 0, ๐ฆ(1, ๐ก) = ๐ฆ ๐ฅ๐ฅ (1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ). That is, you have also an initial velocity. Find a series solution. Hint: Use the same idea as we did for the wave equation. Exercise 5.2.101: Suppose you have a beam of length 1 with hinged ends. Let ๐ฆ be the transverse deviation of the beam at position ๐ฅ on the beam (0 < ๐ฅ < 1). You know that the constants are such that this satisfies the equation ๐ฆ๐ก๐ก + 4๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ = 0. Suppose you know that the initial shape of the beam is the graph of sin(๐๐ฅ), and the initial velocity is 0. Solve for ๐ฆ. Exercise 5.2.102: Suppose you have a beam of length 10 with two fixed ends. Let ๐ฆ be the transverse deviation of the beam at position ๐ฅ on the beam (0 < ๐ฅ < 10). You know that the constants are such that this satisfies the equation ๐ฆ๐ก๐ก + 9๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ = 0. Suppose you know that the initial shape of the beam is the graph of sin(๐๐ฅ), and the initial velocity is uniformly equal to ๐ฅ(10 − ๐ฅ). Set up the equation together with the boundary and initial conditions. Just set up, do not solve. 286 5.3 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Steady periodic solutions Note: 1–2 lectures, §10.3 in [EP], not in [BD] 5.3.1 Forced vibrating string Consider a guitar string of length ๐ฟ. We studied this setup in § 4.7. Let ๐ฅ be the position on the string, ๐ก the time, and ๐ฆ the displacement of the string. See Figure 5.3. ๐ฆ ๐ฆ ๐ฟ 0 ๐ฅ Figure 5.3: Vibrating string. The problem is governed by the wave equation ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = 0, ๐ฆ(๐ฟ, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = ๐ (๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = ๐(๐ฅ). (5.6) We found that the solution is of the form ๐ฆ= ∞ Õ ๐=1 ๐ด๐ cos ๐๐๐ ๐ฟ ๐ก + ๐ต๐ sin ๐๐๐ ๐ฟ ๐ก sin ๐๐ ๐ฟ ๐ฅ , where ๐ด๐ and ๐ต๐ are determined by the initial conditions. The natural frequencies of the system are the (angular) frequencies ๐๐๐ ๐ฟ for integers ๐ ≥ 1. But these are free vibrations. What if there is an external force acting on the string. Let us assume say air vibrations (noise), for example from a second string. Or perhaps a jet engine. For simplicity, assume nice pure sound and assume the force is uniform at every position on the string. Let us say ๐น(๐ก) = ๐น0 cos(๐๐ก) as force per unit mass. Then our wave equation becomes (remember force is mass times acceleration) ๐ฆ๐ก๐ก = ๐ 2 ๐ฆ ๐ฅ๐ฅ + ๐น0 cos(๐๐ก), (5.7) with the same boundary conditions of course. We want to find the solution here that satisfies the equation above and ๐ฆ(0, ๐ก) = 0, ๐ฆ(๐ฟ, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = 0, ๐ฆ๐ก (๐ฅ, 0) = 0. (5.8) 287 5.3. STEADY PERIODIC SOLUTIONS That is, the string is initially at rest. First we find a particular solution ๐ฆ ๐ of (5.7) that satisfies ๐ฆ(0, ๐ก) = ๐ฆ(๐ฟ, ๐ก) = 0. We define the functions ๐ and ๐ as ๐ (๐ฅ) = −๐ฆ ๐ (๐ฅ, 0), ๐(๐ฅ) = − ๐๐ฆ ๐ ๐๐ก (๐ฅ, 0). We then find solution ๐ฆ ๐ of (5.6). If we add the two solutions, we find that ๐ฆ = ๐ฆ ๐ + ๐ฆ ๐ solves (5.7) with the initial conditions. Exercise 5.3.1: Check that ๐ฆ = ๐ฆ ๐ + ๐ฆ ๐ solves (5.7) and the side conditions (5.8). So the big issue here is to find the particular solution ๐ฆ ๐ . We look at the equation and we make an educated guess ๐ฆ ๐ (๐ฅ, ๐ก) = ๐(๐ฅ) cos(๐๐ก). We plug in to get −๐2 ๐ cos(๐๐ก) = ๐ 2 ๐ 00 cos(๐๐ก) + ๐น0 cos(๐๐ก), or −๐ 2 ๐ = ๐ 2 ๐ 00 + ๐น0 after canceling the cosine. We know how to find a general solution to this equation (it is a nonhomogeneous constant coefficient equation). The general solution is ๐ ๐ ๐น 0 ๐(๐ฅ) = ๐ด cos ๐ฅ + ๐ต sin ๐ฅ − 2. ๐ ๐ ๐ The endpoint conditions imply ๐(0) = ๐(๐ฟ) = 0. So ๐น0 , ๐2 0 = ๐(0) = ๐ด − or ๐ด = ๐น0 , ๐2 and also ๐น0 ๐๐ฟ ๐๐ฟ ๐น0 0 = ๐(๐ฟ) = 2 cos + ๐ต sin − 2. ๐ ๐ ๐ ๐ Assuming that sin( ๐๐ฟ ๐ ) is not zero we can solve for ๐ต to get ๐ต= Therefore, ๐๐ฟ ๐ − ๐ 2 sin ๐๐ฟ ๐ −๐น0 cos 1 . (5.9) ๐ cos ๐๐ฟ − 1 ๐ ๐น0 ๐ ๐(๐ฅ) = 2 cos ๐ฅ − ๐ฅ −1 . sin ๐ ๐ ๐ sin ๐๐ฟ ๐ ! The particular solution ๐ฆ ๐ we are looking for is ๐ cos ๐๐ฟ − 1 ๐ ๐น0 ๐ ๐ฆ ๐ (๐ฅ, ๐ก) = 2 cos ๐ฅ − sin ๐ฅ − 1 cos(๐๐ก). ๐ ๐ ๐ sin ๐๐ฟ ๐ ! 288 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Exercise 5.3.2: Check that ๐ฆ ๐ works. Now we get to the point that we skipped. Suppose sin( ๐๐ฟ ๐ ) = 0. What this means is that ๐ is equal to one of the natural frequencies of the system, i.e. a multiple of ๐๐ ๐ฟ . We notice that if ๐ is not equal to a multiple of the base frequency, but is very close, then the coefficient ๐ต in (5.9) seems to become very large. But let us not jump to conclusions just ๐๐ฟ yet. When ๐ = ๐๐๐ ๐ฟ for ๐ even, then cos( ๐ ) = 1 and hence we really get that ๐ต = 0. So ๐๐ฟ ๐๐๐ resonance occurs only when both cos( ๐ ) = −1 and sin( ๐๐ฟ ๐ ) = 0. That is when ๐ = ๐ฟ for odd ๐. We could again solve for the resonance solution if we wanted to, but it is, in the right sense, the limit of the solutions as ๐ gets close to a resonance frequency. In real life, pure resonance never occurs anyway. The calculation above explains why a string begins to vibrate if the identical string is plucked close by. In the absence of friction this vibration would get louder and louder as time goes on. On the other hand, you are unlikely to get large vibration if the forcing frequency is not close to a resonance frequency even if you have a jet engine running close to the string. That is, the amplitude does not keep increasing unless you tune to just the right frequency. Similar resonance phenomena occur when you break a wine glass using human voice (yes this is possible, but not easy∗ ) if you happen to hit just the right frequency. Remember a glass has much purer sound, i.e. it is more like a vibraphone, so there are far fewer resonance frequencies to hit. When the forcing function is more complicated, you decompose it in terms of the Fourier series and apply the result above. You may also need to solve the problem above if the forcing function is a sine rather than a cosine, but if you think about it, the solution is almost the same. Example 5.3.1: Let us do the computation for specific values. Suppose ๐น0 = 1 and ๐ = 1 and ๐ฟ = 1 and ๐ = 1. Then cos(1) − 1 ๐ฆ ๐ (๐ฅ, ๐ก) = cos(๐ฅ) − sin(๐ฅ) − 1 cos(๐ก). sin(1) Write ๐ต = cos(1)−1 sin(1) for simplicity. Then plug in ๐ก = 0 to get ๐ (๐ฅ) = −๐ฆ ๐ (๐ฅ, 0) = − cos ๐ฅ + ๐ต sin ๐ฅ + 1, and after differentiating in ๐ก we see that ๐(๐ฅ) = − ∗ Mythbusters, ๐๐ฆ ๐ (๐ฅ, 0) ๐๐ก = 0. episode 31, Discovery Channel, originally aired may 18th 2005. 289 5.3. STEADY PERIODIC SOLUTIONS Hence to find ๐ฆ ๐ we need to solve the problem ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , ๐ฆ(0, ๐ก) = 0, ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = − cos ๐ฅ + ๐ต sin ๐ฅ + 1, ๐ฆ๐ก (๐ฅ, 0) = 0. The formula that we use to define ๐ฆ(๐ฅ, 0) is not odd, hence it is not a simple matter of plugging in the expression for ๐ฆ(๐ฅ, 0) to the d’Alembert formula directly! You must define ๐น to be the odd, 2-periodic extension of ๐ฆ(๐ฅ, 0). Then our solution is ๐น(๐ฅ + ๐ก) + ๐น(๐ฅ − ๐ก) cos(1) − 1 ๐ฆ(๐ฅ, ๐ก) = + cos(๐ฅ) − sin(๐ฅ) − 1 cos(๐ก). 2 sin(1) (5.10) It is not hard to compute specific values for an odd periodic extension of a function and hence (5.10) is a wonderful solution to the problem. For example, it is very easy to have a computer do it, unlike a series solution. A plot is given in Figure 5.4. 0 0.0 t 1 2 0.2 3 4 x 5 0.5 y(x,t) 0.8 0.240 0.148 0.099 0.049 0.000 -0.049 -0.099 -0.148 -0.197 -0.254 0.20 1.0 0.20 0.10 0.10 y y 0.00 0.00 -0.10 -0.10 -0.20 0.0 -0.20 0.2 0.5 0 x 1 2 0.8 3 t Figure 5.4: Plot of ๐ฆ(๐ฅ, ๐ก) = 4 1.0 5 ๐น(๐ฅ+๐ก)+๐น(๐ฅ−๐ก) 2 + cos(๐ฅ) − cos(1)−1 sin(1) sin(๐ฅ) − 1 cos(๐ก). 290 5.3.2 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Underground temperature oscillations Let ๐ข(๐ฅ, ๐ก) be the temperature at a certain location at depth ๐ฅ underground at time ๐ก. See Figure 5.5. The temperature ๐ข satisfies the heat equation ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , where ๐ is the diffusivity of the soil. We know the temperature at the surface ๐ข(0, ๐ก) from weather records. Let us assume for simplicity that depth ๐ฅ ๐ข(0, ๐ก) = ๐0 + ๐ด0 cos(๐๐ก), where ๐0 is the yearly mean temperature, and ๐ก = 0 Figure 5.5: Underground temperature. is midsummer (you can put negative sign above to make it midwinter if you wish). ๐ด0 gives the typical variation for the year. That is, the hottest temperature is ๐0 + ๐ด0 and the coldest is ๐0 − ๐ด0 . For simplicity, we assume that ๐0 = 0. The frequency ๐ is picked depending on the units of ๐ก, such that when ๐ก = 1 year, then ๐๐ก = 2๐. For example if ๐ก is in years, then ๐ = 2๐. It seems reasonable that the temperature at depth ๐ฅ also oscillates with the same frequency. This, in fact, is the steady periodic solution, a solution independent of the initial conditions. So we are looking for a solution of the form ๐ข(๐ฅ, ๐ก) = ๐(๐ฅ) cos(๐๐ก) + ๐(๐ฅ) sin(๐๐ก) for the problem ๐ข๐ก = ๐๐ข๐ฅ๐ฅ , ๐ข(0, ๐ก) = ๐ด0 cos(๐๐ก). (5.11) We employ the complex exponential here to make calculations simpler. Suppose we have a complex-valued function โ(๐ฅ, ๐ก) = ๐(๐ฅ) ๐ ๐๐๐ก . We look for an โ such that Re โ = ๐ข. To find an โ, whose real part satisfies (5.11), we look for an โ such that โ ๐ก = ๐ โ ๐ฅ๐ฅ , โ(0, ๐ก) = ๐ด0 ๐ ๐๐๐ก . (5.12) Exercise 5.3.3: Suppose โ satisfies (5.12). Use Euler’s formula for the complex exponential to check that ๐ข = Re โ satisfies (5.11). Substitute โ into (5.12). ๐๐๐ ๐ ๐๐๐ก = ๐๐ 00 ๐ ๐๐๐ก . Hence, ๐๐ 00 − ๐๐๐ = 0, or ๐ 00 − ๐ผ2 ๐ = 0, 291 5.3. STEADY PERIODIC SOLUTIONS √ p √ so you could simplify to ๐ผ = ±(1 + ๐) ๐ . Hence where ๐ผ = ± ๐๐ . Note that ± ๐ = ± 1+๐ ๐ 2๐ 2 the general solution is √๐ √๐ ๐(๐ฅ) = ๐ด๐ −(1+๐) 2๐ ๐ฅ + ๐ต๐ (1+๐) 2๐ ๐ฅ . q We assume that an ๐(๐ฅ) that solves the problem must be bounded as ๐ฅ → ∞ since ๐ข(๐ฅ, ๐ก) should be bounded (we are not worrying about the earth core!). If you use Euler’s formula to expand the complex exponentials, note that the second term is unbounded (if ๐ต ≠ 0), while the first term is always bounded. Hence ๐ต = 0. √๐ (1+๐) 2๐ ๐ฅ Exercise is unbounded as ๐ฅ → ∞, while √ 5.3.4: Use Euler’s formula to show that ๐ ๐ −(1+๐) ๐ 2๐ ๐ฅ is bounded as ๐ฅ → ∞. Furthermore, ๐(0) = ๐ด0 since โ(0, ๐ก) = ๐ด0 ๐ ๐๐๐ก . Thus ๐ด = ๐ด0 . This means that √๐ √๐ √๐ √๐ โ(๐ฅ, ๐ก) = ๐ด0 ๐ −(1+๐) 2๐ ๐ฅ ๐ ๐๐๐ก = ๐ด0 ๐ −(1+๐) 2๐ ๐ฅ+๐๐๐ก = ๐ด0 ๐ − 2๐ ๐ฅ ๐ ๐(๐๐ก− 2๐ ๐ฅ) . We need to get the real part of โ, so we apply Euler’s formula to get โ(๐ฅ, ๐ก) = ๐ด0 ๐ √๐ − 2๐ ๐ฅ cos ๐๐ก − r Then finally ๐ข(๐ฅ, ๐ก) = Re โ(๐ฅ, ๐ก) = ๐ด0 ๐ ๐ ๐ฅ + ๐ sin ๐๐ก − 2๐ √๐ − 2๐ ๐ฅ cos ๐๐ก − r r ๐ ๐ฅ 2๐ . ๐ ๐ฅ . 2๐ Yay! the phase is different at different depths. At depth ๐ฅ the phase is delayed by p Notice ๐ ๐ฅ 2๐ . For example in cgs units (centimeters-grams-seconds) we have ๐ = 0.005 (typical 2๐ value for soil), ๐ = seconds2๐in a year = 31,557,341 ≈ 1.99 × 10−7 . Then if we compute where the ๐ phase shift ๐ฅ 2๐ = ๐ we find the depth in centimeters where the seasons are reversed. That is, we get the depth at which summer is the coldest and winter is the warmest. We get approximately 700 centimeters, which is approximately 23 feet below ground. Be careful not to jump to conclusions. The temperature swings decay rapidly as you √ p ๐ dig deeper. The amplitude of the temperature swings is ๐ด0 ๐ − 2๐ ๐ฅ . This function decays very quickly as ๐ฅ (the depth) grows. Let us again take typical parameters as above. We also assume that our surface temperature swing is ±15โฆ Celsius, that is, ๐ด0 = 15. Then the maximum temperature variation at 700 centimeters is only ±0.66โฆ Celsius. You need not dig very deep to get an effective “refrigerator,” with nearly constant temperature. That is why wines are kept in a cellar; you need consistent temperature. The temperature differential could also be used for energy. A home could be heated or cooled by taking advantage of the fact above. Even without the earth core you could heat a home in the winter and cool it in the summer. The earth core makes the temperature higher the deeper you dig, although you need to dig somewhat deep to feel a difference. We did not take that into account above. 292 5.3.3 CHAPTER 5. MORE ON EIGENVALUE PROBLEMS Exercises Exercise 5.3.5: Suppose that the forcing function for the vibrating string is ๐น0 sin(๐๐ก). Derive the particular solution ๐ฆ ๐ . Exercise 5.3.6: Take the forced vibrating string. Suppose that ๐ฟ = 1, ๐ = 1. Suppose that the forcing function is the square wave that is 1 on the interval 0 < ๐ฅ < 1 and −1 on the interval −1 < ๐ฅ < 0. Find the particular solution. Hint: You may want to use result of Exercise 5.3.5. Exercise 5.3.7: The units are cgs (centimeters-grams-seconds). For ๐ = 0.005, ๐ = 1.991 × 10−7 , ๐ด0 = 20. Find the depth at which the temperature variation is half (±10 degrees) of what it is on the surface. Exercise 5.3.8: Derive the solution for underground temperature oscillation without assuming that ๐0 = 0. Exercise 5.3.101: Take the forced vibrating string. Suppose that ๐ฟ = 1, ๐ = 1. Suppose that the forcing function is a sawtooth, that is |๐ฅ| − 21 on −1 < ๐ฅ < 1 extended periodically. Find the particular solution. Exercise 5.3.102: The units are cgs (centimeters-grams-seconds). For ๐ = 0.01, ๐ = 1.991 × 10−7 , ๐ด0 = 25. Find the depth at which the summer is again the hottest point. Chapter 6 The Laplace transform 6.1 The Laplace transform Note: 1.5–2 lectures, §10.1 in [EP], §6.1 and parts of §6.2 in [BD] 6.1.1 The transform In this chapter we will discuss the Laplace transform† . The Laplace transform is a very efficient method to solve certain ODE or PDE problems. The transform takes a differential equation and turns it into an algebraic equation. If the algebraic equation can be solved, applying the inverse transform gives us our desired solution. The Laplace transform also has applications in the analysis of electrical circuits, NMR spectroscopy, signal processing, and elsewhere. Finally, understanding the Laplace transform will also help with understanding the related Fourier transform, which, however, requires more understanding of complex numbers. We will not cover the Fourier transform. The Laplace transform also gives a lot of insight into the nature of the equations we are dealing with. It can be seen as converting between the time and the frequency domain. For example, take the standard equation ๐๐ฅ 00(๐ก) + ๐๐ฅ 0(๐ก) + ๐๐ฅ(๐ก) = ๐ (๐ก). We can think of ๐ก as time and ๐ (๐ก) as incoming signal. The Laplace transform will convert the equation from a differential equation in time to an algebraic (no derivatives) equation, where the new independent variable ๐ is the frequency. We can think of the Laplace transform as a black box. It eats functions and spits out functions in a new variable. We write โ ๐ (๐ก) = ๐น(๐ ) for the Laplace transform of ๐ (๐ก). It is common to write lower case letters for functions in the time domain and upper case letters for functions in the frequency domain. We use the same letter to denote that one † Just like the Laplace equation and the Laplacian, the Laplace transform is also named after Pierre-Simon, marquis de Laplace (1749–1827). 294 CHAPTER 6. THE LAPLACE TRANSFORM function is the Laplace transform of the other. For example ๐น(๐ ) is the Laplace transform of ๐ (๐ก). Let us define the transform. def โ ๐ (๐ก) = ๐น(๐ ) = ∫ ∞ ๐ −๐ ๐ก ๐ (๐ก) ๐๐ก. 0 We note that we are only considering ๐ก ≥ 0 in the transform. Of course, if we think of ๐ก as time there is no problem, we are generally interested in finding out what will happen in the future (Laplace transform is one place where it is safe to ignore the past). Let us compute some simple transforms. Example 6.1.1: Suppose ๐ (๐ก) = 1, then ∫ โ{1} = ∞ ๐ −๐ ๐ก 0 ๐ −๐ ๐ก ๐๐ก = −๐ ∞ ๐ −๐ ๐ก = lim โ→∞ −๐ ๐ก=0 โ = lim โ→∞ ๐ก=0 ๐ −๐ โ 1 1 − = . −๐ −๐ ๐ The limit (the improper integral) only exists if ๐ > 0. So โ{1} is only defined for ๐ > 0. Example 6.1.2: Suppose ๐ (๐ก) = ๐ −๐๐ก , then โ ๐ −๐๐ก ∫ = ∞ ๐ −๐ ๐ก −๐๐ก ๐ ∞ ∫ ๐๐ก = 0 ๐ −(๐ +๐)๐ก 0 ๐ −(๐ +๐)๐ก ๐๐ก = −(๐ + ๐) ∞ = ๐ก=0 1 . ๐ +๐ The limit only exists if ๐ + ๐ > 0. So โ ๐ −๐๐ก is only defined for ๐ + ๐ > 0. Example 6.1.3: Suppose ๐ (๐ก) = ๐ก, then using integration by parts ∫ ∞ โ{๐ก} = ๐ −๐ ๐ก ๐ก ๐๐ก 0 ∞ −๐ก๐ −๐ ๐ก = ๐ =0+ 1 ๐ 1 + ๐ ๐ก=0 ∫ ∞ ๐ −๐ ๐ก ๐๐ก 0 ∞ ๐ −๐ ๐ก −๐ ๐ก=0 1 = 2. ๐ Again, the limit only exists if ๐ > 0. Example 6.1.4: A common function is the unit step function, which is sometimes called the Heaviside function∗ . This function is generally given as ( ๐ข(๐ก) = ∗ The 0 if ๐ก < 0, 1 if ๐ก ≥ 0. function is named after the English mathematician, engineer, and physicist Oliver Heaviside (1850–1925). Only by coincidence is the function “heavy” on “one side.” 295 6.1. THE LAPLACE TRANSFORM Let us find the Laplace transform of ๐ข(๐ก − ๐), where ๐ ≥ 0 is some constant. That is, the function that is 0 for ๐ก < ๐ and 1 for ๐ก ≥ ๐. โ ๐ข(๐ก − ๐) = ∞ ∫ ๐ −๐ ๐ก ๐ข(๐ก − ๐) ๐๐ก = ∞ ∫ ๐ −๐ ๐ก ๐ 0 ๐ −๐ ๐ก ๐๐ก = −๐ ∞ = ๐ก=๐ ๐ −๐๐ , ๐ where of course ๐ > 0 (and ๐ ≥ 0 as we said before). By applying similar procedures we can compute the transforms of many elementary functions. Many basic transforms are listed in Table 6.1. ๐ (๐ก) โ ๐ (๐ก) ๐ (๐ก) โ ๐ (๐ก) ๐ถ ๐ถ ๐ 1 ๐ 2 2 ๐ 3 6 ๐ 4 ๐! ๐ ๐+1 1 ๐ +๐ sin(๐๐ก) ๐ ๐ 2 +๐ 2 ๐ ๐ 2 +๐ 2 ๐ ๐ 2 −๐ 2 ๐ ๐ 2 −๐ 2 ๐ −๐๐ ๐ ๐ก ๐ก2 ๐ก3 ๐ก๐ ๐ −๐๐ก cos(๐๐ก) sinh(๐๐ก) cosh(๐๐ก) ๐ข(๐ก − ๐) Table 6.1: Some Laplace transforms (๐ถ, ๐, and ๐ are constants). Exercise 6.1.1: Verify Table 6.1. Since the transform is defined by an integral. We can use the linearity properties of the integral. For example, suppose ๐ถ is a constant, then โ ๐ถ ๐ (๐ก) = ∫ ∞ ๐ −๐ ๐ก ๐ถ ๐ (๐ก) ๐๐ก = ๐ถ 0 ∞ ∫ ๐ −๐ ๐ก ๐ (๐ก) ๐๐ก = ๐ถโ ๐ (๐ก) . 0 So we can “pull out” a constant out of the transform. Similarly we have linearity. Since linearity is very important we state it as a theorem. Theorem 6.1.1 (Linearity of the Laplace transform). Suppose that ๐ด, ๐ต, and ๐ถ are constants, then โ ๐ด ๐ (๐ก) + ๐ต๐(๐ก) = ๐ดโ ๐ (๐ก) + ๐ตโ ๐(๐ก) , and in particular โ ๐ถ ๐ (๐ก) = ๐ถโ ๐ (๐ก) . Exercise 6.1.2: Verify the theorem. That is, show that โ ๐ด ๐ (๐ก)+๐ต๐(๐ก) = ๐ดโ ๐ (๐ก) +๐ตโ ๐(๐ก) . 296 CHAPTER 6. THE LAPLACE TRANSFORM These rules together with Table 6.1 on the preceding page make it easy to find the Laplace transform of a whole lot of functions already. But be careful. It is a common mistake to think that the Laplace transform of a product is the product of the transforms. In general โ ๐ (๐ก)๐(๐ก) ≠ โ ๐ (๐ก) โ ๐(๐ก) . It must also be noted that not all functions have a Laplace transform. For example, the function 1๐ก does not have a Laplace transform as the integral diverges for all ๐ . Similarly, 2 tan ๐ก or ๐ ๐ก do not have Laplace transforms. 6.1.2 Existence and uniqueness When does the Laplace transform exist? A function ๐ (๐ก) is of exponential order as ๐ก goes to infinity if | ๐ (๐ก)| ≤ ๐๐ ๐๐ก , for some constants ๐ and ๐, for sufficiently large ๐ก (say for all ๐ก > ๐ก0 for some ๐ก0 ). The simplest way to check this condition is to try and compute lim ๐ก→∞ ๐ (๐ก) . ๐ ๐๐ก If the limit exists and is finite (usually zero), then ๐ (๐ก) is of exponential order. Exercise 6.1.3: Use L’Hopital’s rule from calculus to show that a polynomial is of exponential order. Hint: Note that a sum of two exponential order functions is also of exponential order. Then show that ๐ก ๐ is of exponential order for any ๐. For an exponential order function we have existence and uniqueness of the Laplace transform. Theorem 6.1.2 (Existence). Let ๐ (๐ก) be continuous and of exponential order for a certain constant ๐. Then ๐น(๐ ) = โ ๐ (๐ก) is defined for all ๐ > ๐. The existence is not difficult to see. Let ๐ (๐ก) be of exponential order, that is | ๐ (๐ก)| ≤ ๐๐ ๐๐ก for all ๐ก > 0 (for simplicity ๐ก0 = 0). Let ๐ > ๐, or in other words (๐ − ๐) > 0. By the comparison theorem from calculus, the improper integral defining โ ๐ (๐ก) exists if the following integral exists ∫ 0 ∞ ๐ −๐ ๐ก ๐๐ก (๐๐ ) ๐๐ก = ๐ ∫ ∞ ๐ −(๐ −๐)๐ก 0 ๐ −(๐ −๐)๐ก ๐๐ก = ๐ −(๐ − ๐) ∞ = ๐ก=0 ๐ . ๐ −๐ The transform also exists for some other functions that are not of exponential order, but that will not be relevant to us. Before dealing with uniqueness, let us note that for exponential order functions we obtain that their Laplace transform decays at infinity: lim ๐น(๐ ) = 0. ๐ →∞ 297 6.1. THE LAPLACE TRANSFORM Theorem 6.1.3 (Uniqueness). Let ๐ (๐ก) and ๐(๐ก) be continuous and of exponential order. Suppose that there exists a constant ๐ถ, such that ๐น(๐ ) = ๐บ(๐ ) for all ๐ > ๐ถ. Then ๐ (๐ก) = ๐(๐ก) for all ๐ก ≥ 0. Both theorems hold for piecewise continuous functions as well. Recall that piecewise continuous means that the function is continuous except perhaps at a discrete set of points, where it has jump discontinuities like the Heaviside function. Uniqueness, however, does not “see” values at the discontinuities. So we can only conclude that ๐ (๐ก) = ๐(๐ก) outside of discontinuities. For example, the unit step function is sometimes defined using ๐ข(0) = 1/2. This new step function, however, has the exact same Laplace transform as the one we defined earlier where ๐ข(0) = 1. 6.1.3 The inverse transform As we said, the Laplace transform will allow us to convert a differential equation into an algebraic equation. Once we solve the algebraic equation in the frequency domain we will want to get back to the time domain, as that is what we are interested in. Given a function ๐น(๐ ), we wish to find a function ๐ (๐ก) such that โ ๐ (๐ก) = ๐น(๐ ). Theorem 6.1.3 says that the solution ๐ (๐ก) is unique. So we can without fear make the following definition. Suppose ๐น(๐ ) = โ ๐ (๐ก) for some function ๐ (๐ก). Define the inverse Laplace transform as def โ −1 ๐น(๐ ) = ๐ (๐ก). There is an integral formula for the inverse, but it is not as simple as the transform itself—it requires complex numbers and path integrals. For us it will suffice to compute the inverse using Table 6.1 on page 295. 1 Example 6.1.5: Take ๐น(๐ ) = ๐ +1 . Find the inverse Laplace transform. We look at the table to find 1 −1 โ = ๐ −๐ก . ๐ +1 As the Laplace transform is linear, the inverse Laplace transform is also linear. That is, โ −1 ๐ด๐น(๐ ) + ๐ต๐บ(๐ ) = ๐ดโ −1 ๐น(๐ ) + ๐ตโ −1 ๐บ(๐ ) . Of course, we also have โ −1 ๐ด๐น(๐ ) = ๐ดโ −1 ๐น(๐ ) . Let us demonstrate how linearity can be used. Example 6.1.6: Take ๐น(๐ ) = ๐ ๐ +๐ +1 3 +๐ . Find the inverse Laplace transform. First we use the method of partial fractions to write ๐น in a form where we can use Table 6.1 on page 295. We factor the denominator as ๐ (๐ 2 + 1) and write 2 ๐ 2 + ๐ + 1 ๐ด ๐ต๐ + ๐ถ = + 2 . ๐ ๐ 3 + ๐ ๐ +1 Putting the right-hand side over a common denominator and equating the numerators we get ๐ด(๐ 2 + 1) + ๐ (๐ต๐ + ๐ถ) = ๐ 2 + ๐ + 1. Expanding and equating coefficients we obtain 298 CHAPTER 6. THE LAPLACE TRANSFORM ๐ด + ๐ต = 1, ๐ถ = 1, ๐ด = 1, and thus ๐ต = 0. In other words, ๐น(๐ ) = ๐ 2 + ๐ + 1 1 1 = + 2 . 3 ๐ ๐ +1 ๐ +๐ By linearity of the inverse Laplace transform we get โ −1 1 ๐ 2 + ๐ + 1 −1 −1 1 + โ = โ = 1 + sin ๐ก. ๐ ๐ 3 + ๐ ๐ 2 + 1 Another useful property is the so-called shifting property or the first shifting property โ ๐ −๐๐ก ๐ (๐ก) = ๐น(๐ + ๐), where ๐น(๐ ) is the Laplace transform of ๐ (๐ก). Exercise 6.1.4: Derive the first shifting property from the definition of the Laplace transform. The shifting property can be used, for example, when the denominator is a more complicated quadratic that may come up in the method of partial fractions. We complete the square and write such quadratics as (๐ + ๐)2 + ๐ and then use the shifting property. Example 6.1.7: Find โ −1 1 ๐ 2 +4๐ +8 . First we complete the square to make the denominator (๐ + 2)2 + 4. Next we find โ −1 1 1 = sin(2๐ก). 2 2 ๐ +4 Putting it all together with the shifting property, we find โ −1 1 1 1 = โ −1 = ๐ −2๐ก sin(2๐ก). 2 2 2 ๐ + 4๐ + 8 (๐ + 2) + 4 In general, we want to be able to apply the Laplace transform to rational functions, that is functions of the form ๐น(๐ ) ๐บ(๐ ) where ๐น(๐ ) and ๐บ(๐ ) are polynomials. Since normally, for the functions that we are considering, the Laplace transform goes to zero as ๐ → ∞, it is not hard to see that the degree of ๐น(๐ ) must be smaller than that of ๐บ(๐ ). Such rational functions are called proper rational functions and we can always apply the method of partial fractions. Of course this means we need to be able to factor the denominator into linear and quadratic terms, which involves finding the roots of the denominator. 299 6.1. THE LAPLACE TRANSFORM 6.1.4 Exercises Exercise 6.1.5: Find the Laplace transform of 3 + ๐ก 5 + sin(๐๐ก). Exercise 6.1.6: Find the Laplace transform of ๐ + ๐๐ก + ๐๐ก 2 for some constants ๐, ๐, and ๐. Exercise 6.1.7: Find the Laplace transform of ๐ด cos(๐๐ก) + ๐ต sin(๐๐ก). Exercise 6.1.8: Find the Laplace transform of cos2 (๐๐ก). Exercise 6.1.9: Find the inverse Laplace transform of 4 . ๐ 2 −9 Exercise 6.1.10: Find the inverse Laplace transform of 2๐ . ๐ 2 −1 Exercise 6.1.11: Find the inverse Laplace transform of 1 . (๐ −1)2 (๐ +1) ( Exercise 6.1.12: Find the Laplace transform of ๐ (๐ก) = Exercise 6.1.13: Find the inverse Laplace transform of ๐ก if ๐ก ≥ 1, 0 if ๐ก < 1. ๐ . (๐ 2 +๐ +2)(๐ +4) Exercise 6.1.14: Find the Laplace transform of sin ๐(๐ก − ๐) . Exercise 6.1.15: Find the Laplace transform of ๐ก sin(๐๐ก). Hint: Several integrations by parts. Exercise 6.1.101: Find the Laplace transform of 4(๐ก + 1)2 . Exercise 6.1.102: Find the inverse Laplace transform of 8 . ๐ 3 (๐ +2) Exercise 6.1.103: Find the Laplace transform of ๐ก๐ −๐ก . Hint: Integrate by parts. Exercise 6.1.104: Find the Laplace transform of sin(๐ก)๐ −๐ก . Hint: Integrate by parts. 300 CHAPTER 6. THE LAPLACE TRANSFORM 6.2 Transforms of derivatives and ODEs Note: 2 lectures, §7.2–7.3 in [EP], §6.2 and §6.3 in [BD] 6.2.1 Transforms of derivatives Let us see how the Laplace transform is used for differential equations. First let us try to find the Laplace transform of a function that is a derivative. Suppose ๐(๐ก) is a differentiable function of exponential order, that is, | ๐(๐ก)| ≤ ๐๐ ๐๐ก for some ๐ and ๐. So โ ๐(๐ก) exists, and what is more, lim๐ก→∞ ๐ −๐ ๐ก ๐(๐ก) = 0 when ๐ > ๐. Then 0 โ ๐ (๐ก) = ∫ ∞ ๐ h −๐ ๐ก 0 ๐ (๐ก) ๐๐ก = ๐ −๐ ๐ก ๐(๐ก) i∞ ∫ − ๐ก=0 0 ∞ (−๐ ) ๐ −๐ ๐ก ๐(๐ก) ๐๐ก = −๐(0) + ๐ โ ๐(๐ก) . 0 We repeat this procedure for higher derivatives. The results are listed in Table 6.2. The procedure also works for piecewise smooth functions, that is functions that are piecewise continuous with a piecewise continuous derivative. ๐ (๐ก) โ ๐ (๐ก) = ๐น(๐ ) ๐ 0(๐ก) ๐ ๐บ(๐ ) − ๐(0) ๐ 00(๐ก) ๐ 2 ๐บ(๐ ) − ๐ ๐(0) − ๐ 0(0) ๐ 000(๐ก) ๐ 3 ๐บ(๐ ) − ๐ 2 ๐(0) − ๐ ๐ 0(0) − ๐ 00(0) Table 6.2: Laplace transforms of derivatives (๐บ(๐ ) = โ ๐(๐ก) as usual). Exercise 6.2.1: Verify Table 6.2. 6.2.2 Solving ODEs with the Laplace transform Notice that the Laplace transform turns differentiation into multiplication by ๐ . Let us see how to apply this fact to differential equations. Example 6.2.1: Take the equation ๐ฅ 00(๐ก) + ๐ฅ(๐ก) = cos(2๐ก), ๐ฅ 0(0) = 1. ๐ฅ(0) = 0, We will take the Laplace transform of both sides. By ๐(๐ ) we will, as usual, denote the Laplace transform of ๐ฅ(๐ก). โ ๐ฅ 00(๐ก) + ๐ฅ(๐ก) = โ cos(2๐ก) , ๐ ๐ 2 ๐(๐ ) − ๐ ๐ฅ(0) − ๐ฅ 0(0) + ๐(๐ ) = 2 . ๐ +4 6.2. TRANSFORMS OF DERIVATIVES AND ODES 301 We plug in the initial conditions now—this makes the computations more streamlined—to obtain ๐ ๐ 2 ๐(๐ ) − 1 + ๐(๐ ) = 2 . ๐ +4 We solve for ๐(๐ ), 1 ๐ + 2 . ๐(๐ ) = 2 2 (๐ + 1)(๐ + 4) ๐ + 1 We use partial fractions (exercise) to write ๐(๐ ) = 1 ๐ 1 ๐ 1 − + . 3 ๐ 2 + 1 3 ๐ 2 + 4 ๐ 2 + 1 Now take the inverse Laplace transform to obtain ๐ฅ(๐ก) = 1 1 cos(๐ก) − cos(2๐ก) + sin(๐ก). 3 3 The procedure for linear constant coefficient equations is as follows. We take an ordinary differential equation in the time variable ๐ก. We apply the Laplace transform to transform the equation into an algebraic (non differential) equation in the frequency domain. All the ๐ฅ(๐ก), ๐ฅ 0(๐ก), ๐ฅ 00(๐ก), and so on, will be converted to ๐(๐ ), ๐ ๐(๐ ) − ๐ฅ(0), ๐ 2 ๐(๐ ) − ๐ ๐ฅ(0) − ๐ฅ 0(0), and so on. We solve the equation for ๐(๐ ). Then taking the inverse transform, if possible, we find ๐ฅ(๐ก). It should be noted that since not every function has a Laplace transform, not every equation can be solved in this manner. Also if the equation is not a linear constant coefficient ODE, then by applying the Laplace transform we may not obtain an algebraic equation. 6.2.3 Using the Heaviside function Before we move on to more general equations than those we could solve before, we want to consider the Heaviside function. See Figure 6.1 on the next page for the graph. ( ๐ข(๐ก) = 0 if ๐ก < 0, 1 if ๐ก ≥ 0. This function is useful for putting together functions, or cutting functions off. Most commonly it is used as ๐ข(๐ก − ๐) for some constant ๐. This just shifts the graph to the right by ๐. That is, it is a function that is 0 when ๐ก < ๐ and 1 when ๐ก ≥ ๐. Suppose for example that ๐ (๐ก) is a “signal” and you started receiving the signal sin ๐ก at time ๐ก = ๐. The function ๐ (๐ก) should then be defined as ( ๐ (๐ก) = 0 if ๐ก < ๐, sin ๐ก if ๐ก ≥ ๐. Using the Heaviside function, ๐ (๐ก) can be written as ๐ (๐ก) = ๐ข(๐ก − ๐) sin ๐ก. 302 CHAPTER 6. THE LAPLACE TRANSFORM -1.0 -0.5 0.0 0.5 1.0 1.00 1.00 0.75 0.75 0.50 0.50 0.25 0.25 0.00 0.00 -1.0 -0.5 0.0 0.5 1.0 Figure 6.1: Plot of the Heaviside (unit step) function ๐ข(๐ก). Similarly the step function that is 1 on the interval [1, 2) and zero everywhere else can be written as ๐ข(๐ก − 1) − ๐ข(๐ก − 2). The Heaviside function is useful to define functions defined piecewise. If you want to define ๐ (๐ก) such that ๐ (๐ก) = ๐ก when ๐ก is in [0, 1], ๐ (๐ก) = −๐ก + 2 when ๐ก is in [1, 2], and ๐ (๐ก) = 0 otherwise, then you can use the expression ๐ (๐ก) = ๐ก ๐ข(๐ก) − ๐ข(๐ก − 1) + (−๐ก + 2) ๐ข(๐ก − 1) − ๐ข(๐ก − 2) . Hence it is useful to know how the Heaviside function interacts with the Laplace transform. We have already seen that โ ๐ข(๐ก − ๐) = ๐ −๐๐ . ๐ This can be generalized into a shifting property or second shifting property. โ ๐ (๐ก − ๐) ๐ข(๐ก − ๐) = ๐ −๐๐ โ ๐ (๐ก) . (6.1) Example 6.2.2: The forcing function in our setup need not be periodic. Consider the mass-spring system ๐ฅ 00(๐ก) + ๐ฅ(๐ก) = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, where ๐ (๐ก) = 1 if 1 ≤ ๐ก < 5 and zero otherwise. Imagine a rocket attached to the mass is fired for 4 seconds starting at ๐ก = 1. Or perhaps imagine an RLC circuit, where the voltage is raised at a constant rate for 4 seconds starting at ๐ก = 1, and then held steady again starting at ๐ก = 5. 303 6.2. TRANSFORMS OF DERIVATIVES AND ODES We can write ๐ (๐ก) = ๐ข(๐ก − 1) − ๐ข(๐ก − 5). We transform the equation and we plug in the initial conditions as before to obtain ๐ 2 ๐(๐ ) + ๐(๐ ) = ๐ −๐ ๐ −5๐ − . ๐ ๐ We solve for ๐(๐ ) to obtain ๐(๐ ) = ๐ −5๐ ๐ −๐ − . ๐ (๐ 2 + 1) ๐ (๐ 2 + 1) We leave it as an exercise to the reader to show that โ In other words โ{1 − cos ๐ก} = โ −1 −1 1 = 1 − cos ๐ก. ๐ (๐ 2 + 1) 1 . ๐ (๐ 2 +1) So using (6.1) we find ๐ −๐ = โ −1 {๐ −๐ โ{1 − cos ๐ก}} = 1 − cos(๐ก − 1) ๐ข(๐ก − 1). 2 ๐ (๐ + 1) Similarly โ −1 −5๐ ๐ −5๐ −1 = โ ๐ โ{1 − cos ๐ก} = 1 − cos(๐ก − 5) ๐ข(๐ก − 5). ๐ (๐ 2 + 1) Hence, the solution is ๐ฅ(๐ก) = 1 − cos(๐ก − 1) ๐ข(๐ก − 1) − 1 − cos(๐ก − 5) ๐ข(๐ก − 5). The plot of this solution is given in Figure 6.2 on the following page. 6.2.4 Transfer functions The Laplace transform leads to the following useful concept for studying the steady state behavior of a linear system. Consider an equation of the form ๐ฟ๐ฅ = ๐ (๐ก), where ๐ฟ is a linear constant coefficient differential operator. Then ๐ (๐ก) is usually thought of as input of the system and ๐ฅ(๐ก) is thought of as the output of the system. For example, for a mass-spring system the input is the forcing function and the output is the behavior of the mass. We would like to have a convenient way to study the behavior of the system for different inputs. Let us suppose that all the initial conditions are zero and take the Laplace transform of the equation, we obtain the equation ๐ด(๐ )๐(๐ ) = ๐น(๐ ). 304 CHAPTER 6. THE LAPLACE TRANSFORM 0 5 10 15 20 2 2 1 1 0 0 -1 -1 -2 -2 0 5 10 15 20 Figure 6.2: Plot of ๐ฅ(๐ก). Solving for the ratio ๐(๐ )/๐น(๐ ) we obtain the so-called transfer function ๐ป(๐ ) = 1/๐ด(๐ ), that is, ๐ป(๐ ) = ๐(๐ ) . ๐น(๐ ) In other words, ๐(๐ ) = ๐ป(๐ )๐น(๐ ). We obtain an algebraic dependence of the output of the system based on the input. We can now easily study the steady state behavior of the system given different inputs by simply multiplying by the transfer function. Example 6.2.3: Given ๐ฅ 00 + ๐02 ๐ฅ = ๐ (๐ก), let us find the transfer function (assuming the initial conditions are zero). First, we take the Laplace transform of the equation. ๐ 2 ๐(๐ ) + ๐02 ๐(๐ ) = ๐น(๐ ). Now we solve for the transfer function ๐(๐ )/๐น(๐ ). ๐ป(๐ ) = ๐(๐ ) 1 = . ๐น(๐ ) ๐ 2 + ๐02 Let us see how to use the transfer function. Suppose we have the constant input ๐ (๐ก) = 1. Hence ๐น(๐ ) = 1/๐ , and 1 1 ๐(๐ ) = ๐ป(๐ )๐น(๐ ) = . 2 ๐ 2 + ๐ ๐ 0 Taking the inverse Laplace transform of ๐(๐ ) we obtain ๐ฅ(๐ก) = 1 − cos(๐0 ๐ก) ๐02 . 305 6.2. TRANSFORMS OF DERIVATIVES AND ODES 6.2.5 Transforms of integrals A feature of Laplace transforms is that it is also able to easily deal with integral equations. That is, equations in which integrals rather than derivatives of functions appear. The basic property, which can be proved by applying the definition and doing integration by parts, is ∫ ๐ก 1 ๐น(๐ ). ๐ ๐ (๐) ๐๐ = โ 0 It is sometimes useful (e.g. for computing the inverse transform) to write this as ∫ ๐ก ๐ (๐) ๐๐ = โ −1 0 Example 6.2.4: To compute โ −1 rule. โ −1 1 1 = ๐ ๐ 2 + 1 ∫ n 1 ๐ (๐ 2 +1) ๐ก โ −1 0 o 1 ๐น(๐ ) . ๐ we could proceed by applying this integration 1 2 ๐ +1 ๐๐ = ∫ ๐ก sin ๐ ๐๐ = 1 − cos ๐ก. 0 Example 6.2.5: An equation containing an integral of the unknown function is called an integral equation. Consider ๐ก = 2 ∫ ๐ก ๐ ๐ ๐ฅ(๐) ๐๐, 0 where we wish to solve for ๐ฅ(๐ก). We apply the Laplace transform and the shifting property to get 2 1 1 = โ ๐ ๐ก ๐ฅ(๐ก) = ๐(๐ − 1), 3 ๐ ๐ ๐ where ๐(๐ ) = โ ๐ฅ(๐ก) . Thus ๐(๐ − 1) = 2 ๐ 2 ๐(๐ ) = or 2 (๐ + 1)2 . We use the shifting property again ๐ฅ(๐ก) = 2๐ −๐ก ๐ก. 6.2.6 Exercises Exercise 6.2.2: Using the Heaviside function write down the piecewise function that is 0 for ๐ก < 0, ๐ก 2 for ๐ก in [0, 1] and ๐ก for ๐ก > 1. Exercise 6.2.3: Using the Laplace transform solve ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, ๐ฅ(0) = ๐, ๐ฅ 0(0) = ๐, where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 − 4๐๐ > 0 (system is overdamped). 306 CHAPTER 6. THE LAPLACE TRANSFORM Exercise 6.2.4: Using the Laplace transform solve ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, ๐ฅ(0) = ๐, ๐ฅ 0(0) = ๐, where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 − 4๐๐ < 0 (system is underdamped). Exercise 6.2.5: Using the Laplace transform solve ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = 0, ๐ฅ(0) = ๐, ๐ฅ 0(0) = ๐, where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 = 4๐๐ (system is critically damped). Exercise 6.2.6: Solve ๐ฅ 00 + ๐ฅ = ๐ข(๐ก − 1) for initial conditions ๐ฅ(0) = 0 and ๐ฅ 0(0) = 0. Exercise 6.2.7: Show the differentiation of the transform property. Suppose โ ๐ (๐ก) = ๐น(๐ ), then show โ −๐ก ๐ (๐ก) = ๐น0(๐ ). Hint: Differentiate under the integral sign. Exercise 6.2.8: Solve ๐ฅ 000 + ๐ฅ = ๐ก 3 ๐ข(๐ก − 1) for initial conditions ๐ฅ(0) = 1 and ๐ฅ 0(0) = 0, ๐ฅ 00(0) = 0. Exercise 6.2.9: Show the second shifting property: โ ๐ (๐ก − ๐) ๐ข(๐ก − ๐) = ๐ −๐๐ โ ๐ (๐ก) . Exercise 6.2.10: Let us think of the mass-spring system with a rocket from Example 6.2.2. We noticed that the solution kept oscillating after the rocket stopped running. The amplitude of the oscillation depends on the time that the rocket was fired (for 4 seconds in the example). a) Find a formula for the amplitude of the resulting oscillation in terms of the amount of time the rocket is fired. b) Is there a nonzero time (if so what is it?) for which the rocket fires and the resulting oscillation has amplitude 0 (the mass is not moving)? Exercise 6.2.11: Define ๏ฃฑ ๏ฃด (๐ก − 1)2 if 1 ≤ ๐ก < 2, ๏ฃด ๏ฃฒ ๏ฃด ๐ (๐ก) = 3 − ๐ก ๏ฃด ๏ฃด ๏ฃด0 ๏ฃณ if 2 ≤ ๐ก < 3, otherwise. a) Sketch the graph of ๐ (๐ก). b) Write down ๐ (๐ก) using the Heaviside function. c) Solve ๐ฅ 00 + ๐ฅ = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0 using Laplace transform. Exercise 6.2.12: Find the transfer function for ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐ (๐ก) (assuming the initial conditions are zero). 307 6.2. TRANSFORMS OF DERIVATIVES AND ODES Exercise 6.2.101: Using the Heaviside function ๐ข(๐ก), write down the function ๐ก < 1, ๏ฃฑ ๏ฃด 0 ๏ฃด ๏ฃฒ ๏ฃด if ๏ฃด ๏ฃด ๏ฃด1 ๏ฃณ if 2 ≤ ๐ก. ๐ (๐ก) = ๐ก − 1 if 1 ≤ ๐ก < 2, Exercise 6.2.102: Solve ๐ฅ 00 − ๐ฅ = (๐ก 2 − 1)๐ข(๐ก − 1) for initial conditions ๐ฅ(0) = 1, ๐ฅ 0(0) = 2 using the Laplace transform. Exercise 6.2.103: Find the transfer function for ๐ฅ 0 + ๐ฅ = ๐ (๐ก) (assuming the initial conditions are zero). 308 6.3 CHAPTER 6. THE LAPLACE TRANSFORM Convolution Note: 1 or 1.5 lectures, §7.2 in [EP], §6.6 in [BD] 6.3.1 The convolution The Laplace transformation of a product is not the product of the transforms. All hope is not lost however. We simply have to use a different type of a “product.” Take two functions ๐ (๐ก) and ๐(๐ก) defined for ๐ก ≥ 0, and define the convolution∗ of ๐ (๐ก) and ๐(๐ก) as def ( ๐ ∗ ๐)(๐ก) = ∫ ๐ก ๐ (๐)๐(๐ก − ๐) ๐๐. (6.2) 0 As you can see, the convolution of two functions of ๐ก is another function of ๐ก. Example 6.3.1: Take ๐ (๐ก) = ๐ ๐ก and ๐(๐ก) = ๐ก for ๐ก ≥ 0. Then ( ๐ ∗ ๐)(๐ก) = ๐ก ∫ ๐ ๐ (๐ก − ๐) ๐๐ = ๐ ๐ก − ๐ก − 1. 0 To solve the integral we did one integration by parts. Example 6.3.2: Take ๐ (๐ก) = sin(๐๐ก) and ๐(๐ก) = cos(๐๐ก) for ๐ก ≥ 0. Then ( ๐ ∗ ๐)(๐ก) = ∫ ๐ก sin(๐๐) cos ๐(๐ก − ๐) ๐๐. 0 Apply the identity cos(๐) sin(๐) = 1 sin(๐ + ๐) − sin(๐ − ๐) , 2 to get ( ๐ ∗ ๐)(๐ก) = ∫ 0 ๐ก 1 sin(๐๐ก) − sin(๐๐ก − 2๐๐) ๐๐ 2 1 1 = ๐ sin(๐๐ก) + cos(2๐๐ − ๐๐ก) 2 4๐ 1 = ๐ก sin(๐๐ก). 2 ๐ก ๐=0 The formula holds only for ๐ก ≥ 0. The functions ๐ , ๐, and ๐ ∗ ๐ are undefined for ๐ก < 0. ∗ For those that have seen convolution before, you may have seen it defined as ( ๐ ∫∞ ∗ ๐)(๐ก) = −∞ ๐ (๐)๐(๐ก −๐) ๐๐. This definition agrees with (6.2) if you define ๐ (๐ก) and ๐(๐ก) to be zero for ๐ก < 0. When discussing the Laplace transform the definition we gave is sufficient. Convolution does occur in many other applications, however, where you may have to use the more general definition with infinities. 309 6.3. CONVOLUTION Convolution has many properties that make it behave like a product. Let ๐ be a constant and ๐ , ๐, and โ be functions. Then ๐ ∗ ๐ = ๐∗ ๐, (๐ ๐ ) ∗ ๐ = ๐ ∗ (๐ ๐) = ๐( ๐ ∗ ๐), ( ๐ ∗ ๐) ∗ โ = ๐ ∗ (๐ ∗ โ). The most interesting property for us is the following theorem. Theorem 6.3.1. Let ๐ (๐ก) and ๐(๐ก) be of exponential order, then โ ( ๐ ∗ ๐)(๐ก) = โ ∫ ๐ก ๐ (๐)๐(๐ก − ๐) ๐๐ = โ ๐ (๐ก) โ ๐(๐ก) . 0 In other words, the Laplace transform of a convolution is the product of the Laplace transforms. The simplest way to use this result is in reverse. Example 6.3.3: Suppose we have the function of ๐ defined by 1 1 1 = . 2 ๐ + 1 ๐ 2 (๐ + 1)๐ We recognize the two entries of Table 6.2. That is, โ −1 1 = ๐ −๐ก ๐ +1 and Therefore, โ −1 1 1 = ๐ + 1 ๐ 2 ∫ โ −1 1 = ๐ก. ๐ 2 ๐ก ๐๐ −(๐ก−๐) ๐๐ = ๐ −๐ก + ๐ก − 1. 0 The calculation of the integral involved an integration by parts. 6.3.2 Solving ODEs The next example demonstrates the full power of the convolution and the Laplace transform. We can give the solution to the forced oscillation problem for any forcing function as a definite integral. Example 6.3.4: Find the solution to ๐ฅ 00 + ๐02 ๐ฅ = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, for an arbitrary function ๐ (๐ก). We first apply the Laplace transform to the equation. Denote the transform of ๐ฅ(๐ก) by ๐(๐ ) and the transform of ๐ (๐ก) by ๐น(๐ ) as usual. We get ๐ 2 ๐(๐ ) + ๐02 ๐(๐ ) = ๐น(๐ ), 310 CHAPTER 6. THE LAPLACE TRANSFORM or in other words ๐(๐ ) = ๐น(๐ ) We know ( โ −1 Therefore, ๐ฅ(๐ก) = ๐ก ∫ 0 + ๐ 2 + ๐02 ) 1 ๐ 2 1 ๐02 = . sin(๐0 ๐ก) . ๐0 sin ๐0 (๐ก − ๐) ๐ (๐) ๐๐, ๐0 or if we reverse the order ๐ฅ(๐ก) = ∫ 0 ๐ก sin(๐0 ๐) ๐ (๐ก − ๐) ๐๐. ๐0 Notice one more feature of this example. We can now see how Laplace transform handles resonance. Suppose that ๐ (๐ก) = cos(๐0 ๐ก). Then ๐ฅ(๐ก) = ∫ 0 ๐ก sin(๐0 ๐) 1 cos ๐0 (๐ก − ๐) ๐๐ = ๐0 ๐0 ∫ ๐ก sin(๐0 ๐) cos ๐0 (๐ก − ๐) ๐๐. 0 We have computed the convolution of sine and cosine in Example 6.3.2. Hence 1 ๐ฅ(๐ก) = ๐0 1 1 ๐ก sin(๐0 ๐ก) = ๐ก sin(๐0 ๐ก). 2 2๐0 Note the ๐ก in front of the sine. The solution, therefore, grows without bound as ๐ก gets large, meaning we get resonance. Similarly, we can solve any constant coefficient equation with an arbitrary forcing function ๐ (๐ก) as a definite integral using convolution. A definite integral, rather than a closed form solution, is usually enough for most practical purposes. It is not hard to numerically evaluate a definite integral. 6.3.3 Volterra integral equation A common integral equation is the Volterra integral equation∗ ๐ฅ(๐ก) = ๐ (๐ก) + ∫ ๐ก ๐(๐ก − ๐)๐ฅ(๐) ๐๐, 0 where ๐ (๐ก) and ๐(๐ก) are known functions and ๐ฅ(๐ก) is an unknown we wish to solve for. To find ๐ฅ(๐ก), we apply the Laplace transform to the equation to obtain ๐(๐ ) = ๐น(๐ ) + ๐บ(๐ )๐(๐ ), ∗ Named for the Italian mathematician Vito Volterra (1860–1940). 311 6.3. CONVOLUTION where ๐(๐ ), ๐น(๐ ), and ๐บ(๐ ) are the Laplace transforms of ๐ฅ(๐ก), ๐ (๐ก), and ๐(๐ก) respectively. We find ๐น(๐ ) ๐(๐ ) = . 1 − ๐บ(๐ ) To find ๐ฅ(๐ก) we now need to find the inverse Laplace transform of ๐(๐ ). Example 6.3.5: Solve ๐ฅ(๐ก) = ๐ −๐ก ๐ก ∫ sinh(๐ก − ๐)๐ฅ(๐) ๐๐. + 0 We apply Laplace transform to obtain ๐(๐ ) = or ๐(๐ ) = 1 ๐ +1 1− 1 ๐ 2 −1 1 1 + 2 ๐(๐ ), ๐ +1 ๐ −1 = ๐ −1 ๐ 1 = − . ๐ 2 − 2 ๐ 2 − 2 ๐ 2 − 2 It is not hard to apply Table 6.1 on page 295 to find ๐ฅ(๐ก) = cosh 6.3.4 √ √ 1 2 ๐ก − √ sinh 2 ๐ก . 2 Exercises Exercise 6.3.1: Let ๐ (๐ก) = ๐ก 2 for ๐ก ≥ 0, and ๐(๐ก) = ๐ข(๐ก − 1). Compute ๐ ∗ ๐. Exercise 6.3.2: Let ๐ (๐ก) = ๐ก for ๐ก ≥ 0, and ๐(๐ก) = sin ๐ก for ๐ก ≥ 0. Compute ๐ ∗ ๐. Exercise 6.3.3: Find the solution to ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, for an arbitrary function ๐ (๐ก), where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 − 4๐๐ > 0 (the system is overdamped). Write the solution as a definite integral. Exercise 6.3.4: Find the solution to ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, for an arbitrary function ๐ (๐ก), where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 − 4๐๐ < 0 (the system is underdamped). Write the solution as a definite integral. Exercise 6.3.5: Find the solution to ๐๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, for an arbitrary function ๐ (๐ก), where ๐ > 0, ๐ > 0, ๐ > 0, and ๐ 2 = 4๐๐ (the system is critically damped). Write the solution as a definite integral. 312 CHAPTER 6. THE LAPLACE TRANSFORM Exercise 6.3.6: Solve ๐ฅ(๐ก) = ๐ −๐ก ๐ก ∫ cos(๐ก − ๐)๐ฅ(๐) ๐๐. + 0 Exercise 6.3.7: Solve ๐ฅ(๐ก) = cos ๐ก + ∫ ๐ก cos(๐ก − ๐)๐ฅ(๐) ๐๐. 0 Exercise 6.3.8: Compute โ −1 n ๐ 2 (๐ 2 +4) o using convolution. 2 Exercise 6.3.9: Write down the solution to ๐ฅ 00 − 2๐ฅ = ๐ −๐ก , ๐ฅ(0) = 0, ๐ฅ 0(0) = 0 as a definite 2 integral. Hint: Do not try to compute the Laplace transform of ๐ −๐ก . Exercise 6.3.101: Let ๐ (๐ก) = cos ๐ก for ๐ก ≥ 0, and ๐(๐ก) = ๐ −๐ก . Compute ๐ ∗ ๐. Exercise 6.3.102: Compute โ −1 5 ๐ 4 +๐ 2 using convolution. Exercise 6.3.103: Solve ๐ฅ 00 + ๐ฅ = sin ๐ก, ๐ฅ(0) = 0, ๐ฅ 0(0) = 0 using convolution. Exercise 6.3.104: Solve ๐ฅ 000 + ๐ฅ 0 = ๐ (๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, ๐ฅ 00(0) = 0 using convolution. Write the result as a definite integral. 313 6.4. DIRAC DELTA AND IMPULSE RESPONSE 6.4 Dirac delta and impulse response Note: 1 or 1.5 lecture, §7.6 in [EP], §6.5 in [BD] 6.4.1 Rectangular pulse Often we study a physical system by putting in a short pulse and then seeing what the system does. The resulting behavior is often called impulse response, and understanding it tells us how the system responds to any input. Let us see what we mean by a pulse. The simplest kind of a pulse is a simple rectangular pulse defined by ๏ฃฑ ๏ฃด 0 ๏ฃด ๏ฃฒ ๏ฃด ๐(๐ก) = ๐ ๏ฃด ๏ฃด ๏ฃด0 ๏ฃณ ๐ก < ๐, if if ๐ ≤ ๐ก < ๐, if ๐ ≤ ๐ก. See Figure 6.3 for a graph. Notice that 0.0 ๐(๐ก) = ๐ ๐ข(๐ก − ๐) − ๐ข(๐ก − ๐) , where ๐ข(๐ก) is the unit step function. Let us take the Laplace transform of a square pulse, โ ๐(๐ก) = โ ๐ ๐ข(๐ก − ๐) − ๐ข(๐ก − ๐) =๐ ๐ −๐๐ − ๐ −๐๐ . ๐ 1.0 1.5 2.0 2.5 3.0 2.0 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 0.0 For simplicity, let ๐ = 0. It is also convenient to set ๐ = 1/๐ so that ∫ 0.5 2.0 0.5 1.0 1.5 2.0 2.5 3.0 Figure 6.3: Sample square pulse with ๐ = 0.5, ๐ = 1, and ๐ = 2. ∞ ๐(๐ก) ๐๐ก = 1. 0 That is, to have the pulse have “unit mass.” For such a pulse, ๐ข(๐ก) − ๐ข(๐ก − ๐) 1 − ๐ −๐๐ โ ๐(๐ก) = โ = . ๐ ๐๐ We want ๐ to be very small; we wish to have the pulse be very short and very tall. By letting ๐ go to zero we arrive at the concept of the Dirac delta function. 314 6.4.2 CHAPTER 6. THE LAPLACE TRANSFORM The delta function The Dirac delta function∗ is not exactly a function; it is sometimes called a generalized function. We avoid unnecessary details and simply say that it is an object that does not really make sense unless we integrate it. The motivation is that we would like a “function” ๐ฟ(๐ก) such that for any continuous function ๐ (๐ก) we have ∞ ∫ ๐ฟ(๐ก) ๐ (๐ก) ๐๐ก = ๐ (0). −∞ The formula should hold if we integrate over any interval that contains 0, not just (−∞, ∞). So ๐ฟ(๐ก) is a “function” with all its “mass” at the single point ๐ก = 0. In other words, for any interval [๐, ๐] ( ๐ ∫ ๐ฟ(๐ก) ๐๐ก = ๐ 1 if the interval [๐, ๐] contains 0, i.e. ๐ ≤ 0 ≤ ๐, 0 otherwise. Unfortunately there is no such function in the classical sense. You could informally think that ๐ฟ(๐ก) is zero for ๐ก ≠ 0 and somehow infinite at ๐ก = 0. A good way to think about ๐ฟ(๐ก) is as a limit of short pulses whose integral is 1. For example, suppose that we have a square pulse ๐(๐ก) as above with ๐ = 0, ๐ = 1/๐ , that is ๐(๐ก) = ๐ข(๐ก)−๐ข(๐ก−๐) . Compute ๐ ∫ ∞ ๐(๐ก) ๐ (๐ก) ๐๐ก = ∫ −∞ ∞ −∞ 1 ๐ข(๐ก) − ๐ข(๐ก − ๐) ๐ (๐ก) ๐๐ก = ๐ ๐ ∫ ๐ ๐ (๐ก) ๐๐ก. 0 If ๐ (๐ก) is continuous at ๐ก = 0, then for very small ๐, the function ๐ (๐ก) is approximately equal to ๐ (0) on the interval [0, ๐]. We approximate the integral 1 ๐ Hence, ∫ ∫ ∞ lim ๐→0 −∞ ๐ 1 ๐ (๐ก) ๐๐ก ≈ ๐ 0 ∫ ๐ ๐ (0) ๐๐ก = ๐ (0). 0 1 ๐(๐ก) ๐ (๐ก) ๐๐ก = lim ๐→0 ๐ ∫ ๐ ๐ (๐ก) ๐๐ก = ๐ (0). 0 Let us therefore accept ๐ฟ(๐ก) as an object that is possible to integrate. We often want to shift ๐ฟ to another point, for example ๐ฟ(๐ก − ๐). In that case, ∫ ∞ ๐ฟ(๐ก − ๐) ๐ (๐ก) ๐๐ก = ๐ (๐). −∞ Note that ๐ฟ(๐ − ๐ก) is the same object as ๐ฟ(๐ก − ๐). In other words, the convolution of ๐ฟ(๐ก) with ๐ (๐ก) is again ๐ (๐ก), ( ๐ ∗ ๐ฟ)(๐ก) = ∫ ๐ก ๐ฟ(๐ก − ๐ ) ๐ (๐ ) ๐๐ = ๐ (๐ก). 0 ∗ Named after the English physicist and mathematician Paul Adrien Maurice Dirac (1902–1984). 315 6.4. DIRAC DELTA AND IMPULSE RESPONSE As we can integrate ๐ฟ(๐ก), we compute its Laplace transform: โ ๐ฟ(๐ก − ๐) = ∞ ∫ ๐ −๐ ๐ก ๐ฟ(๐ก − ๐) ๐๐ก = ๐ −๐๐ . 0 In particular, โ ๐ฟ(๐ก) = 1. Remark 6.4.1: The Laplace transform of ๐ฟ(๐ก − ๐) would be the Laplace transform of the derivative of the Heaviside function ๐ข(๐ก − ๐), if the Heaviside function had a derivative. First, ๐ −๐๐ โ ๐ข(๐ก − ๐) = . ๐ To obtain what the Laplace transform of the derivative would be we multiply by ๐ , to obtain ๐ −๐๐ , which is the Laplace transform of ๐ฟ(๐ก − ๐). We see the same thing using integration, ∫ ๐ก ๐ฟ(๐ − ๐) ๐๐ = ๐ข(๐ก − ๐). 0 So in a certain sense i ๐ h ๐ข(๐ก − ๐) = ๐ฟ(๐ก − ๐). ” ๐๐ก This line of reasoning allows us to talk about derivatives of functions with jump discontinuities. We can think of the derivative of the Heaviside function ๐ข(๐ก − ๐) as being somehow infinite at ๐, which is precisely our intuitive understanding of the delta function. “ Example 6.4.1: Let us compute โ −1 ๐ +1 . So far we only computed the inverse transform ๐ of proper rational functions in the ๐ variable. That is, the numerator was of lower degree than the denominator. Not so with ๐ +1 ๐ . We can use the delta function to compute, โ −1 ๐ +1 1 1 = โ −1 1 + = โ −1 {1} + โ −1 = ๐ฟ(๐ก) + 1. ๐ ๐ ๐ The resulting object is a generalized function and only makes sense when put underneath an integral. 6.4.3 Impulse response As we said before, in the differential equation ๐ฟ๐ฅ = ๐ (๐ก), we think of ๐ (๐ก) as input, and ๐ฅ(๐ก) as the output. We think of the delta function as an impulse, and so to find the response to an impulse, we use the delta function in place of ๐ (๐ก). The solution to ๐ฟ๐ฅ = ๐ฟ(๐ก) is called the impulse response. 316 CHAPTER 6. THE LAPLACE TRANSFORM Example 6.4.2: Solve (find the impulse response) ๐ฅ 00 + ๐02 ๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. (6.3) We first apply the Laplace transform to the equation. Denote the transform of ๐ฅ(๐ก) by ๐(๐ ). 1 . ๐ 2 ๐(๐ ) + ๐02 ๐(๐ ) = 1, and so ๐(๐ ) = 2 ๐ + ๐02 The inverse Laplace transform produces ๐ฅ(๐ก) = sin(๐0 ๐ก) . ๐0 Let us notice something about the example above. In Example 6.3.4, we found that when the input is ๐ (๐ก), the solution to ๐ฟ๐ฅ = ๐ (๐ก) is given by ๐ฅ(๐ก) = ๐ก ∫ 0 sin ๐0 (๐ก − ๐) ๐ (๐) ๐๐. ๐0 That is, the solution for an arbitrary input is given as convolution with the impulse response. Let us see why. The key is to notice that for functions ๐ฅ(๐ก) and ๐ (๐ก), ๐2 (๐ฅ ∗ ๐ ) (๐ก) = 2 ๐๐ก 00 ∫ ๐ก ๐ (๐)๐ฅ(๐ก − ๐) ๐๐ = 0 ∫ ๐ก ๐ (๐)๐ฅ 00(๐ก − ๐) ๐๐ = (๐ฅ 00 ∗ ๐ )(๐ก). 0 We simply differentiate twice under the integral∗ , the details are left as an exercise. If we convolve the entire equation (6.3), the left-hand side becomes (๐ฅ 00 + ๐02 ๐ฅ) ∗ ๐ = (๐ฅ 00 ∗ ๐ ) + ๐02 (๐ฅ ∗ ๐ ) = (๐ฅ ∗ ๐ )00 + ๐02 (๐ฅ ∗ ๐ ). The right-hand side becomes (๐ฟ ∗ ๐ )(๐ก) = ๐ (๐ก). Therefore ๐ฆ(๐ก) = (๐ฅ ∗ ๐ )(๐ก) is the solution to ๐ฆ 00 + ๐02 ๐ฆ = ๐ (๐ก). This procedure works in general for other linear equations ๐ฟ๐ฅ = ๐ (๐ก). If you determine the impulse response, you also know how to obtain the output ๐ฅ(๐ก) for any input ๐ (๐ก) by simply convolving the impulse response and the input ๐ (๐ก). ∗ You should really think of the integral going over (−∞, ∞) rather than over [0, ๐ก] and simply assume that ๐ (๐ก) and ๐ฅ(๐ก) are continuous and zero for negative ๐ก. 317 6.4. DIRAC DELTA AND IMPULSE RESPONSE 6.4.4 Three-point beam bending Let us give another quite different example where the delta function turns up: Representing point loads on a steel beam. Consider a beam of length ๐ฟ, resting on two simple supports at the ends. Let ๐ฅ denote the position on the beam, and let ๐ฆ(๐ฅ) denote the deflection of the beam in the vertical direction. The deflection ๐ฆ(๐ฅ) satisfies the Euler–Bernoulli equation∗ , ๐ธ๐ผ ๐4 ๐ฆ = ๐น(๐ฅ), ๐๐ฅ 4 where ๐ธ and ๐ผ are constants† and ๐น(๐ฅ) is the force applied per unit length at position ๐ฅ. The situation we are interested in is when the force is applied at a single point as in Figure 6.4. ๐ฆ ๐น๐ฟ(๐ฅ − ๐) ๐ฅ Figure 6.4: Three-point bending. The equation becomes ๐4 ๐ฆ = −๐น๐ฟ(๐ฅ − ๐), ๐๐ฅ 4 where ๐ฅ = ๐ is the point where the mass is applied. The constant ๐น is the force applied and the minus sign indicates that the force is downward, that is, in the negative ๐ฆ direction. The end points of the beam satisfy the conditions, ๐ธ๐ผ ๐ฆ(0) = 0, ๐ฆ 00(0) = 0, ๐ฆ(๐ฟ) = 0, ๐ฆ 00(๐ฟ) = 0. See § 5.2 for further information about endpoint conditions applied to beams. Example 6.4.3: Suppose that length of the beam is 2, and ๐ธ๐ผ = 1 for simplicity. Further suppose that the force ๐น = 1 is applied at ๐ฅ = 1. That is, we have the equation ๐4 ๐ฆ = −๐ฟ(๐ฅ − 1), ๐๐ฅ 4 and the endpoint conditions are ๐ฆ(0) = 0, ∗ Named ๐ฆ 00(0) = 0, ๐ฆ(2) = 0, ๐ฆ 00(2) = 0. for the Swiss mathematicians Jacob Bernoulli (1654–1705), Daniel Bernoulli (1700–1782), the nephew of Jacob, and Leonhard Paul Euler (1707–1783). † ๐ธ is the elastic modulus and ๐ผ is the second moment of area. Let us not worry about the details and simply think of these as some given constants. 318 CHAPTER 6. THE LAPLACE TRANSFORM We could integrate, but using the Laplace transform is even easier. We apply the transform in the ๐ฅ variable rather than the ๐ก variable. Let us again denote the transform of ๐ฆ(๐ฅ) as ๐(๐ ). ๐ 4๐(๐ ) − ๐ 3 ๐ฆ(0) − ๐ 2 ๐ฆ 0(0) − ๐ ๐ฆ 00(0) − ๐ฆ 000(0) = −๐ −๐ . We notice that ๐ฆ(0) = 0 and ๐ฆ 00(0) = 0. Let us call ๐ถ1 = ๐ฆ 0(0) and ๐ถ2 = ๐ฆ 000(0). We solve for ๐(๐ ), −๐ −๐ ๐ถ1 ๐ถ2 ๐(๐ ) = 4 + 2 + 4 . ๐ ๐ ๐ We take the inverse Laplace transform utilizing the second shifting property (6.1) to take the inverse of the first term. ๐ฆ(๐ฅ) = ๐ถ2 3 −(๐ฅ − 1)3 ๐ข(๐ฅ − 1) + ๐ถ1 ๐ฅ + ๐ฅ . 6 6 We still need to apply two of the endpoint conditions. As the conditions are at ๐ฅ = 2 we can simply replace ๐ข(๐ฅ − 1) = 1 when taking the derivatives. Therefore, −(2 − 1)3 ๐ถ2 3 −1 4 0 = ๐ฆ(2) = + ๐ถ1 (2) + 2 = + 2๐ถ1 + ๐ถ2 , 6 6 6 3 and −3 · 2 · (2 − 1) ๐ถ2 + 3 · 2 · 2 = −1 + 2๐ถ2 . 6 6 Hence ๐ถ2 = 12 and solving for ๐ถ1 using the first equation we obtain ๐ถ1 = for the beam deflection is 0 = ๐ฆ 00(2) = −1 4 . Our solution ๐ฅ ๐ฅ3 −(๐ฅ − 1)3 ๐ข(๐ฅ − 1) − + . ๐ฆ(๐ฅ) = 6 4 12 6.4.5 Exercises Exercise 6.4.1: Solve (find the impulse response) ๐ฅ 00 + ๐ฅ 0 + ๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. Exercise 6.4.2: Solve (find the impulse response) ๐ฅ 00 + 2๐ฅ 0 + ๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. Exercise 6.4.3: A pulse can come later and can be bigger. Solve ๐ฅ 00 + 4๐ฅ = 4๐ฟ(๐ก − 1), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. Exercise 6.4.4: Suppose that ๐ (๐ก) and ๐(๐ก) are differentiable functions and suppose that ๐ (๐ก) = ๐(๐ก) = 0 for all ๐ก ≤ 0. Show that ( ๐ ∗ ๐)0(๐ก) = ( ๐ 0 ∗ ๐)(๐ก) = ( ๐ ∗ ๐ 0)(๐ก). Exercise 6.4.5: Suppose that ๐ฟ๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, has the solution ๐ฅ = ๐ −๐ก for ๐ก > 0. Find the solution to ๐ฟ๐ฅ = ๐ก 2 , ๐ฅ(0) = 0, ๐ฅ 0(0) = 0 for ๐ก > 0. Exercise 6.4.6: Compute โ −1 n ๐ 2 +๐ +1 ๐ 2 o . 6.4. DIRAC DELTA AND IMPULSE RESPONSE 319 Exercise 6.4.7 (challenging): Solve Example 6.4.3 via integrating 4 times in the ๐ฅ variable. Exercise 6.4.8: Suppose we have a beam of length 1 simply supported at the ends and suppose that force ๐น = 1 is applied at ๐ฅ = 34 in the downward direction. Suppose that ๐ธ๐ผ = 1 for simplicity. Find the beam deflection ๐ฆ(๐ฅ). Exercise 6.4.101: Solve (find the impulse response) ๐ฅ 00 = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. Exercise 6.4.102: Solve (find the impulse response) ๐ฅ 0 + ๐๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0. Exercise 6.4.103: Suppose that ๐ฟ๐ฅ = ๐ฟ(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0, has the solution ๐ฅ(๐ก) = cos(๐ก) for ๐ก > 0. Find (in closed form) the solution to ๐ฟ๐ฅ = sin(๐ก), ๐ฅ(0) = 0, ๐ฅ 0(0) = 0 for ๐ก > 0. โ −1 n ๐ 2 ๐ 2 +1 Exercise 6.4.105: Compute โ −1 n 3๐ 2 ๐ −๐ +2 ๐ 2 Exercise 6.4.104: Compute o . o . 320 6.5 CHAPTER 6. THE LAPLACE TRANSFORM Solving PDEs with the Laplace transform Note: 1–1.5 lecture, can be skipped The Laplace transform comes from the same family of transforms as does the Fourier series∗ , which we used in chapter 4 to solve partial differential equations (PDEs). It is therefore not surprising that we can also solve PDEs with the Laplace transform. Given a PDE in two independent variables ๐ฅ and ๐ก, we use the Laplace transform on one of the variables (taking the transform of everything in sight), and derivatives in that variable become multiplications by the transformed variable ๐ . The PDE becomes an ODE, which we solve. Afterwards we invert the transform to find a solution to the original problem. It is best to see the procedure on an example. Example 6.5.1: Consider the first order PDE ๐ฆ๐ก = −๐ผ๐ฆ ๐ฅ , for ๐ฅ > 0, ๐ก > 0, with side conditions ๐ฆ(0, ๐ก) = ๐ถ, ๐ฆ(๐ฅ, 0) = 0. This equation is called the convection equation or sometimes the transport equation, and it already made an appearance in § 1.9, with different conditions. See Figure 6.5 for a diagram of the setup. A physical setup of this equation is a river of solid goo, as we do not want anything to ๐ก diffuse. The function ๐ฆ is the concentration of some toxic substance† . The variable ๐ฅ denotes ๐ฆ=๐ถ ๐ฆ๐ก = −๐ผ๐ฆ ๐ฅ position where ๐ฅ = 0 is the location of a factory spewing the toxic substance into the river. The toxic substance flows into the river so that at ๐ฅ = 0 the concentration is always ๐ถ. We wish (0, 0) ๐ฆ=0 ๐ฅ to see what happens past the factory, that is at ๐ฅ > 0. Let ๐ก be the time, and assume the Figure 6.5: Transport equation on a half line. factory started operations at ๐ก = 0, so that at ๐ก = 0 the river is just pure goo. Consider a function of two variables ๐ฆ(๐ฅ, ๐ก). Let us fix ๐ฅ and transform the ๐ก variable. For convenience, we treat the transformed ๐ variable as a parameter, since there are no derivatives in ๐ . That is, we write ๐(๐ฅ) for the transformed function, and treat it as a function of ๐ฅ, leaving ๐ as a parameter. ๐(๐ฅ) = โ ๐ฆ(๐ฅ, ๐ก) = ∫ ∞ ๐ฆ(๐ฅ, ๐ก)๐ −๐ ๐ก ๐๐ . 0 ∗ There is a corresponding Fourier transform on the real line as well that looks sort of like the Laplace transform. † It’s a river of goo already, we’re not hurting the environment much more. 321 6.5. SOLVING PDES WITH THE LAPLACE TRANSFORM The transform of a derivative with respect to ๐ฅ is just differentiating the transformed function: โ ๐ฆ ๐ฅ (๐ฅ, ๐ก) = ∫ ∞ 0 ๐ ๐ฆ ๐ฅ (๐ฅ, ๐ก)๐ −๐ ๐ก ๐๐ = ๐๐ฅ ∫ ∞ ๐ฆ(๐ฅ, ๐ก)๐ −๐ ๐ก ๐๐ = ๐ 0(๐ฅ). 0 To transform the derivative in ๐ก (the variable being transformed), we use the rules from § 6.2: โ ๐ฆ๐ก (๐ฅ, ๐ก) = ๐ ๐(๐ฅ) − ๐ฆ(๐ฅ, 0). In our specific case, ๐ฆ(๐ฅ, 0) = 0, and so โ ๐ฆ๐ก (๐ฅ, ๐ก) = ๐ ๐(๐ฅ). We transform the equation to find ๐ ๐(๐ฅ) = −๐ผ๐ 0(๐ฅ). This ODE needs an initial condition. The initial condition is the other side condition of the PDE, the one that depends on ๐ฅ. Everything is transformed, so we must also transform this condition ๐ถ ๐(0) = โ ๐ฆ(0, ๐ก) = โ ๐ถ = . ๐ We solve the ODE problem ๐ ๐(๐ฅ) = −๐ผ๐ 0(๐ฅ), ๐(0) = ๐(๐ฅ) = ๐ถ ๐ , to find ๐ถ −๐ ๐ฅ ๐ ๐ผ . ๐ We are not done, we have ๐(๐ฅ), but we really want ๐ฆ(๐ฅ, ๐ก). We transform the ๐ variable back to ๐ก. Let ( 0 if ๐ก < 0, ๐ข(๐ก) = 1 otherwise be the Heaviside function. As โ ๐ข(๐ก − ๐) = ∫ ∞ ๐ข(๐ก − ๐) ๐ −๐ ๐ก ∞ ๐ −๐ ๐ก ๐๐ก = ๐ 0 then ๐ฆ(๐ฅ, ๐ก) = โ ๐๐ก = ∫ −1 In other words, ๐ถ −๐ ๐ฅ ๐ ๐ผ = ๐ถ๐ข ๐ก − ๐ฅ/๐ผ . ๐ ( ๐ฆ(๐ฅ, ๐ก) = ๐ −๐๐ , ๐ 0 if ๐ก < ๐ฅ/๐ผ , ๐ถ otherwise. See Figure 6.6 on the following page for a diagram of this solution. The line of slope 1/๐ผ indicates the wavefront of the toxic substance in the picture as it is leaving the factory. What the equation does is simply move the initial condition to the right at speed ๐ผ. Shhh. . . ๐ฆ is not differentiable, it is not even continuous (nobody ever seems to notice). How could we plug something that’s not differentiable into the equation? Well, just think 322 CHAPTER 6. THE LAPLACE TRANSFORM ๐ก ๐ฆ=๐ถ wavefront, slope 1/๐ผ ๐ฆ=๐ถ ๐ฆ=0 ๐ฆ=0 (0, 0) ๐ฅ Figure 6.6: Wavefront of toxic substance is a line of slope 1/๐ผ. of a differentiable function very very close to ๐ฆ. Or, if you recognize the derivative of the Heaviside function as the delta function, then all is well too: ๐ฆ๐ก (๐ฅ, ๐ก) = and ๐ฆ ๐ฅ (๐ฅ, ๐ก) = ๐ ๐ถ๐ข ๐ก − ๐ฅ/๐ผ = ๐ถ๐ข 0 ๐ก − ๐ฅ/๐ผ = ๐ถ๐ฟ ๐ก − ๐ฅ/๐ผ ๐๐ก ๐ ๐ถ ๐ถ ๐ถ๐ข ๐ก − ๐ฅ/๐ผ = − ๐ข 0 ๐ก − ๐ฅ/๐ผ = − ๐ฟ ๐ก − ๐ฅ/๐ผ . ๐ผ ๐ผ ๐๐ฅ So ๐ฆ๐ก = −๐ผ๐ฆ ๐ฅ . Laplace equation is very good with constant coefficient equations. One advantage of Laplace is that it easily handles nonhomogeneous side conditions. Let us try a more complicated example. Example 6.5.2: Consider ๐ฆ๐ก + ๐ฆ ๐ฅ + ๐ฆ = 0, for ๐ฅ > 0, ๐ก > 0, ๐ฆ(0, ๐ก) = sin(๐ก), ๐ฆ(๐ฅ, 0) = 0. Again, we transform ๐ก, and we write ๐(๐ฅ) for the transformed function. As ๐ฆ(๐ฅ, 0) = 0, we find 1 ๐ ๐(๐ฅ) + ๐ 0(๐ฅ) + ๐(๐ฅ) = 0, ๐(0) = 2 . ๐ +1 The solution of the transformed equation is ๐(๐ฅ) = ๐ 2 1 1 ๐ −(๐ +1)๐ฅ = 2 ๐ −๐ฅ๐ ๐ −๐ฅ . +1 ๐ +1 Using the second shifting property (6.1) and linearity of the transform, we obtain the solution ๐ฆ(๐ฅ, ๐ก) = ๐ −๐ฅ sin(๐ก − ๐ฅ)๐ข(๐ก − ๐ฅ). 323 6.5. SOLVING PDES WITH THE LAPLACE TRANSFORM We can also detect when the problem is ill-posed in the sense that it has no solution. Let us change the equation to − ๐ฆ๐ก + ๐ฆ ๐ฅ = 0, for ๐ฅ > 0, ๐ก > 0, ๐ฆ(0, ๐ก) = sin(๐ก), ๐ฆ(๐ฅ, 0) = 0. Then the problem has no solution. First, let us see this in the language of § 1.9. The characteristic curves are ๐ก = −๐ฅ + ๐ถ. If ๐ is the the characteristic coordinate, then we find the equation ๐ฆ๐ = 0 along the curve, meaning a solution is constant along characteristic curves. But these curves intersect both the ๐ฅ-axis and the ๐ก-axis. For example, the curve ๐ก = −๐ฅ + 1 intersects at (1, 0) and (0, 1). The solution is constant along the curve so ๐ฆ(1, 0) should equal ๐ฆ(0, 1). But ๐ฆ(1, 0) = 0 and ๐ฆ(0, 1) = sin(1) ≠ 0. See Figure 6.7. ๐ก ๐ฆ(0, 1) = sin(1) ๐ก = −๐ฅ + 1 ๐ฆ = sin(๐ก) ๐ฆ is constant along this characteristic curve ๐ฆ(1, 0) = 0 ๐ฆ=0 (0, 0) ๐ฅ Figure 6.7: Ill-posed problem. Now consider the transform. The transformed problem is −๐ ๐(๐ฅ) + ๐ 0(๐ฅ) = 0, ๐(0) = 1 , ๐ 2 + 1 and the solution ought to be ๐(๐ฅ) = ๐ 2 1 ๐ ๐ ๐ฅ . +1 Importantly, this Laplace transform does not decay to zero at infinity! That is, since ๐ฅ > 0 in the region of interest, then lim ๐ →∞ ๐ 2 1 ๐ ๐ ๐ฅ = ∞ ≠ 0. +1 It almost looks as if we could use the shifting property, but notice that the shift is in the wrong direction. Of course, we need not restrict ourselves to first order equations, although the computations become more involved for higher order equations. 324 CHAPTER 6. THE LAPLACE TRANSFORM Example 6.5.3: Let us use Laplace for the following problem: ๐ฆ๐ก = ๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ ๐ฅ (0, ๐ก) = ๐ (๐ก), ๐ฆ(๐ฅ, 0) = 0. Really we also impose other conditions on the solution so that for example the Laplace transform exists. For example, we might impose that ๐ฆ is bounded for each fixed time ๐ก. Transform the equation in the ๐ก variable to find ๐ ๐(๐ฅ) = ๐ 00(๐ฅ). The general solution to this ODE is √ ๐(๐ฅ) = ๐ด๐ √ ๐ ๐ฅ + ๐ต๐ − ๐ ๐ฅ . First ๐ด = 0, since otherwise ๐ does not decay to zero as ๐ → ∞. √ Now consider the boundary condition. Transform ๐ 0(0) = ๐น(๐ ) and so − ๐ ๐ต = ๐น(๐ ). In other words, 1 √ ๐(๐ฅ) = −๐น(๐ ) √ ๐ − ๐ ๐ฅ . ๐ If we look up the inverse transform in a table such as the one in Appendix B (or we spend the afternoon doing calculus), we find √ h โ −1 ๐ − ๐ ๐ฅ i ๐ฅ =√ ๐ −๐ฅ 2 4๐ก , 4๐๐ก 3 or โ −1 1 √ 1 −๐ฅ2 √ ๐ − ๐ ๐ฅ = √ ๐ 4๐ก . ๐ ๐๐ก So ๐ฆ(๐ฅ, ๐ก) = โ −1 h ๐น(๐ )๐ √ i − ๐ ๐ฅ ∫ = 0 ๐ก ๐ (๐) p 1 ๐ −๐ฅ 2 4(๐ก−๐) ๐๐. ๐(๐ก − ๐) Laplace can solve problems where separation of variables fails. Laplace does not mind nonhomogeneity, but it is essentially only useful for constant coefficient equations. 6.5.1 Exercises Exercise 6.5.1: Solve ๐ฆ๐ก + ๐ฆ ๐ฅ = 1, ๐ฆ(0, ๐ก) = 1, 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(๐ฅ, 0) = 0. 325 6.5. SOLVING PDES WITH THE LAPLACE TRANSFORM Exercise 6.5.2: Solve ๐ฆ๐ก + ๐ผ๐ฆ ๐ฅ = 0, 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(0, ๐ก) = ๐ก, ๐ฆ(๐ฅ, 0) = 0. Exercise 6.5.3: Solve ๐ฆ๐ก + 2๐ฆ ๐ฅ = ๐ฅ + ๐ก, ๐ฆ(0, ๐ก) = 0, 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(๐ฅ, 0) = 0. Exercise 6.5.4: For an ๐ผ > 0, solve ๐ฆ๐ก + ๐ผ๐ฆ ๐ฅ + ๐ฆ = 0, 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(0, ๐ก) = sin(๐ก), ๐ฆ(๐ฅ, 0) = 0. Exercise 6.5.5: Find the corresponding ODE problem for ๐(๐ฅ), after transforming the ๐ก variable ๐ฆ๐ก๐ก + 3๐ฆ ๐ฅ๐ฅ + ๐ฆ ๐ฅ๐ก + 3๐ฆ ๐ฅ + ๐ฆ = sin(๐ฅ) + ๐ก, ๐ฆ(0, ๐ก) = 1, ๐ฆ(1, ๐ก) = ๐ก, ๐ฆ(๐ฅ, 0) = 1 − ๐ฅ, 0 < ๐ฅ < 1, ๐ก > 0, ๐ฆ๐ก (๐ฅ, 0) = 1. Do not solve the problem. Exercise 6.5.6: Write down a solution to ๐ฆ๐ก = ๐ฆ ๐ฅ๐ฅ , 0 < ๐ฅ < ∞, ๐ก > 0, −๐ก ๐ฆ ๐ฅ (0, ๐ก) = ๐ , ๐ฆ(๐ฅ, 0) = 0, as an definite integral (convolution). Exercise 6.5.7: Use the Laplace transform in ๐ก to solve ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , −∞ < ๐ฅ < ∞, ๐ก > 0, ๐ฆ๐ก (๐ฅ, 0) = sin(๐ฅ), ๐ฆ(๐ฅ, 0) = 0. Hint: Note that ๐ ๐ ๐ฅ does not go to zero as ๐ → ∞ for positive ๐ฅ, and ๐ −๐ ๐ฅ does not go to zero as ๐ → ∞ for negative ๐ฅ. Exercise 6.5.101: Solve ๐ฆ๐ก + ๐ฆ ๐ฅ = 1, ๐ฆ(0, ๐ก) = 0, 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(๐ฅ, 0) = 0. Exercise 6.5.102: For a ๐ > 0, solve ๐ฆ๐ก + ๐ฆ ๐ฅ + ๐๐ฆ = 0, ๐ฆ(0, ๐ก) = sin(๐ก), 0 < ๐ฅ < ∞, ๐ก > 0, ๐ฆ(๐ฅ, 0) = 0. 326 CHAPTER 6. THE LAPLACE TRANSFORM Exercise 6.5.103: Find the corresponding ODE problem for ๐(๐ฅ), after transforming the ๐ก variable ๐ฆ๐ก๐ก + 3๐ฆ ๐ฅ๐ฅ + ๐ฆ = ๐ฅ + ๐ก, ๐ฆ(−1, ๐ก) = 0, −1 < ๐ฅ < 1, ๐ก > 0, ๐ฆ(1, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = (1 − ๐ฅ 2 ), ๐ฆ๐ก (๐ฅ, 0) = 0. Do not solve the problem. Exercise 6.5.104: Use the Laplace transform in ๐ก to solve ๐ฆ๐ก๐ก = ๐ฆ ๐ฅ๐ฅ , −∞ < ๐ฅ < ∞, ๐ก > 0, ๐ฆ๐ก (๐ฅ, 0) = ๐ฅ , 2 ๐ฆ(๐ฅ, 0) = 0. Hint: Note that ๐ ๐ ๐ฅ does not go to zero as ๐ → ∞ for positive ๐ฅ, and ๐ −๐ ๐ฅ does not go to zero as ๐ → ∞ for negative ๐ฅ. Chapter 7 Power series methods 7.1 Power series Note: 1 or 1.5 lecture, §8.1 in [EP], §5.1 in [BD] Many functions can be written in terms of a power series ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ . ๐=0 If we assume that a solution of a differential equation is written as a power series, then perhaps we can use a method reminiscent of undetermined coefficients. That is, we will try to solve for the numbers ๐ ๐ . Before we can carry out this process, let us review some results and concepts about power series. 7.1.1 Definition As we said, a power series is an expression such as ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ = ๐ 0 + ๐ 1 (๐ฅ − ๐ฅ 0 ) + ๐ 2 (๐ฅ − ๐ฅ0 )2 + ๐ 3 (๐ฅ − ๐ฅ0 )3 + · · · , (7.1) ๐=0 where ๐0 , ๐1 , ๐2 , . . . , ๐ ๐ , . . . and ๐ฅ 0 are constants. Let ๐๐ (๐ฅ) = ๐ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ = ๐ 0 + ๐ 1 (๐ฅ − ๐ฅ0 ) + ๐ 2 (๐ฅ − ๐ฅ0 )2 + ๐3 (๐ฅ − ๐ฅ 0 )3 + · · · + ๐ ๐ (๐ฅ − ๐ฅ 0 )๐ , ๐=0 denote the so-called partial sum. If for some ๐ฅ, the limit lim ๐๐ (๐ฅ) = lim ๐→∞ ๐→∞ ๐ Õ ๐=0 ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ 328 CHAPTER 7. POWER SERIES METHODS exists, then we say that the series (7.1) converges at ๐ฅ. At ๐ฅ = ๐ฅ0 , the series always converges to ๐0 . When (7.1) converges at any other point ๐ฅ ≠ ๐ฅ 0 , we say that (7.1) is a convergent power series, and we write ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ = lim ๐ Õ ๐→∞ ๐=0 ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ . ๐=0 If the series does not converge for any point ๐ฅ ≠ ๐ฅ0 , we say that the series is divergent. Example 7.1.1: The series ∞ Õ 1 ๐=0 ๐ฅ2 ๐ฅ3 ๐ฅ =1+๐ฅ+ + +··· ๐! 2 6 ๐ is convergent for any ๐ฅ. Recall that ๐! = 1 · 2 · 3 · · · ๐ is the factorial. By convention we define 0! = 1. You may recall that this series converges to ๐ ๐ฅ . We say that (7.1) converges absolutely at ๐ฅ whenever the limit lim ๐→∞ ๐ Õ |๐ ๐ | |๐ฅ − ๐ฅ 0 | ๐ ๐=0 ๐ exists. That is, the series ∞ ๐=0 |๐ ๐ | |๐ฅ − ๐ฅ 0 | is convergent. If (7.1) converges absolutely at ๐ฅ, then it converges at ๐ฅ. However, the opposite implication is not true. Í Example 7.1.2: The series ∞ Õ 1 ๐=1 ๐ ๐ฅ๐ ๐ (−1) converges absolutely for all ๐ฅ in the interval (−1, 1). It converges at ๐ฅ = −1, as ∞ ๐=1 ๐ converges (conditionally) by the alternating series test. The power series does not converge Í 1 absolutely at ๐ฅ = −1, because ∞ ๐=1 ๐ does not converge. The series diverges at ๐ฅ = 1. Í 7.1.2 Radius of convergence If a power series converges absolutely at some ๐ฅ 1 , then for all ๐ฅ such that |๐ฅ − ๐ฅ0 | ≤ |๐ฅ1 − ๐ฅ0 | (that is, ๐ฅ is closer than ๐ฅ1 to ๐ฅ0 ) we have ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ ≤ ๐ ๐ (๐ฅ 1 − ๐ฅ 0 ) ๐ for all ๐. As the numbers ๐ ๐ (๐ฅ1 − ๐ฅ0 ) ๐ sum to some finite limit, summing smaller positive numbers ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ must also have a finite limit. Hence, the series must converge absolutely at ๐ฅ. Theorem 7.1.1. For a power series (7.1), there exists a number ๐ (we allow ๐ = ∞) called the radius of convergence such that the series converges absolutely on the interval (๐ฅ0 − ๐, ๐ฅ0 + ๐) and diverges for ๐ฅ < ๐ฅ0 − ๐ and ๐ฅ > ๐ฅ 0 + ๐. We write ๐ = ∞ if the series converges for all ๐ฅ. See Figure 7.1 on the facing page. In Example 7.1.1 the radius of convergence is ๐ = ∞ as the series converges everywhere. In Example 7.1.2 the radius of convergence is ๐ = 1. We note that ๐ = 0 is another way of saying that the series is divergent. 329 7.1. POWER SERIES diverges converges absolutely ๐ฅ0 − ๐ ๐ฅ0 diverges ๐ฅ0 + ๐ Figure 7.1: Convergence of a power series. A useful test for convergence of a series is the ratio test. Suppose that ∞ Õ ๐๐ ๐=0 is a series and the limit ๐ ๐+1 ๐→∞ ๐ ๐ exists. Then the series converges absolutely if ๐ฟ < 1 and diverges if ๐ฟ > 1. We apply this test to the series (7.1). Let ๐ ๐ = ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ in the test. Compute ๐ฟ = lim ๐ฟ = lim ๐→∞ ๐ ๐+1 ๐ ๐+1 ๐ ๐+1 (๐ฅ − ๐ฅ 0 ) ๐+1 = lim = lim |๐ฅ − ๐ฅ0 |. ๐→∞ ๐ ๐ ๐→∞ ๐๐ ๐ ๐ (๐ฅ − ๐ฅ 0 ) ๐ Define ๐ด by ๐ ๐+1 . ๐→∞ ๐ ๐ Then if 1 > ๐ฟ = ๐ด|๐ฅ − ๐ฅ0 | the series (7.1) converges absolutely. If ๐ด = 0, then the series always converges. If ๐ด > 0, then the series converges absolutely if |๐ฅ − ๐ฅ0 | < 1/๐ด, and diverges if |๐ฅ − ๐ฅ 0 | > 1/๐ด. That is, the radius of convergence is 1/๐ด. A similar test is the root test. Suppose ๐ด = lim ๐ฟ = lim ๐→∞ p๐ |๐ ๐ | exists. Then ∞ ๐=0 ๐ ๐ converges absolutely if ๐ฟ < 1 and diverges if ๐ฟ > 1. We can use the same calculation as above to find ๐ด. Let us summarize. Í Theorem 7.1.2 (Ratio and root tests for power series). Consider a power series ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ 0 ) ๐ ๐=0 such that p๐ ๐ ๐+1 or ๐ด = lim |๐ ๐ | ๐→∞ ๐ ๐ ๐→∞ exists. If ๐ด = 0, then the radius of convergence of the series is ∞. Otherwise, the radius of convergence is 1/๐ด. ๐ด = lim 330 CHAPTER 7. POWER SERIES METHODS Example 7.1.3: Suppose we have the series ∞ Õ 2−๐ (๐ฅ − 1) ๐ . ๐=0 First we compute the limit in the ratio test, ๐ด = lim ๐→∞ 2−๐−1 ๐ ๐+1 = lim = lim 2−1 = 1/2. ๐๐ ๐→∞ 2−๐ ๐→∞ Therefore the radius of convergence is 2, and the series converges absolutely on the interval (−1, 3). And we could just as well have used the root test: ๐ด = lim lim p๐ ๐→∞ ๐→∞ |๐ ๐ | = lim ๐→∞ Example 7.1.4: Consider ∞ Õ 1 ๐=0 ๐๐ p๐ |2−๐ | = lim 2−1 = 1/2. ๐→∞ ๐ฅ๐. Compute the limit for the root test, s ๐ด = lim p๐ ๐→∞ |๐ ๐ | = lim ๐ ๐→∞ 1 = lim ๐→∞ ๐๐ s ๐ 1 ๐ ๐ 1 = 0. ๐→∞ ๐ = lim So the radius of convergence is ∞: the series converges everywhere. The ratio test would also work here. The root or the ratio test does not always apply. That is the limit of ๐๐๐+1 or ๐ |๐ ๐ | might ๐ not exist. There exist more sophisticated ways of finding the radius of convergence, but those would be beyond the scope of this chapter. The two methods above cover many of the series that arise in practice. Often if the root test applies, so does the ratio test, and vice versa, though the limit might be easier to compute in one way than the other. p 7.1.3 Analytic functions Functions represented by power series are called analytic functions. Not every function is analytic, although the majority of the functions you have seen in calculus are. An analytic function ๐ (๐ฅ) is equal to its Taylor series∗ near a point ๐ฅ0 . That is, for ๐ฅ near ๐ฅ0 we have ∞ Õ ๐ (๐) (๐ฅ0 ) ๐ (๐ฅ) = (๐ฅ − ๐ฅ 0 ) ๐ , (7.2) ๐! ๐=0 where ๐ (๐) (๐ฅ ∗ Named 0) denotes the ๐ th derivative of ๐ (๐ฅ) at the point ๐ฅ0 . after the English mathematician Sir Brook Taylor (1685–1731). 331 7.1. POWER SERIES For example, sine is an analytic function and its Taylor series around ๐ฅ 0 = 0 is given by sin(๐ฅ) = ∞ Õ (−1)๐ ๐=0 (2๐ + 1)! ๐ฅ 2๐+1 . In Figure 7.2 we plot sin(๐ฅ) and the truncations of the series up to degree 5 and 9. You can see that the approximation is very good for ๐ฅ near 0, but gets worse for ๐ฅ further away from 0. This is what happens in general. To get a good approximation far away from ๐ฅ0 you need to take more and more terms of the Taylor series. -10 -5 0 5 10 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -10 -5 0 5 10 Figure 7.2: The sine function and its Taylor approximations around ๐ฅ 0 = 0 of 5th and 9th degree. 7.1.4 Manipulating power series One of the main properties of power series that we will use is that we can differentiate Í them term by term. That is, suppose that ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ is a convergent power series. Then for ๐ฅ in the radius of convergence we have " # ∞ ∞ Õ ๐ Õ ๐ ๐ ๐ (๐ฅ − ๐ฅ0 ) = ๐๐ ๐ (๐ฅ − ๐ฅ0 ) ๐−1 . ๐๐ฅ ๐=0 ๐=1 Notice that the term corresponding to ๐ = 0 disappeared as it was constant. The radius of convergence of the differentiated series is the same as that of the original. Example 7.1.5: Let us show that the exponential ๐ฆ = ๐ ๐ฅ solves ๐ฆ 0 = ๐ฆ. First write ๐ฆ = ๐๐ฅ = ∞ Õ 1 ๐=0 ๐! ๐ฅ๐. 332 CHAPTER 7. POWER SERIES METHODS Now differentiate 0 ๐ฆ = ∞ Õ 1 ๐ ๐=1 ๐! ๐ฅ ๐−1 = ∞ Õ ๐=1 1 ๐ฅ ๐−1 . (๐ − 1)! We reindex the series by simply replacing ๐ with ๐ + 1. The series does not change, what changes is simply how we write it. After reindexing the series starts at ๐ = 0 again. ∞ Õ ๐=1 ∞ Õ 1 ๐−1 ๐ฅ = (๐ − 1)! ๐+1=1 ∞ Õ 1 1 (๐+1)−1 = ๐ฅ๐. ๐ฅ ๐! (๐ + 1) − 1 ! ๐=0 That was precisely the power series for ๐ ๐ฅ we started with, so we showed that ๐ ๐ฅ ๐๐ฅ [๐ ] = ๐๐ฅ. Convergent power series can be added and multiplied together, and multiplied by constants using the following rules. First, we can add series by adding term by term, ∞ Õ ! ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ 0 ) ๐ + ๐=0 ! ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ = ๐=0 ∞ Õ (๐ ๐ + ๐ ๐ )(๐ฅ − ๐ฅ0 ) ๐ . ๐=0 We can multiply by constants, ๐ผ ∞ Õ ! ๐ ๐ (๐ฅ − ๐ฅ 0 ) ๐ = ๐=0 ∞ Õ ๐ผ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ . ๐=0 We can also multiply series together, ∞ Õ ๐=0 ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ ! ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ ๐=0 ! = ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ , ๐=0 where ๐ ๐ = ๐ 0 ๐ ๐ + ๐1 ๐ ๐−1 + · · · + ๐ ๐ ๐0 . The radius of convergence of the sum or the product is at least the minimum of the radii of convergence of the two series involved. 7.1.5 Power series for rational functions Polynomials are simply finite power series. That is, a polynomial is a power series where the ๐ ๐ are zero for all ๐ large enough. We can always expand a polynomial as a power series about any point ๐ฅ0 by writing the polynomial as a polynomial in (๐ฅ − ๐ฅ0 ). For example, let us write 2๐ฅ 2 − 3๐ฅ + 4 as a power series around ๐ฅ0 = 1: 2๐ฅ 2 − 3๐ฅ + 4 = 3 + (๐ฅ − 1) + 2(๐ฅ − 1)2 . In other words ๐ 0 = 3, ๐1 = 1, ๐ 2 = 2, and all other ๐ ๐ = 0. To do this, we know that ๐ ๐ = 0 for all ๐ ≥ 3 as the polynomial is of degree 2. We write ๐ 0 + ๐ 1 (๐ฅ − 1) + ๐ 2 (๐ฅ − 1)2 , we expand, and we solve for ๐ 0 , ๐1 , and ๐ 2 . We could have also differentiated at ๐ฅ = 1 and used the Taylor series formula (7.2). 333 7.1. POWER SERIES Let us look at rational functions, that is, ratios of polynomials. An important fact is that a series for a function only defines the function on an interval even if the function is defined elsewhere. For example, for −1 < ๐ฅ < 1, ∞ Õ 1 = ๐ฅ ๐ = 1 + ๐ฅ + ๐ฅ2 + · · · 1−๐ฅ ๐=0 This series is called the geometric series. The ratio test tells us that the radius of convergence 1 is defined for all ๐ฅ ≠ 1. is 1. The series diverges for ๐ฅ ≤ −1 and ๐ฅ ≥ 1, even though 1−๐ฅ We can use the geometric series together with rules for addition and multiplication of power series to expand rational functions around a point, as long as the denominator is not zero at ๐ฅ 0 . Note that as for polynomials, we could equivalently use the Taylor series expansion (7.2). ๐ฅ Example 7.1.6: Expand 1+2๐ฅ+๐ฅ 2 as a power series around the origin (๐ฅ 0 = 0) and find the radius of convergence. 2 First, write 1 + 2๐ฅ + ๐ฅ 2 = (1 + ๐ฅ)2 = 1 − (−๐ฅ) . Compute ๐ฅ 1 =๐ฅ 2 1 − (−๐ฅ) 1 + 2๐ฅ + ๐ฅ =๐ฅ ∞ Õ =๐ฅ 2 (−1) ๐ ๐ฅ ๐ ๐=0 ∞ Õ !2 ! ๐๐ ๐ฅ๐ ๐=0 = ∞ Õ ๐ ๐ ๐ฅ ๐+1 , ๐=0 where to get ๐ ๐ , we use the formula for the product of series. We obtain, ๐ 0 = 1, ๐1 = −1 − 1 = −2, ๐ 2 = 1 + 1 + 1 = 3, etc. Therefore ∞ Õ ๐ฅ = (−1) ๐+1 ๐๐ฅ ๐ = ๐ฅ − 2๐ฅ 2 + 3๐ฅ 3 − 4๐ฅ 4 + · · · 2 1 + 2๐ฅ + ๐ฅ ๐=1 The radius of convergence is at least 1. We use the ratio test (−1) ๐+2 (๐ + 1) ๐ ๐+1 ๐+1 = lim = 1. lim = lim ๐+1 ๐ ๐→∞ ๐ ๐ ๐→∞ ๐→∞ (−1) ๐ So the radius of convergence is actually equal to 1. When the rational function is more complicated, it is also possible to use method of 3 partial fractions. For example, to find the Taylor series for ๐ฅ๐ฅ 2+๐ฅ , we write −1 ∞ ∞ ∞ Õ Õ Õ ๐ฅ3 + ๐ฅ 1 1 ๐ ๐ ๐ = ๐ฅ + − = ๐ฅ + (−1) ๐ฅ − ๐ฅ = −๐ฅ + (−2)๐ฅ ๐ . 2 1 + ๐ฅ 1 − ๐ฅ ๐ฅ −1 ๐=0 ๐=0 ๐=3 ๐ odd 334 7.1.6 CHAPTER 7. POWER SERIES METHODS Exercises Exercise 7.1.1: Is the power series ∞ Õ ๐ ๐ ๐ฅ ๐ convergent? If so, what is the radius of convergence? ๐=0 Exercise 7.1.2: Is the power series ∞ Õ ๐๐ฅ ๐ convergent? If so, what is the radius of convergence? ๐=0 Exercise 7.1.3: Is the power series ∞ Õ ๐!๐ฅ ๐ convergent? If so, what is the radius of convergence? ๐=0 Exercise 7.1.4: Is the power series ∞ Õ 1 ๐=0 (2๐)! (๐ฅ − 10) ๐ convergent? If so, what is the radius of convergence? Exercise 7.1.5: Determine the Taylor series for sin ๐ฅ around the point ๐ฅ0 = ๐. Exercise 7.1.6: Determine the Taylor series for ln ๐ฅ around the point ๐ฅ0 = 1, and find the radius of convergence. 1 around ๐ฅ0 = 0. 1+๐ฅ ๐ฅ Exercise 7.1.8: Determine the Taylor series and its radius of convergence of around ๐ฅ0 = 0. 4 − ๐ฅ2 Hint: You will not be able to use the ratio test. Exercise 7.1.7: Determine the Taylor series and its radius of convergence of Exercise 7.1.9: Expand ๐ฅ 5 + 5๐ฅ + 1 as a power series around ๐ฅ 0 = 5. Exercise 7.1.10: Suppose that the ratio test applies to a series ∞ Õ ๐ ๐ ๐ฅ ๐ . Show, using the ratio test, ๐=0 that the radius of convergence of the differentiated series is the same as that of the original series. Exercise 7.1.11: Suppose that ๐ is an analytic function such that ๐ (๐) (0) = ๐. Find ๐ (1). Exercise 7.1.101: Is the power series ∞ Õ (0.1)๐ ๐ฅ ๐ convergent? If so, what is the radius of ๐=1 convergence? Exercise 7.1.102 (challenging): Is the power series ∞ Õ ๐! ๐=1 ๐๐ ๐ฅ ๐ convergent? If so, what is the radius of convergence? Exercise 7.1.103: Using the geometric series, expand series converge? 1 1−๐ฅ around ๐ฅ0 = 2. For what ๐ฅ does the Exercise 7.1.104 (challenging): Find the Taylor series for ๐ฅ 7 ๐ ๐ฅ around ๐ฅ0 = 0. Exercise 7.1.105 (challenging): Imagine ๐ and ๐ are analytic functions such that ๐ (๐) (0) = ๐ (๐) (0) for all large enough ๐. What can you say about ๐ (๐ฅ) − ๐(๐ฅ)? 7.2. SERIES SOLUTIONS OF LINEAR SECOND ORDER ODES 7.2 335 Series solutions of linear second order ODEs Note: 1 or 1.5 lecture, §8.2 in [EP], §5.2 and §5.3 in [BD] Suppose we have a linear second order homogeneous ODE of the form ๐(๐ฅ)๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0. Suppose that ๐(๐ฅ), ๐(๐ฅ), and ๐(๐ฅ) are polynomials. We will try a solution of the form ๐ฆ= ∞ Õ ๐ ๐ (๐ฅ − ๐ฅ0 ) ๐ ๐=0 and solve for the ๐ ๐ to try to obtain a solution defined in some interval around ๐ฅ 0 . The point ๐ฅ0 is called an ordinary point if ๐(๐ฅ0 ) ≠ 0. That is, the functions ๐(๐ฅ) ๐(๐ฅ) and ๐(๐ฅ) ๐(๐ฅ) are defined for ๐ฅ near ๐ฅ0 . If ๐(๐ฅ0 ) = 0, then we say ๐ฅ 0 is a singular point. Handling singular points is harder than ordinary points and so we now focus only on ordinary points. Example 7.2.1: Let us start with a very simple example ๐ฆ 00 − ๐ฆ = 0. Let us try a power series solution near ๐ฅ0 = 0, which is an ordinary point. Every point is an ordinary point in fact, as the equation is constant coefficient. We already know we should obtain exponentials or the hyperbolic sine and cosine, but let us pretend we do not know this. We try ๐ฆ= ∞ Õ ๐๐ ๐ฅ ๐ . ๐=0 If we differentiate, the ๐ = 0 term is a constant and hence disappears. We therefore get 0 ๐ฆ = ∞ Õ ๐๐ ๐ ๐ฅ ๐−1 . ๐=1 We differentiate yet again to obtain (now the ๐ = 1 term disappears) 00 ๐ฆ = ∞ Õ ๐(๐ − 1)๐ ๐ ๐ฅ ๐−2 . ๐=2 We reindex the series (replace ๐ with ๐ + 2) to obtain ๐ฆ 00 = ∞ Õ (๐ + 2) (๐ + 1) ๐ ๐+2 ๐ฅ ๐ . ๐=0 336 CHAPTER 7. POWER SERIES METHODS Now we plug ๐ฆ and ๐ฆ 00 into the differential equation 0 = ๐ฆ 00 − ๐ฆ = ! ∞ Õ (๐ + 2) (๐ + 1) ๐ ๐+2 ๐ฅ ๐ − ๐=0 = = ! ๐๐ ๐ฅ๐ ๐=0 ∞ Õ ๐=0 ∞ Õ ∞ Õ ๐ (๐ + 2) (๐ + 1) ๐ ๐+2 ๐ฅ − ๐ ๐ ๐ฅ ๐ (๐ + 2) (๐ + 1) ๐ ๐+2 − ๐ ๐ ๐ฅ ๐ . ๐=0 ๐ฆ 00 As − ๐ฆ is supposed to be equal to 0, we know that the coefficients of the resulting series must be equal to 0. Therefore, ๐๐ . (๐ + 2) (๐ + 1) ๐ ๐+2 − ๐ ๐ = 0, or ๐ ๐+2 = (๐ + 2)(๐ + 1) The equation above is called a recurrence relation for the coefficients of the power series. It did not matter what ๐ 0 or ๐1 was. They can be arbitrary. But once we pick ๐ 0 and ๐ 1 , then all other coefficients are determined by the recurrence relation. Let us see what the coefficients must be. First, ๐ 0 and ๐1 are arbitrary. Then, ๐1 ๐0 ๐2 ๐0 ๐3 ๐1 ๐2 = , ๐3 = , ๐4 = = , ๐5 = = , ... 2 (3)(2) (4)(3) (4)(3)(2) (5)(4) (5)(4)(3)(2) So for even ๐, that is ๐ = 2๐, we have ๐0 , (2๐)! ๐ ๐ = ๐ 2๐ = and for odd ๐, that is ๐ = 2๐ + 1, we have ๐ ๐ = ๐ 2๐+1 = ๐1 . (2๐ + 1)! Let us write down the series ๐ฆ= ∞ Õ ๐ ๐๐ ๐ฅ = ๐=0 ∞ Õ ๐0 ๐=0 (2๐)! ๐ฅ 2๐ ∞ ∞ ๐=0 ๐=0 Õ 1 Õ ๐1 1 + ๐ฅ 2๐+1 = ๐ 0 ๐ฅ 2๐ + ๐ 1 ๐ฅ 2๐+1 . (2๐ + 1)! (2๐)! (2๐ + 1)! We recognize the two series as the hyperbolic sine and cosine. Therefore, ๐ฆ = ๐ 0 cosh ๐ฅ + ๐ 1 sinh ๐ฅ. Of course, in general we will not be able to recognize the series that appears, since usually there will not be any elementary function that matches it. In that case we will be content with the series. Example 7.2.2: Let us do a more complex example. Consider Airy’s equation∗ : ๐ฆ 00 − ๐ฅ๐ฆ = 0, near the point ๐ฅ0 = 0. Note that ๐ฅ0 = 0 is an ordinary point. ∗ Named after the English mathematician Sir George Biddell Airy (1801–1892). 337 7.2. SERIES SOLUTIONS OF LINEAR SECOND ORDER ODES We try ๐ฆ= ∞ Õ ๐๐ ๐ฅ ๐ . ๐=0 We differentiate twice (as above) to obtain 00 ๐ฆ = ∞ Õ ๐ (๐ − 1) ๐ ๐ ๐ฅ ๐−2 . ๐=2 We plug ๐ฆ into the equation ∞ Õ 0 = ๐ฆ 00 − ๐ฅ๐ฆ = ๐=2 ∞ Õ = ! ๐ (๐ − 1) ๐ ๐ ๐ฅ ๐−2 − ๐ฅ ! ๐ (๐ − 1) ๐ ๐ ๐ฅ ๐−2 − ๐=2 ∞ Õ ! ๐๐ ๐ฅ๐ ๐=0 ∞ Õ ! ๐ ๐ ๐ฅ ๐+1 . ๐=0 We reindex to make things easier to sum 0 = ๐ฆ 00 − ๐ฅ๐ฆ = 2๐ 2 + (๐ + 2) (๐ + 1) ๐ ๐+2 ๐ฅ ๐ − ๐=1 ∞ Õ = 2๐2 + ! ∞ Õ ∞ Õ ! ๐ ๐−1 ๐ฅ ๐ ๐=1 (๐ + 2) (๐ + 1) ๐ ๐+2 − ๐ ๐−1 ๐ฅ ๐ . ๐=1 Again ๐ฆ 00 − ๐ฅ๐ฆ is supposed to be 0, so ๐ 2 = 0, and (๐ + 2) (๐ + 1) ๐ ๐+2 − ๐ ๐−1 = 0, or ๐ ๐+2 = ๐ ๐−1 . (๐ + 2)(๐ + 1) We jump in steps of three. First, since ๐ 2 = 0 we must have , ๐ 5 = 0, ๐8 = 0, ๐ 11 = 0, etc. In general, ๐ 3๐+2 = 0. The constants ๐ 0 and ๐ 1 are arbitrary and we obtain ๐3 = ๐0 , (3)(2) ๐4 = ๐1 , (4)(3) ๐6 = ๐3 ๐0 = , (6)(5) (6)(5)(3)(2) ๐7 = For ๐ ๐ where ๐ is a multiple of 3, that is ๐ = 3๐ we notice that ๐ 3๐ = ๐0 . (2)(3)(5)(6) · · · (3๐ − 1)(3๐) For ๐ ๐ where ๐ = 3๐ + 1, we notice ๐3๐+1 = ๐1 . (3)(4)(6)(7) · · · (3๐)(3๐ + 1) ๐4 ๐1 = , (7)(6) (7)(6)(4)(3) ... 338 CHAPTER 7. POWER SERIES METHODS In other words, if we write down the series for ๐ฆ, it has two parts ๐0 ๐0 6 ๐0 ๐ฆ = ๐0 + ๐ฅ 3 + ๐ฅ +···+ ๐ฅ 3๐ + · · · 6 180 (2)(3)(5)(6) · · · (3๐ − 1)(3๐) ๐1 7 ๐1 ๐1 4 3๐+1 ๐ฅ +···+ + ๐1 ๐ฅ + ๐ฅ + ๐ฅ +··· 12 504 (3)(4)(6)(7) · · · (3๐)(3๐ + 1) 1 3 1 6 1 ๐ฅ +···+ = ๐0 1 + ๐ฅ + ๐ฅ 3๐ + · · · 6 180 (2)(3)(5)(6) · · · (3๐ − 1)(3๐) 1 7 1 1 4 3๐+1 ๐ฅ +···+ + ๐1 ๐ฅ + ๐ฅ + ๐ฅ +··· . 12 504 (3)(4)(6)(7) · · · (3๐)(3๐ + 1) We define 1 6 1 1 ๐ฅ +···+ ๐ฅ 3๐ + · · · , ๐ฆ1 (๐ฅ) = 1 + ๐ฅ 3 + 6 180 (2)(3)(5)(6) · · · (3๐ − 1)(3๐) 1 7 1 1 ๐ฅ +···+ ๐ฅ 3๐+1 + · · · , ๐ฆ2 (๐ฅ) = ๐ฅ + ๐ฅ 4 + 12 504 (3)(4)(6)(7) · · · (3๐)(3๐ + 1) and write the general solution to the equation as ๐ฆ(๐ฅ) = ๐ 0 ๐ฆ1 (๐ฅ) + ๐1 ๐ฆ2 (๐ฅ). If we plug in ๐ฅ = 0 into the power series for ๐ฆ1 and ๐ฆ2 , we find ๐ฆ1 (0) = 1 and ๐ฆ2 (0) = 0. Similarly, ๐ฆ10 (0) = 0 and ๐ฆ20 (0) = 1. Therefore ๐ฆ = ๐ 0 ๐ฆ1 + ๐ 1 ๐ฆ2 is a solution that satisfies the initial conditions ๐ฆ(0) = ๐ 0 and ๐ฆ 0(0) = ๐ 1 . -5.0 7.5 -2.5 0.0 2.5 5.0 7.5 5.0 5.0 2.5 2.5 0.0 0.0 -2.5 -2.5 -5.0 -5.0 -5.0 -2.5 0.0 2.5 5.0 Figure 7.3: The two solutions ๐ฆ1 and ๐ฆ2 to Airy’s equation. The functions ๐ฆ1 and ๐ฆ2 cannot be written in terms of the elementary functions that you know. See Figure 7.3 for the plot of the solutions ๐ฆ1 and ๐ฆ2 . These functions have many interesting properties. For example, they are oscillatory for negative ๐ฅ (like solutions to ๐ฆ 00 + ๐ฆ = 0) and for positive ๐ฅ they grow without bound (like solutions to ๐ฆ 00 − ๐ฆ = 0). Sometimes a solution may turn out to be a polynomial. 339 7.2. SERIES SOLUTIONS OF LINEAR SECOND ORDER ODES Example 7.2.3: Let us find a solution to the so-called Hermite’s equation of order ๐ ∗ : ๐ฆ 00 − 2๐ฅ๐ฆ 0 + 2๐๐ฆ = 0. Let us find a solution around the point ๐ฅ 0 = 0. We try ๐ฆ= ∞ Õ ๐๐ ๐ฅ ๐ . ๐=0 We differentiate (as above) to obtain 0 ๐ฆ = ∞ Õ ๐๐ ๐ ๐ฅ ๐−1 , ๐=1 ๐ฆ 00 = ∞ Õ ๐ (๐ − 1) ๐ ๐ ๐ฅ ๐−2 . ๐=2 Now we plug into the equation 0 = ๐ฆ 00 − 2๐ฅ๐ฆ 0 + 2๐๐ฆ = = ∞ Õ ๐=2 ∞ Õ ! ๐(๐ − 1)๐ ๐ ๐ฅ ๐−2 − 2๐ฅ ! ๐(๐ − 1)๐ ๐ ๐ฅ ๐−2 − ๐=2 ∞ Õ ! ๐๐ ๐ ๐ฅ ๐−1 + 2๐ ๐=1 ∞ Õ ๐=1 = 2๐ 2 + ๐๐ ๐ฅ๐ ∞ Õ ! 2๐๐ ๐ ๐ฅ ๐ ๐=0 ! (๐ + 2)(๐ + 1)๐ ๐+2 ๐ฅ ๐ − ∞ Õ ๐=1 = 2๐2 + 2๐๐ 0 + ! ๐=0 ! 2๐๐ ๐ ๐ฅ ๐ + ∞ Õ ∞ Õ ! 2๐๐ ๐ ๐ฅ ๐ + 2๐๐ 0 + ๐=1 ∞ Õ ∞ Õ ! 2๐๐ ๐ ๐ฅ ๐ ๐=1 (๐ + 2)(๐ + 1)๐ ๐+2 − 2๐๐ ๐ + 2๐๐ ๐ ๐ฅ ๐ . ๐=1 As ๐ฆ 00 − 2๐ฅ ๐ฆ 0 + 2๐๐ฆ = 0 we have (๐ + 2)(๐ + 1)๐ ๐+2 + (−2๐ + 2๐)๐ ๐ = 0, or ๐ ๐+2 = (2๐ − 2๐) ๐๐ . (๐ + 2)(๐ + 1) This recurrence relation actually includes ๐2 = −๐๐ 0 (which comes about from 2๐2 + 2๐๐ 0 = 0). Again ๐0 and ๐ 1 are arbitrary. −2๐ 2(1 − ๐) ๐0 , ๐3 = ๐1 , (2)(1) (3)(2) 2(2 − ๐) 22 (2 − ๐)(−๐) ๐4 = ๐2 = ๐0 , (4)(3) (4)(3)(2)(1) ๐2 = ∗ Named after the French mathematician Charles Hermite (1822–1901). 340 CHAPTER 7. POWER SERIES METHODS ๐5 = 2(3 − ๐) 22 (3 − ๐)(1 − ๐) ๐3 = ๐1 , (5)(4) (5)(4)(3)(2) ... Let us separate the even and odd coefficients. We find that 2๐ (−๐)(2 − ๐) · · · (2๐ − 2 − ๐) , (2๐)! 2๐ (1 − ๐)(3 − ๐) · · · (2๐ − 1 − ๐) = . (2๐ + 1)! ๐ 2๐ = ๐ 2๐+1 Let us write down the two series, one with the even powers and one with the odd. 2(−๐) 2 22 (−๐)(2 − ๐) 4 23 (−๐)(2 − ๐)(4 − ๐) 6 ๐ฅ + ๐ฅ + ๐ฅ +··· , 2! 4! 6! 2(1 − ๐) 3 22 (1 − ๐)(3 − ๐) 5 23 (1 − ๐)(3 − ๐)(5 − ๐) 7 ๐ฆ2 (๐ฅ) = ๐ฅ + ๐ฅ + ๐ฅ + ๐ฅ +··· . 3! 5! 7! ๐ฆ1 (๐ฅ) = 1 + We then write ๐ฆ(๐ฅ) = ๐0 ๐ฆ1 (๐ฅ) + ๐ 1 ๐ฆ2 (๐ฅ). We remark that if ๐ is a positive even integer, then ๐ฆ1 (๐ฅ) is a polynomial as all the coefficients in the series beyond a certain degree are zero. If ๐ is a positive odd integer, then ๐ฆ2 (๐ฅ) is a polynomial. For example, if ๐ = 4, then ๐ฆ1 (๐ฅ) = 1 + 7.2.1 4 2(−4) 2 22 (−4)(2 − 4) 4 ๐ฅ + ๐ฅ = 1 − 4๐ฅ 2 + ๐ฅ 4 . 2! 4! 3 Exercises In the following exercises, when asked to solve an equation using power series methods, you should find the first few terms of the series, and if possible find a general formula for the ๐ th coefficient. Exercise 7.2.1: Use power series methods to solve ๐ฆ 00 + ๐ฆ = 0 at the point ๐ฅ0 = 1. Exercise 7.2.2: Use power series methods to solve ๐ฆ 00 + 4๐ฅ๐ฆ = 0 at the point ๐ฅ0 = 0. Exercise 7.2.3: Use power series methods to solve ๐ฆ 00 − ๐ฅ๐ฆ = 0 at the point ๐ฅ0 = 1. Exercise 7.2.4: Use power series methods to solve ๐ฆ 00 + ๐ฅ 2 ๐ฆ = 0 at the point ๐ฅ0 = 0. Exercise 7.2.5: The methods work for other orders than second order. Try the methods of this section to solve the first order system ๐ฆ 0 − ๐ฅ๐ฆ = 0 at the point ๐ฅ 0 = 0. Exercise 7.2.6 (Chebyshev’s equation of order ๐): a) Solve (1 − ๐ฅ 2 )๐ฆ 00 − ๐ฅ๐ฆ 0 + ๐ 2 ๐ฆ = 0 using power series methods at ๐ฅ0 = 0. b) For what ๐ is there a polynomial solution? 7.2. SERIES SOLUTIONS OF LINEAR SECOND ORDER ODES 341 Exercise 7.2.7: Find a polynomial solution to (๐ฅ 2 + 1)๐ฆ 00 − 2๐ฅ๐ฆ 0 + 2๐ฆ = 0 using power series methods. Exercise 7.2.8: a) Use power series methods to solve (1 − ๐ฅ)๐ฆ 00 + ๐ฆ = 0 at the point ๐ฅ 0 = 0. b) Use the solution to part a) to find a solution for ๐ฅ๐ฆ 00 + ๐ฆ = 0 around the point ๐ฅ0 = 1. Exercise 7.2.101: Use power series methods to solve ๐ฆ 00 + 2๐ฅ 3 ๐ฆ = 0 at the point ๐ฅ0 = 0. Exercise 7.2.102 (challenging): Power series methods also work for nonhomogeneous equations. a) Use power series methods to solve ๐ฆ 00 − ๐ฅ๐ฆ = geometric series. 1 1−๐ฅ at the point ๐ฅ0 = 0. Hint: Recall the b) Now solve for the initial condition ๐ฆ(0) = 0, ๐ฆ 0(0) = 0. Exercise 7.2.103: Attempt to solve ๐ฅ 2 ๐ฆ 00 − ๐ฆ = 0 at ๐ฅ0 = 0 using the power series method of this section (๐ฅ0 is a singular point). Can you find at least one solution? Can you find more than one solution? 342 7.3 CHAPTER 7. POWER SERIES METHODS Singular points and the method of Frobenius Note: 1 or 1.5 lectures, §8.4 and §8.5 in [EP], §5.4–§5.7 in [BD] While behavior of ODEs at singular points is more complicated, certain singular points are not especially difficult to solve. Let us look at some examples before giving a general method. We may be lucky and obtain a power series solution using the method of the previous section, but in general we may have to try other things. 7.3.1 Examples Example 7.3.1: Let us first look at a simple first order equation 2๐ฅ๐ฆ 0 − ๐ฆ = 0. Note that ๐ฅ = 0 is a singular point. If we try to plug in ๐ฆ= ∞ Õ ๐๐ ๐ฅ ๐ , ๐=0 we obtain 0 = 2๐ฅ๐ฆ 0 − ๐ฆ = 2๐ฅ ∞ Õ = ๐0 + ! ๐๐ ๐ ๐ฅ ๐−1 − ๐=1 ∞ Õ ∞ Õ ! ๐๐ ๐ฅ๐ ๐=0 (2๐๐ ๐ − ๐ ๐ ) ๐ฅ ๐ . ๐=1 First, ๐ 0 = 0. Next, the only way to solve 0 = 2๐๐ ๐ − ๐ ๐ = (2๐ − 1) ๐ ๐ for ๐ = 1, 2, 3, . . . is for ๐ ๐ = 0 for all ๐. Therefore, in this manner we only get the trivial solution ๐ฆ = 0. We need a nonzero solution to get the general solution to the equation. Let us try ๐ฆ = ๐ฅ ๐ for some real number ๐. Consequently our solution—if we can find one—may only make sense for positive ๐ฅ. Then ๐ฆ 0 = ๐๐ฅ ๐−1 . So 0 = 2๐ฅ๐ฆ 0 − ๐ฆ = 2๐ฅ๐๐ฅ ๐−1 − ๐ฅ ๐ = (2๐ − 1)๐ฅ ๐ . Therefore ๐ = 1/2, or in other words ๐ฆ = ๐ฅ 1/2 . Multiplying by a constant, the general solution for positive ๐ฅ is ๐ฆ = ๐ถ๐ฅ 1/2 . If ๐ถ ≠ 0, then the derivative of the solution “blows up” at ๐ฅ = 0 (the singular point). There is only one solution that is differentiable at ๐ฅ = 0 and that’s the trivial solution ๐ฆ = 0. Not every problem with a singular point has a solution of the form ๐ฆ = ๐ฅ ๐ , of course. But perhaps we can combine the methods. What we will do is to try a solution of the form ๐ฆ = ๐ฅ ๐ ๐ (๐ฅ), where ๐ (๐ฅ) is an analytic function. 343 7.3. SINGULAR POINTS AND THE METHOD OF FROBENIUS Example 7.3.2: Consider the equation 4๐ฅ 2 ๐ฆ 00 − 4๐ฅ 2 ๐ฆ 0 + (1 − 2๐ฅ)๐ฆ = 0, and again note that ๐ฅ = 0 is a singular point. Let us try ๐ฆ = ๐ฅ๐ ∞ Õ ๐๐ ๐ฅ ๐ = ๐=0 ∞ Õ ๐ ๐ ๐ฅ ๐+๐ , ๐=0 where ๐ is a real number, not necessarily an integer. Again if such a solution exists, it may only exist for positive ๐ฅ. First let us find the derivatives 0 ๐ฆ = ๐ฆ 00 = ∞ Õ (๐ + ๐) ๐ ๐ ๐ฅ ๐+๐−1 , ๐=0 ∞ Õ (๐ + ๐) (๐ + ๐ − 1) ๐ ๐ ๐ฅ ๐+๐−2 . ๐=0 Plugging into our equation we obtain 0 = 4๐ฅ 2 ๐ฆ 00 − 4๐ฅ 2 ๐ฆ 0 + (1 − 2๐ฅ)๐ฆ ! ∞ Õ (๐ + ๐) (๐ + ๐ − 1) ๐ ๐ ๐ฅ ๐+๐−2 − 4๐ฅ 2 = 4๐ฅ 2 (๐ + ๐) ๐ ๐ ๐ฅ ๐+๐−1 + (1 − 2๐ฅ) ๐=0 = ∞ Õ ! ∞ Õ ๐=0 ∞ Õ ! ๐ ๐ ๐ฅ ๐+๐ ๐=0 ! 4(๐ + ๐) (๐ + ๐ − 1) ๐ ๐ ๐ฅ ๐+๐ ๐=0 − ∞ Õ ! ∞ Õ 4(๐ + ๐) ๐ ๐ ๐ฅ ๐+๐+1 + ๐=0 = ∞ Õ ! ∞ Õ ๐ ๐ ๐ฅ ๐+๐ − ๐=0 ! 2๐ ๐ ๐ฅ ๐+๐+1 ๐=0 ! 4(๐ + ๐) (๐ + ๐ − 1) ๐ ๐ ๐ฅ ๐+๐ ๐=0 − ∞ Õ ! 4(๐ + ๐ − 1) ๐ ๐−1 ๐ฅ ๐+๐ + ๐=1 ∞ Õ ! ∞ Õ ๐ ๐ ๐ฅ ๐+๐ − ๐=0 = 4๐(๐ − 1) ๐ 0 ๐ฅ ๐ + ๐ 0 ๐ฅ ๐ + ∞ Õ ! 2๐ ๐−1 ๐ฅ ๐+๐ ๐=1 4(๐ + ๐) (๐ + ๐ − 1) ๐ ๐ − 4(๐ + ๐ − 1) ๐ ๐−1 + ๐ ๐ − 2๐ ๐−1 ๐ฅ ๐+๐ ๐=1 ๐ = 4๐(๐ − 1) + 1 ๐ 0 ๐ฅ + ∞ Õ 4(๐ + ๐) (๐ + ๐ − 1) + 1 ๐ ๐ − 4(๐ + ๐ − 1) + 2 ๐ ๐−1 ๐ฅ ๐+๐ . ๐=1 To have a solution we must first have 4๐(๐ − 1) + 1 ๐ 0 = 0. Supposing that ๐ 0 ≠ 0 we obtain 4๐(๐ − 1) + 1 = 0. 344 CHAPTER 7. POWER SERIES METHODS This equation is called the indicial equation. This particular indicial equation has a double root at ๐ = 1/2. OK, so we know what ๐ has to be. That knowledge we obtained simply by looking at the coefficient of ๐ฅ ๐ . All other coefficients of ๐ฅ ๐+๐ also have to be zero so 4(๐ + ๐) (๐ + ๐ − 1) + 1 ๐ ๐ − 4(๐ + ๐ − 1) + 2 ๐ ๐−1 = 0. If we plug in ๐ = 1/2 and solve for ๐ ๐ , we get ๐๐ = 1 4(๐ + 1/2 − 1) + 2 ๐ ๐−1 = ๐ ๐−1 . ๐ 4(๐ + 1/2) (๐ + 1/2 − 1) + 1 Let us set ๐ 0 = 1. Then 1 1 1 ๐0 = 1, ๐2 = ๐1 = , 1 2 2 Extrapolating, we notice that ๐1 = ๐3 = 1 1 ๐2 = , 3 3·2 ๐4 = 1 1 ๐3 = , 4 4·3·2 ··· 1 1 = . ๐(๐ − 1)(๐ − 2) · · · 3 · 2 ๐! ๐๐ = In other words, ๐ฆ= ∞ Õ ๐๐ ๐ฅ ๐+๐ = ∞ Õ 1 ๐=0 ๐=0 ๐! ๐ฅ ๐+1/2 =๐ฅ 1/2 ∞ Õ 1 ๐=0 ๐! ๐ฅ ๐ = ๐ฅ 1/2 ๐ ๐ฅ . That was lucky! In general, we will not be able to write the series in terms of elementary functions. We have one solution, let us call it ๐ฆ1 = ๐ฅ 1/2 ๐ ๐ฅ . But what about a second solution? If we want a general solution, we need two linearly independent solutions. Picking ๐0 to be a different constant only gets us a constant multiple of ๐ฆ1 , and we do not have any other ๐ to try; we only have one solution to the indicial equation. Well, there are powers of ๐ฅ floating around and we are taking derivatives, perhaps the logarithm (the antiderivative of ๐ฅ −1 ) is around as well. It turns out we want to try for another solution of the form ๐ฆ2 = ∞ Õ ๐ ๐ ๐ฅ ๐+๐ + (ln ๐ฅ)๐ฆ1 , ๐=0 which in our case is ๐ฆ2 = ∞ Õ ๐ ๐ ๐ฅ ๐+1/2 + (ln ๐ฅ)๐ฅ 1/2 ๐ ๐ฅ . ๐=0 We now differentiate this equation, substitute into the differential equation and solve for ๐ ๐ . A long computation ensues and we obtain some recursion relation for ๐ ๐ . The reader can (and should) try this to obtain for example the first three terms 2๐ 1 − 1 6๐ 2 − 1 , ๐3 = , ... 4 18 We then fix ๐ 0 and obtain a solution ๐ฆ2 . Then we write the general solution as ๐ฆ = ๐ด๐ฆ1 +๐ต๐ฆ2 . ๐ 1 = ๐ 0 − 1, ๐2 = 345 7.3. SINGULAR POINTS AND THE METHOD OF FROBENIUS 7.3.2 The method of Frobenius Before giving the general method, let us clarify when the method applies. Let ๐(๐ฅ)๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0 be an ODE. As before, if ๐(๐ฅ 0 ) = 0, then ๐ฅ0 is a singular point. If, furthermore, the limits lim (๐ฅ − ๐ฅ0 ) ๐ฅ→๐ฅ 0 ๐(๐ฅ) ๐(๐ฅ) and lim (๐ฅ − ๐ฅ0 )2 ๐ฅ→๐ฅ 0 ๐(๐ฅ) ๐(๐ฅ) both exist and are finite, then we say that ๐ฅ0 is a regular singular point. Example 7.3.3: Often, and for the rest of this section, ๐ฅ0 = 0. Consider ๐ฅ 2 ๐ฆ 00 + ๐ฅ(1 + ๐ฅ)๐ฆ 0 + (๐ + ๐ฅ 2 )๐ฆ = 0. Write ๐(๐ฅ) ๐ฅ(1 + ๐ฅ) = lim ๐ฅ = lim (1 + ๐ฅ) = 1, ๐ฅ→0 ๐ฅ→0 ๐(๐ฅ) ๐ฅ→0 ๐ฅ2 (๐ + ๐ฅ 2 ) ๐(๐ฅ) = lim (๐ + ๐ฅ 2 ) = ๐. = lim ๐ฅ 2 lim ๐ฅ 2 ๐ฅ→0 ๐ฅ→0 ๐(๐ฅ) ๐ฅ→0 ๐ฅ2 lim ๐ฅ So ๐ฅ = 0 is a regular singular point. On the other hand if we make the slight change ๐ฅ 2 ๐ฆ 00 + (1 + ๐ฅ)๐ฆ 0 + (๐ + ๐ฅ 2 )๐ฆ = 0, then lim ๐ฅ ๐ฅ→0 ๐(๐ฅ) (1 + ๐ฅ) 1+๐ฅ = DNE. = lim ๐ฅ = lim 2 ๐ฅ→0 ๐ฅ ๐(๐ฅ) ๐ฅ→0 ๐ฅ Here DNE stands for does not exist. The point 0 is a singular point, but not a regular singular point. Let us now discuss the general Method of Frobenius∗ . We only consider the method at the point ๐ฅ = 0 for simplicity. The main idea is the following theorem. Theorem 7.3.1 (Method of Frobenius). Suppose that ๐(๐ฅ)๐ฆ 00 + ๐(๐ฅ)๐ฆ 0 + ๐(๐ฅ)๐ฆ = 0 has a regular singular point at ๐ฅ = 0, then there exists at least one solution of the form ๐ฆ=๐ฅ ๐ ∞ Õ ๐๐ ๐ฅ ๐ . ๐=0 A solution of this form is called a Frobenius-type solution. ∗ Named after the German mathematician Ferdinand Georg Frobenius (1849–1917). (7.3) 346 CHAPTER 7. POWER SERIES METHODS The method usually breaks down like this: (i) We seek a Frobenius-type solution of the form ๐ฆ= ∞ Õ ๐ ๐ ๐ฅ ๐+๐ . ๐=0 We plug this ๐ฆ into equation (7.3). We collect terms and write everything as a single series. (ii) The obtained series must be zero. Setting the first coefficient (usually the coefficient of ๐ฅ ๐ ) in the series to zero we obtain the indicial equation, which is a quadratic polynomial in ๐. (iii) If the indicial equation has two real roots ๐1 and ๐2 such that ๐1 − ๐2 is not an integer, then we have two linearly independent Frobenius-type solutions. Using the first root, we plug in ๐ฆ1 = ๐ฅ ๐1 ∞ Õ ๐๐ ๐ฅ ๐ , ๐=0 and we solve for all ๐ ๐ to obtain the first solution. Then using the second root, we plug in ๐ฆ2 = ๐ฅ ๐2 ∞ Õ ๐๐ ๐ฅ๐ , ๐=0 and solve for all ๐ ๐ to obtain the second solution. (iv) If the indicial equation has a doubled root ๐, then there we find one solution ๐ฆ1 = ๐ฅ ๐ ∞ Õ ๐๐ ๐ฅ๐ , ๐=0 and then we obtain a new solution by plugging ๐ฆ2 = ๐ฅ ๐ ∞ Õ ๐ ๐ ๐ฅ ๐ + (ln ๐ฅ)๐ฆ1 , ๐=0 into equation (7.3) and solving for the constants ๐ ๐ . (v) If the indicial equation has two real roots such that ๐1 − ๐2 is an integer, then one solution is ๐ฆ 1 = ๐ฅ ๐1 ∞ Õ ๐=0 ๐๐ ๐ฅ ๐ , 7.3. SINGULAR POINTS AND THE METHOD OF FROBENIUS 347 and the second linearly independent solution is of the form ๐ฆ2 = ๐ฅ ๐2 ∞ Õ ๐ ๐ ๐ฅ ๐ + ๐ถ(ln ๐ฅ)๐ฆ1 , ๐=0 where we plug ๐ฆ2 into (7.3) and solve for the constants ๐ ๐ and ๐ถ. (vi) Finally, if the indicial equation has complex roots, then solving for ๐ ๐ in the solution ๐ฆ=๐ฅ ๐1 ∞ Õ ๐๐ ๐ฅ ๐ ๐=0 results in a complex-valued function—all the ๐ ๐ are complex numbers. We obtain our two linearly independent solutions∗ by taking the real and imaginary parts of ๐ฆ. The main idea is to find at least one Frobenius-type solution. If we are lucky and find two, we are done. If we only get one, we either use the ideas above or even a different method such as reduction of order (see § 2.1) to obtain a second solution. 7.3.3 Bessel functions An important class of functions that arises commonly in physics are the Bessel functions† . For example, these functions appear when solving the wave equation in two and three dimensions. First consider Bessel’s equation of order ๐: ๐ฅ 2 ๐ฆ 00 + ๐ฅ๐ฆ 0 + ๐ฅ 2 − ๐ 2 ๐ฆ = 0. We allow ๐ to be any number, not just an integer, although integers and multiples of 1/2 are most important in applications. When we plug ๐ฆ= ∞ Õ ๐ ๐ ๐ฅ ๐+๐ ๐=0 into Bessel’s equation of order ๐, we obtain the indicial equation ๐(๐ − 1) + ๐ − ๐ 2 = (๐ − ๐)(๐ + ๐) = 0. We obtain two roots, ๐1 = ๐ and ๐2 = −๐. If ๐ is not an integer, then following the method of Frobenius and setting ๐0 = 1, we find linearly independent solutions of the form ๐ฆ1 = ๐ฅ ๐ ๐ฆ2 = ๐ฅ ∞ Õ (−1) ๐ ๐ฅ 2๐ , 22๐ ๐!(๐ + ๐)(๐ − 1 + ๐) · · · (2 + ๐)(1 + ๐) ๐=0 ∞ Õ −๐ ๐=0 ∗ See (−1) ๐ ๐ฅ 2๐ . 22๐ ๐!(๐ − ๐)(๐ − 1 − ๐) · · · (2 − ๐)(1 − ๐) Joseph L. Neuringera, The Frobenius method for complex roots of the indicial equation, International Journal of Mathematical Education in Science and Technology, Volume 9, Issue 1, 1978, 71–77. † Named after the German astronomer and mathematician Friedrich Wilhelm Bessel (1784–1846). 348 CHAPTER 7. POWER SERIES METHODS Exercise 7.3.1: a) Verify that the indicial equation of Bessel’s equation of order ๐ is (๐ − ๐)(๐ + ๐) = 0. b) Suppose ๐ is not an integer. Carry out the computation to obtain the solutions ๐ฆ1 and ๐ฆ2 above. Bessel functions are convenient constant multiples of ๐ฆ1 and ๐ฆ2 . First we must define the gamma function ∫ ∞ ๐ก ๐ฅ−1 ๐ −๐ก ๐๐ก. Γ(๐ฅ) = 0 Notice that Γ(1) = 1. The gamma function also has a wonderful property Γ(๐ฅ + 1) = ๐ฅΓ(๐ฅ). From this property, it follows that Γ(๐) = (๐ − 1)! when ๐ is an integer. So the gamma function is a continuous version of the factorial. We compute: Γ(๐ + ๐ + 1) = (๐ + ๐)(๐ − 1 + ๐) · · · (2 + ๐)(1 + ๐)Γ(1 + ๐), Γ(๐ − ๐ + 1) = (๐ − ๐)(๐ − 1 − ๐) · · · (2 − ๐)(1 − ๐)Γ(1 − ๐). Exercise 7.3.2: Verify the identities above using Γ(๐ฅ + 1) = ๐ฅΓ(๐ฅ). We define the Bessel functions of the first kind of order ๐ and −๐ as ๐ฅ 2๐+๐ Õ 1 (−1) ๐ ๐ฝ๐ (๐ฅ) = ๐ , ๐ฆ1 = 2 Γ(1 + ๐) ๐! Γ(๐ + ๐ + 1) 2 ∞ ๐=0 ๐ฅ 2๐−๐ Õ 1 (−1) ๐ . ๐ฝ−๐ (๐ฅ) = −๐ ๐ฆ2 = 2 Γ(1 − ๐) ๐! Γ(๐ − ๐ + 1) 2 ∞ ๐=0 As these are constant multiples of the solutions we found above, these are both solutions to Bessel’s equation of order ๐. The constants are picked for convenience. When ๐ is not an integer, ๐ฝ๐ and ๐ฝ−๐ are linearly independent. When ๐ is an integer we obtain ∞ Õ (−1) ๐ ๐ฅ 2๐+๐ . ๐ฝ๐ (๐ฅ) = ๐! (๐ + ๐)! 2 ๐=0 In this case ๐ฝ๐ (๐ฅ) = (−1)๐ ๐ฝ−๐ (๐ฅ), and so ๐ฝ−๐ is not a second linearly independent solution. The other solution is the so-called Bessel function of second kind. These make sense only for integer orders ๐ and are defined as limits of linear combinations of ๐ฝ๐ (๐ฅ) and ๐ฝ−๐ (๐ฅ), as ๐ approaches ๐ in the following way: ๐๐ (๐ฅ) = lim ๐→๐ cos(๐๐)๐ฝ๐ (๐ฅ) − ๐ฝ−๐ (๐ฅ) sin(๐๐) . 349 7.3. SINGULAR POINTS AND THE METHOD OF FROBENIUS Each linear combination of ๐ฝ๐ (๐ฅ) and ๐ฝ−๐ (๐ฅ) is a solution to Bessel’s equation of order ๐. Then as we take the limit as ๐ goes to ๐, we see that ๐๐ (๐ฅ) is a solution to Bessel’s equation of order ๐. It also turns out that ๐๐ (๐ฅ) and ๐ฝ๐ (๐ฅ) are linearly independent. Therefore when ๐ is an integer, we have the general solution to Bessel’s equation of order ๐: ๐ฆ = ๐ด๐ฝ๐ (๐ฅ) + ๐ต๐๐ (๐ฅ), for arbitrary constants ๐ด and ๐ต. Note that ๐๐ (๐ฅ) goes to negative infinity at ๐ฅ = 0. Many mathematical software packages have these functions ๐ฝ๐ (๐ฅ) and ๐๐ (๐ฅ) defined, so they can be used just like say sin(๐ฅ) and cos(๐ฅ). In fact, Bessel functions have some similar properties. For example, −๐ฝ1 (๐ฅ) is a derivative of ๐ฝ0 (๐ฅ), and in general the derivative of ๐ฝ๐ (๐ฅ) can be written as a linear combination of ๐ฝ๐−1 (๐ฅ) and ๐ฝ๐+1 (๐ฅ). Furthermore, these functions oscillate, although they are not periodic. See Figure 7.4 for graphs of Bessel functions. 0.0 2.5 5.0 7.5 10.0 1.00 1.00 0.75 0.75 0.50 0.50 0.25 0.25 0.00 0.00 -0.25 -0.25 1.0 0.0 2.5 5.0 7.5 10.0 1.0 0.5 0.5 0.0 0.0 -0.5 -0.5 -1.0 -1.0 -1.5 -1.5 -2.0 0.0 2.5 5.0 7.5 10.0 0.0 2.5 5.0 7.5 -2.0 10.0 Figure 7.4: Plot of the ๐ฝ0 (๐ฅ) and ๐ฝ1 (๐ฅ) in the first graph and ๐0 (๐ฅ) and ๐1 (๐ฅ) in the second graph. Example 7.3.4: Other equations can sometimes be solved in terms of the Bessel functions. For example, given a positive constant ๐, ๐ฅ๐ฆ 00 + ๐ฆ 0 + ๐2 ๐ฅ๐ฆ = 0, can be changed to ๐ฅ 2 ๐ฆ 00 + ๐ฅ๐ฆ 0 + ๐2 ๐ฅ 2 ๐ฆ = 0. Then changing variables ๐ก = ๐๐ฅ, we obtain via chain rule the equation in ๐ฆ and ๐ก: ๐ก 2 ๐ฆ 00 + ๐ก ๐ฆ 0 + ๐ก 2 ๐ฆ = 0, which we recognize as Bessel’s equation of order 0. Therefore the general solution is ๐ฆ(๐ก) = ๐ด๐ฝ0 (๐ก) + ๐ต๐0 (๐ก), or in terms of ๐ฅ: ๐ฆ = ๐ด๐ฝ0 (๐๐ฅ) + ๐ต๐0 (๐๐ฅ). This equation comes up, for example, when finding the fundamental modes of vibration of a circular drum, but we digress. 350 7.3.4 CHAPTER 7. POWER SERIES METHODS Exercises Exercise 7.3.3: Find a particular (Frobenius-type) solution of ๐ฅ 2 ๐ฆ 00 + ๐ฅ๐ฆ 0 + (1 + ๐ฅ)๐ฆ = 0. Exercise 7.3.4: Find a particular (Frobenius-type) solution of ๐ฅ๐ฆ 00 − ๐ฆ = 0. Exercise 7.3.5: Find a particular (Frobenius-type) solution of ๐ฆ 00 + ๐ฅ1 ๐ฆ 0 − ๐ฅ๐ฆ = 0. Exercise 7.3.6: Find the general solution of 2๐ฅ๐ฆ 00 + ๐ฆ 0 − ๐ฅ 2 ๐ฆ = 0. Exercise 7.3.7: Find the general solution of ๐ฅ 2 ๐ฆ 00 − ๐ฅ๐ฆ 0 − ๐ฆ = 0. Exercise 7.3.8: In the following equations classify the point ๐ฅ = 0 as ordinary, regular singular, or singular but not regular singular. a) ๐ฅ 2 (1 + ๐ฅ 2 )๐ฆ 00 + ๐ฅ๐ฆ = 0 b) ๐ฅ 2 ๐ฆ 00 + ๐ฆ 0 + ๐ฆ = 0 c) ๐ฅ ๐ฆ 00 + ๐ฅ 3 ๐ฆ 0 + ๐ฆ = 0 d) ๐ฅ๐ฆ 00 + ๐ฅ๐ฆ 0 − ๐ ๐ฅ ๐ฆ = 0 e) ๐ฅ 2 ๐ฆ 00 + ๐ฅ 2 ๐ฆ 0 + ๐ฅ 2 ๐ฆ = 0 Exercise 7.3.101: In the following equations classify the point ๐ฅ = 0 as ordinary, regular singular, or singular but not regular singular. a) ๐ฆ 00 + ๐ฆ = 0 b) ๐ฅ 3 ๐ฆ 00 + (1 + ๐ฅ)๐ฆ = 0 c) ๐ฅ ๐ฆ 00 + ๐ฅ 5 ๐ฆ 0 + ๐ฆ = 0 d) sin(๐ฅ)๐ฆ 00 − ๐ฆ = 0 e) cos(๐ฅ)๐ฆ 00 − sin(๐ฅ)๐ฆ = 0 Exercise 7.3.102: Find the general solution of ๐ฅ 2 ๐ฆ 00 − ๐ฆ = 0. Exercise 7.3.103: Find a particular solution of ๐ฅ 2 ๐ฆ 00 + (๐ฅ − 3/4)๐ฆ = 0. Exercise 7.3.104 (tricky): Find the general solution of ๐ฅ 2 ๐ฆ 00 − ๐ฅ๐ฆ 0 + ๐ฆ = 0. Chapter 8 Nonlinear systems 8.1 Linearization, critical points, and equilibria Note: 1 lecture, §6.1–§6.2 in [EP], §9.2–§9.3 in [BD] Except for a few brief detours in chapter 1, we considered mostly linear equations. Linear equations suffice in many applications, but in reality most phenomena require nonlinear equations. Nonlinear equations, however, are notoriously more difficult to understand than linear ones, and many strange new phenomena appear when we allow our equations to be nonlinear. Not to worry, we did not waste all this time studying linear equations. Nonlinear equations can often be approximated by linear ones if we only need a solution “locally,” for example, only for a short period of time, or only for certain parameters. Understanding linear equations can also give us qualitative understanding about a more general nonlinear problem. The idea is similar to what you did in calculus in trying to approximate a function by a line with the right slope. In § 2.4 we looked at the pendulum of length ๐ฟ. The goal was to solve for the angle ๐(๐ก) as a function of the time ๐ก. The equation for ๐ฟ the setup is the nonlinear equation ๐ ๐ ๐00 + sin ๐ = 0. ๐ฟ ๐ Instead of solving this equation, we solved the rather easier linear equation ๐ ๐00 + ๐ = 0. ๐ฟ While the solution to the linear equation is not exactly what we were looking for, it is rather close to the original, as long as the angle ๐ is small and the time period involved is short. You might ask: Why don’t we just solve the nonlinear problem? Well, it might be very difficult, impractical, or impossible to solve analytically, depending on the equation in question. We may not even be interested in the actual solution, we might only be interested 352 CHAPTER 8. NONLINEAR SYSTEMS in some qualitative idea of what the solution is doing. For example, what happens as time goes to infinity? 8.1.1 Autonomous systems and phase plane analysis We restrict our attention to a two-dimensional autonomous system ๐ฅ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ 0 = ๐(๐ฅ, ๐ฆ), where ๐ (๐ฅ, ๐ฆ) and ๐(๐ฅ, ๐ฆ) are functions of two variables, and the derivatives are taken with respect to time ๐ก. Solutions are functions ๐ฅ(๐ก) and ๐ฆ(๐ก) such that ๐ฅ 0(๐ก) = ๐ ๐ฅ(๐ก), ๐ฆ(๐ก) , ๐ฆ 0(๐ก) = ๐ ๐ฅ(๐ก), ๐ฆ(๐ก) . The way we will analyze the system is very similar to § 1.6, where we studied a single autonomous equation. The ideas in two dimensions are the same, but the behavior can be far more complicated. It may be best to think of the system of equations as the single vector equation 0 ๐ฅ ๐ฆ ๐ (๐ฅ, ๐ฆ) = . ๐(๐ฅ, ๐ฆ) (8.1) As in § 3.1 we draw the phase portrait (or phase diagram), where each point (๐ฅ, ๐ฆ) corresponds to a specific state of the system. We draw the vector field given at each point (๐ฅ, ๐ฆ) by the h i vector ๐ (๐ฅ,๐ฆ) ๐(๐ฅ,๐ฆ) . And as before if we find solutions, we draw the trajectories by plotting all points ๐ฅ(๐ก), ๐ฆ(๐ก) for a certain range of ๐ก. Example 8.1.1: Consider the second order equation ๐ฅ 00 = −๐ฅ + ๐ฅ 2 . Write this equation as a first order nonlinear system ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฅ 2 . The phase portrait with some trajectories is drawn in Figure 8.1 on the facing page. From the phase portrait it should be clear that even this simple system has fairly complicated behavior. Some trajectories keep oscillating around the origin, and some go off towards infinity. We will return to this example often, and analyze it completely in this (and the next) section. If we zoom into the diagram near a point where h ๐ (๐ฅ,๐ฆ) ๐(๐ฅ,๐ฆ) i is not zero, then nearby the arrows point generally in essentially that same direction and have essentially the same magnitude. In other words the behavior is not that interesting near such a point. We are of course assuming that ๐ (๐ฅ, ๐ฆ) and ๐(๐ฅ, ๐ฆ) are continuous. Let us concentrate on those points in the phase diagram above where the trajectories seem to start, end, or go around. We see two such points: (0, 0) and (1, 0). The trajectories seem to go around the point (0, 0), and they seem to either go in or out of the point (1, 0). 353 8.1. LINEARIZATION, CRITICAL POINTS, AND EQUILIBRIA -2 -1 0 1 2 2 2 1 1 0 0 -1 -1 -2 -2 -2 -1 0 1 2 Figure 8.1: Phase portrait with some trajectories of ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฅ 2 . These points are precisely those points where the derivatives of both ๐ฅ and ๐ฆ are zero. Let us define the critical points as the points (๐ฅ, ๐ฆ) such that ๐ (๐ฅ, ๐ฆ) ® = 0. ๐(๐ฅ, ๐ฆ) In other words, these are the points where both ๐ (๐ฅ, ๐ฆ) = 0 and ๐(๐ฅ, ๐ฆ) = 0. The critical hpointsi are where the behavior of the system is in some sense the most complicated. If ๐ (๐ฅ,๐ฆ) ๐(๐ฅ,๐ฆ) is zero, then nearby, the vector can point in any direction whatsoever. Also, the trajectories are either going towards, away from, or around these points, so if we are looking for long-term qualitative behavior of the system, we should look at what is happening near the critical points. Critical points are also sometimes called equilibria, since we have so-called equilibrium solutions at critical points. If (๐ฅ0 , ๐ฆ0 ) is a critical point, then we have the solutions ๐ฅ(๐ก) = ๐ฅ0 , ๐ฆ(๐ก) = ๐ฆ0 . In Example 8.1.1 on the preceding page, there are two equilibrium solutions: ๐ฅ(๐ก) = 0, ๐ฆ(๐ก) = 0, and ๐ฅ(๐ก) = 1, ๐ฆ(๐ก) = 0. Compare this discussion on equilibria to the discussion in § 1.6. The underlying concept is exactly the same. 8.1.2 Linearization In § 3.5 we studied the behavior of a homogeneous linear system of two equations near a critical point. For a linear system of two variables given by an invertible matrix, the only 354 CHAPTER 8. NONLINEAR SYSTEMS critical point is the origin (0, 0). Let us put the understanding we gained in that section to good use understanding what happens near critical points of nonlinear systems. In calculus we learned to estimate a function by taking its derivative and linearizing. We work similarly with nonlinear systems of ODE. Suppose (๐ฅ 0 , ๐ฆ0 ) is a critical point. First change variables to (๐ข, ๐ฃ), so that (๐ข, ๐ฃ) = (0, 0) corresponds to (๐ฅ0 , ๐ฆ0 ). That is, ๐ข = ๐ฅ − ๐ฅ0 , ๐ฃ = ๐ฆ − ๐ฆ0 . Next we need to find the derivative. In multivariable calculus you may have seen that the several variables version ofh the derivative is the Jacobian matrix∗ . The Jacobian matrix of i ๐ (๐ฅ,๐ฆ) the vector-valued function ๐(๐ฅ,๐ฆ) at (๐ฅ0 , ๐ฆ0 ) is "๐๐ (๐ฅ , ๐ฆ ) ๐๐ฅ 0 0 ๐๐ (๐ฅ , ๐๐ฅ 0 ๐ฆ0 ) ๐๐ (๐ฅ , ๐๐ฆ 0 ๐๐ (๐ฅ , ๐๐ฆ 0 ๐ฆ0 ) # ๐ฆ0 ) . This matrix gives the best linear approximation as ๐ข and ๐ฃ (and therefore ๐ฅ and ๐ฆ) vary. We define the linearization of the equation (8.1) as the linear system ๐ข ๐ฃ ๐๐ (๐ฅ , ๐๐ฆ 0 ๐๐ (๐ฅ , ๐๐ฆ 0 "๐๐ 0 (๐ฅ , ๐ฆ ) ๐๐ฅ 0 0 = ๐๐ (๐ฅ , ๐๐ฅ 0 ๐ฆ0 ) ๐ฆ0 ) ๐ฆ0 ) # ๐ข . ๐ฃ Example 8.1.2: Let us keep with the same equations as Example 8.1.1: ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฅ 2 . There are two critical points, (0, 0) and (1, 0). The Jacobian matrix at any point is "๐๐ ๐๐ (๐ฅ, ๐๐ฆ ๐๐ (๐ฅ, ๐๐ฆ (๐ฅ, ๐ฆ) ๐๐ฅ ๐๐ (๐ฅ, ๐๐ฅ ๐ฆ) ๐ฆ) # 0 1 = . −1 + 2๐ฅ 0 ๐ฆ) Therefore at (0, 0), we have ๐ข = ๐ฅ and ๐ฃ = ๐ฆ, and the linearization is 0 ๐ข ๐ฃ 0 1 = −1 0 ๐ข . ๐ฃ At the point (1, 0), we have ๐ข = ๐ฅ − 1 and ๐ฃ = ๐ฆ, and the linearization is 0 ๐ข ๐ฃ 0 1 = 1 0 ๐ข . ๐ฃ The phase diagrams of the two linearizations at the point (0, 0) and (1, 0) are given in Figure 8.2 on the facing page. Note that the variables are now ๐ข and ๐ฃ. Compare Figure 8.2 with Figure 8.1 on the previous page, and look especially at the behavior near the critical points. ∗ Named for the German mathematician Carl Gustav Jacob Jacobi (1804–1851). 355 8.1. LINEARIZATION, CRITICAL POINTS, AND EQUILIBRIA -1.0 1.0 1.0 -1.0 1.0 0.5 0.5 0.5 0.5 0.0 0.0 0.0 0.0 -0.5 -0.5 -0.5 -0.5 -1.0 -1.0 -1.0 -1.0 -1.0 -0.5 -0.5 0.0 0.0 0.5 1.0 0.5 1.0 -0.5 0.0 0.5 1.0 1.0 -1.0 -0.5 0.0 0.5 1.0 Figure 8.2: Phase diagram with some trajectories of linearizations at the critical points (0, 0) (left) and (1, 0) (right) of ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฅ 2 . 8.1.3 Exercises Exercise 8.1.1: Sketch the phase plane vector field for: a) ๐ฅ 0 = ๐ฅ 2 , ๐ฆ 0 = ๐ฆ 2 , b) ๐ฅ 0 = (๐ฅ − ๐ฆ)2 , ๐ฆ 0 = −๐ฅ, c) ๐ฅ 0 = ๐ ๐ฆ , ๐ฆ 0 = ๐ ๐ฅ . 2) ๐ฅ 0 = ๐ฅ๐ฆ, ๐ฆ 0 = 1 + ๐ฆ 2 , 3) ๐ฅ 0 = sin(๐๐ฆ), ๐ฆ 0 = ๐ฅ, b) c) Exercise 8.1.2: Match systems 1) ๐ฅ 0 = ๐ฅ 2 , ๐ฆ 0 = ๐ฆ 2 , to the vector fields below. Justify. a) Exercise 8.1.3: Find the critical points and linearizations of the following systems. a) ๐ฅ 0 = ๐ฅ 2 − ๐ฆ 2 , ๐ฆ 0 = ๐ฅ 2 + ๐ฆ 2 − 1, b) ๐ฅ 0 = −๐ฆ, ๐ฆ 0 = 3๐ฅ + ๐ฆ๐ฅ 2 , c) ๐ฅ 0 = ๐ฅ 2 + ๐ฆ, ๐ฆ 0 = ๐ฆ 2 + ๐ฅ. Exercise 8.1.4: For the following systems, verify they have critical point at (0, 0), and find the linearization at (0, 0). a) ๐ฅ 0 = ๐ฅ + 2๐ฆ + ๐ฅ 2 − ๐ฆ 2 , ๐ฆ 0 = 2๐ฆ − ๐ฅ 2 b) ๐ฅ 0 = −๐ฆ, ๐ฆ 0 = ๐ฅ − ๐ฆ 3 c) ๐ฅ 0 = ๐๐ฅ + ๐๐ฆ + ๐ (๐ฅ, ๐ฆ), ๐ฆ 0 = ๐๐ฅ + ๐๐ฆ + ๐(๐ฅ, ๐ฆ), where ๐ (0, 0) = 0, ๐(0, 0) = 0, and all first partial derivatives of ๐ and ๐ are also zero at (0, 0), that is, ๐๐ (0, 0) ๐๐ฆ = 0. ๐๐ (0, 0) ๐๐ฅ = ๐๐ (0, 0) ๐๐ฆ = ๐๐ (0, 0) ๐๐ฅ = 356 CHAPTER 8. NONLINEAR SYSTEMS Exercise 8.1.5: Take ๐ฅ 0 = (๐ฅ − ๐ฆ)2 , ๐ฆ 0 = (๐ฅ + ๐ฆ)2 . a) Find the set of critical points. b) Sketch a phase diagram and describe the behavior near the critical point(s). c) Find the linearization. Is it helpful in understanding the system? Exercise 8.1.6: Take ๐ฅ 0 = ๐ฅ 2 , ๐ฆ 0 = ๐ฅ 3 . a) Find the set of critical points. b) Sketch a phase diagram and describe the behavior near the critical point(s). c) Find the linearization. Is it helpful in understanding the system? Exercise 8.1.101: Find the critical points and linearizations of the following systems. a) ๐ฅ 0 = sin(๐๐ฆ) + (๐ฅ − 1)2 , ๐ฆ 0 = ๐ฆ 2 − ๐ฆ, b) ๐ฅ 0 = ๐ฅ + ๐ฆ + ๐ฆ 2 , ๐ฆ 0 = ๐ฅ, c) ๐ฅ 0 = (๐ฅ − 1)2 + ๐ฆ, ๐ฆ 0 = ๐ฅ 2 + ๐ฆ. Exercise 8.1.102: Match systems 1) ๐ฅ 0 = ๐ฆ 2 , ๐ฆ 0 = −๐ฅ 2 , 2) ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = (๐ฅ − 1)(๐ฅ + 1), 3) ๐ฅ 0 = ๐ฆ + ๐ฅ 2 , ๐ฆ 0 = −๐ฅ, to the vector fields below. Justify. a) b) c) Exercise 8.1.103: The idea of critical points and linearization works in higher dimensions as well. You simply make the Jacobian matrix bigger by adding more functions and more variables. For the following system of 3 equations find the critical points and their linearizations: ๐ฅ0 = ๐ฅ + ๐ง 2 , ๐ฆ 0 = ๐ง 2 − ๐ฆ, ๐ง0 = ๐ง + ๐ฅ 2 . Exercise 8.1.104: Any two-dimensional non-autonomous system ๐ฅ 0 = ๐ (๐ฅ, ๐ฆ, ๐ก), ๐ฆ 0 = ๐(๐ฅ, ๐ฆ, ๐ก) can be written as a three-dimensional autonomous system (three equations). Write down this autonomous system using the variables ๐ข, ๐ฃ, ๐ค. 8.2. STABILITY AND CLASSIFICATION OF ISOLATED CRITICAL POINTS 8.2 357 Stability and classification of isolated critical points Note: 1.5–2 lectures, §6.1–§6.2 in [EP], §9.2–§9.3 in [BD] 8.2.1 Isolated critical points and almost linear systems A critical point is isolated if it is the only critical point in some small “neighborhood” of the point. That is, if we zoom in far enough it is the only critical point we see. In the example above, the critical point was isolated. If on the other hand there would be a whole curve of critical points, then it would not be isolated. A system is called almost linear at a critical point (๐ฅ0 , ๐ฆ0 ), if the critical point is isolated and the Jacobian matrix at the point is invertible, or equivalently if the linearized system has an isolated critical point. In such a case, the nonlinear terms are very small and the system behaves like its linearization, at least if we are close to the critical point. For example, the system in Examples 8.1.1 and 8.1.2 has two isolated critical points (0, 0) and linear at both critical points as the Jacobian matrices at both 0(0,1 1), and 0is1almost points, −1 0 and 1 0 , are invertible. On the other hand, the system ๐ฅ 0 = ๐ฅ 2 , ๐ฆ 0 = ๐ฆ 2 has an isolated critical point at (0, 0), however the Jacobian matrix 2๐ฅ 0 0 2๐ฆ is zero when (๐ฅ, ๐ฆ) = (0, 0). So the system is not almost linear. Even a worse example is the system ๐ฅ 0 = ๐ฅ, ๐ฆ 0 = ๐ฅ 2 , which does not have isolated critical points; ๐ฅ 0 and ๐ฆ 0 are both zero whenever ๐ฅ = 0, that is, the entire ๐ฆ-axis. Fortunately, most often critical points are isolated, and the system is almost linear at the critical points. So if we learn what happens there, we will have figured out the majority of situations that arise in applications. 8.2.2 Stability and classification of isolated critical points Once we have an isolated critical point, the system is almost linear at that critical point, and we computed the associated linearized system, we can classify what happens to the solutions. We more or less use the classification for linear two-variable systems from § 3.5, with one minor caveat. Let us list the behaviors depending on the eigenvalues of the Jacobian matrix at the critical point in Table 8.1 on the following page. This table is very similar to Table 3.1 on page 150, with the exception of missing “center” points. We will discuss centers later, as they are more complicated. In the third column, we mark points as asymptotically stable or unstable. Formally, a stable critical point (๐ฅ 0 , ๐ฆ0 ) is one where given any small distance ๐ to (๐ฅ0 , ๐ฆ0 ), and any initial condition within a perhaps smaller radius around (๐ฅ0 , ๐ฆ0 ), the trajectory of the system never goes further away from (๐ฅ0 , ๐ฆ0 ) than ๐. An unstable critical point is one that is not 358 CHAPTER 8. NONLINEAR SYSTEMS Eigenvalues of the Jacobian matrix Behavior Stability real and both positive real and both negative real and opposite signs complex with positive real part complex with negative real part source / unstable node unstable sink / stable node asymptotically stable saddle unstable spiral source unstable spiral sink asymptotically stable Table 8.1: Behavior of an almost linear system near an isolated critical point. stable. Informally, a point is stable if we start close to a critical point and follow a trajectory we either go towards, or at least not away from, this critical point. A stable critical point (๐ฅ0 , ๐ฆ0 ) is called asymptoticallystable if given any initial condition sufficiently close to (๐ฅ0 , ๐ฆ0 ) and any solution ๐ฅ(๐ก), ๐ฆ(๐ก) satisfying that condition, then lim ๐ฅ(๐ก), ๐ฆ(๐ก) = (๐ฅ0 , ๐ฆ0 ). ๐ก→∞ That is, the critical point is asymptotically stable if any trajectory for a sufficiently close initial condition goes towards the critical point (๐ฅ0 , ๐ฆ0 ). Example 8.2.1: Consider ๐ฅ 0 = −๐ฆ − ๐ฅ 2 , ๐ฆ 0 = −๐ฅ + ๐ฆ 2 . See Figure 8.3 on the facing page for the phase diagram. Let us find the critical points. These are the points where −๐ฆ − ๐ฅ 2 = 0 and −๐ฅ + ๐ฆ 2 = 0. The first equation means ๐ฆ = −๐ฅ 2 , and so ๐ฆ 2 = ๐ฅ 4 . Plugging into the second equation we obtain −๐ฅ + ๐ฅ 4 = 0. Factoring we obtain ๐ฅ(1 − ๐ฅ 3 ) = 0. Since we are looking only for real solutions we get either ๐ฅ = 0 or ๐ฅ = 1. Solving for the corresponding ๐ฆ using ๐ฆ = −๐ฅ 2 , we get two critical points, one being (0, 0) and the other being (1, −1). Clearly the critical points are isolated. Let us compute the Jacobian matrix: −2๐ฅ −1 . −1 2๐ฆ 0 −1 and so the two eigenvalues are 1 and −1. As At the point (0, 0) we get the matrix −1 0 the matrix is invertible, the system is almost linear at (0, 0). As the eigenvalues are real and of opposite signs, we get a saddle point, which is an unstable equilibrium point. −1 At the point (1, −1) we get the matrix −2 −1 −2 and computing the eigenvalues we get −1, −3. The matrix is invertible, and so the system is almost linear at (1, −1). As we have real eigenvalues and both negative, the critical point is a sink, and therefore an asymptotically stable equilibrium point. That is, if we start with any point (๐ฅ ๐ , ๐ฆ ๐ ) close to (1, −1) as an initial condition and plot a trajectory, it approaches (1, −1). In other words, lim ๐ฅ(๐ก), ๐ฆ(๐ก) = (1, −1). ๐ก→∞ 8.2. STABILITY AND CLASSIFICATION OF ISOLATED CRITICAL POINTS -2 -1 0 1 359 2 2 2 1 1 0 0 -1 -1 -2 -2 -2 -1 0 1 2 Figure 8.3: The phase portrait with few sample trajectories of ๐ฅ 0 = −๐ฆ − ๐ฅ 2 , ๐ฆ 0 = −๐ฅ + ๐ฆ 2 . As you can see from the diagram, this behavior is true even for some initial points quite far from (1, −1), but it is definitely not true for all initial points. Example 8.2.2: Let us look at ๐ฅ 0 = ๐ฆ + ๐ฆ 2 ๐ ๐ฅ , ๐ฆ 0 = ๐ฅ. First let us find the critical points. These are the points where ๐ฆ + ๐ฆ 2 ๐ ๐ฅ = 0 and ๐ฅ = 0. Simplifying we get 0 = ๐ฆ + ๐ฆ 2 = ๐ฆ(๐ฆ + 1). So the critical points are (0, 0) and (0, −1), and hence are isolated. Let us compute the Jacobian matrix: 2 ๐ฅ ๐ฆ ๐ 1 + 2๐ฆ๐ ๐ฅ . 1 0 At the point (0, 0) we get the matrix 01 10 and so the two eigenvalues are 1 and −1. As the matrix is invertible, the system is almost linear at (0, 0). And, as the eigenvalues are real and of opposite signs, we get a saddle point, which is an unstable equilibrium point. √ At the point (0, −1) we get the matrix 11 −1 whose eigenvalues are 12 ± ๐ 23 . The matrix 0 is invertible, and so the system is almost linear at (0, −1). As we have complex eigenvalues with positive real part, the critical point is a spiral source, and therefore an unstable equilibrium point. See Figure 8.4 on the next page for the phase diagram. Notice the two critical points, and the behavior of the arrows in the vector field around these points. 8.2.3 The trouble with centers Recall, a linear system with a center means that trajectories travel in closed elliptical orbits in some direction around the critical point. Such a critical point we call a center or a stable center. It is not an asymptotically stable critical point, as the trajectories never approach the critical point, but at least if you start sufficiently close to the critical point, you stay close to the critical point. The simplest example of such behavior is the linear system with a center. Another example is the critical point (0, 0) in Example 8.1.1 on page 352. 360 CHAPTER 8. NONLINEAR SYSTEMS -2 -1 0 1 2 2 2 1 1 0 0 -1 -1 -2 -2 -2 -1 0 1 2 Figure 8.4: The phase portrait with few sample trajectories of ๐ฅ 0 = ๐ฆ + ๐ฆ 2 ๐ ๐ฅ , ๐ฆ 0 = ๐ฅ. The trouble with a center in a nonlinear system is that whether the trajectory goes towards or away from the critical point is governed by the sign of the real part of the eigenvalues of the Jacobian matrix, and the Jacobian matrix in a nonlinear system changes from point to point. Since this real part is zero at the critical point itself, it can have either sign nearby, meaning the trajectory could be pulled towards or away from the critical point. Example 8.2.3: An example of such a problematic behavior is the system ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ+๐ฆ 3 . The only critical point is the origin (0, 0). The Jacobian matrix is 0 1 . −1 3๐ฆ 2 0 1 , which has eigenvalues ±๐. So the linearization has a At (0, 0) the Jacobian matrix is −1 0 center. Using the quadratic equation, the eigenvalues of the Jacobian matrix at any point (๐ฅ, ๐ฆ) are p 4 − 9๐ฆ 4 3 2 ๐= ๐ฆ ±๐ . 2 2 At any point where ๐ฆ ≠ 0 (so at most points near the origin), the eigenvalues have a positive real part (๐ฆ 2 can never be negative). This positive real part pulls the trajectory away from the origin. A sample trajectory for an initial condition near the origin is given in Figure 8.5 on the next page. The moral of the example is that further analysis is needed when the linearization has a center. The analysis will in general be more complicated than in the example above, and is more likely to involve case-by-case consideration. Such a complication should not be surprising to you. By now in your mathematical career, you have seen many places where a simple test is inconclusive, recall for example the second derivative test for maxima or minima, and requires more careful, and perhaps ad hoc analysis of the situation. 8.2. STABILITY AND CLASSIFICATION OF ISOLATED CRITICAL POINTS -3 -2 -1 0 1 2 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -2 -1 0 1 2 361 3 Figure 8.5: An unstable critical point (spiral source) at the origin for ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฆ 3 , even if the linearization has a center. 8.2.4 Conservative equations An equation of the form ๐ฅ 00 + ๐ (๐ฅ) = 0 for an arbitrary function ๐ (๐ฅ) is called a conservative equation. For example the pendulum equation is a conservative equation. The equations are conservative as there is no friction in the system so the energy in the system is “conserved.” Let us write this equation as a system of nonlinear ODE. ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = − ๐ (๐ฅ). These types of equations have the advantage that we can solve for their trajectories easily. The trick is to first think of ๐ฆ as a function of ๐ฅ for a moment. Then use the chain rule ๐ฅ 00 = ๐ฆ 0 = ๐๐ฆ 0 ๐๐ฆ ๐ฅ =๐ฆ , ๐๐ฅ ๐๐ฅ ๐๐ฆ where the prime indicates a derivative with respect to ๐ก. We obtain ๐ฆ ๐๐ฅ + ๐ (๐ฅ) = 0. We integrate with respect to ๐ฅ to get ∫ ๐๐ฆ ๐ฆ ๐๐ฅ ๐๐ฅ + 1 2 ๐ฆ + 2 ∫ ∫ ๐ (๐ฅ) ๐๐ฅ = ๐ถ. In other words ๐ (๐ฅ) ๐๐ฅ = ๐ถ. We obtained an implicit equation for the trajectories, with different ๐ถ giving different trajectories. The value of ๐ถ is conserved on any trajectory. This expression is sometimes called the Hamiltonian or the energy of the system. If you look back to § 1.8, you will notice ๐๐ฆ that ๐ฆ ๐๐ฅ + ๐ (๐ฅ) = 0 is an exact equation, and we just found a potential function. 362 CHAPTER 8. NONLINEAR SYSTEMS Example 8.2.4: Let us find the trajectories for the equation ๐ฅ 00 + ๐ฅ − ๐ฅ 2 = 0, which is the equation from Example 8.1.1 on page 352. The corresponding first order system is ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ + ๐ฅ 2 . Trajectories satisfy 1 2 1 2 1 3 ๐ฆ + ๐ฅ − ๐ฅ = ๐ถ. 2 2 3 We solve for ๐ฆ r 2 ๐ฆ = ± −๐ฅ 2 + ๐ฅ 3 + 2๐ถ. 3 Plotting these graphs we get exactly the trajectories in Figure 8.1 on page 353. In particular we notice that near the origin the trajectories are closed curves: they keep going around the origin, never spiraling in or out. Therefore we discovered a way to verify that the critical point at (0, 0) is a stable center. The critical point at (0, 1) is a saddle as we already noticed. This example is typical for conservative equations. Consider an arbitrary conservative equation ๐ฅ 00 + ๐ (๐ฅ) = 0. All critical points occur when ๐ฆ = 0 (the ๐ฅ-axis), that is when ๐ฅ 0 = 0. The critical points are those points on the ๐ฅ-axis where ๐ (๐ฅ) = 0. The trajectories are given by s ๐ฆ = ± −2 ∫ ๐ (๐ฅ) ๐๐ฅ + 2๐ถ. So all trajectories are mirrored across the ๐ฅ-axis. In particular, there can be no spiral sources nor sinks. The Jacobian matrix is 0 1 . − ๐ 0(๐ฅ) 0 The critical point is almost linear if ๐ 0(๐ฅ) ≠ 0 at the critical point. Let ๐ฝ denote the Jacobian matrix. The eigenvalues of ๐ฝ are solutions to 0 = det(๐ฝ − ๐๐ผ) = ๐2 + ๐ 0(๐ฅ). Therefore ๐ = ± − ๐ 0(๐ฅ). In other words, either we get real eigenvalues of opposite signs (if ๐ 0(๐ฅ) < 0), or we get purely imaginary eigenvalues (if ๐ 0(๐ฅ) > 0). There are only two possibilities for critical points, either an unstable saddle point, or a stable center. There are never any sinks or sources. p 8.2.5 Exercises Exercise 8.2.1: For the systems below, find and classify the critical points, also indicate if the equilibria are stable, asymptotically stable, or unstable. a) ๐ฅ 0 = −๐ฅ + 3๐ฅ 2 , ๐ฆ 0 = −๐ฆ c) ๐ฅ 0 = ๐ฆ๐ ๐ฅ , ๐ฆ 0 = ๐ฆ − ๐ฅ + ๐ฆ 2 b) ๐ฅ 0 = ๐ฅ 2 + ๐ฆ 2 − 1, ๐ฆ 0 = ๐ฅ 8.2. STABILITY AND CLASSIFICATION OF ISOLATED CRITICAL POINTS 363 Exercise 8.2.2: Find the implicit equations of the trajectories of the following conservative systems. Next find their critical points (if any) and classify them. a) ๐ฅ 00 + ๐ฅ + ๐ฅ 3 = 0 b) ๐00 + sin ๐ = 0 c) ๐ง 00 + (๐ง − 1)(๐ง + 1) = 0 d) ๐ฅ 00 + ๐ฅ 2 + 1 = 0 Exercise 8.2.3: Find and classify the critical point(s) of ๐ฅ 0 = −๐ฅ 2 , ๐ฆ 0 = −๐ฆ 2 . Exercise 8.2.4: Suppose ๐ฅ 0 = −๐ฅ๐ฆ, ๐ฆ 0 = ๐ฅ 2 − 1 − ๐ฆ. a) Show there are two spiral sinks at (−1, 0) and (1, 0). b) For any initial point of the form (0, ๐ฆ0 ), find what is the trajectory. c) Can a trajectory starting at (๐ฅ0 , ๐ฆ0 ) where ๐ฅ0 > 0 spiral into the critical point at (−1, 0)? Why or why not? Exercise 8.2.5: In the example ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = ๐ฆ 3 − ๐ฅ show that for any trajectory, the distance from the origin is an increasing function. Conclude that the origin behaves like is a spiral source. Hint: 2 2 Consider ๐ (๐ก) = ๐ฅ(๐ก) + ๐ฆ(๐ก) and show it has positive derivative. Exercise 8.2.6: Suppose ๐ is always positive. Find the trajectories of ๐ฅ 00 + ๐ (๐ฅ 0) = 0. Are there any critical points? Exercise 8.2.7: Suppose that ๐ฅ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ 0 = ๐(๐ฅ, ๐ฆ). Suppose that ๐(๐ฅ, ๐ฆ) > 1 for all ๐ฅ and ๐ฆ. Are there any critical points? What can we say about the trajectories at ๐ก goes to infinity? Exercise 8.2.101: For the systems below, find and classify the critical points. a) ๐ฅ 0 = −๐ฅ + ๐ฅ 2 , ๐ฆ 0 = ๐ฆ b) ๐ฅ 0 = ๐ฆ − ๐ฆ 2 − ๐ฅ, ๐ฆ 0 = −๐ฅ c) ๐ฅ 0 = ๐ฅ๐ฆ, ๐ฆ 0 = ๐ฅ + ๐ฆ − 1 Exercise 8.2.102: Find the implicit equations of the trajectories of the following conservative systems. Next find their critical points (if any) and classify them. a) ๐ฅ 00 + ๐ฅ 2 = 4 b) ๐ฅ 00 + ๐ ๐ฅ = 0 c) ๐ฅ 00 + (๐ฅ + 1)๐ ๐ฅ = 0 Exercise 8.2.103: The conservative system ๐ฅ 00 + ๐ฅ 3 = 0 is not almost linear. Classify its critical point(s) nonetheless. Exercise 8.2.104: Derive an analogous classification of critical points for equations in one dimension, such as ๐ฅ 0 = ๐ (๐ฅ) based on the derivative. A point ๐ฅ0 is critical when ๐ (๐ฅ0 ) = 0 and almost linear if in addition ๐ 0(๐ฅ0 ) ≠ 0. Figure out if the critical point is stable or unstable depending on the sign of ๐ 0(๐ฅ0 ). Explain. Hint: see § 1.6. 364 8.3 CHAPTER 8. NONLINEAR SYSTEMS Applications of nonlinear systems Note: 2 lectures, §6.3–§6.4 in [EP], §9.3, §9.5 in [BD] In this section we study two very standard examples of nonlinear systems. First, we look at the nonlinear pendulum equation. We saw the pendulum equation’s linearization before, but we noted it was only valid for small angles and short times. Now we find out what happens for large angles. Next, we look at the predator-prey equation, which finds various applications in modeling problems in biology, chemistry, economics, and elsewhere. 8.3.1 Pendulum ๐ The first example we study is the pendulum equation ๐00 + ๐ฟ sin ๐ = 0. Here, ๐ is the angular displacement, ๐ is the gravitational acceleration, and ๐ฟ is the length of the pendulum. In this equation we disregard friction, so we are talking about an idealized pendulum. This equation is a conservative equation, so we can use our analysis of conservative equations from the previous section. Let us ๐ฟ change the equation to a two-dimensional system in variables (๐, ๐) ๐ by introducing the new variable ๐: 0 ๐ ๐ ๐ = . ๐ − ๐ฟ sin ๐ ๐ ๐ The critical points of this system are when ๐ = 0 and − ๐ฟ sin ๐ = 0, or in other words if sin ๐ = 0. So the critical points are when ๐ = 0 and ๐ is a multiple of ๐. That is, the points are . . . (−2๐, 0), (−๐, 0), (0, 0), (๐, 0), (2๐, 0) . . .. While there are infinitely many critical points, they are all isolated. Let us compute the Jacobian matrix: ๏ฃฎ ๐ ๏ฃฏ ๐๐ ๐ ๏ฃฏ ๏ฃฏ๐ ๐ − sin ๐ ๏ฃฏ ๐๐ ๐ฟ ๏ฃฐ ๐ ๐๐ ๐ ๐๐ ๐ ๏ฃน ๏ฃบ 0 1 ๏ฃบ = . ๐ ๏ฃบ ๐ − ๐ฟ cos ๐ 0 − ๐ฟ sin ๐ ๏ฃบ ๏ฃป For conservative equations, there are two types of critical points. q Either stable centers, ๐ or saddle points. The eigenvalues of the Jacobian matrix are ๐ = ± − ๐ฟ cos ๐. The eigenvalues are going to be real when cos ๐ < 0. This happens at the odd multiples of ๐. The eigenvalues are going to be purely imaginary when cos ๐ > 0. This happens at the even multiples of ๐. Therefore the system has a stable center at the points . . . (−2๐, 0), (0, 0), (2๐, 0) . . ., and it has an unstable saddle at the points . . . (−3๐, 0), (−๐, 0), (๐, 0), (3๐, 0) . . .. Look at the phase diagram in Figure 8.6 on the facing ๐ page, where for simplicity we let ๐ฟ = 1. In the linearized equation we have only a single critical point, the center at (0, 0). Now we see more clearly what we meant when we said the linearization is good for small 365 8.3. APPLICATIONS OF NONLINEAR SYSTEMS -5.0 -2.5 0.0 2.5 5.0 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -5.0 -2.5 0.0 2.5 5.0 Figure 8.6: Phase plane diagram and some trajectories of the nonlinear pendulum equation. angles. The horizontal axis is the deflection angle. The vertical axis is the angular velocity of the pendulum. Suppose we start at ๐ = 0 (no deflection), and we start with a small angular velocity ๐. Then the trajectory keeps going around the critical point (0, 0) in an approximate circle. This corresponds to short swings of the pendulum back and forth. When ๐ stays small, the trajectories really look like circles and hence are very close to our linearization. When we give the pendulum a big enough push, it goes across the top and keeps spinning about its axis. This behavior corresponds to the wavy curves that do not cross the horizontal axis in the phase diagram. Let us suppose we look at the top curves, when the angular velocity ๐ is large and positive. Then the pendulum is going around and around its axis. The velocity is going to be large when the pendulum is near the bottom, and the velocity is the smallest when the pendulum is close to the top of its loop. At each critical point, there is an equilibrium solution. Consider the solution ๐ = 0; the pendulum is not moving and is hanging straight down. This is a stable place for the pendulum to be, hence this is a stable equilibrium. The other type of equilibrium solution is at the unstable point, for example ๐ = ๐. Here the pendulum is upside down. Sure you can balance the pendulum this way and it will stay, but this is an unstable equilibrium. Even the tiniest push will make the pendulum start swinging wildly. See Figure 8.7 on the next page for a diagram. The first picture is the stable equilibrium ๐ = 0. The second picture corresponds to those “almost circles” in the phase diagram around ๐ = 0 when the angular velocity is small. The next picture is the unstable equilibrium ๐ = ๐. The last picture corresponds to the wavy lines for large angular velocities. The quantity 1 2 ๐ ๐ − cos ๐ 2 ๐ฟ 366 CHAPTER 8. NONLINEAR SYSTEMS ๐=0 ๐=๐ Small angular velocities Large angular velocities Figure 8.7: Various possibilities for the motion of the pendulum. is conserved by any solution. This is the energy or the Hamiltonian of the system. We have a conservative equation and so (exercise) the trajectories are given by r ๐=± 2๐ cos ๐ + ๐ถ, ๐ฟ for various values of ๐ถ. Let us look at the initial condition of (๐0 , 0), that is, we take the pendulum to angle ๐0 , and just let it go (initial angular velocity 0). We plug the initial conditions into the above and solve for ๐ถ to obtain ๐ถ=− 2๐ cos ๐0 . ๐ฟ Thus the expression for the trajectory is r ๐=± 2๐ p cos ๐ − cos ๐0 . ๐ฟ Let us figure out the period. That is, the time it takes for the pendulum to swing back and forth. We notice that the trajectory about the origin in the phase plane is symmetric about both the ๐ and the ๐-axis. That is, in terms of ๐, the time it takes from ๐0 to −๐0 is the same as it takes from −๐0 back to ๐0 . Furthermore, the time it takes from −๐0 to 0 is the same as to go from 0 to ๐0 . Therefore, let us find how long it takes for the pendulum to go from angle 0 to angle ๐0 , which is a quarter of the full oscillation and then multiply by 4. ๐๐ก We figure out this time by finding ๐๐ and integrating from 0 to ๐0 . The period is four times this integral. Let us stay in the region where ๐ is positive. Since ๐ = ๐๐ ๐๐ก , inverting we get ๐๐ก = ๐๐ s ๐ฟ 1 . √ 2๐ cos ๐ − cos ๐0 367 8.3. APPLICATIONS OF NONLINEAR SYSTEMS Therefore the period ๐ is given by s ๐=4 ๐ฟ 2๐ ∫ ๐0 √ 0 1 cos ๐ − cos ๐0 ๐๐. The integral is an improper integral, and we cannot in general evaluate it symbolically. We must resort to numerical approximation if we want to compute a particular ๐. ๐ Recall from § 2.4, the linearized equation ๐00 + ๐ฟ ๐ = 0 has period s ๐linear = 2๐ ๐ฟ . ๐ We plot ๐, ๐linear , and the relative error ๐−๐๐linear in Figure 8.8. The relative error says how far is our approximation from the real period percentage-wise. Note that ๐linear is simply a constant, it does not change with the initial angle ๐0 . The actual period ๐ gets larger and larger as ๐0 gets larger. Notice how the relative error is small when ๐0 is small. It is still only 15% when ๐0 = ๐2 , that is, a 90 degree angle. The error is 3.8% when starting at ๐4 , a 45 degree angle. At a 5 degree initial angle, the error is only 0.048%. 0.00 8.0 0.25 0.50 0.75 1.00 1.25 1.50 0.00 0.25 0.50 0.75 1.00 1.25 1.50 8.0 7.5 0.150 0.150 0.125 0.125 0.100 0.100 7.5 7.0 7.0 6.5 6.5 0.075 0.075 6.0 6.0 0.050 0.050 0.025 0.025 5.5 5.5 0.000 5.0 0.00 0.000 5.0 0.25 0.50 0.75 1.00 1.25 Figure 8.8: The plot of ๐ and ๐linear with ๐0 between 0 and ๐/2. 1.50 ๐ ๐ฟ 0.00 0.25 0.50 0.75 1.00 1.25 = 1 (left), and the plot of the relative error ๐−๐linear ๐ 1.50 (right), for While it is not immediately obvious from the formula, it is true that lim ๐ = ∞. ๐0 ↑๐ That is, the period goes to infinity as the initial angle approaches the unstable equilibrium point. So if we put the pendulum almost upside down it may take a very long time before it gets down. This is consistent with the limiting behavior, where the exactly upside down pendulum never makes an oscillation, so we could think of that as infinite period. 368 8.3.2 CHAPTER 8. NONLINEAR SYSTEMS Predator-prey or Lotka–Volterra systems One of the most common simple applications of nonlinear systems are the so-called predator-prey or Lotka–Volterra∗ systems. For example, these systems arise when two species interact, one as the prey and one as the predator. It is then no surprise that the equations also see applications in economics. The system also arises in chemical reactions. In biology, this system of equations explains the natural periodic variations of populations of different species in nature. Before the application of differential equations, these periodic variations in the population baffled biologists. We keep with the classical example of hares and foxes in a forest, it is the easiest to understand. ๐ฅ = # of hares (the prey), ๐ฆ = # of foxes (the predator). When there are a lot of hares, there is plenty of food for the foxes, so the fox population grows. However, when the fox population grows, the foxes eat more hares, so when there are lots of foxes, the hare population should go down, and vice versa. The Lotka–Volterra model proposes that this behavior is described by the system of equations ๐ฅ 0 = (๐ − ๐๐ฆ)๐ฅ, ๐ฆ 0 = (๐๐ฅ − ๐)๐ฆ, where ๐, ๐, ๐, ๐ are some parameters that describe the interaction of the foxes and hares† . In this model, these are all positive numbers. Let us analyze the idea behind this model. The model is a slightly more complicated idea based on the exponential population model. First expand, ๐ฅ 0 = (๐ − ๐๐ฆ)๐ฅ = ๐๐ฅ − ๐๐ฆ๐ฅ. The hares are expected to simply grow exponentially in the absence of foxes, that is where the ๐๐ฅ term comes in, the growth in population is proportional to the population itself. We are assuming the hares always find enough food and have enough space to reproduce. However, there is another component −๐๐ฆ๐ฅ, that is, the population also is decreasing proportionally to the number of foxes. Together we can write the equation as (๐ − ๐๐ฆ)๐ฅ, so it is like exponential growth or decay but the constant depends on the number of foxes. The equation for foxes is very similar, expand again ๐ฆ 0 = (๐๐ฅ − ๐)๐ฆ = ๐๐ฅ๐ฆ − ๐๐ฆ. The foxes need food (hares) to reproduce: the more food, the bigger the rate of growth, hence the ๐๐ฅ๐ฆ term. On the other hand, there are natural deaths in the fox population, and hence the −๐๐ฆ term. ∗ Named for the American mathematician, chemist, and statistician Alfred James Lotka (1880–1949) and the Italian mathematician and physicist Vito Volterra (1860–1940). † This interaction does not end well for the hare. 369 8.3. APPLICATIONS OF NONLINEAR SYSTEMS Without further delay, let us start with an explicit example. Suppose the equations are ๐ฅ 0 = (0.4 − 0.01๐ฆ)๐ฅ, ๐ฆ 0 = (0.003๐ฅ − 0.3)๐ฆ. See Figure 8.9 for the phase portrait. In this example it makes sense to also plot ๐ฅ and ๐ฆ as graphs with respect to time. Therefore the second graph in Figure 8.9 is the graph of ๐ฅ and ๐ฆ on the vertical axis (the prey ๐ฅ is the thinner line with taller peaks), against time on the horizontal axis. The particular solution graphed was with initial conditions of 20 foxes and 50 hares. 0 50 100 150 200 250 300 100 100 75 0 10 20 30 40 300 300 250 250 200 200 150 150 100 100 50 50 75 50 50 25 25 0 0 50 100 150 200 0 300 250 0 0 0 10 20 30 40 Figure 8.9: The phase portrait (left) and graphs of ๐ฅ and ๐ฆ for a sample solution (right). Let us analyze what we see on the graphs. We work in the general setting rather than putting in specific numbers. We start with finding the critical points. Set (๐ − ๐๐ฆ)๐ฅ = 0, and (๐๐ฅ − ๐)๐ฆ = 0. The first equation is satisfied if either ๐ฅ = 0 or ๐ฆ = ๐/๐ . If ๐ฅ = 0, the second equation implies ๐ฆ = 0. If ๐ฆ = ๐/๐ , the second equation implies ๐ฅ = ๐/๐ . There are two equilibria: at (0, 0) when there are no animals at all, and at (๐/๐ , ๐/๐ ). In our specific example ๐ฅ = ๐/๐ = 100, and ๐ฆ = ๐/๐ = 40. This is the point where there are 100 hares and 40 foxes. We compute the Jacobian matrix: ๐ − ๐๐ฆ −๐๐ฅ . ๐๐ฆ ๐๐ฅ − ๐ 0 , so the eigenvalues are ๐ and −๐, hence real At the origin (0, 0) we get the matrix 0๐ −๐ and of opposite signs. So the critical point at the origin is a saddle. This makes sense. If you started with some foxes but no hares, then the foxes would go extinct, that is, you would approach the origin. If you started with no foxes and a few hares, then the hares would keep multiplying without check, and so you would go away from the origin. OK, how about the other critical point at (๐/๐ , ๐/๐ ). Here the Jacobian matrix becomes 0 ๐๐ ๐ − ๐๐ ๐ . 0 370 CHAPTER 8. NONLINEAR SYSTEMS √ The eigenvalues satisfy ๐2 + ๐๐ = 0. In other words, ๐ = ±๐ ๐๐. The eigenvalues being purely imaginary, we are in the case where we cannot quite decide using only linearization. We could have a stable center, spiral sink, or a spiral source. That is, the equilibrium could be asymptotically stable, stable, or unstable. Of course I gave you a picture above that seems to imply it is a stable center. But never trust a picture only. Perhaps the oscillations are getting larger and larger, but only very slowly. Of course this would be bad as it would imply something will go wrong with our population sooner or later. And I only graphed a very specific example with very specific trajectories. How can we be sure we are in the stable situation? As we said before, in the case of purely imaginary eigenvalues, we have to do a bit more work. Previously we found that for conservative systems, there was a certain quantity that was conserved on the trajectories, and hence the trajectories had to go in closed loops. We can use a similar technique here. We just have to figure out what is the conserved quantity. After some trial and error we find the constant ๐ฆ๐ ๐ฅ๐ ๐ถ = ๐๐ฅ+๐ ๐ฆ = ๐ฆ ๐ ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ ๐ is conserved. Such a quantity is called the constant of motion. Let us check ๐ถ really is a constant of motion. How do we check, you say? Well, a constant is something that does not change with time, so let us compute the derivative with respect to time: ๐ถ 0 = ๐๐ฆ ๐−1 ๐ฆ 0 ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ + ๐ฆ ๐ ๐๐ฅ ๐−1 ๐ฅ 0 ๐ −๐๐ฅ−๐ ๐ฆ + ๐ฆ ๐ ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ (−๐๐ฅ 0 − ๐๐ฆ 0). Our equations give us what ๐ฅ 0 and ๐ฆ 0 are so let us plug those in: ๐ถ 0 = ๐๐ฆ ๐−1 (๐๐ฅ − ๐)๐ฆ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ + ๐ฆ ๐ ๐๐ฅ ๐−1 (๐ − ๐๐ฆ)๐ฅ๐ −๐๐ฅ−๐ ๐ฆ + ๐ฆ ๐ ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ −๐(๐ − ๐๐ฆ)๐ฅ − ๐(๐๐ฅ − ๐)๐ฆ = ๐ฆ ๐ ๐ฅ ๐ ๐ −๐๐ฅ−๐ ๐ฆ ๐(๐๐ฅ − ๐) + ๐(๐ − ๐๐ฆ) + −๐(๐ − ๐๐ฆ)๐ฅ − ๐(๐๐ฅ − ๐)๐ฆ = 0. ๐ฆ๐ ๐ฅ๐ So along the trajectories ๐ถ is constant. In fact, the expression ๐ถ = ๐ ๐๐ฅ+๐ ๐ฆ gives us an implicit equation for the trajectories. In any case, once we have found this constant of motion, it ๐ฆ๐ ๐ฅ๐ must be true that the trajectories are simple curves, that is, the level curves of ๐ ๐๐ฅ+๐ ๐ฆ . It turns out, the critical point at (๐/๐ , ๐/๐ ) is a maximum for ๐ถ (left as an exercise). So (๐/๐ , ๐/๐ ) is a stable equilibrium point, and we do not have to worry about the foxes and hares going extinct or their populations exploding. One blemish on this wonderful model is that the number of foxes and hares are discrete quantities and we are modeling with continuous variables. Our model has no problem with there being 0.1 fox in the forest for example, while in reality that makes no sense. The approximation is a reasonable one as long as the number of foxes and hares are large, but it does not make much sense for small numbers. One must be careful in interpreting any results from such a model. 371 8.3. APPLICATIONS OF NONLINEAR SYSTEMS An interesting consequence (perhaps counterintuitive) of this model is that adding animals to the forest might lead to extinction, because the variations will get too big, and one of the populations will get close to zero. For example, suppose there are 20 foxes and 50 hares as before, but now we bring in more foxes, bringing their number to 200. If we run the computation, we find the number of hares will plummet to just slightly more than 1 hare in the whole forest. In reality that most likely means the hares die out, and then the foxes will die out as well as they will have nothing to eat. Showing that a system of equations has a stable solution can be a very difficult problem. When Isaac Newton put forth his laws of planetary motions, he proved that a single planet orbiting a single sun is a stable system. But any solar system with more than 1 planet proved very difficult indeed. In fact, such a system behaves chaotically (see § 8.5), meaning small changes in initial conditions lead to very different long-term outcomes. From numerical experimentation and measurements, we know the earth will not fly out into the empty space or crash into the sun, for at least some millions of years or so. But we do not know what happens beyond that. 8.3.3 Exercises Exercise 8.3.1: Take the damped nonlinear pendulum equation ๐00 + ๐๐0 + ( ๐/๐ฟ) sin ๐ = 0 for some ๐ > 0 (that is, there is some friction). a) Suppose ๐ = 1 and ๐/๐ฟ = 1 for simplicity, find and classify the critical points. b) Do the same for any ๐ > 0 and any ๐ and ๐ฟ, but such that the damping is small, in particular, ๐2 < 4( ๐/๐ฟ). c) Explain what your findings mean, and if it agrees with what you expect in reality. Exercise 8.3.2: Suppose the hares do not grow exponentially, but logistically. In particular consider ๐ฅ 0 = (0.4 − 0.01๐ฆ)๐ฅ − ๐พ๐ฅ 2 , ๐ฆ 0 = (0.003๐ฅ − 0.3)๐ฆ. For the following two values of ๐พ, find and classify all the critical points in the positive quadrant, that is, for ๐ฅ ≥ 0 and ๐ฆ ≥ 0. Then sketch the phase diagram. Discuss the implication for the long term behavior of the population. a) ๐พ = 0.001, b) ๐พ = 0.01. Exercise 8.3.3: a) Suppose ๐ฅ and ๐ฆ are positive variables. Show ๐ฆ๐ฅ ๐ ๐ฅ+๐ฆ attains a maximum at (1, 1). b) Suppose ๐, ๐, ๐, ๐ are positive constants, and also suppose ๐ฅ and ๐ฆ are positive variables. Show ๐ฆ๐ ๐ฅ๐ ๐ ๐๐ฅ+๐ ๐ฆ attains a maximum at (๐/๐ , ๐/๐ ). 372 CHAPTER 8. NONLINEAR SYSTEMS Exercise 8.3.4: Suppose that for the q pendulum equation we take a trajectory giving the spinningaround motion, for example ๐ = 2๐ ๐ฟ cos ๐ + 2๐ ๐ฟ + ๐02 . This is the trajectory where the lowest angular velocity is ๐02 . Find an integral expression for how long it takes the pendulum to go all the way around. Exercise 8.3.5 (challenging): Take the pendulum, suppose the initial position is ๐ = 0. a) Find the expression for ๐ giving the trajectory with initial condition (0, ๐0 ). Hint: Figure out what ๐ถ should be in terms of ๐0 . b) Find the crucial angular velocity ๐1 , such that for any higher initial angular velocity, the pendulum will keep going around its axis, and for any lower initial angular velocity, the pendulum will simply swing back and forth. Hint: When the pendulum doesn’t go over the top the expression for ๐ will be undefined for some ๐s. c) What do you think happens if the initial condition is (0, ๐1 ), that is, the initial angle is 0, and the initial angular velocity is exactly ๐1 . Exercise 8.3.101: Take the damped nonlinear pendulum equation ๐00 + ๐๐0 + ( ๐/๐ฟ) sin ๐ = 0 for some ๐ > 0 (that is, there is friction). Suppose the friction is large, in particular ๐2 > 4( ๐/๐ฟ). a) Find and classify the critical points. b) Explain what your findings mean, and if it agrees with what you expect in reality. Exercise 8.3.102: Suppose we have the system predator-prey system where the foxes are also killed at a constant rate โ (โ foxes killed per unit time): ๐ฅ 0 = (๐ − ๐๐ฆ)๐ฅ, ๐ฆ 0 = (๐๐ฅ − ๐)๐ฆ − โ. a) Find the critical points and the Jacobian matrices of the system. b) Put in the constants ๐ = 0.4, ๐ = 0.01, ๐ = 0.003, ๐ = 0.3, โ = 10. Analyze the critical points. What do you think it says about the forest? Exercise 8.3.103 (challenging): Suppose the foxes never die. That is, we have the system ๐ฅ 0 = (๐ − ๐๐ฆ)๐ฅ, ๐ฆ 0 = ๐๐ฅ๐ฆ. Find the critical points and notice they are not isolated. What will happen to the population in the forest if it starts at some positive numbers. Hint: Think of the constant of motion. 373 8.4. LIMIT CYCLES 8.4 Limit cycles Note: less than 1 lecture, discussed in §6.1 and §6.4 in [EP] , §9.7 in [BD] For nonlinear systems, trajectories do not simply need to approach or leave a single point. They may in fact approach a larger set, such as a circle or another closed curve. Example 8.4.1: The Van der Pol oscillator∗ is the following equation ๐ฅ 00 − ๐(1 − ๐ฅ 2 )๐ฅ 0 + ๐ฅ = 0, where ๐ is some positive constant. The Van der Pol oscillator originated with electrical circuits, but finds applications in diverse fields such as biology, seismology, and other physical sciences. For simplicity, let us use ๐ = 1. A phase diagram is given in the left-hand plot in Figure 8.10. Notice how the trajectories seem to very quickly settle on a closed curve. On the right-hand side is the plot of a single solution for ๐ก = 0 to ๐ก = 30 with initial conditions ๐ฅ(0) = 0.1 and ๐ฅ 0(0) = 0.1. The solution quickly tends to a periodic solution. -4 -2 0 2 4 4 0 5 10 15 20 25 30 4 2 2 2 1 1 0 0 -1 -1 2 0 0 -2 -2 -2 -4 -2 -4 -4 -2 0 2 4 0 5 10 15 20 25 30 Figure 8.10: The phase portrait (left) and a graph of a sample solution of the Van der Pol oscillator. The Van der Pol oscillator is an example of so-called relaxation oscillation. The word relaxation comes from the sudden jump (the very steep part of the solution). For larger ๐ the steep part becomes even more pronounced, for small ๐ the limit cycle looks more like a circle. In fact, setting ๐ = 0, we get ๐ฅ 00 + ๐ฅ = 0, which is a linear system with a center and all trajectories become circles. A trajectory in the phase portrait that is a closed curve (a curve that is a loop) is called a closed trajectory. A limit cycle is a closed trajectory such that at least one other trajectory spirals into it (or spirals out of it). For example, the closed curve in the phase portrait for ∗ Named for the Dutch physicist Balthasar van der Pol (1889–1959). 374 CHAPTER 8. NONLINEAR SYSTEMS the Van der Pol equation is a limit cycle. If all trajectories that start near the limit cycle spiral into it, the limit cycle is called asymptotically stable. The limit cycle in the Van der Pol oscillator is asymptotically stable. Given a closed trajectory on an autonomous system, any solution that starts on it is periodic. Such a curve is called a periodic orbit. More precisely, if ๐ฅ(๐ก), ๐ฆ(๐ก) is a solution such that for some ๐ก0 the point ๐ฅ(๐ก0 ), ๐ฆ(๐ก0 ) lies on a periodic orbit, then both ๐ฅ(๐ก) and ๐ฆ(๐ก) are periodic functions (with the same period). That is, there is some number ๐ such that ๐ฅ(๐ก) = ๐ฅ(๐ก + ๐) and ๐ฆ(๐ก) = ๐ฆ(๐ก + ๐). Consider the system ๐ฅ 0 = ๐ (๐ฅ, ๐ฆ), ๐ฆ 0 = ๐(๐ฅ, ๐ฆ), (8.2) where the functions ๐ and ๐ have continuous derivatives in some region ๐ in the plane. Theorem 8.4.1 (Poincaré–Bendixson∗ ). Suppose ๐ is a closed bounded region (a region in the plane that includes its boundary and does not have points arbitrarily far from the origin). Suppose ๐ฅ(๐ก), ๐ฆ(๐ก) is a solution of (8.2) in ๐ that exists for all ๐ก ≥ ๐ก0 . Then either the solution is a periodic function, or the solution tends towards a periodic solution in ๐ . The main point of the theorem is that if you find one solution that exists for all ๐ก large enough (that is, as ๐ก goes to infinity) and stays within a bounded region, then you have found either a periodic orbit, or a solution that spirals towards a limit cycle or tends to a critical point. That is, in the long term, the behavior is very close to a periodic function. Note that a constant solution at a critical point is periodic (with any period). The theorem is more a qualitative statement rather than something to help us in computations. In practice it is hard to find analytic solutions and so hard to show rigorously that they exist for all time. But if we think the solution exists we numerically solve for a large time to approximate the limit cycle. Another caveat is that the theorem only works in two dimensions. In three dimensions and higher, there is simply too much room. The theorem applies to all solutions in the Van der Pol oscillator. Solutions that start at any point except the origin (0, 0) will tend to the periodic solution around the limit cycle, and if the initial condition of (0, 0) will lead to the constant solution ๐ฅ = 0, ๐ฆ = 0. Example 8.4.2: Consider 2 ๐ฅ 0 = ๐ฆ + (๐ฅ 2 + ๐ฆ 2 − 1) ๐ฅ, 2 ๐ฆ 0 = −๐ฅ + (๐ฅ 2 + ๐ฆ 2 − 1) ๐ฆ. A vector field along with solutions with initial conditions (1.02, 0), (0.9, 0), and (0.1, 0) are drawn in Figure 8.11 on the next page. Notice that points on the unit circle (distance one from the origin) satisfy ๐ฅ 2 + ๐ฆ 2 − 1 = 0. And ๐ฅ(๐ก) = sin(๐ก), ๐ฆ = cos(๐ก) is a solution of the system. Therefore we have a closed trajectory. For points off the unit circle, the second term in ๐ฅ 0 pushes the solution further away from the ๐ฆ-axis than the system ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ, and ๐ฆ 0 pushes the solution further away from the ๐ฅ-axis than the linear system ๐ฅ 0 = ๐ฆ, ๐ฆ 0 = −๐ฅ. In other words for all other initial conditions the trajectory will spiral out. ∗ Ivar Otto Bendixson (1861–1935) was a Swedish mathematician. 375 8.4. LIMIT CYCLES -1.5 1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0.0 -0.5 -0.5 -1.0 -1.0 -1.5 -1.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 Figure 8.11: Unstable limit cycle example. This means that for initial conditions inside the unit circle, the solution spirals out towards the periodic solution on the unit circle, and for initial conditions outside the unit circle the solutions spiral off towards infinity. Therefore the unit circle is a limit cycle, but not an asymptotically stable one. The Poincaré–Bendixson Theorem applies to the initial points inside the unit circle, as those solutions stay bounded, but not to those outside, as those solutions go off to infinity. A very similar analysis applies to the system ๐ฅ 0 = ๐ฆ + (๐ฅ 2 + ๐ฆ 2 − 1)๐ฅ, ๐ฆ 0 = −๐ฅ + (๐ฅ 2 + ๐ฆ 2 − 1)๐ฆ. We still obtain a closed trajectory on the unit circle, and points outside the unit circle spiral out to infinity, but now points inside the unit circle spiral towards the critical point at the origin. So this system does not have a limit cycle, even though it has a closed trajectory. Due to the Picard theorem (Theorem 3.1.1 on page 125) we find that no matter where we are in the plane we can always find a solution a little bit further in time, as long as ๐ and ๐ have continuous derivatives. So if we find a closed trajectory in an autonomous system, then for every initial point inside the closed trajectory, the solution will exist for all time and it will stay bounded (it will stay inside the closed trajectory). So the moment we found the solution above going around the unit circle, we knew that for every initial point inside the circle, the solution exists for all time and the Poincaré–Bendixson theorem applies. Let us next look for conditions when limit cycles (or periodic orbits) do not exist. We assume the equation (8.2) is defined on a simply connected region, that is, a region with no holes we can go around. For example the entire plane is a simply connected region, and so is the inside of the unit disc. However, the entire plane minus a point is not a simply connected domain as it has a “hole” at the origin. 376 CHAPTER 8. NONLINEAR SYSTEMS Theorem 8.4.2 (Bendixson–Dulac∗ ). Suppose ๐ is a simply connected region, and the expression† ๐๐ ๐๐ + ๐๐ฅ ๐๐ฆ is either always positive or always negative on ๐ (except perhaps a small set such as on isolated points or curves) then the system (8.2) has no closed trajectory inside ๐ . The theorem gives us a way of ruling out the existence of a closed trajectory, and hence a way of ruling out limit cycles. The exception about points or curves means that we can allow the expression to be zero at a few points, or perhaps on a curve, but not on any larger set. Example 8.4.3: Let us look at ๐ฅ 0 = ๐ฆ + ๐ฆ 2 ๐ ๐ฅ , ๐ฆ 0 = ๐ฅ in the entire plane (see Example 8.2.2 on page 359). The entire plane is simply connected and so we can apply the theorem. We ๐๐ ๐๐ compute ๐๐ฅ + ๐๐ฆ = ๐ฆ 2 ๐ ๐ฅ + 0. The function ๐ฆ 2 ๐ ๐ฅ is always positive except on the line ๐ฆ = 0. Therefore, via the theorem, the system has no closed trajectories. In some books (or the internet) the theorem is not stated carefully and it concludes there are no periodic solutions. That is not quite right. The example above has two critical points and hence it has constant solutions, and constant functions are periodic. The conclusion of the theorem should be that there exist no trajectories that form closed curves. Another way to state the conclusion of the theorem would be to say that there exist no nonconstant periodic solutions that stay in ๐ . Example 8.4.4: Let us look at a somewhat more complicated example. Take the system ๐๐ ๐๐ ๐ฅ 0 = −๐ฆ − ๐ฅ 2 , ๐ฆ 0 = −๐ฅ + ๐ฆ 2 (see Example 8.2.1 on page 358). We compute ๐๐ฅ + ๐๐ฆ = −2๐ฅ + 2๐ฆ = 2(−๐ฅ + ๐ฆ). This expression takes on both signs, so if we are talking about the whole plane we cannot simply apply the theorem. However, we could apply it on the set where −๐ฅ + ๐ฆ ≥ 0. Via the theorem, there is no closed trajectory in that set. Similarly, there is no closed trajectory in the set −๐ฅ + ๐ฆ ≤ 0. We cannot conclude (yet) that there is no closed trajectory in the entire plane. Perhaps half of it is in the set where −๐ฅ + ๐ฆ ≥ 0 and the other half is in the set where −๐ฅ + ๐ฆ ≤ 0. The key is to look at the line where −๐ฅ+๐ฆ = 0, or ๐ฅ = ๐ฆ. On this line ๐ฅ 0 = −๐ฆ−๐ฅ 2 = −๐ฅ−๐ฅ 2 and ๐ฆ 0 = −๐ฅ + ๐ฆ 2 = −๐ฅ + ๐ฅ 2 . In particular, when ๐ฅ = ๐ฆ then ๐ฅ 0 ≤ ๐ฆ 0. That means that the arrows, the vectors (๐ฅ 0 , ๐ฆ 0), always point into the set where −๐ฅ + ๐ฆ ≥ 0. There is no way we can start in the set where −๐ฅ + ๐ฆ ≥ 0 and go into the set where −๐ฅ + ๐ฆ ≤ 0. Once we are in the set where −๐ฅ + ๐ฆ ≥ 0, we stay there. So no closed trajectory can have points in both sets. Example 8.4.5: Consider ๐ฅ 0 = ๐ฆ + (๐ฅ 2 + ๐ฆ 2 − 1)๐ฅ, ๐ฆ 0 = −๐ฅ + (๐ฅ 2 + ๐ฆ 2 − 1)๐ฆ, and consider the region ๐ given by ๐ฅ 2 + ๐ฆ 2 > 12 . That is, ๐ is the region outside a circle of radius √1 2 ∗ Henri Dulac (1870–1955) was a French mathematician. ๐(๐ ๐ ) the expression in the Bendixson–Dulac Theorem is ๐๐ฅ + tiable function ๐. For simplicity, let us just consider the case ๐ = 1. † Usually ๐(๐๐) ๐๐ฆ for some continuously differen- 377 8.4. LIMIT CYCLES centered at the origin. Then there is a closed trajectory in ๐ , namely ๐ฅ = cos(๐ก), ๐ฆ = sin(๐ก). Furthermore, ๐๐ ๐๐ + = 4๐ฅ 2 + 4๐ฆ 2 − 2, ๐๐ฅ ๐๐ฅ which is always positive on ๐ . So what is going on? The Bendixson–Dulac theorem does not apply since the region ๐ is not simply connected—it has a hole, the circle we cut out! 8.4.1 Exercises Exercise 8.4.1: Show that the following systems have no closed trajectories. a) ๐ฅ 0 = ๐ฅ 3 + ๐ฆ, ๐ฆ0 = ๐ฆ 3 + ๐ฅ 2, c) ๐ฅ 0 = ๐ฅ + 3๐ฆ 2 − ๐ฆ 3 , b) ๐ฅ 0 = ๐ ๐ฅ−๐ฆ , ๐ฆ 0 = ๐ ๐ฅ+๐ฆ , ๐ฆ0 = ๐ฆ 3 + ๐ฅ 2. Exercise 8.4.2: Formulate a condition for a 2-by-2 linear system ๐ฅ®0 = ๐ด ๐ฅ® to not be a center using the Bendixson–Dulac theorem. That is, the theorem says something about certain elements of ๐ด. Exercise 8.4.3: Explain why the Bendixson–Dulac Theorem does not apply for any conservative system ๐ฅ 00 + โ(๐ฅ) = 0. Exercise 8.4.4: A system such as ๐ฅ 0 = ๐ฅ, ๐ฆ 0 = ๐ฆ has solutions that exist for all time ๐ก, yet there are no closed trajectories. Explain why the Poincaré–Bendixson Theorem does not apply. Exercise 8.4.5: Differential equations can also be given in different coordinate systems. Suppose we have the system ๐ 0 = 1 − ๐ 2 , ๐0 = 1 given in polar coordinates. Find all the closed trajectories and check if they are limit cycles and if so, if they are asymptotically stable or not. Exercise 8.4.101: Show that the following systems have no closed trajectories. a) ๐ฅ 0 = ๐ฅ + ๐ฆ 2 , c) ๐ฅ 0 = ๐ฅ๐ฆ, ๐ฆ0 = ๐ฆ + ๐ฅ 2, b) ๐ฅ 0 = −๐ฅ sin2 (๐ฆ), ๐ฆ0 = ๐ ๐ฅ , ๐ฆ0 = ๐ฅ + ๐ฅ 2. Exercise 8.4.102: Suppose an autonomous system in the plane has a solution ๐ฅ = cos(๐ก) + ๐ −๐ก , ๐ฆ = sin(๐ก) + ๐ −๐ก . What can you say about the system (in particular about limit cycles and periodic solutions)? Exercise 8.4.103: Show that the limit cycle of the Van der Pol oscillator (for ๐ > 0) must not lie completely in the set where −1 < ๐ฅ < 1. Compare with Figure 8.10 on page 373. Exercise 8.4.104: Suppose we have the system ๐ 0 = sin(๐), ๐0 = 1 given in polar coordinates. Find all the closed trajectories. 378 8.5 CHAPTER 8. NONLINEAR SYSTEMS Chaos Note: 1 lecture, §6.5 in [EP], §9.8 in [BD] You have surely heard the story about the flap of a butterfly wing in the Amazon causing hurricanes in the North Atlantic. In a prior section, we mentioned that a small change in initial conditions of the planets can lead to very different configuration of the planets in the long term. These are examples of chaotic systems. Mathematical chaos is not really chaos, there is precise order behind the scenes. Everything is still deterministic. However a chaotic system is extremely sensitive to initial conditions. This also means even small errors induced via numerical approximation create large errors very quickly, so it is almost impossible to numerically approximate for long times. This is a large part of the trouble, as chaotic systems cannot be in general solved analytically. Take the weather, the most well-known chaotic system. A small change in the initial conditions (the temperature at every point of the atmosphere for example) produces drastically different predictions in relatively short time, and so we cannot accurately predict weather. And we do not actually know the exact initial conditions. We measure temperatures at a few points with some error, and then we somehow estimate what is in between. There is no way we can accurately measure the effects of every butterfly wing. Then we solve the equations numerically introducing new errors. You should not trust weather prediction more than a few days out. Chaotic behavior was first noticed by Edward Lorenz∗ in the 1960s when trying to model thermally induced air convection (movement). Lorentz was looking at the relatively simple system: ๐ฅ 0 = −10๐ฅ + 10๐ฆ, ๐ฆ 0 = 28๐ฅ − ๐ฆ − ๐ฅ๐ง, 8 ๐ง 0 = − ๐ง + ๐ฅ๐ฆ. 3 A small change in the initial conditions yields a very different solution after a reasonably short time. A simple example the reader can experiment with, and which displays chaotic behavior, is a double pendulum. The equations for this setup are somewhat complicated, and their derivation is quite tedious, so we will not bother to write them down. The idea is to put a pendulum on the end of another pendulum. The movement of the bottom mass will appear chaotic. This type of chaotic system is a basis for a whole number of office novelty desk toys. It is simple to build a version. Take a piece of a string. Tie two heavy nuts at different points of the string; one at the end, and one a bit above. Now give the bottom nut a little push. As long as the swings are not too big and the string stays tight, you have a double pendulum system. ∗ Edward Norton Lorenz (1917–2008) was an American mathematician and meteorologist. 379 8.5. CHAOS 8.5.1 Duffing equation and strange attractors Let us study the so-called Duffing equation: ๐ฅ 00 + ๐๐ฅ 0 + ๐๐ฅ + ๐๐ฅ 3 = ๐ถ cos(๐๐ก). Here ๐, ๐, ๐, ๐ถ, and ๐ are constants. Except for the ๐๐ฅ 3 term, this equation looks like a forced mass-spring system. The ๐๐ฅ 3 means the spring does not exactly obey Hooke’s law (which no real-world spring actually does obey exactly). When ๐ is not zero, the equation does not have a closed form solution, so we must resort to numerical solutions, as is usual for nonlinear systems. Not all choices of constants and initial conditions exhibit chaotic behavior. Let us study ๐ฅ 00 + 0.05๐ฅ 0 + ๐ฅ 3 = 8 cos(๐ก). The equation is not autonomous, so we cannot draw the vector field in the phase plane. We can still draw trajectories. In Figure 8.12, we plot trajectories for ๐ก going from 0 to 15 for two very close initial conditions (2, 3) and (2, 2.9), and also the solutions in the (๐ฅ, ๐ก) space. The two trajectories are close at first, but after a while diverge significantly. This sensitivity to initial conditions is precisely what we mean by the system behaving chaotically. -2 0 2 0.0 5.0 5.0 2.5 2.5 0.0 2.5 5.0 7.5 10.0 12.5 15.0 3 3 2 2 1 1 0 0 -1 -1 -2 -2 0.0 -2.5 -2.5 -5.0 -5.0 -3 -2 0 2 -3 0.0 2.5 5.0 7.5 10.0 12.5 15.0 Figure 8.12: On left, two trajectories in phase space for 0 ≤ ๐ก ≤ 15, for the Duffing equation one with initial conditions (2, 3) and the other with (2, 2.9). On right the two solutions in (๐ฅ, ๐ก)-space. Let us see the long term behavior. In Figure 8.13 on the next page, we plot the behavior of the system for initial conditions (2, 3) for a longer period of time. It is hard to see any particular pattern in the shape of the solution except that it seems to oscillate, but each oscillation appears quite unique. The oscillation is expected due to the forcing term. We mention that to produce the picture accurately, a ridiculously large number of steps∗ had to be used in the numerical algorithm, as even small errors quickly propagate in a chaotic system. ∗ In fact for reference, 30,000 steps were used with the Runge–Kutta algorithm, see exercises in § 1.7. 380 0 CHAPTER 8. NONLINEAR SYSTEMS 20 40 60 80 100 2 2 0 0 -2 -2 0 20 40 60 80 100 Figure 8.13: The solution to the given Duffing equation for ๐ก from 0 to 100. It is very difficult to analyze chaotic systems, or to find the order behind the madness, but let us try to do something that we did for the standard mass-spring system. One way we analyzed the system is that we figured out what was the long term behavior (not dependent on initial conditions). From the figure above, it is clear that we will not get a nice exact description of the long term behavior for this chaotic system, but perhaps we can find some order to what happens on each “oscillation” and what do these oscillations have in common. The concept we explore is that of a Poincaré section∗ . Instead of looking at ๐ก in a certain interval, we look at where the system is at a certain sequence of points in time. Imagine flashing a strobe at a fixed frequency and drawing the points where the solution is during the flashes. The right strobing frequency depends on the system in question. The correct frequency for the forced Duffing equation (and other similar systems) is the frequency of the forcing term. For the Duffing equation above, find a solution ๐ฅ(๐ก), ๐ฆ(๐ก) , and look at the points ๐ฅ(0), ๐ฆ(0) , ๐ฅ(2๐), ๐ฆ(2๐) , ๐ฅ(4๐), ๐ฆ(4๐) , ๐ฅ(6๐), ๐ฆ(6๐) , ... As we are really not interested in the transient part of the solution, that is, the part of the solution that depends on the initial condition, we skip some number of steps in the beginning. For example, we might skip the first 100 such steps and start plotting points at ๐ก = 100(2๐), that is ๐ฅ(200๐), ๐ฆ(200๐) , ๐ฅ(202๐), ๐ฆ(202๐) , ๐ฅ(204๐), ๐ฆ(204๐) , ... The plot of these points is the Poincaré section. After plotting enough points, a curious pattern emerges in Figure 8.14 on the facing page (the left-hand picture), a so-called strange attractor. ∗ Named for the French polymath Jules Henri Poincaré (1854–1912). 381 8.5. CHAOS 2.0 2.5 3.0 3.5 0.0 5.0 5.0 2.5 2.5 0.0 0.5 1.0 1.5 2.0 0 0 -1 -1 -2 -2 -3 -3 -4 -4 -5 -5 0.0 -2.5 -2.5 2.0 2.5 3.0 3.5 0.0 0.5 1.0 1.5 2.0 Figure 8.14: Strange attractor. The left plot is with no phase shift, the right plot has phase shift ๐/4. Given a sequence of points, an attractor is a set towards which the points in the sequence eventually get closer and closer to, that is, they are attracted. The Poincaré section is not really the attractor itself, but as the points are very close to it, we see its shape. The strange attractor is a very complicated set. It has fractal structure, that is, if you zoom in as far as you want, you keep seeing the same complicated structure. The initial condition makes no difference. If we start with a different initial condition, the points eventually gravitate towards the attractor, and so as long as we throw away the first few points, we get the same picture. Similarly small errors in the numerical approximations do not matter here. An amazing thing is that a chaotic system such as the Duffing equation is not random at all. There is a very complicated order to it, and the strange attractor says something about this order. We cannot quite say what state the system will be in eventually, but given the fixed strobing frequency we narrow it down to the points on the attractor. If we use a phase shift, for example ๐/4, and look at the times ๐/4 , 2๐ + ๐/4, 4๐ + ๐/4, 6๐ + ๐/4, ... we obtain a slightly different attractor. The picture is the right-hand side of Figure 8.14. It is as if we had rotated, moved, and slightly distorted the original. For each phase shift you can find the set of points towards which the system periodically keeps coming back to. Study the pictures and notice especially the scales—where are these attractors located in the phase plane. Notice the regions where the strange attractor lives and compare it to the plot of the trajectories in Figure 8.12 on page 379. Let us compare this section to the discussion in § 2.6 on forced oscillations. Consider ๐ฅ 00 + 2๐๐ฅ 0 + ๐02 ๐ฅ = ๐น0 cos(๐๐ก). ๐ This is like the Duffing equation, but with no ๐ฅ 3 term. The steady periodic solution is of 382 CHAPTER 8. NONLINEAR SYSTEMS the form ๐ฅ = ๐ถ cos(๐๐ก + ๐พ). Strobing using the frequency ๐, we obtain a single point in the phase space. The attractor in this setting is a single point—an expected result as the system is not chaotic. It was the opposite of chaotic: Any difference induced by the initial conditions dies away very quickly, and we settle into always the same steady periodic motion. 8.5.2 The Lorenz system In two dimensions to find chaotic behavior, we must study forced, or non-autonomous, systems such as the Duffing equation. The Poincaré–Bendixson Theorem says that a solution to an autonomous two-dimensional system that exists for all time in the future and does not go towards infinity is periodic or tends towards a periodic solution. Hardly the chaotic behavior we are looking for. In three dimensions, even autonomous systems can be chaotic. Let us very briefly return to the Lorenz system ๐ฅ 0 = −10๐ฅ + 10๐ฆ, 8 ๐ง 0 = − ๐ง + ๐ฅ๐ฆ. 3 ๐ฆ 0 = 28๐ฅ − ๐ฆ − ๐ฅ๐ง, The Lorenz system is an autonomous system in three dimensions exhibiting chaotic behavior. See the Figure 8.15 for a sample trajectory, which is now a curve in three-dimensional space. y x -15 20 -10 -5 10 0 5 10 15 0 -10 -20 40 40 30 30 20 20 10 10 20 10 -15 -10 0 -5 0 x 5 -10 10 15 y -20 Figure 8.15: A trajectory in the Lorenz system. 383 8.5. CHAOS The solutions tend to an attractor in space, the so-called Lorenz attractor. In this case no strobing is necessary. Again we cannot quite see the attractor itself, but if we try to follow a solution for long enough, as in the figure, we get a pretty good picture of what the attractor looks like. The Lorenz attractor is also a strange attractor and has a complicated fractal structure. And, just as for the Duffing equation, what we want to draw is not the whole trajectory, but start drawing the trajectory after a while, once it is close to the attractor. The path of the trajectory is not simply a repeating figure-eight. The trajectory spins some seemingly random number of times on the left, then spins a number of times on the right, and so on. As this system arose in weather prediction, one can perhaps imagine a few days of warm weather and then a few days of cold weather, where it is not easy to predict when the weather will change, just as it is not really easy to predict far in advance when the solution will jump onto the other side. See Figure 8.16 for a plot of the ๐ฅ component of the solution drawn above. A negative ๐ฅ corresponds to the left “loop” and a positive ๐ฅ corresponds to the right “loop”. Most of the mathematics we studied in this book is quite classical and well understood. On the other hand, chaos, including the Lorenz system, continues to be the subject of current research. Furthermore, chaos has found applications not just in the sciences, but also in art. 0.0 2.5 5.0 7.5 10.0 12.5 15.0 10 10 0 0 -10 -10 0.0 2.5 5.0 7.5 10.0 12.5 15.0 Figure 8.16: Graph of the ๐ฅ(๐ก) component of the solution. 8.5.3 Exercises Exercise 8.5.1: For the non-chaotic equation ๐ฅ 00 + 2๐๐ฅ 0 + ๐02 ๐ฅ = ๐น๐0 cos(๐๐ก), suppose we strobe with frequency ๐ as we mentioned above. Use the known steady periodic solution to find precisely the point which is the attractor for the Poincaré section. 384 CHAPTER 8. NONLINEAR SYSTEMS Exercise 8.5.2 (project): A simple fractal attractor can be drawn via the following chaos game. Draw the three vertices of a triangle and label them, say ๐ 1 , ๐2 and ๐3 . Draw some random point ๐ (it does not have to be one of the three points above). Roll a die to pick of the ๐ 1 , ๐2 , or ๐3 randomly (for example 1 and 4 mean ๐1 , 2 and 5 mean ๐ 2 , and 3 and 6 mean ๐3 ). Suppose we picked ๐2 , then let ๐ new be the point exactly halfway between ๐ and ๐2 . Draw this point and let ๐ now refer to this new point ๐ new . Rinse, repeat. Try to be precise and draw as many iterations as possible. Your points will be attracted to the so-called Sierpinski triangle. A computer was used to run the game for 10,000 iterations to obtain the picture in Figure 8.17. 0.00 0.25 0.50 0.75 1.00 0.75 0.75 0.50 0.50 0.25 0.25 0.00 0.00 0.00 0.25 0.50 0.75 1.00 Figure 8.17: 10,000 iterations of the chaos game producing the Sierpinski triangle. Exercise 8.5.3 (project): Construct the double pendulum described in the text with a string and two nuts (or heavy beads). Play around with the position of the middle nut, and perhaps use different weight nuts. Describe what you find. Exercise 8.5.4 (computer project): Use a computer software (such as Matlab, Octave, or perhaps even a spreadsheet), plot the solution of the given forced Duffing equation with Euler’s method. Plotting the solution for ๐ก from 0 to 100 with several different (small) step sizes. Discuss. Exercise 8.5.101: Find critical points of the Lorenz system and the associated linearizations. Appendix A Linear algebra A.1 Vectors, mappings, and matrices Note: 2 lectures In real life, there is most often more than one variable. We wish to organize dealing with multiple variables in a consistent manner, and in particular organize dealing with linear equations and linear mappings, as those are both rather useful and rather easy to handle. Mathematicians joke that “to an engineer every problem is linear, and everything is a matrix.” And well, they (the engineers) are not wrong. Quite often, solving an engineering problem is figuring out the right finite-dimensional linear problem to solve, which is then solved with some matrix manipulation. Most importantly, linear problems are the ones that we know how to solve, and we have many tools to solve them. For engineers, mathematicians, physicists, and anybody else in a technical field, it is absolutely vital to learn linear algebra. As motivation, suppose we wish to solve ๐ฅ − ๐ฆ = 2, 2๐ฅ + ๐ฆ = 4, for ๐ฅ and ๐ฆ. That is, we desire numbers ๐ฅ and ๐ฆ such that the two equations are satisfied. Let us perhaps start by adding the equations together to find ๐ฅ + 2๐ฅ − ๐ฆ + ๐ฆ = 2 + 4, or 3๐ฅ = 6. In other words, ๐ฅ = 2. Once we have that, we plug ๐ฅ = 2 into the first equation to find 2 − ๐ฆ = 2, so ๐ฆ = 0. OK, that was easy. What is all this fuss about linear equations. Well, try doing this if you have 5000 unknowns† . Also, we may have such equations not just of numbers, but of functions and derivatives of functions in differential equations. Clearly we need a systematic way of doing things. A nice consequence of making things systematic † One of the downsides of making everything look like a linear problem is that the number of variables tends to become huge. 386 APPENDIX A. LINEAR ALGEBRA and simpler to write down is that it becomes easier to have computers do the work for us. Computers are rather stupid, they do not think, but are very good at doing lots of repetitive tasks precisely, as long as we figure out a systematic way for them to perform the tasks. A.1.1 Vectors and operations on vectors Consider ๐ real numbers as an ๐-tuple: (๐ฅ1 , ๐ฅ2 , . . . , ๐ฅ ๐ ). The set of such ๐-tuples is the so-called ๐-dimensional space, often denoted by โ ๐ . Sometimes we call this the ๐-dimensional euclidean space∗ . In two dimensions, โ2 is called the cartesian plane† . Each such ๐-tuple represents a point in the ๐-dimensional space. For example, the point (1, 2) in the plane โ2 is one unit to the right and two units up from the origin. When we do algebra with these ๐-tuples of numbers we call them vectors‡ . Mathematicians are keen on separating what is a vector and what is a point of the space or in the plane, and it turns out to be an important distinction, however, for the purposes of linear algebra we can think of everything being represented by a vector. A way to think of a vector, which is especially useful in calculus and differential equations, is an arrow. It is an object that has a direction and a magnitude. For instance, the vector (1, 2) is the arrow from the origin to the point (1, 2) in the plane. The magnitude is the length of the arrow. See Figure A.1. If we think of vectors as arrows, the arrow doesn’t always have to start at the origin. If we do move it around, however, it should always keep the same direction and the same magnitude. ๐ฅ2 2 1 0 0 1 2 3 ๐ฅ1 Figure A.1: The vector (1, 2) drawn as an arrow from the origin to the point (1, 2). As vectors are arrows, when we want to give a name to a vector, we draw a little arrow above it: ๐ฅ® ∗ Named after the ancient Greek mathematician Euclid of Alexandria (around 300 BC), possibly the most famous of mathematicians; even small towns often have Euclid Street or Euclid Avenue. † Named after the French mathematician René Descartes (1596–1650). It is “cartesian” as his name in Latin is Renatus Cartesius. ‡ A common notation to distinguish vectors from points is to write (1, 2) for the point and h1, 2i for the vector. We write both as (1, 2). 387 A.1. VECTORS, MAPPINGS, AND MATRICES Another popular notation is x, although we will use the little arrows. It may be easy to write a bold letter in a book, but it is not so easy to write it by hand on paper or on the board. Mathematicians often don’t even write the arrows. A mathematician would write ๐ฅ and just remember that ๐ฅ is a vector and not a number. Just like you remember that Bob is your uncle, and you don’t have to keep repeating “Uncle Bob” and you can just say “Bob.” In this book, however, we will call Bob “Uncle Bob” and write vectors with the little arrows. The magnitude can be computed √ using the√Pythagorean theorem. The vector (1, 2) drawn in the figure has magnitude 12 + 22 = 5. The magnitude is denoted by k ๐ฅ® k, and, in any number of dimensions, it can be computed in the same way: k ๐ฅ® k = k(๐ฅ1 , ๐ฅ2 , . . . , ๐ฅ ๐ )k = q ๐ฅ12 + ๐ฅ22 + · · · + ๐ฅ ๐2 . For reasons that will become clear in the next section, we often write vectors as so-called column vectors: ๏ฃฎ ๐ฅ1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๐ฅ2 ๏ฃบ ๐ฅ® = ๏ฃฏ๏ฃฏ .. ๏ฃบ๏ฃบ . . ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฅ ๏ฃบ ๏ฃฐ ๐๏ฃป Don’t worry. It is just a different way of writing the same thing. For example, the vector (1, 2) can be written as 1 . 2 The fact that we write arrows above vectors allows us to write several vectors ๐ฅ®1 , ๐ฅ®2 , etc., without confusing these with the components of some other vector ๐ฅ®. So where is the algebra from linear algebra? Well, arrows can be added, subtracted, and multiplied by numbers. First we consider addition. If we have two arrows, we simply move along one, and then along the other. See Figure A.2. ๐ฅ2 2 1 0 0 1 2 3 ๐ฅ1 −1 Figure A.2: Adding the vectors (1, 2), drawn dotted, and (2, −3), drawn dashed. The result, (3, −1), is drawn as a solid arrow. 388 APPENDIX A. LINEAR ALGEBRA It is rather easy to see what it does to the numbers that represent the vectors. Suppose we want to add (1, 2) to (2, −3) as in the figure. We travel along (1, 2) and then we travel along (2, −3). What we did was travel one unit right, two units up, and then we travelled two units right, and three units down (the negative three). That means that we ended up at 1 + 2, 2 + (−3) = (3, −1). And that’s how addition always works: ๏ฃฎ ๐ฅ 1 ๏ฃน ๏ฃฎ ๐ฆ1 ๏ฃน ๏ฃฎ ๐ฅ 1 + ๐ฆ1 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ ๐ฅ 2 ๏ฃบ ๏ฃฏ ๐ฆ2 ๏ฃบ ๏ฃฏ ๐ฅ 2 + ๐ฆ2 ๏ฃบ ๏ฃฏ . ๏ฃบ+๏ฃฏ . ๏ฃบ = ๏ฃฏ . ๏ฃบ. ๏ฃฏ .. ๏ฃบ ๏ฃฏ .. ๏ฃบ ๏ฃฏ .. ๏ฃบ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ๐ฅ ๏ฃบ ๏ฃฏ ๐ฆ ๏ฃบ ๏ฃฏ๐ฅ + ๐ฆ ๏ฃบ ๐ ๐ ๐ ๐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ Subtracting is similar. What ๐ฅ® − ๐ฆ® means visually is that we first travel along ๐ฅ®, and then we travel backwards along ๐ฆ®. See Figure A.3. It is like adding ๐ฅ® + (− ๐ฆ®) where − ๐ฆ® is the arrow we obtain by erasing the arrow head from one side and drawing it on the other side, that is, we reverse the direction. In terms of the numbers, we simply go backwards both horizontally and vertically, so we negate both numbers. For instance, if ๐ฆ® is (−2, 1), then − ๐ฆ® is (2, −1). ๐ฅ2 2 1 0 0 1 2 3 ๐ฅ1 Figure A.3: Subtraction, the vector (1, 2), drawn dotted, minus (−2, 1), drawn dashed. The result, (3, 1), is drawn as a solid arrow. Another intuitive thing to do to a vector is to scale it. We represent this by multiplication of a number with a vector. Because of this, when we wish to distinguish between vectors and numbers, we call the numbers scalars. For example, suppose we want to travel three times further. If the vector is (1, 2), travelling 3 times further means going 3 units to the right and 6 units up, so we get the vector (3, 6). We just multiply each number in the vector by 3. If ๐ผ is a number, then ๏ฃฎ ๐ฅ1 ๏ฃน ๏ฃฎ ๐ผ๐ฅ1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๐ฅ2 ๏ฃบ ๏ฃฏ ๐ผ๐ฅ2 ๏ฃบ ๐ผ ๏ฃฏ๏ฃฏ .. ๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ .. ๏ฃบ๏ฃบ . . . ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฅ ๏ฃบ ๏ฃฐ ๐๏ฃป ๏ฃฏ ๏ฃบ ๏ฃฏ๐ผ๐ฅ ๏ฃบ ๏ฃฐ ๐๏ฃป Scaling (by a positive number) √ multiplies the magnitude and leaves direction untouched. √ The magnitude of (1, 2) is 5. The magnitude of 3 times (1, 2), that is, (3, 6), is 3 5. 389 A.1. VECTORS, MAPPINGS, AND MATRICES When the scalar is negative, then when we multiply a vector by it, the vector is not only scaled, but it also switches direction. Multiplying (1, 2) by −3 means we should go 3 times further but in the opposite direction, so 3 units to the left and 6 units down, or in other words, (−3, −6). As we mentioned above, − ๐ฆ® is a reverse of ๐ฆ®, and this is the same as (−1) ๐ฆ®. In Figure A.4, you can see a couple of examples of what scaling a vector means visually. −1.5๐ฅ® 2๐ฅ® ๐ฅ® Figure A.4: A vector ๐ฅ®, the vector 2 ๐ฅ® (same direction, double the magnitude), and the vector −1.5 ๐ฅ® (opposite direction, 1.5 times the magnitude). We put all of these operations together to work out more complicated expressions. Let us compute a small example: 1 −4 −2 3(1) + 2(−4) − 3(−2) 1 3 +2 −3 = = . 2 −1 2 3(2) + 2(−1) − 3(2) −2 As we said a vector is a direction and a magnitude. Magnitude is easy to represent, it is just a number. The direction is usually given by a vector with magnitude one. We call such a vector a unit vector. That is, ๐ข® is a unit vector when k ๐ข® k = 1. For instance, the vectors √ √ (1, 0), (1/ 2, 1/ 2), and (0, −1) are all unit vectors. To represent the direction of a vector ๐ฅ®, we need to find the unit vector in the same direction. To do so, we simply rescale ๐ฅ® by the reciprocal of the magnitude, that is k ๐ฅ1®k ๐ฅ®, or more concisely k ๐ฅ๐ฅ®®k . As an example, the unit vector in the direction of (1, 2) is the vector 1 1 2 (1, 2) = √ , √ . √ 5 5 12 + 22 A.1.2 Linear mappings and matrices A vector-valued function ๐น is a rule that takes a vector ๐ฅ® and returns another vector ๐ฆ®. For example, ๐น could be a scaling that doubles the size of vectors: ๐น( ๐ฅ®) = 2๐ฅ®. Applied to say (1, 3) we get ๐น 1 3 1 2 =2 = . 3 6 390 APPENDIX A. LINEAR ALGEBRA If ๐น is a mapping that takes vectors in โ2 to โ2 (such as the above), we write ๐น : โ2 → โ2 . The words function and mapping are used rather interchangeably, although more often than not, mapping is used when talking about a vector-valued function, and the word function is often used when the function is scalar-valued. A beginning student of mathematics (and many a seasoned mathematician), that sees an expression such as ๐ (3๐ฅ + 8๐ฆ) yearns to write 3 ๐ (๐ฅ) + 8 ๐ (๐ฆ). √ √ √ After all, who hasn’t wanted to write ๐ฅ + ๐ฆ = ๐ฅ + ๐ฆ or something like that at some point in their mathematical lives. Wouldn’t life be simple if we could do that? Of course we can’t always do that (for example, not with the square roots!) But there are many other functions where we can do exactly the above. Such functions are called linear. A mapping ๐น : โ ๐ → โ ๐ is called linear if ๐น(๐ฅ® + ๐ฆ®) = ๐น(๐ฅ®) + ๐น( ๐ฆ®), for any vectors ๐ฅ® and ๐ฆ®, and also ๐น(๐ผ ๐ฅ®) = ๐ผ๐น(๐ฅ®), for any scalar ๐ผ. The ๐น we defined above that doubles the size of all vectors is linear. Let us check: ๐น(๐ฅ® + ๐ฆ®) = 2(๐ฅ® + ๐ฆ®) = 2๐ฅ® + 2 ๐ฆ® = ๐น(๐ฅ®) + ๐น( ๐ฆ®), and also ๐น(๐ผ ๐ฅ®) = 2๐ผ ๐ฅ® = ๐ผ2๐ฅ® = ๐ผ๐น(๐ฅ®). We also call a linear function a linear transformation. If you want to be really fancy and impress your friends, you can call it a linear operator. When a mapping is linear we often do not write the parentheses. We write simply ๐น ๐ฅ® instead of ๐น(๐ฅ®). We do this because linearity means that the mapping ๐น behaves like multiplying ๐ฅ® by “something.” That something is a matrix. A matrix is an ๐ × ๐ array of numbers (๐ rows and ๐ columns). A 3 × 5 matrix is ๏ฃฎ ๐11 ๐12 ๐13 ๐14 ๐15 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด = ๏ฃฏ๏ฃฏ ๐21 ๐ 22 ๐ 23 ๐ 24 ๐ 25 ๏ฃบ๏ฃบ . ๏ฃฏ ๐31 ๐32 ๐33 ๐34 ๐35 ๏ฃบ ๏ฃฐ ๏ฃป The numbers ๐ ๐๐ are called elements or entries. 391 A.1. VECTORS, MAPPINGS, AND MATRICES A column vector is simply an ๐ × 1 matrix. Similarly to a column vector there is also a row vector, which is a 1 × ๐ matrix. If we have an ๐ × ๐ matrix, then we say that it is a square matrix. Now how does a matrix ๐ด relate to a linear mapping? Well a matrix tells you where certain special vectors go. Let’s give a name to those certain vectors. The standard basis vectors of โ ๐ are ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๐®1 = ๏ฃฏ0๏ฃบ , ๏ฃฏ .. ๏ฃบ ๏ฃฏ.๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๐®2 = ๏ฃฏ0๏ฃบ , ๏ฃฏ .. ๏ฃบ ๏ฃฏ.๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๐®3 = ๏ฃฏ1๏ฃบ , ๏ฃฏ .. ๏ฃบ ๏ฃฏ.๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ··· , ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๐®๐ = ๏ฃฏ0๏ฃบ . ๏ฃฏ .. ๏ฃบ ๏ฃฏ.๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป In โ3 these vectors are ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ ๐®1 = ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๐®2 = ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๐®3 = ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ . ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป ® You may recall from calculus of several variables that these are sometimes called ®๐ค , ®๐ฅ , ๐. The reason these are called a basis is that every other vector can be written as a linear combination of them. For example, in โ3 the vector (4, 5, 6) can be written as ๏ฃฎ1๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ4๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 4®๐1 + 5®๐2 + 6®๐3 = 4 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ + 5 ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ + 6 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ . ๏ฃฏ0๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ6๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป So how does a matrix represent a linear mapping? Well, the columns of the matrix are the vectors where ๐ด as a linear mapping takes ๐®1 , ๐®2 , etc. For instance, consider 1 2 ๐= . 3 4 As a linear mapping ๐ : โ2 → โ2 takes ๐®1 = words, 1 2 1 1 ๐®๐1 = = , and 3 4 0 3 1 0 to 1 3 and ๐®2 = 1 2 ๐®๐2 = 3 4 0 1 to 2 4 . In other 0 2 = . 1 4 More generally, if we have an ๐ × ๐ matrix ๐ด, that is, we have ๐ rows and ๐ columns, then the mapping ๐ด : โ ๐ → โ ๐ takes ๐®๐ to the ๐ th column of ๐ด. For example, ๏ฃฎ ๐11 ๐12 ๐13 ๐14 ๐15 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด = ๏ฃฏ๏ฃฏ ๐ 21 ๐ 22 ๐ 23 ๐ 24 ๐25 ๏ฃบ๏ฃบ ๏ฃฏ ๐31 ๐32 ๐33 ๐34 ๐35 ๏ฃบ ๏ฃฐ ๏ฃป 392 APPENDIX A. LINEAR ALGEBRA represents a mapping from โ5 to โ3 that does ๏ฃฎ ๐11 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด®๐1 = ๏ฃฏ๏ฃฏ ๐ 21 ๏ฃบ๏ฃบ , ๏ฃฏ ๐31 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ ๐12 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด®๐2 = ๏ฃฏ๏ฃฏ ๐ 22 ๏ฃบ๏ฃบ , ๏ฃฏ ๐32 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ ๐13 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด®๐3 = ๏ฃฏ๏ฃฏ ๐ 23 ๏ฃบ๏ฃบ , ๏ฃฏ ๐33 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ ๐14 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด®๐4 = ๏ฃฏ๏ฃฏ ๐ 24 ๏ฃบ๏ฃบ , ๏ฃฏ ๐34 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ ๐15 ๏ฃน ๏ฃฏ ๏ฃบ ๐ด®๐5 = ๏ฃฏ๏ฃฏ ๐25 ๏ฃบ๏ฃบ . ๏ฃฏ ๐35 ๏ฃบ ๏ฃฐ ๏ฃป What about another vector ๐ฅ®, which isn’t in the standard basis? Where does it go? We use linearity. First, we write the vector as a linear combination of the standard basis vectors: ๏ฃฎ0 ๏ฃน ๏ฃฎ๐ฅ1 ๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฅ2 ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๐ฅ® = ๏ฃฏ๏ฃฏ๐ฅ 3 ๏ฃบ๏ฃบ = ๐ฅ1 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ + ๐ฅ 2 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ + ๐ฅ3 ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ + ๐ฅ4 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ + ๐ฅ5 ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ = ๐ฅ1 ๐®1 + ๐ฅ2 ๐®2 + ๐ฅ 3 ๐®3 + ๐ฅ 4 ๐®4 + ๐ฅ 5 ๐®5 . ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ0 ๏ฃบ ๏ฃฏ๐ฅ4 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ1 ๏ฃบ ๏ฃฏ๐ฅ5 ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป Then ๐ด ๐ฅ® = ๐ด(๐ฅ 1 ๐®1 + ๐ฅ 2 ๐®2 + ๐ฅ 3 ๐®3 + ๐ฅ4 ๐®4 + ๐ฅ5 ๐®5 ) = ๐ฅ1 ๐ด®๐1 + ๐ฅ2 ๐ด®๐2 + ๐ฅ3 ๐ด®๐3 + ๐ฅ 4 ๐ด®๐4 + ๐ฅ 5 ๐ด®๐5 . If we know where ๐ด takes all the basis vectors, we know where it takes all vectors. Suppose ๐ is the 2 × 2 matrix from above, then −2 1 2 ๐ = 0.1 3 4 −2 1 2 −1.8 = −2 + 0.1 = . 0.1 3 4 −5.6 Every linear mapping from โ ๐ to โ ๐ can be represented by an ๐ × ๐ matrix. You just figure out where it takes the standard basis vectors. Conversely, every ๐ × ๐ matrix represents a linear mapping. Hence, we may think of matrices being linear mappings, and linear mappings being matrices. Or can we? In this book we study mostly linear differential operators, and linear differential operators are linear mappings, although they are not acting on โ ๐ , but on an infinite-dimensional space of functions: ๐ฟ ๐ = ๐. For a function ๐ we get a function ๐, and ๐ฟ is linear in the sense that ๐ฟ( ๐ + โ) = ๐ฟ ๐ + ๐ฟโ, and ๐ฟ(๐ผ ๐ ) = ๐ผ๐ฟ ๐ . for any number (scalar) ๐ผ and all functions ๐ and โ. So the answer is not really. But if we consider vectors in finite-dimensional spaces ๐ โ then yes, every linear mapping is a matrix. We have mentioned at the beginning of this section, that we can “make everything a vector.” That’s not strictly true, but it is true approximately. Those “infinite-dimensional” spaces of functions can be approximated by a finite-dimensional space, and then linear operators are just matrices. So approximately, this is true. And as far as actual computations that we can do on a computer, we can work 393 A.1. VECTORS, MAPPINGS, AND MATRICES only with finitely many dimensions anyway. If you ask a computer or your calculator to plot a function, it samples the function at finitely many points and then connects the dots∗ . It does not actually give you infinitely many values. The way that you have been using the computer or your calculator so far has already been a certain approximation of the space of functions by a finite-dimensional space. To end the section, we notice how ๐ด ๐ฅ® can be written more succintly. Suppose ๐ ๐ ๐ ๐ด = 11 12 13 ๐ 21 ๐ 22 ๐23 Then ๐ ๐ ๐ ๐ด ๐ฅ® = 11 12 13 ๐ 21 ๐22 ๐ 23 For example, 1 2 3 4 ๏ฃฎ๐ฅ1 ๏ฃน ๏ฃฏ ๏ฃบ ๐ฅ® = ๏ฃฏ๏ฃฏ๐ฅ2 ๏ฃบ๏ฃบ . ๏ฃฏ๐ฅ3 ๏ฃบ ๏ฃฐ ๏ฃป and ๏ฃฎ๐ฅ1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ๐ฅ2 ๏ฃบ = ๐11 ๐ฅ1 + ๐12 ๐ฅ2 + ๐13 ๐ฅ3 . ๏ฃฏ ๏ฃบ ๐ 21 ๐ฅ1 + ๐ 22 ๐ฅ2 + ๐ 23 ๐ฅ3 ๏ฃฏ๐ฅ3 ๏ฃบ ๏ฃฐ ๏ฃป 2 1 · 2 + 2 · (−1) 0 = = . −1 3 · 2 + 4 · (−1) 2 That is, you take the entries in a row of the matrix, you multiply them by the entries in your vector, you add things up, and that’s the corresponding entry in the resulting vector. A.1.3 Exercises Exercise A.1.1: On a piece of graph paper draw the vectors: −2 b) −4 2 a) 5 c) (3, −4) Exercise A.1.2: On a piece of graph paper draw the vector (1, 2) starting at (based at) the given point: a) based at (0, 0) b) based at (1, 2) c) based at (0, −1) Exercise A.1.3: On a piece of graph paper draw the following operations. Draw and label the vectors involved in the operations as well as the result: 1 2 a) + −4 3 −3 1 b) − 2 3 c) 3 2 1 Exercise A.1.4: Compute the magnitude of 7 a) 2 ∗ If ๏ฃฎ−2๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ 3 ๏ฃบ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป c) (1, 3, −4) you have ever used Matlab, you may have noticed that to plot a function, we take a vector of inputs, ask Matlab to compute the corresponding vector of values of the function, and then we ask it to plot the result. 394 APPENDIX A. LINEAR ALGEBRA Exercise A.1.5: Compute 2 7 a) + 3 −8 −1 d) 4 5 −2 6 b) − 3 −4 1 0 e) 5 +9 0 1 −3 c) − 2 1 3 f) 3 −2 −8 −1 Exercise A.1.6: Find the unit vector in the direction of the given vector 1 a) −3 ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ 1 ๏ฃบ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป c) (3, 1, −2) Exercise A.1.7: If ๐ฅ® = (1, 2) and ๐ฆ® are added together, we find ๐ฅ® + ๐ฆ® = (0, 2). What is ๐ฆ®? Exercise A.1.8: Write (1, 2, 3) as a linear combination of the standard basis vectors ๐®1 , ๐®2 , and ๐®3 . Exercise A.1.9: If the magnitude of ๐ฅ® is 4, what is the magnitude of a) 0๐ฅ® b) 3๐ฅ® c) −๐ฅ® d) −4๐ฅ® e) ๐ฅ® + ๐ฅ® f) ๐ฅ® − ๐ฅ® Exercise A.1.10: Suppose a linear mapping ๐น : โ2 → โ2 takes (1, 0) to (2, −1) and it takes (0, 1) to (3, 3). Where does it take a) (1, 1) b) (2, 0) c) (2, −1) Exercise A.1.11: Suppose a linear mapping ๐น : โ3 → โ2 takes (1, 0, 0) to (2, 1), it takes (0, 1, 0) to (3, 4), and it takes (0, 0, 1) to (5, 6). Write down the matrix representing the mapping ๐น. Exercise A.1.12: Suppose that a mapping ๐น : โ2 → โ2 takes (1, 0) to (1, 2), (0, 1) to (3, 4), and (1, 1) to (0, −1). Explain why ๐น is not linear. Exercise A.1.13 (challenging): Let โ3 represent the space of quadratic polynomials in ๐ก: a point (๐0 , ๐1 , ๐2 ) in โ3 represents the polynomial ๐ 0 + ๐ 1 ๐ก + ๐ 2 ๐ก 2 . Consider the derivative ๐๐ก๐ as a mapping of โ3 to โ3 , and note that ๐๐ก๐ is linear. Write down ๐๐ก๐ as a 3 × 3 matrix. Exercise A.1.101: Compute the magnitude of ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ 3 ๏ฃบ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป 1 a) 3 c) (−2, 1, −2) Exercise A.1.102: Find the unit vector in the direction of the given vector −1 a) 1 ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ−1๏ฃบ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป c) (2, −5, 2) 395 A.1. VECTORS, MAPPINGS, AND MATRICES Exercise A.1.103: Compute 3 6 a) + 1 −3 −2 d) 2 4 −1 2 b) − 2 −1 1 0 e) 3 +7 0 1 −5 c) − 3 2 2 f) 2 −6 −3 −1 Exercise A.1.104: If the magnitude of ๐ฅ® is 5, what is the magnitude of a) 4๐ฅ® b) −2๐ฅ® c) −4๐ฅ® Exercise A.1.105: Suppose a linear mapping ๐น : โ2 → โ2 takes (1, 0) to (1, −1) and it takes (0, 1) to (2, 0). Where does it take a) (1, 1) b) (0, 2) c) (1, −1) 396 A.2 APPENDIX A. LINEAR ALGEBRA Matrix algebra Note: 2–3 lectures A.2.1 One-by-one matrices Let us motivate what we want to achieve with matrices. Real-valued linear mappings of the real line, linear functions that eat numbers and spit out numbers, are just multiplications by a number. Consider a mapping defined by multiplying by a number. Let’s call this number ๐ผ. The mapping then takes ๐ฅ to ๐ผ๐ฅ. We can add such mappings: If we have another mapping ๐ฝ, then ๐ผ๐ฅ + ๐ฝ๐ฅ = (๐ผ + ๐ฝ)๐ฅ. We get a new mapping ๐ผ + ๐ฝ that multiplies ๐ฅ by, well, ๐ผ + ๐ฝ. If ๐ท is a mapping that doubles its input, ๐ท๐ฅ = 2๐ฅ, and ๐ is a mapping that triples, ๐๐ฅ = 3๐ฅ, then ๐ท + ๐ is a mapping that multiplies by 5, (๐ท + ๐)๐ฅ = 5๐ฅ. Similarly we can compose such mappings, that is, we could apply one and then the other. We take ๐ฅ, we run it through the first mapping ๐ผ to get ๐ผ times ๐ฅ, then we run ๐ผ๐ฅ through the second mapping ๐ฝ. In other words, ๐ฝ(๐ผ๐ฅ) = (๐ฝ๐ผ)๐ฅ. We just multiply those two numbers. Using our doubling and tripling mappings, if we double and then triple, that is ๐(๐ท๐ฅ) then we obtain 3(2๐ฅ) = 6๐ฅ. The composition ๐๐ท is the mapping that multiplies by 6. For larger matrices, composition also ends up being a kind of multiplication. A.2.2 Matrix addition and scalar multiplication The mappings that multiply numbers by numbers are just 1 × 1 matrices. The number ๐ผ above could be written as a matrix [๐ผ]. Perhaps we would want to do to all matrices the same things that we did to those 1 × 1 matrices at the start of this section above. First, let us add matrices. If we have a matrix ๐ด and a matrix ๐ต that are of the same size, say ๐ × ๐, then they are mappings from โ ๐ to โ ๐ . The mapping ๐ด + ๐ต should also be a mapping from โ ๐ to โ ๐ , and it should do the following to vectors: (๐ด + ๐ต)๐ฅ® = ๐ด ๐ฅ® + ๐ต ๐ฅ®. It turns out you just add the matrices element-wise: If the ๐๐ th entry of ๐ด is ๐ ๐๐ , and the ๐๐ th entry of ๐ต is ๐ ๐๐ , then the ๐๐ th entry of ๐ด + ๐ต is ๐ ๐๐ + ๐ ๐๐ . If ๐ ๐ ๐ ๐ด = 11 12 13 ๐ 21 ๐ 22 ๐ 23 ๐ ๐ ๐ ๐ต = 11 12 13 , ๐ 21 ๐ 22 ๐ 23 and 397 A.2. MATRIX ALGEBRA then ๐ + ๐ 11 ๐ 12 + ๐ 12 ๐ 13 + ๐ 13 ๐ด + ๐ต = 11 . ๐ 21 + ๐ 21 ๐ 22 + ๐ 22 ๐ 23 + ๐ 23 Let us illustrate on a more concrete example: ๏ฃฎ1 2๏ฃน ๏ฃฎ 7 8 ๏ฃน ๏ฃฎ 1 + 7 2 + 8 ๏ฃน ๏ฃฎ 8 10๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3 4๏ฃบ + ๏ฃฏ 9 10 ๏ฃบ = ๏ฃฏ 3 + 9 4 + 10๏ฃบ = ๏ฃฏ12 14๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ5 6๏ฃบ ๏ฃฏ11 −1๏ฃบ ๏ฃฏ5 + 11 6 − 1 ๏ฃบ ๏ฃฏ16 5 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป Let’s check that this does the right thing to a vector. Let’s use some of the vector algebra that we already know, and regroup things: ๏ฃฎ1๏ฃน ๏ฃฎ2๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ1 2 ๏ฃน ๏ฃฎ 7 8 ๏ฃน ๏ฃฏ ๏ฃบ 2 ๏ฃฏ ๏ฃบ 2 ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบª © ๏ฃฏ 7 ๏ฃบ ๏ฃฏ 8 ๏ฃบª © ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3 4 ๏ฃบ ๏ฃฏ ๏ฃบ −1 + ๏ฃฏ 9 10 ๏ฃบ −1 = ­2 ๏ฃฏ3๏ฃบ − ๏ฃฏ4๏ฃบ ® + ­2 ๏ฃฏ 9 ๏ฃบ − ๏ฃฏ 10 ๏ฃบ ® ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ5 6 ๏ฃบ ๏ฃฏ11 −1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ « ๏ฃฐ5๏ฃป ๏ฃฐ6๏ฃป ¬ « ๏ฃฐ11๏ฃป ๏ฃฐ−1๏ฃป ¬ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฎ 7 ๏ฃน ๏ฃฎ2๏ฃน ๏ฃฎ 8 ๏ฃน © ๏ฃฏ๏ฃฏ ๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ ๏ฃบ๏ฃบ ª © ๏ฃฏ๏ฃฏ ๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ ๏ฃบ๏ฃบ ª = 2 ­ ๏ฃฏ3๏ฃบ + ๏ฃฏ 9 ๏ฃบ ® − ­ ๏ฃฏ4๏ฃบ + ๏ฃฏ 10 ๏ฃบ ® ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ « ๏ฃฐ5๏ฃป ๏ฃฐ11๏ฃป ¬ « ๏ฃฐ6๏ฃป ๏ฃฐ−1๏ฃป ¬ ๏ฃฎ1+7๏ฃน ๏ฃฎ2+8๏ฃน ๏ฃฎ 8 ๏ฃน ๏ฃฎ10๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ = 2 ๏ฃฏ๏ฃฏ 3 + 9 ๏ฃบ๏ฃบ − ๏ฃฏ๏ฃฏ4 + 10๏ฃบ๏ฃบ = 2 ๏ฃฏ๏ฃฏ12๏ฃบ๏ฃบ − ๏ฃฏ๏ฃฏ14๏ฃบ๏ฃบ ๏ฃฏ5 + 11๏ฃบ ๏ฃฏ 6 − 1 ๏ฃบ ๏ฃฏ16๏ฃบ ๏ฃฏ 5 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ 2(8) − 10 ๏ฃน ๏ฃฎ 6 ๏ฃน ๏ฃฎ 8 10๏ฃน ๏ฃฏ ๏ฃบ 2 ๏ฃบ ๏ฃฏ ๏ฃบª © ๏ฃฏ๏ฃฏ = ๏ฃฏ๏ฃฏ12 14๏ฃบ๏ฃบ ­= ๏ฃฏ2(12) − 14๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ10๏ฃบ๏ฃบ ® . ๏ฃฏ16 5 ๏ฃบ −1 ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ « ๏ฃฐ 2(16) − 5 ๏ฃป ๏ฃฐ27๏ฃป ¬ ๏ฃฐ ๏ฃป If we replaced the numbers by letters that would constitute a proof! You’ll notice that we didn’t really have to even compute what the result is to convince ourselves that the two expressions were equal. If the sizes of the matrices do not match, then addition is not defined. If ๐ด is 3 × 2 and ๐ต is 2 × 5, then we cannot add these matrices. We don’t know what that could possibly mean. It is also useful to have a matrix that when added to any other matrix does nothing. This is the zero matrix, the matrix of all zeros: 1 2 0 0 1 2 + = . 3 4 0 0 3 4 We often denote the zero matrix by 0 without specifying size. We would then just write ๐ด + 0, where we just assume that 0 is the zero matrix of the same size as ๐ด. There are really two things we can multiply matrices by. We can multiply matrices by scalars or we can multiply by other matrices. Let us first consider multiplication by scalars. For a matrix ๐ด and a scalar ๐ผ, we want ๐ผ๐ด to be the matrix that accomplishes (๐ผ๐ด)๐ฅ® = ๐ผ(๐ด ๐ฅ®). 398 APPENDIX A. LINEAR ALGEBRA That is just scaling the result by ๐ผ. If you think about it, scaling every term in ๐ด by ๐ผ achieves just that: If ๐ ๐ ๐ ๐ด = 11 12 13 , ๐ 21 ๐ 22 ๐ 23 ๐ผ๐ 11 ๐ผ๐ 12 ๐ผ๐ 13 ๐ผ๐ด = . ๐ผ๐ 21 ๐ผ๐ 22 ๐ผ๐ 23 then For example, 1 2 3 2 4 6 2 = . 4 5 6 8 10 12 Let us list some properties of matrix addition and scalar multiplication. Denote by 0 the zero matrix, by ๐ผ, ๐ฝ scalars, and by ๐ด, ๐ต, ๐ถ matrices. Then: ๐ด + 0 = ๐ด = 0 + ๐ด, ๐ด + ๐ต = ๐ต + ๐ด, (๐ด + ๐ต) + ๐ถ = ๐ด + (๐ต + ๐ถ), ๐ผ(๐ด + ๐ต) = ๐ผ๐ด + ๐ผ๐ต, (๐ผ + ๐ฝ)๐ด = ๐ผ๐ด + ๐ฝ๐ด. These rules should look very familiar. A.2.3 Matrix multiplication As we mentioned above, composition of linear mappings is also a multiplication of matrices. Suppose ๐ด is an ๐ × ๐ matrix, that is, ๐ด takes โ ๐ to โ ๐ , and ๐ต is an ๐ × ๐ matrix, that is, ๐ต takes โ ๐ to โ ๐ . The composition ๐ด๐ต should work as follows ๐ด๐ต ๐ฅ® = ๐ด(๐ต ๐ฅ®). First, a vector ๐ฅ® in โ ๐ gets taken to the vector ๐ต ๐ฅ® in โ ๐ . Then the mapping ๐ด takes it to the vector ๐ด(๐ต ๐ฅ®) in โ ๐ . In other words, the composition ๐ด๐ต should be an ๐ × ๐ matrix. In terms of sizes we should have “ [๐ × ๐] [๐ × ๐] = [๐ × ๐]. ” Notice how the middle size must match. OK, now we know what sizes of matrices we should be able to multiply, and what the product should be. Let us see how to actually compute matrix multiplication. We start with the so-called dot product (or inner product) of two vectors. Usually this is a row vector multiplied with a column vector of the same size. Dot product multiplies each pair of entries from the first and the second vector and sums these products. The result is a single number. For example, ๐1 ๐2 ๏ฃฎ ๏ฃน ๏ฃฏ๐ 1 ๏ฃบ ๐ 3 · ๏ฃฏ๏ฃฏ๐ 2 ๏ฃบ๏ฃบ = ๐ 1 ๐ 1 + ๐ 2 ๐ 2 + ๐ 3 ๐ 3 . ๏ฃฏ๐ 3 ๏ฃบ ๏ฃฐ ๏ฃป 399 A.2. MATRIX ALGEBRA And similarly for larger (or smaller) vectors. A dot product is really a product of two matrices: a 1 × ๐ matrix and an ๐ × 1 matrix resulting in a 1 × 1 matrix, that is, a number. Armed with the dot product we define the product of matrices. We denote by row๐ (๐ด) the ๐ th row of ๐ด and by column ๐ (๐ด) the ๐ th column of ๐ด. For an ๐ × ๐ matrix ๐ด and an ๐ × ๐ matrix ๐ต we can compute the product ๐ด๐ต: The matrix ๐ด๐ต is an ๐ × ๐ matrix whose ๐๐ th entry is the dot product row๐ (๐ด) · column ๐ (๐ต). For example, given a 2 × 3 and a 3 × 2 matrix we should end up with a 2 × 2 matrix: ๐ 11 ๐12 ๐13 ๐ 21 ๐22 ๐23 ๏ฃฎ๐11 ๐12 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ๐21 ๐22 ๏ฃบ = ๐11 ๐11 + ๐12 ๐21 + ๐13 ๐31 ๏ฃฏ ๏ฃบ ๐ 21 ๐ 11 + ๐22 ๐ 21 + ๐ 23 ๐ 31 ๏ฃฏ๐31 ๐32 ๏ฃบ ๏ฃฐ ๏ฃป ๐ 11 ๐12 + ๐ 12 ๐ 22 + ๐ 13 ๐ 32 , (A.1) ๐ 21 ๐12 + ๐ 22 ๐ 22 + ๐ 23 ๐ 32 or with some numbers: ๏ฃฎ−1 2 ๏ฃน ๏ฃบ 1 2 3 ๏ฃฏ๏ฃฏ ๏ฃบ = 1 · (−1) + 2 · (−7) + 3 · 1 −7 0 ๏ฃฏ ๏ฃบ 4 5 6 ๏ฃฏ 4 · (−1) + 5 · (−7) + 6 · 1 ๏ฃบ 1 −1 ๏ฃฐ ๏ฃป 1 · 2 + 2 · 0 + 3 · (−1) −12 −1 = . 4 · 2 + 5 · 0 + 6 · (−1) −33 2 A useful consequence of the definition is that the evaluation ๐ด ๐ฅ® for a matrix ๐ด and a (column) vector ๐ฅ® is also matrix multiplication. That is really why we think of vectors as column vectors, or ๐ × 1 matrices. For example, 1 2 3 4 2 1 · 2 + 2 · (−1) 0 = = . −1 3 · 2 + 4 · (−1) 2 If you look at the last section, that is precisely the last example we gave. You should stare at the computation of multiplication of matrices ๐ด๐ต and the previous definition of ๐ด ๐ฆ® as a mapping for a moment. What we are doing with matrix multiplication is applying the mapping ๐ด to the columns of ๐ต. This is usually written as follows. Suppose we write the ๐ × ๐ matrix ๐ต = [๐®1 ๐®2 · · · ๐®๐ ], where ๐®1 , ๐®2 , . . . , ๐®๐ are the columns of ๐ต. Then for an ๐ × ๐ matrix ๐ด, ๐ด๐ต = ๐ด[๐®1 ๐®2 · · · ๐®๐ ] = [๐ด๐®1 ๐ด๐®2 · · · ๐ด๐®๐ ]. The columns of the ๐ × ๐ matrix ๐ด๐ต are the vectors ๐ด๐®1 , ๐ด๐®2 , . . . , ๐ด๐®๐ . For example, in (A.1), the columns of ๏ฃฎ๐ ๐ ๏ฃน ๐ 11 ๐ 12 ๐ 13 ๏ฃฏ๏ฃฏ 11 12 ๏ฃบ๏ฃบ ๐ ๐ ๐ 21 ๐ 22 ๐ 23 ๏ฃฏ๏ฃฏ 21 22 ๏ฃบ๏ฃบ ๏ฃฐ๐31 ๐32 ๏ฃป are ๏ฃฎ๐ ๏ฃน ๏ฃฎ๐ ๏ฃน ๐ 11 ๐ 12 ๐13 ๏ฃฏ๏ฃฏ 11 ๏ฃบ๏ฃบ ๐ 11 ๐ 12 ๐ 13 ๏ฃฏ๏ฃฏ 12 ๏ฃบ๏ฃบ ๐ ๐ . and ๐ 21 ๐ 22 ๐23 ๏ฃฏ๏ฃฏ 21 ๏ฃบ๏ฃบ ๐ 21 ๐ 22 ๐ 23 ๏ฃฏ๏ฃฏ 22 ๏ฃบ๏ฃบ ๐ ๏ฃฐ 31 ๏ฃป ๏ฃฐ๐32 ๏ฃป This is a very useful way to understand what matrix multiplication is. It should also make it easier to remember how to perform matrix multiplication. 400 A.2.4 APPENDIX A. LINEAR ALGEBRA Some rules of matrix algebra For multiplication we want an analogue of a 1. That is, we desire a matrix that just leaves everything as it found it. This analogue is the so-called identity matrix. The identity matrix is a square matrix with 1s on the main diagonal and zeros everywhere else. It is usually denoted by ๐ผ. For each size we have a different identity matrix and so sometimes we may denote the size as a subscript. For example, ๐ผ3 is the 3 × 3 identity matrix ๏ฃฎ1 0 0๏ฃน ๏ฃฏ ๏ฃบ ๐ผ = ๐ผ3 = ๏ฃฏ๏ฃฏ0 1 0๏ฃบ๏ฃบ . ๏ฃฏ0 0 1๏ฃบ ๏ฃฐ ๏ฃป Let us see how the matrix works on a smaller example, ๐ 11 ๐ 12 ๐ 21 ๐ 22 1 0 ๐ · 1 + ๐ 12 · 0 = 11 0 1 ๐21 · 1 + ๐ 22 · 0 ๐ 11 · 0 + ๐12 · 1 ๐ ๐ = 11 12 . ๐ 21 · 0 + ๐22 · 1 ๐ 21 ๐ 22 Multiplication by the identity from the left looks similar, and also does not touch anything. We have the following rules for matrix multiplication. Suppose that ๐ด, ๐ต, ๐ถ are matrices of the correct sizes so that the following make sense. Let ๐ผ denote a scalar (number). Then ๐ด(๐ต๐ถ) = (๐ด๐ต)๐ถ (associative law), ๐ด(๐ต + ๐ถ) = ๐ด๐ต + ๐ด๐ถ (distributive law), (๐ต + ๐ถ)๐ด = ๐ต๐ด + ๐ถ๐ด (distributive law), ๐ผ(๐ด๐ต) = (๐ผ๐ด)๐ต = ๐ด(๐ผ๐ต), ๐ผ๐ด = ๐ด = ๐ด๐ผ (identity). Example A.2.1: Let us demonstrate a couple of these rules. For example, the associative law: −3 3 4 4 −1 4 −3 3 16 24 −96 −78 = = , 2 −2 1 −3 5 2 2 −2 −16 −2 64 52 | {z } | {z } | {z } ๐ด and ๐ต −3 3 2 −2 | {z } | {z } ๐ถ 4 4 1 −3 ๐ด ๐ต ๐ถ | | {z } | {z } | −1 4 −9 −21 = 5 2 6 14 | {z } | {z } | {z } ๐ด ๐ต๐ถ {z ๐ด(๐ต๐ถ) −1 4 −96 −78 = . 5 2 64 52 ๐ด๐ต ๐ถ {z (๐ด๐ต)๐ถ Or how about multiplication by scalars: −3 3 10 2 −2 4 4 1 −3 | {z } | {z } ๐ด ๐ต | {z } | −9 −21 −90 −210 = 10 = , 6 14 60 140 ๐ด๐ต } {z 10(๐ด๐ต) } } 401 A.2. MATRIX ALGEBRA | {z } | {z } | −3 3 10 2 −2 ๐ด and ๐ต −3 3 4 4 10 2 −2 1 −3 | {z } 10๐ด } | {z } | ๐ต ๐ต 4 4 −90 −210 = , 1 −3 60 140 {z } (10๐ด)๐ต | {z } | {z } | −3 3 = 2 −2 | {z } ๐ด {z 4 4 −30 30 = 1 −3 20 −20 40 40 −90 −210 = . 10 −30 60 140 ๐ด 10๐ต {z } ๐ด(10๐ต) A multiplication rule, one you have used since primary school on numbers, is quite conspicuously missing for matrices. That is, matrix multiplication is not commutative. Firstly, just because ๐ด๐ต makes sense, it may be that ๐ต๐ด is not even defined. For example, if ๐ด is 2 × 3, and ๐ต is 3 × 4, the we can multiply ๐ด๐ต but not ๐ต๐ด. Even if ๐ด๐ต and ๐ต๐ด are 1 0both defined, does not mean that they are equal. For example, 1 1 take ๐ด = 1 1 and ๐ต = 0 2 : 1 1 ๐ด๐ต = 1 1 A.2.5 1 0 1 2 = 0 2 1 2 ≠ 1 1 1 0 = 2 2 0 2 1 1 = ๐ต๐ด. 1 1 Inverse A couple of other algebra rules you know for numbers do not quite work on matrices: (i) ๐ด๐ต = ๐ด๐ถ does not necessarily imply ๐ต = ๐ถ, even if ๐ด is not 0. (ii) ๐ด๐ต = 0 does not necessarily mean that ๐ด = 0 or ๐ต = 0. For example: 0 1 0 0 0 1 0 0 0 1 = = 0 0 0 0 0 0 0 2 . 0 0 To make these rules hold, we do not just need one of the matrices to not be zero, we would need to “divide” by a matrix. This is where the matrix inverse comes in. Suppose that ๐ด and ๐ต are ๐ × ๐ matrices such that ๐ด๐ต = ๐ผ = ๐ต๐ด. Then we call ๐ต the inverse of ๐ด and we denote ๐ต by ๐ด−1 . Perhaps not surprisingly, −1 (๐ด−1 ) = ๐ด, since if the inverse of ๐ด is ๐ต, then the inverse of ๐ต is ๐ด. If the inverse of ๐ด exists, then we say ๐ด is invertible. If ๐ด is not invertible, we say ๐ด is singular. If ๐ด = [๐] is a 1 × 1 matrix, then ๐ด−1 is ๐ −1 = 1๐ . That is where the notation comes from. The computation is not nearly as simple when ๐ด is larger. The proper formulation of the cancellation rule is: If ๐ด is invertible, then ๐ด๐ต = ๐ด๐ถ implies ๐ต = ๐ถ. 402 APPENDIX A. LINEAR ALGEBRA The computation is what you would do in regular algebra with numbers, but you have to be careful never to commute matrices: ๐ด๐ต = ๐ด๐ถ, ๐ด−1 ๐ด๐ต = ๐ด−1 ๐ด๐ถ, ๐ผ๐ต = ๐ผ๐ถ, ๐ต = ๐ถ. And similarly for cancellation on the right: If ๐ด is invertible, then ๐ต๐ด = ๐ถ๐ด implies ๐ต = ๐ถ. The rule says, among other things, that the inverse of a matrix is unique if it exists: If ๐ด๐ต = ๐ผ = ๐ด๐ถ, then ๐ด is invertible and ๐ต = ๐ถ. We will see later how to compute an inverse of a matrix in general. For now, let us note that there is a simple formula for the inverse of a 2 × 2 matrix ๐ ๐ ๐ ๐ −1 1 ๐ −๐ = . −๐ ๐ ๐๐ − ๐๐ For example: 1 1 2 4 −1 1 4 −1 2 = = −1 1 · 4 − 1 · 2 −2 1 −1/2 1/2 . Let’s try it: 1 1 2 4 2 −1 −1/2 1/2 1 0 = 0 1 and 2 −1 −1/2 1/2 1 1 1 0 = . 2 4 0 1 Just as we cannot divide by every number, not every matrix is invertible. In the case of matrices however we may have singular matrices that are not zero. For example, 1 1 2 2 is a singular matrix. But didn’t we just give a formula for an inverse? Let us try it: 1 1 2 2 −1 1 2 −1 = = −2 1 1·2−1·2 ? We get into a bit of trouble; we are trying to divide by zero. So a 2 × 2 matrix ๐ด is invertible whenever ๐๐ − ๐๐ ≠ 0 and otherwise it is singular. The expression ๐๐ − ๐๐ is called the determinant and we will look at it more carefully in a later section. There is a similar expression for a square matrix of any size. 403 A.2. MATRIX ALGEBRA A.2.6 Diagonal matrices A simple (and surprisingly useful) type of a square matrix is a so-called diagonal matrix. It is a matrix whose entries are all zero except those on the main diagonal from top left to bottom right. For example a 4 × 4 diagonal matrix is of the form ๏ฃฎ ๐1 0 0 0 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 ๐2 0 0 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ 0 0 ๐3 0 ๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ 0 0 0 ๐4 ๏ฃบ ๏ฃฐ ๏ฃป Such matrices have nice properties when we multiply by them. If we multiply them by a vector, they multiply the ๐ th entry by ๐ ๐ . For example, ๏ฃฎ1 0 0๏ฃน ๏ฃฎ4๏ฃน ๏ฃฎ1 · 4๏ฃน ๏ฃฎ 4 ๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 2 0๏ฃบ ๏ฃฏ5๏ฃบ = ๏ฃฏ2 · 5๏ฃบ = ๏ฃฏ10๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 3๏ฃบ ๏ฃฏ6๏ฃบ ๏ฃฏ3 · 6๏ฃบ ๏ฃฏ18๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป Similarly, when they multiply another matrix from the left, they multiply the ๐ th row by ๐ ๐ . For example, ๏ฃฎ2 0 0 ๏ฃน ๏ฃฎ1 1 1๏ฃน ๏ฃฎ 2 2 2 ๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 3 0 ๏ฃบ ๏ฃฏ1 1 1๏ฃบ = ๏ฃฏ 3 3 3 ๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 −1๏ฃบ ๏ฃฏ1 1 1๏ฃบ ๏ฃฏ−1 −1 −1๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป On the other hand, multiplying on the right, they multiply the columns: ๏ฃฎ1 1 1๏ฃน ๏ฃฎ2 0 0 ๏ฃน ๏ฃฎ2 3 −1๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 1๏ฃบ ๏ฃฏ0 3 0 ๏ฃบ = ๏ฃฏ2 3 −1๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 1๏ฃบ ๏ฃฏ0 0 −1๏ฃบ ๏ฃฏ2 3 −1๏ฃบ ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป And it is really easy to multiply two diagonal matrices together—we multiply the entries: ๏ฃฎ1 0 0๏ฃน ๏ฃฎ2 0 0 ๏ฃน ๏ฃฎ1 · 2 0 0 ๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ2 0 0 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ0 2 0๏ฃบ ๏ฃฏ0 3 0 ๏ฃบ = ๏ฃฏ 0 2 · 3 0 ๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ0 6 0 ๏ฃบ๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ0 0 3๏ฃบ ๏ฃฏ0 0 −1๏ฃบ ๏ฃฏ 0 0 3 · (−1)๏ฃบ๏ฃป ๏ฃฏ๏ฃฐ0 0 −3๏ฃบ๏ฃป ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃป ๏ฃฐ For this last reason, they are easy to invert, you simply invert each diagonal element: ๏ฃฎ๐1 0 0 ๏ฃน −1 ๏ฃฎ๐−1 0 0 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ 1 −1 ๏ฃฏ 0 ๐2 0 ๏ฃบ = ๏ฃฏ 0 ๐ 0 ๏ฃบ๏ฃบ . 2 ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ 0 0 ๐3 ๏ฃบ ๏ฃฏ 0 0 ๐3−1 ๏ฃบ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ Let us check an example ๏ฃฎ2 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ | 0 0๏ฃน๏ฃบ 3 0๏ฃบ๏ฃบ 0 4๏ฃบ๏ฃป {z ๐ด−1 −1 ๏ฃฎ2 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ }| 0 0๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ 12 0 0 ๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ2 0 0๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ1 0 0๏ฃน๏ฃบ 3 0๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ 0 13 0 ๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ0 3 0๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ0 1 0๏ฃบ๏ฃบ . 0 4๏ฃบ๏ฃป ๏ฃฏ๏ฃฐ 0 0 41 ๏ฃบ๏ฃป ๏ฃฏ๏ฃฐ0 0 4๏ฃบ๏ฃป ๏ฃฏ๏ฃฐ0 0 1๏ฃบ๏ฃป {z } ๐ด | {z } | {z } ๐ด−1 ๐ด | {z } ๐ผ It is no wonder that the way we solve many problems in linear algebra (and in differential equations) is to try to reduce the problem to the case of diagonal matrices. 404 A.2.7 APPENDIX A. LINEAR ALGEBRA Transpose Vectors do not always have to be column vectors, that is just a convention. Swapping rows and columns is from time to time needed. The operation that swaps rows and columns is the so-called transpose. The transpose of ๐ด is denoted by ๐ด๐ . Example: 1 2 3 4 5 6 ๐ ๏ฃฎ1 4๏ฃน ๏ฃฏ ๏ฃบ = ๏ฃฏ๏ฃฏ2 5๏ฃบ๏ฃบ . ๏ฃฏ3 6๏ฃบ ๏ฃฐ ๏ฃป Transpose takes an ๐ × ๐ matrix to an ๐ × ๐ matrix. A key feature of the transpose is that if the product ๐ด๐ต makes sense, then ๐ต๐ ๐ด๐ also makes sense, at least from the point of view of sizes. In fact, we get precisely the transpose of ๐ด๐ต. That is: (๐ด๐ต)๐ = ๐ต๐ ๐ด๐ . For example, ๏ฃฎ0 1 ๏ฃน ๐ ๏ฃฎ1 4๏ฃน ๏ฃบª ๏ฃบ 0 1 2 ๏ฃฏ๏ฃฏ © 1 2 3 ๏ฃฏ๏ฃฏ ๏ฃบ. ๏ฃบ 1 0 2 5 = ­ ® ๏ฃบ ๏ฃฏ ๏ฃบ 4 5 6 ๏ฃฏ๏ฃฏ 1 0 −2 ๏ฃฏ3 6๏ฃบ ๏ฃบ 2 −2 « ๏ฃฐ ๏ฃป¬ ๏ฃฐ ๏ฃป It is left to the reader to verify that computing the matrix product on the left and then transposing is the same as computing the matrix product on the right. If we have a column vector ๐ฅ® to which we apply a matrix ๐ด and we transpose the result, then the row vector ๐ฅ®๐ applies to ๐ด๐ from the left: ๐ (๐ด ๐ฅ®) = ๐ฅ®๐ ๐ด๐ . Another place where transpose is useful is when we wish to apply the dot product∗ to two column vectors: ๐ฅ® · ๐ฆ® = ๐ฆ®๐ ๐ฅ®. That is the way that one often writes the dot product in software. We say a matrix ๐ด is symmetric if ๐ด = ๐ด๐ . For example, ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 4 5๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3 5 6๏ฃบ ๏ฃฐ ๏ฃป is a symmetric matrix. Notice that a symmetric matrix is always square, that is, ๐ × ๐. Symmetric matrices have many nice properties† , and come up quite often in applications. ∗ As a side note, mathematicians write ๐ฆ®๐ ๐ฅ® and physicists write ๐ฅ®๐ ๐ฆ®. Shhh. . . don’t tell anyone, but the physicists are probably right on this. † Although so far we have not learned enough about matrices to really appreciate them. 405 A.2. MATRIX ALGEBRA A.2.8 Exercises Exercise A.2.1: Add the following matrices −1 2 2 3 2 3 a) + 5 8 −1 8 3 5 ๏ฃฎ1 2 4๏ฃน ๏ฃฎ2 −8 −3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 0 ๏ฃบ๏ฃบ b) ๏ฃฏ๏ฃฏ2 3 1๏ฃบ๏ฃบ + ๏ฃฏ๏ฃฏ3 1 ๏ฃฏ0 5 1๏ฃบ ๏ฃฏ6 −4 1 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป Exercise A.2.2: Compute 0 3 1 5 a) 3 +6 −2 2 −1 5 −3 1 2 −1 b) 2 −3 2 2 3 2 Exercise A.2.3: Multiply the following matrices ๏ฃฎ−1 2๏ฃน ๏ฃฏ ๏ฃบ 3 −1 3 1 a) ๏ฃฏ๏ฃฏ 3 1๏ฃบ๏ฃบ ๏ฃฏ 5 8๏ฃบ 8 3 2 −3 ๏ฃฐ ๏ฃป ๏ฃฎ1 2 3๏ฃน ๏ฃฎ2 3 1 7 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃบ๏ฃฏ b) ๏ฃฏ๏ฃฏ3 1 1๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ1 2 3 −1๏ฃบ๏ฃบ ๏ฃฏ1 0 3๏ฃบ ๏ฃฏ1 −1 3 0 ๏ฃบ ๏ฃป ๏ฃฐ ๏ฃป๏ฃฐ ๏ฃฎ ๏ฃฎ4 1 6 3๏ฃน ๏ฃฏ2 ๏ฃบ ๏ฃฏ1 ๏ฃฏ c) ๏ฃฏ๏ฃฏ5 6 5 0๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ ๏ฃฏ4 6 6 0๏ฃบ ๏ฃฏ3 ๏ฃป ๏ฃฏ5 ๏ฃฐ ๏ฃฐ ๏ฃฎ2 2๏ฃน ๏ฃบ 1 1 4 ๏ฃฏ๏ฃฏ ๏ฃบ 1 0 d) ๏ฃบ 0 5 1 ๏ฃฏ๏ฃฏ ๏ฃบ ๏ฃฐ6 4๏ฃป 5๏ฃน๏ฃบ 2๏ฃบ๏ฃบ 5๏ฃบ๏ฃบ 6๏ฃบ๏ฃป Exercise A.2.4: Compute the inverse of the given matrices a) −3 0 −1 b) 1 0 1 4 c) 1 3 2 2 d) 1 4 Exercise A.2.5: Compute the inverse of the given matrices a) −2 0 0 1 ๏ฃฎ1 0 0 0 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃฏ0 −1 0 0 ๏ฃบ๏ฃบ c) ๏ฃฏ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0.01 0 ๏ฃบ ๏ฃฏ0 0 0 −5๏ฃบ๏ฃป ๏ฃฐ ๏ฃฎ3 0 0๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ0 −2 0๏ฃบ๏ฃบ ๏ฃฏ0 0 1๏ฃบ ๏ฃฐ ๏ฃป Exercise A.2.101: Add the following matrices 2 1 0 5 3 4 a) + 1 1 −1 1 2 5 ๏ฃฎ6 −2 3๏ฃน ๏ฃฎ−1 −1 −3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 7 3 ๏ฃบ๏ฃบ b) ๏ฃฏ๏ฃฏ7 3 3๏ฃบ๏ฃบ + ๏ฃฏ๏ฃฏ 6 ๏ฃฏ8 −1 2๏ฃบ ๏ฃฏ−9 4 −1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป Exercise A.2.102: Compute 1 2 −1 3 a) 2 +3 3 4 1 2 2 −1 2 1 b) 3 −2 1 3 −1 2 406 APPENDIX A. LINEAR ALGEBRA Exercise A.2.103: Multiply the following matrices ๏ฃฎ2 4๏ฃน ๏ฃบ 2 1 4 ๏ฃฏ๏ฃฏ ๏ฃบ 6 3 a) ๏ฃบ 3 4 4 ๏ฃฏ๏ฃฏ ๏ฃบ 3 5 ๏ฃฐ ๏ฃป ๏ฃฎ0 3 3 ๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ2 −2 1 ๏ฃบ๏ฃบ ๏ฃฏ3 5 −2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ3 4 1๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ2 −1 0๏ฃบ๏ฃบ ๏ฃฏ4 −1 5๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−2 −2๏ฃน ๏ฃฏ ๏ฃบ 0 3 3 ๏ฃบ๏ฃบ d) ๏ฃฏ๏ฃฏ 5 ๏ฃฏ2 1๏ฃบ 1 3 ๏ฃฐ ๏ฃป ๏ฃฎ0 2 5 0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 0 5 2๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3 6 1 6๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ6 6 2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4 6 0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2 0 4๏ฃบ ๏ฃฐ ๏ฃป Exercise A.2.104: Compute the inverse of the given matrices 0 1 b) 1 0 a) 2 1 2 c) 3 5 4 2 d) 4 4 Exercise A.2.105: Compute the inverse of the given matrices a) 2 0 0 3 ๏ฃฎ4 0 0 ๏ฃน ๏ฃบ ๏ฃฏ b) ๏ฃฏ๏ฃฏ0 5 0 ๏ฃบ๏ฃบ ๏ฃฏ0 0 −1๏ฃบ ๏ฃป ๏ฃฐ ๏ฃฎ−1 ๏ฃฏ ๏ฃฏ0 c) ๏ฃฏ๏ฃฏ ๏ฃฏ0 ๏ฃฏ0 ๏ฃฐ 0 2 0 0 0 0 ๏ฃน๏ฃบ 0 0 ๏ฃบ๏ฃบ 3 0 ๏ฃบ๏ฃบ 0 0.1๏ฃบ๏ฃป 407 A.3. ELIMINATION A.3 Elimination Note: 2–3 lectures A.3.1 Linear systems of equations One application of matrices is to solve systems of linear equations∗ . Consider the following system of linear equations 2๐ฅ1 + 2๐ฅ2 + 2๐ฅ3 = 2, ๐ฅ1 + ๐ฅ2 + 3๐ฅ3 = 5, (A.2) ๐ฅ1 + 4๐ฅ2 + ๐ฅ3 = 10. There is a systematic procedure called elimination to solve such a system. In this procedure, we attempt to eliminate each variable from all but one equation. We want to end up with equations such as ๐ฅ3 = 2, where we can just read off the answer. We write a system of linear equations as a matrix equation: ® ๐ด ๐ฅ® = ๐. The system (A.2) is written as ๏ฃฎ2 ๏ฃฏ ๏ฃฏ1 ๏ฃฏ ๏ฃฏ1 ๏ฃฐ | ๏ฃฎ2๏ฃน 2 2๏ฃน๏ฃบ ๏ฃฎ๏ฃฏ ๐ฅ1 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃบ 1 3๏ฃบ๏ฃบ ๏ฃฏ๏ฃฏ ๐ฅ2 ๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ 5 ๏ฃบ๏ฃบ . ๏ฃฏ10๏ฃบ 4 1๏ฃบ๏ฃป ๏ฃฏ๏ฃฐ ๐ฅ3 ๏ฃบ๏ฃป ๏ฃฐ ๏ฃป {z } |{z} ๐ด ๐ฅ® |{z} ๐® If we knew the inverse of ๐ด, then we would be done; we would simply solve the equation: ® ๐ฅ® = ๐ด−1 ๐ด ๐ฅ® = ๐ด−1 ๐. Well, but that is part of the problem, we do not know how to compute the inverse for matrices bigger than 2 × 2. We will see later that to compute the inverse we are really ® In other words, we will need to do elimination to solving ๐ด ๐ฅ® = ๐® for several different ๐. find ๐ด−1 . In addition, we may wish to solve ๐ด ๐ฅ® = ๐® if ๐ด is not invertible, or perhaps not even square. Let us return to the equations themselves and see how we can manipulate them. There are a few operations we can perform on the equations that do not change the solution. First, perhaps an operation that may seem stupid, we can swap two equations in (A.2): ๐ฅ1 + ๐ฅ2 + 3๐ฅ3 = 5, 2๐ฅ1 + 2๐ฅ2 + 2๐ฅ3 = 2, ๐ฅ1 + 4๐ฅ2 + ๐ฅ3 = 10. ∗ Although perhaps we have this backwards, quite often we solve a linear system of equations to find out something about matrices, rather than vice versa. 408 APPENDIX A. LINEAR ALGEBRA Clearly these new equations have the same solutions ๐ฅ1 , ๐ฅ2 , ๐ฅ3 . A second operation is that we can multiply an equation by a nonzero number. For example, we multiply the third equation in (A.2) by 3: 2๐ฅ1 + 2๐ฅ2 + 2๐ฅ 3 = 2, ๐ฅ1 + ๐ฅ2 + 3๐ฅ 3 = 5, 3๐ฅ1 + 12๐ฅ2 + 3๐ฅ 3 = 30. Finally, we can add a multiple of one equation to another equation. For instance, we add 3 times the third equation in (A.2) to the second equation: 2๐ฅ1 + 2๐ฅ2 + 2๐ฅ 3 = 2, (1 + 3)๐ฅ1 + (1 + 12)๐ฅ 2 + (3 + 3)๐ฅ 3 = 5 + 30, ๐ฅ1 + 4๐ฅ 2 + ๐ฅ 3 = 10. The same ๐ฅ1 , ๐ฅ2 , ๐ฅ3 should still be solutions to the new equations. These were just examples; we did not get any closer to the solution. We must to do these three operations in some more logical manner, but it turns out these three operations suffice to solve every linear equation. The first thing is to write the equations in a more compact manner. Given ® ๐ด ๐ฅ® = ๐, we write down the so-called augmented matrix ® [๐ด | ๐], where the vertical line is just a marker for us to know where the “right-hand side” of the equation starts. For the system (A.2) the augmented matrix is ๏ฃฎ2 2 2 2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 1 1 3 5 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ 1 4 1 10 ๏ฃบ ๏ฃฐ ๏ฃป The entire process of elimination, which we will describe, is often applied to any sort of matrix, not just an augmented matrix. Simply think of the matrix as the 3 × 4 matrix ๏ฃฎ2 2 2 2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 3 5 ๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ1 4 1 10๏ฃบ ๏ฃฐ ๏ฃป A.3.2 Row echelon form and elementary operations We apply the three operations above to the matrix. We call these the elementary operations or elementary row operations. Translating the operations to the matrix setting, the operations become: 409 A.3. ELIMINATION (i) Swap two rows. (ii) Multiply a row by a nonzero number. (iii) Add a multiple of one row to another row. We run these operations until we get into a state where it is easy to read off the answer, or until we get into a contradiction indicating no solution. More specifically, we run the operations until we obtain the so-called row echelon form. Let us call the first (from the left) nonzero entry in each row the leading entry. A matrix is in row echelon form if the following conditions are satisfied: (i) The leading entry in any row is strictly to the right of the leading entry of the row above. (ii) Any zero rows are below all the nonzero rows. (iii) All leading entries are 1. A matrix is in reduced row echelon form if furthermore the following condition is satisfied. (iv) All the entries above a leading entry are zero. Note that the definition applies to matrices of any size. Example A.3.1: The following matrices are in row echelon form. The leading entries are marked: ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 2 0 0 9 1 0 3 ๏ฃน๏ฃบ 5 ๏ฃบ๏ฃบ 1 ๏ฃบ๏ฃป −1 −3๏ฃน๏ฃบ 5 ๏ฃบ๏ฃบ 1 0 1 ๏ฃบ๏ฃป ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 2 1 0 1๏ฃน๏ฃบ 2๏ฃบ๏ฃบ 0๏ฃบ๏ฃป ๏ฃฎ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ −5 0 0 1 0 0 2 ๏ฃน๏ฃบ 1 ๏ฃบ๏ฃบ 0 ๏ฃบ๏ฃป None of the matrices above are in reduced row echelon form. For example, in the first matrix none of the entries above the second and third leading entries are zero; they are 9, 3, and 5. The following matrices are in reduced row echelon form. The leading entries are marked: ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 3 0 0 0 1 0 8๏ฃน๏ฃบ 6๏ฃบ๏ฃบ 0๏ฃบ๏ฃป ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 0 1 0 2 3 0 0 ๏ฃน๏ฃบ 0 ๏ฃบ๏ฃบ 1 ๏ฃบ๏ฃป ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 0 1 0 3 ๏ฃน๏ฃบ −2๏ฃบ๏ฃบ 0 ๏ฃบ๏ฃป ๏ฃฎ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 1 0 0 2 0 0 0 ๏ฃน๏ฃบ 1 ๏ฃบ๏ฃบ 0 ๏ฃบ๏ฃป The procedure we will describe to find a reduced row echelon form of a matrix is called Gauss–Jordan elimination. The first part of it, which obtains a row echelon form, is called Gaussian elimination or row reduction. For some problems, a row echelon form is sufficient, and it is a bit less work to only do this first part. To attain the row echelon form we work systematically. We go column by column, starting at the first column. We find topmost entry in the first column that is not zero, and we call it the pivot. If there is no nonzero entry we move to the next column. We swap rows 410 APPENDIX A. LINEAR ALGEBRA to put the row with the pivot as the first row. We divide the first row by the pivot to make the pivot entry be a 1. Now look at all the rows below and subtract the correct multiple of the pivot row so that all the entries below the pivot become zero. After this procedure we forget that we had a first row (it is now fixed), and we forget about the column with the pivot and all the preceding zero columns. Below the pivot row, all the entries in these columns are just zero. Then we focus on the smaller matrix and we repeat the steps above. It is best shown by example, so let us go back to the example from the beginning of the section. We keep the vertical line in the matrix, even though the procedure works on any matrix, not just an augmented matrix. We start with the first column and we locate the pivot, in this case the first entry of the first column. ๏ฃฎ 2 ๏ฃฏ ๏ฃฏ 1 ๏ฃฏ ๏ฃฏ 1 ๏ฃฐ 2 2 2 ๏ฃน๏ฃบ 1 3 5 ๏ฃบ๏ฃบ 4 1 10 ๏ฃบ๏ฃป ๏ฃฎ 1 ๏ฃฏ ๏ฃฏ 1 ๏ฃฏ ๏ฃฏ 1 ๏ฃฐ 1 1 1 ๏ฃน๏ฃบ 1 3 5 ๏ฃบ๏ฃบ 4 1 10 ๏ฃบ๏ฃป We multiply the first row by 1/2. We subtract the first row from the second and third row (two elementary operations). ๏ฃฎ1 1 1 1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 2 4๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 3 0 9๏ฃบ ๏ฃฐ ๏ฃป We are done with the first column and the first row for now. We almost pretend the matrix doesn’t have the first column and the first row. ๏ฃฎ∗ ∗ ∗ ∗ ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ∗ 0 2 4๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ∗ 3 0 9๏ฃบ ๏ฃฐ ๏ฃป OK, look at the second column, and notice that now the pivot is in the third row. ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 1 0 3 1 1 ๏ฃน๏ฃบ 2 4 ๏ฃบ๏ฃบ 0 9 ๏ฃบ๏ฃป ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 1 3 0 1 1 ๏ฃน๏ฃบ 0 9 ๏ฃบ๏ฃบ 2 4 ๏ฃบ๏ฃป We swap rows. 411 A.3. ELIMINATION And we divide the pivot row by 3. ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 1 1 0 1 1 ๏ฃน๏ฃบ 0 3 ๏ฃบ๏ฃบ 2 4 ๏ฃบ๏ฃป We do not need to subtract anything as everything below the pivot is already zero. We move on, we again start ignoring the second row and second column and focus on ๏ฃฎ∗ ∗ ∗ ∗ ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ∗ ∗ ∗ ∗ ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ∗ ∗ 2 4๏ฃบ ๏ฃฐ ๏ฃป We find the pivot, then divide that row by 2: ๏ฃฎ1 1 ๏ฃฏ ๏ฃฏ0 1 ๏ฃฏ ๏ฃฏ0 0 ๏ฃฐ 1 0 2 1 3 4 ๏ฃน ๏ฃบ ๏ฃบ ๏ฃบ ๏ฃบ ๏ฃป → ๏ฃฎ1 1 1 1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 1 0 3 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2๏ฃบ ๏ฃฐ ๏ฃป The matrix is now in row echelon form. The equation corresponding to the last row is ๐ฅ 3 = 2. We know ๐ฅ3 and we could substitute it into the first two equations to get equations for ๐ฅ1 and ๐ฅ 2 . Then we could do the same thing with ๐ฅ2 , until we solve for all 3 variables. This procedure is called backsubstitution and we can achieve it via elementary operations. We start from the lowest pivot (leading entry in the row echelon form) and subtract the right multiple from the row above to make all the entries above this pivot zero. Then we move to the next pivot and so on. After we are done, we will have a matrix in reduced row echelon form. We continue our example. Subtract the last row from the first to get ๏ฃฎ 1 1 0 −1 ๏ฃน ๏ฃบ ๏ฃฏ ๏ฃฏ 0 1 0 3 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2 ๏ฃบ ๏ฃป ๏ฃฐ The entry above the pivot in the second row is already zero. So we move onto the next pivot, the one in the second row. We subtract this row from the top row to get ๏ฃฎ 1 0 0 −4 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 1 0 3 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 2 ๏ฃบ ๏ฃฐ ๏ฃป The matrix is in reduced row echelon form. If we now write down the equations for ๐ฅ1 , ๐ฅ2 , ๐ฅ3 , we find ๐ฅ1 = −4, ๐ฅ2 = 3, In other words, we have solved the system. ๐ฅ3 = 2. 412 A.3.3 APPENDIX A. LINEAR ALGEBRA Non-unique solutions and inconsistent systems It is possible that the solution of a linear system of equations is not unique, or that no solution exists. Suppose for a moment that the row echelon form we found was ๏ฃฎ1 2 3 4๏ฃน ๏ฃบ ๏ฃฏ ๏ฃฏ 0 0 1 3 ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0 1๏ฃบ ๏ฃฐ ๏ฃป Then we have an equation 0 = 1 coming from the last row. That is impossible and the ® equations are what we call inconsistent. There is no solution to ๐ด ๐ฅ® = ๐. On the other hand, if we find a row echelon form ๏ฃฎ1 2 3 4๏ฃน ๏ฃบ ๏ฃฏ ๏ฃฏ 0 0 1 3 ๏ฃบ, ๏ฃบ ๏ฃฏ ๏ฃฏ0 0 0 0๏ฃบ ๏ฃป ๏ฃฐ then there is no issue with finding solutions. In fact, we will find way too many. Let us continue with backsubstitution (subtracting 3 times the third row from the first) to find the reduced row echelon form and let’s mark the pivots. ๏ฃฎ 1 ๏ฃฏ ๏ฃฏ 0 ๏ฃฏ ๏ฃฏ 0 ๏ฃฐ 2 0 0 0 1 0 −5 3 0 ๏ฃน ๏ฃบ ๏ฃบ ๏ฃบ ๏ฃบ ๏ฃป The last row is all zeros; it just says 0 = 0 and we ignore it. The two remaining equations are ๐ฅ1 + 2๐ฅ2 = −5, ๐ฅ3 = 3. Let us solve for the variables that corresponded to the pivots, that is ๐ฅ1 and ๐ฅ3 as there was a pivot in the first column and in the third column: ๐ฅ1 = −2๐ฅ2 − 5, ๐ฅ3 = 3. The variable ๐ฅ2 can be anything you wish and we still get a solution. The ๐ฅ2 is called a free variable. There are infinitely many solutions, one for every choice of ๐ฅ 2 . If we pick ๐ฅ2 = 0, then ๐ฅ1 = −5, and ๐ฅ 3 = 3 give a solution. But we also get a solution by picking say ๐ฅ2 = 1, in which case ๐ฅ1 = −9 and ๐ฅ3 = 3, or by picking ๐ฅ 2 = −5 in which case ๐ฅ1 = 5 and ๐ฅ 3 = 3. The general idea is that if any row has all zeros in the columns corresponding to the ® then variables, but a nonzero entry in the column corresponding to the right-hand side ๐, the system is inconsistent and has no solutions. In other words, the system is inconsistent if you find a pivot on the right side of the vertical line drawn in the augmented matrix. Otherwise, the system is consistent, and at least one solution exists. 413 A.3. ELIMINATION Suppose the system is consistent (at least one solution exists): (i) If every column corresponding to a variable has a pivot element, then the solution is unique. (ii) If there are columns corresponding to variables with no pivot, then those are free variables that can be chosen arbitrarily, and there are infinitely many solutions. ® we have a so-called homogeneous matrix equation When ๐® = 0, ® ๐ด ๐ฅ® = 0. There is no need to write an augmented matrix in this case. As the elementary operations do not do anything to a zero column, it always stays a zero column. Moreover, ๐ด ๐ฅ® = 0® ® Such a system is always consistent. It may always has at least one solution, namely ๐ฅ® = 0. have other solutions: If you find any free variables, then you get infinitely many solutions. The set of solutions of ๐ด ๐ฅ® = 0® comes up quite often so people give it a name. It is called the nullspace or the kernel of ๐ด. One place where the kernel comes up is invertibility of a square matrix ๐ด. If the kernel of ๐ด contains a nonzero vector, then it contains infinitely ® since infinitely many vectors (there was a free variable). But then it is impossible to invert 0, ® so there is no unique vector that ๐ด takes to 0. ® So if the kernel is many vectors go to 0, nontrivial, that is, if there are any nonzero vectors in the kernel, in other words, if there are any free variables, or in yet other words, if the row echelon form of ๐ด has columns without pivots, then ๐ด is not invertible. We will return to this idea later. A.3.4 Linear independence and rank If rows of a matrix correspond to equations, it may be good to find out how many equations we really need to find the same set of solutions. Similarly, if we find a number of solutions ® we may ask if we found enough so that all other solutions can to a linear equation ๐ด ๐ฅ® = 0, be formed out of the given set. The concept we want is that of linear independence. That same concept is useful for differential equations, for example in chapter 2. Given row or column vectors ๐ฆ®1 , ๐ฆ®2 , . . . , ๐ฆ®๐ , a linear combination is an expression of the form ๐ผ1 ๐ฆ®1 + ๐ผ2 ๐ฆ®2 + · · · + ๐ผ ๐ ๐ฆ®๐ , where ๐ผ1 , ๐ผ2 , . . . , ๐ผ ๐ are all scalars. For example, 3 ๐ฆ®1 + ๐ฆ®2 − 5 ๐ฆ®3 is a linear combination of ๐ฆ®1 , ๐ฆ®2 , and ๐ฆ®3 . We have seen linear combinations before. The expression ๐ด ๐ฅ® is a linear combination of the columns of ๐ด, while ๐ฅ®๐ ๐ด = (๐ด๐ ๐ฅ®)๐ is a linear combination of the rows of ๐ด. 414 APPENDIX A. LINEAR ALGEBRA The way linear combinations come up in our study of differential equations is similar to ® ๐ด ๐ฅ®2 = 0, ® the following computation. Suppose that ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ are solutions to ๐ด ๐ฅ®1 = 0, ® Then the linear combination . . . , ๐ด ๐ฅ®๐ = 0. ๐ฆ® = ๐ผ 1 ๐ฅ®1 + ๐ผ 2 ๐ฅ®2 + · · · + ๐ผ ๐ ๐ฅ®๐ ® is a solution to ๐ด ๐ฆ® = 0: ๐ด ๐ฆ® = ๐ด(๐ผ1 ๐ฅ®1 + ๐ผ2 ๐ฅ®2 + · · · + ๐ผ ๐ ๐ฅ®๐ ) = ® = ๐ผ1 ๐ด ๐ฅ®1 + ๐ผ 2 ๐ด ๐ฅ®2 + · · · + ๐ผ ๐ ๐ด ๐ฅ®๐ = ๐ผ1 0® + ๐ผ2 0® + · · · + ๐ผ ๐ 0® = 0. So if you have found enough solutions, you have them all. The question is, when did we find enough of them? We say the vectors ๐ฆ®1 , ๐ฆ®2 , . . . , ๐ฆ®๐ are linearly independent if the only solution to ๐ผ1 ๐ฅ®1 + ๐ผ2 ๐ฅ®2 + · · · + ๐ผ ๐ ๐ฅ®๐ = 0® is ๐ผ 1 = ๐ผ 2 = · · · = ๐ผ ๐ = 0. Otherwise, 1 we say the vectors are linearly dependent. 0 For example, the vectors 2 and 1 are linearly independent. Let’s try: ๐ผ1 0 ๐ผ1 1 0 + ๐ผ2 = = 0® = . 1 2๐ผ 1 + ๐ผ2 0 2 So ๐ผ1 = 0, and then it is clear that ๐ผ2 = 0 as well. In other words, the two vectors are linearly independent. If a set of vectors is linearly dependent, that is, some of the ๐ผ ๐ s are nonzero, then we can ® solve for one vector in terms of the others. Suppose ๐ผ1 ≠ 0. Since ๐ผ1 ๐ฅ®1 +๐ผ 2 ๐ฅ®2 +· · ·+๐ผ ๐ ๐ฅ®๐ = 0, then −๐ผ3 −๐ผ ๐ −๐ผ2 ๐ฅ®2 − ๐ฅ®3 + · · · + ๐ฅ®๐ . ๐ฅ®1 = ๐ผ1 ๐ผ1 ๐ผ1 For example, and so ๏ฃฎ1๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ 1 ๏ฃน ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 2 ๏ฃฏ2๏ฃบ − 4 ๏ฃฏ1๏ฃบ + 2 ๏ฃฏ๏ฃฏ 0 ๏ฃบ๏ฃบ = ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ3๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ1 ๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ 1 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ = 2 ๏ฃฏ1๏ฃบ − ๏ฃฏ 0 ๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3 ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป You may have noticed that solving for those ๐ผ ๐ s is just solving linear equations, and so you may not be surprised that to check if a set of vectors is linearly independent we use row reduction. Given a set of vectors, we may not be interested in just finding if they are linearly independent or not, we may be interested in finding a linearly independent subset. Or 415 A.3. ELIMINATION perhaps we may want to find some other vectors that give the same linear combinations and are linearly independent. The way to figure this out is to form a matrix out of our vectors. If we have row vectors we consider them as rows of a matrix. If we have column vectors we consider them columns of a matrix. The set of all linear combinations of a set of vectors is called their span. span ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ = Set of all linear combinations of ๐ฅ®1 , ๐ฅ®2 , . . . , ๐ฅ®๐ . Given a matrix ๐ด, the maximal number of linearly independent rows is called the rank of ๐ด, and we write “rank ๐ด” for the rank. For example, ๏ฃฎ1 1 1๏ฃน ๏ฃฏ ๏ฃบ 2 2 ๏ฃบ๏ฃบ = 1. rank ๏ฃฏ๏ฃฏ 2 ๏ฃฏ−1 −1 −1๏ฃบ ๏ฃฐ ๏ฃป The second and third row are multiples of the first one. We cannot choose more than one row and still have a linearly independent set. But what is ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ rank ๏ฃฏ๏ฃฏ4 5 6๏ฃบ๏ฃบ ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป = ? That seems to be a tougher question to answer. The first two rows are linearly independent (neither is a multiple of the other), so the rank is at least two. If we would set up the equations for the ๐ผ1 , ๐ผ2 , and ๐ผ3 , we would find a system with infinitely many solutions. One solution is 1 2 3 −2 4 5 6 + 7 8 9 = 0 0 0 . So the set of all three rows is linearly dependent, the rank cannot be 3. Therefore the rank is 2. But how can we do this in a more systematic way? We find the row echelon form! ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4 5 6๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป Row echelon form of is ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 1 2๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0๏ฃบ ๏ฃฐ ๏ฃป The elementary row operations do not change the set of linear combinations of the rows (that was one of the main reasons for defining them as they were). In other words, the span of the rows of the ๐ด is the same as the span of the rows of the row echelon form of ๐ด. In particular, the number of linearly independent rows is the same. And in the row echelon form, all nonzero rows are linearly independent. This is not hard to see. Consider the two nonzero rows in the example above. Suppose we tried to solve for the ๐ผ1 and ๐ผ2 in ๐ผ1 1 2 3 + ๐ผ2 0 1 2 = 0 0 0 . Since the first column of the row echelon matrix has zeros except in the first row means that ๐ผ1 = 0. For the same reason, ๐ผ2 is zero. We only have two nonzero rows, and they are linearly independent, so the rank of the matrix is 2. 416 APPENDIX A. LINEAR ALGEBRA The span of the rows is called the row space. The row space of ๐ด and the row echelon form of ๐ด are the same. In the example, ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ row space of ๏ฃฏ๏ฃฏ4 5 6๏ฃบ๏ฃบ = span 1 2 3 , 4 5 6 , 7 8 9 ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป = span 1 2 3 , 0 1 2 . Similarly to row space, the span of columns is called the column space. ๏ฃฑ ๏ฃฎ1 2 3๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน๏ฃผ ๏ฃด ๏ฃฒ ๏ฃฏ1๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด ๏ฃฏ ๏ฃบ column space of ๏ฃฏ๏ฃฏ4 5 6๏ฃบ๏ฃบ = span ๏ฃฏ๏ฃฏ4๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ6๏ฃบ๏ฃบ . ๏ฃด ๏ฃด ๏ฃฏ7๏ฃบ ๏ฃฏ8๏ฃบ ๏ฃฏ9๏ฃบ ๏ฃด ๏ฃด ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ So it may also be good to find the number of linearly independent columns of ๐ด. One way to do that is to find the number of linearly independent rows of ๐ด๐ . It is a tremendously useful fact that the number of linearly independent columns is always the same as the number of linearly independent rows: Theorem A.3.1. rank ๐ด = rank ๐ด๐ In particular, to find a set of linearly independent columns we need to look at where the pivots were. If you recall above, when solving ๐ด ๐ฅ® = 0® the key was finding the pivots, any non-pivot columns corresponded to free variables. That means we can solve for the non-pivot columns in terms of the pivot columns. Let’s see an example. First we reduce some random matrix: ๏ฃฎ1 2 3 4๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 4 5 6๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ3 6 7 8๏ฃบ ๏ฃฐ ๏ฃป We find a pivot and reduce the rows below: ๏ฃฎ1 2 3 4๏ฃน๏ฃบ ๏ฃฏ 4 5 6๏ฃบ๏ฃบ → ๏ฃฏ๏ฃฏ 0 ๏ฃฏ3 6 7 8๏ฃบ๏ฃป ๏ฃฐ ๏ฃฎ1 ๏ฃฏ ๏ฃฏ2 ๏ฃฏ ๏ฃฏ3 ๏ฃฐ ๏ฃฎ1 2 3 4 ๏ฃน๏ฃบ ๏ฃฏ 0 −1 −2๏ฃบ๏ฃบ → ๏ฃฏ๏ฃฏ 0 ๏ฃฏ0 6 7 8 ๏ฃบ๏ฃป ๏ฃฐ 2 3 4 ๏ฃน๏ฃบ 0 −1 −2๏ฃบ๏ฃบ . 0 −2 −4๏ฃบ๏ฃป We find the next pivot, make it one, and rinse and repeat: ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 2 0 0 3 −1 −2 ๏ฃฎ1 4 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃบ −2๏ฃบ → ๏ฃฏ๏ฃฏ 0 ๏ฃฏ0 −4๏ฃบ๏ฃป ๏ฃฐ ๏ฃฎ1 2 3 4 ๏ฃน๏ฃบ ๏ฃฏ ๏ฃบ 0 1 2 ๏ฃบ → ๏ฃฏ๏ฃฏ 0 ๏ฃฏ0 0 −2 −4๏ฃบ๏ฃป ๏ฃฐ 2 0 0 3 1 0 4๏ฃน๏ฃบ 2๏ฃบ๏ฃบ . 0๏ฃบ๏ฃป The final matrix is the row echelon form of the matrix. Consider the pivots that we marked. The pivot columns are the first and the third column. All other columns correspond to free 417 A.3. ELIMINATION ® so all other columns can be solved in terms of the first and variables when solving ๐ด ๐ฅ® = 0, the third column. In other words ๏ฃฑ ๏ฃฑ ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน๏ฃผ ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน๏ฃผ ๏ฃฎ1 2 3 4๏ฃน ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด ๏ฃฒ ๏ฃฏ1๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด ๏ฃฒ ๏ฃฏ1๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ4๏ฃบ ๏ฃด ๏ฃด ๏ฃฏ ๏ฃบ column space of ๏ฃฏ๏ฃฏ2 4 5 6๏ฃบ๏ฃบ = span ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ4๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ6๏ฃบ๏ฃบ = span ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ . ๏ฃด ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ3๏ฃบ ๏ฃฏ7๏ฃบ ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ3๏ฃบ ๏ฃฏ6๏ฃบ ๏ฃฏ7๏ฃบ ๏ฃฏ8๏ฃบ ๏ฃด ๏ฃฏ3 6 7 8๏ฃบ ๏ฃฐ ๏ฃป ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ We could perhaps use another pair of columns to get the same span, but the first and the third are guaranteed to work because they are pivot columns. The discussion above could be expanded into a proof of the theorem if we wanted. As each nonzero row in the row echelon form contains a pivot, then the rank is the number of pivots, which is the same as the maximal number of linearly independent columns. The idea also works in reverse. Suppose we have a bunch of column vectors and we just need to find a linearly independent set. For example, suppose we started with the vectors ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ ๐ฃ®1 = ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ3๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๐ฃ®2 = ๏ฃฏ๏ฃฏ4๏ฃบ๏ฃบ , ๏ฃฏ6๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ ๐ฃ®3 = ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ , ๏ฃฏ7๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ4๏ฃน ๏ฃฏ ๏ฃบ ๐ฃ®4 = ๏ฃฏ๏ฃฏ6๏ฃบ๏ฃบ . ๏ฃฏ8๏ฃบ ๏ฃฐ ๏ฃป These vectors are not linearly independent as we saw above. In particular, the span of ๐ฃ®1 and ๐ฃ®3 is the same as the span of all four of the vectors. So ๐ฃ®2 and ๐ฃ®4 can both be written as linear combinations of ๐ฃ®1 and ๐ฃ®3 . A common thing that comes up in practice is that one gets a set of vectors whose span is the set of solutions of some problem. But perhaps we get way too many vectors, we want to simplify. For example above, all vectors in the span of ๐ฃ®1 , ๐ฃ®2 , ๐ฃ®3 , ๐ฃ®4 can be written ๐ผ1 ๐ฃ®1 + ๐ผ2 ๐ฃ®2 + ๐ผ3 ๐ฃ®3 + ๐ผ4 ๐ฃ®4 for some numbers ๐ผ1 , ๐ผ2 , ๐ผ3 , ๐ผ 4 . But it is also true that every such vector can be written as ๐® ๐ฃ 1 + ๐® ๐ฃ3 for two numbers ๐ and ๐. And one has to admit, that looks much simpler. Moreover, these numbers ๐ and ๐ are unique. More on that in the next section. To find this linearly independent set we simply take our vectors and form the matrix [® ๐ฃ1 ๐ฃ®2 ๐ฃ®3 ๐ฃ®4 ], that is, the matrix ๏ฃฎ1 2 3 4๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 4 5 6๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ3 6 7 8๏ฃบ ๏ฃฐ ๏ฃป We crank up the row-reduction machine, feed this matrix into it, find the pivot columns, and pick those. In this case, ๐ฃ®1 and ๐ฃ®3 . A.3.5 Computing the inverse If the matrix ๐ด is square and there exists a unique solution ๐ฅ® to ๐ด ๐ฅ® = ๐® for any ๐® (there are no free variables), then ๐ด is invertible. This is equivalent to the ๐ × ๐ matrix ๐ด being of rank ๐. ® Now we just need to compute what ๐ด−1 is. We In particular, if ๐ด ๐ฅ® = ๐® then ๐ฅ® = ๐ด−1 ๐. ® but that would be ridiculous. can surely do elimination every time we want to find ๐ด−1 ๐, 418 APPENDIX A. LINEAR ALGEBRA The mapping ๐ด−1 is linear and hence given by a matrix, and we have seen that to figure out the matrix we just need to find where ๐ด−1 takes the standard basis vectors ๐®1 , ๐®2 , . . . , ๐®๐ . That is, to find the first column of ๐ด−1 , we solve ๐ด ๐ฅ® = ๐®1 , because then ๐ด−1 ๐®1 = ๐ฅ®. To find the second column of ๐ด−1 , we solve ๐ด ๐ฅ® = ๐®2 . And so on. It is really just ๐ eliminations that we need to do. But it gets even easier. If you think about it, the elimination is the same for everything on the left side of the augmented matrix. Doing ๐ eliminations separately we would redo most of the computations. Best is to do all at once. Therefore, to find the inverse of ๐ด, we write an ๐ × 2๐ augmented matrix [ ๐ด | ๐ผ ], where ๐ผ is the identity matrix, whose columns are precisely the standard basis vectors. We then perform row reduction until we arrive at the reduced row echelon form. If ๐ด is invertible, then pivots can be found in every column of ๐ด, and so the reduced row echelon form of [ ๐ด | ๐ผ ] looks like [ ๐ผ | ๐ด−1 ]. We then just read off the inverse ๐ด−1 . If you do not find a pivot in every one of the first ๐ columns of the augmented matrix, then ๐ด is not invertible. This is best seen by example. Suppose we wish to invert the matrix ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 0 1๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ3 1 0๏ฃบ ๏ฃฐ ๏ฃป We write the augmented matrix and we start reducing: ๏ฃฎ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฐ ๏ฃฎ ๏ฃฏ → ๏ฃฏ๏ฃฏ ๏ฃฏ ๏ฃฐ ๏ฃฎ ๏ฃฏ → ๏ฃฏ๏ฃฏ ๏ฃฏ ๏ฃฐ ๏ฃฎ ๏ฃฏ → ๏ฃฏ๏ฃฏ ๏ฃฏ ๏ฃฐ 1 2 3 1 0 0 2 3 1 0 0 ๏ฃน๏ฃบ 0 1 0 1 0 ๏ฃบ๏ฃบ → 1 0 0 0 1 ๏ฃบ๏ฃป 2 3 1 5 1 1 /4 /2 −5 −9 −3 0 0 ๏ฃน๏ฃบ 1/4 0 ๏ฃบ → ๏ฃบ 0 1 ๏ฃบ๏ฃป 1 0 0 2 1 0 3 5/4 1 0 1/4 5/11 1 0 0 0 1 0 0 0 1 1 1/2 2/11 0 0 −4/11 −1/11 3/11 3/11 −9/11 2/11 5/11 ๏ฃน ๏ฃบ ๏ฃบ→ ๏ฃบ ๏ฃบ ๏ฃป 2/11 ๏ฃน ๏ฃบ 5/11 ๏ฃบ . ๏ฃบ −4/11 ๏ฃบ ๏ฃป ๏ฃฎ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฐ ๏ฃฎ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฐ ๏ฃฎ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฏ ๏ฃฐ 1 0 0 1 0 0 1 0 0 2 3 1 0 0 ๏ฃน๏ฃบ −4 −5 −2 1 0 ๏ฃบ๏ฃบ → −5 −9 −3 0 1 ๏ฃบ๏ฃป 2 1 0 3 5/4 −11/4 2 1 0 0 0 1 1 1/2 −1/2 0 0 ๏ฃน๏ฃบ 1/4 0 ๏ฃบ → ๏ฃบ −5/4 1 ๏ฃบ ๏ฃป 5/11 −5/11 12/11 3/11 −9/11 5/11 2/11 5/11 −4/11 ๏ฃน ๏ฃบ ๏ฃบ→ ๏ฃบ ๏ฃบ ๏ฃป So ๏ฃฎ1 2 3๏ฃน −1 ๏ฃฎ−1/11 ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ2 0 1๏ฃบ = ๏ฃฏ 3/11 ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃฏ3 1 0๏ฃบ ๏ฃฏ 2/11 ๏ฃฐ ๏ฃป ๏ฃฐ 3/11 −9/11 5/11 2/11 ๏ฃน ๏ฃบ 5/11 ๏ฃบ . ๏ฃบ −4/11๏ฃบ ๏ฃป Not too terrible, no? Perhaps harder than inverting a 2 × 2 matrix for which we had a simple formula, but not too bad. Really in practice this is done efficiently by a computer. 419 A.3. ELIMINATION A.3.6 Exercises Exercise A.3.1: Compute the reduced row echelon form for the following matrices: 1 3 1 a) 0 1 1 3 3 b) 6 −3 3 6 c) −2 −3 ๏ฃฎ 2 1 3 −3๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ 6 0 0 −1๏ฃบ๏ฃบ ๏ฃฏ−2 4 4 3 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ9 3 0 2๏ฃน ๏ฃฏ ๏ฃบ e) ๏ฃฏ๏ฃฏ8 6 3 6๏ฃบ๏ฃบ ๏ฃฏ7 9 7 9๏ฃบ ๏ฃฐ ๏ฃป 6 6 7 7 d) 1 1 0 1 ๏ฃฎ0 2 0 −1๏ฃน ๏ฃฏ ๏ฃบ h) ๏ฃฏ๏ฃฏ6 6 −3 3 ๏ฃบ๏ฃบ ๏ฃฏ6 2 −3 5 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ6 6 5๏ฃน ๏ฃฏ ๏ฃบ g) ๏ฃฏ๏ฃฏ0 −2 2๏ฃบ๏ฃบ ๏ฃฏ6 5 6๏ฃบ ๏ฃฐ ๏ฃป Exercise A.3.2: Compute the inverse of the given matrices ๏ฃฎ1 0 0๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ0 0 1๏ฃบ๏ฃบ ๏ฃฏ0 1 0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 1 1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ0 2 1๏ฃบ๏ฃบ ๏ฃฏ0 0 1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ2 0 1๏ฃบ๏ฃบ ๏ฃฏ0 2 1๏ฃบ ๏ฃฐ ๏ฃป Exercise A.3.3: Solve (find all solutions), or show no solution exists a) ๐ฅ1 + 5๐ฅ 2 + 3๐ฅ3 = 7 4๐ฅ 1 + 3๐ฅ2 = −2 b) 8๐ฅ1 + 7๐ฅ 2 + 8๐ฅ3 = 8 −๐ฅ 1 + ๐ฅ2 = 4 4๐ฅ1 + 8๐ฅ 2 + 6๐ฅ3 = 4 4๐ฅ 1 + 8๐ฅ2 + 2๐ฅ 3 = 3 ๐ฅ + 2๐ฆ + 3๐ง = 4 c) −๐ฅ 1 − 2๐ฅ2 + 3๐ฅ 3 = 1 d) 2๐ฅ − ๐ฆ + 3๐ง = 1 4๐ฅ 1 + 8๐ฅ2 3๐ฅ + ๐ฆ + 6๐ง = 6 =2 Exercise A.3.4: By computing the inverse, solve the following systems for ๐ฅ®. 4 1 13 a) ๐ฅ® = −1 3 26 3 3 2 b) ๐ฅ® = 3 4 −1 Exercise A.3.5: Compute the rank of the given matrices ๏ฃฎ6 3 5๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ1 4 1๏ฃบ๏ฃบ ๏ฃฏ7 7 6๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ5 −2 −1๏ฃน ๏ฃฏ ๏ฃบ 6 ๏ฃบ๏ฃบ b) ๏ฃฏ๏ฃฏ3 0 ๏ฃฏ2 4 5 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ−1 −2 −3๏ฃบ๏ฃบ ๏ฃฏ2 4 6๏ฃบ ๏ฃฐ ๏ฃป Exercise A.3.6: For the matrices in Exercise A.3.5, find a linearly independent set of row vectors that span the row space (they don’t need to be rows of the matrix). Exercise A.3.7: For the matrices in Exercise A.3.5, find a linearly independent set of columns that span the column space. That is, find the pivot columns of the matrices. Exercise A.3.8: Find a linearly independent subset of the following vectors that has the same span. ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ, ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−2๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ−4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4๏ฃบ, ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−2๏ฃบ ๏ฃฐ ๏ฃป 420 APPENDIX A. LINEAR ALGEBRA Exercise A.3.101: Compute the reduced row echelon form for the following matrices: 1 0 1 a) 0 1 0 1 2 b) 3 4 ๏ฃฎ2 2 5 2 ๏ฃน ๏ฃฏ ๏ฃบ e) ๏ฃฏ๏ฃฏ1 −2 4 −1๏ฃบ๏ฃบ ๏ฃฏ0 3 1 −2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−2 6 4 3๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ 6 0 −3 0๏ฃบ๏ฃบ ๏ฃฏ 4 2 −1 1๏ฃบ ๏ฃฐ ๏ฃป 1 1 c) −2 −2 0 0 0 0 g) 0 0 0 0 ๏ฃฎ 1 −3 1 ๏ฃน ๏ฃฏ ๏ฃบ 6 −2๏ฃบ๏ฃบ d) ๏ฃฏ๏ฃฏ 4 ๏ฃฏ−2 6 −2๏ฃบ ๏ฃฐ ๏ฃป h) 1 2 3 3 1 2 3 5 Exercise A.3.102: Compute the inverse of the given matrices ๏ฃฎ 0 1 0๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ−1 0 0๏ฃบ๏ฃบ ๏ฃฏ 0 0 1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 1 1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ1 1 0๏ฃบ๏ฃบ ๏ฃฏ1 0 0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2 4 0๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ2 2 3๏ฃบ๏ฃบ ๏ฃฏ2 4 1๏ฃบ ๏ฃฐ ๏ฃป Exercise A.3.103: Solve (find all solutions), or show no solution exists a) 5๐ฅ + 6๐ฆ + 5๐ง = 7 4๐ฅ1 + 3๐ฅ 2 = −1 b) 6๐ฅ + 8๐ฆ + 6๐ง = −1 5๐ฅ1 + 6๐ฅ 2 = 4 5๐ฅ + 2๐ฆ + 5๐ง = 2 ๐ + ๐ + ๐ = −1 −2๐ฅ1 + 2๐ฅ2 + 8๐ฅ3 = 6 ๐ + 5๐ + 6๐ = −1 c) ๐ฅ2 + ๐ฅ3 = 2 d) ๐ฅ1 + 4๐ฅ2 + ๐ฅ3 = 7 −2๐ + 5๐ + 6๐ = 8 Exercise A.3.104: By computing the inverse, solve the following systems for ๐ฅ®. −1 1 4 a) ๐ฅ® = 3 3 6 2 7 1 b) ๐ฅ® = 1 6 3 Exercise A.3.105: Compute the rank of the given matrices ๏ฃฎ7 −1 6๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ7 7 7๏ฃบ๏ฃบ ๏ฃฏ7 6 2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 1 1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ1 1 1๏ฃบ๏ฃบ ๏ฃฏ2 2 2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0 3 −1๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ6 3 1 ๏ฃบ๏ฃบ ๏ฃฏ4 7 −1๏ฃบ ๏ฃฐ ๏ฃป Exercise A.3.106: For the matrices in Exercise A.3.105, find a linearly independent set of row vectors that span the row space (they don’t need to be rows of the matrix). Exercise A.3.107: For the matrices in Exercise A.3.105, find a linearly independent set of columns that span the column space. That is, find the pivot columns of the matrices. Exercise A.3.108: Find a linearly independent subset of the following vectors that has the same span. ๏ฃฎ0 ๏ฃน ๏ฃฎ3๏ฃน ๏ฃฎ0๏ฃน ๏ฃฎ−3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 ๏ฃบ , ๏ฃฏ 1 ๏ฃบ , ๏ฃฏ 3 ๏ฃบ , ๏ฃฏ 2 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 ๏ฃบ ๏ฃฏ−5๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป A.4. SUBSPACES, DIMENSION, AND THE KERNEL A.4 421 Subspaces, dimension, and the kernel Note: 1 lecture A.4.1 Subspaces, basis, and dimension We often find ourselves looking at the set of solutions of a linear equation ๐ฟ ๐ฅ® = 0® for some matrix ๐ฟ, that is, we are interested in the kernel of ๐ฟ. The set of all such solutions has a nice structure: It looks and acts a lot like some euclidean space โ ๐ . We say that a set ๐ of vectors in โ ๐ is a subspace if whenever ๐ฅ® and ๐ฆ® are members of ๐ and ๐ผ is a scalar, then ๐ฅ® + ๐ฆ®, and ๐ผ ๐ฅ® are also members of ๐. That is, we can add and multiply by scalars and we still land in ๐. So every linear combination of vectors of ๐ is still in ๐. That is really what a subspace is. It is a subset where we can take linear combinations and still end up being in the subset. Consequently the span of a number of vectors is automatically a subspace. Example A.4.1: If we let ๐ = โ ๐ , then this ๐ is a subspace of โ ๐ . Adding any two vectors in โ ๐ gets a vector in โ ๐ , and so does multiplying by scalars. ® that is, the set of the zero vector by itself, is also a subspace of โ ๐ . The set ๐0 = {0}, There is only one vector in this subspace, so we only need to verify the definition for that ® one vector, and everything checks out: 0® + 0® = 0® and ๐ผ0® = 0. The set ๐00 of all the vectors of the form (๐, ๐) for any real number ๐, such as (1, 1), (3, 3), or (−0.5, −0.5) is a subspace of โ2 . Adding two such vectors, say (1, 1) + (3, 3) = (4, 4) again gets a vector of the same form, and so does multiplying by a scalar, say 8(1, 1) = (8, 8). If ๐ is a subspace and we can find ๐ linearly independent vectors in ๐ ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ , such that every other vector in ๐ is a linear combination of ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ , then the set {® ๐ฃ1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ } is called a basis of ๐. In other words, ๐ is the span of {® ๐ฃ1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ }. We say that ๐ has dimension ๐, and we write dim ๐ = ๐. ® then there exists Theorem A.4.1. If ๐ ⊂ โ ๐ is a subspace and ๐ is not the trivial subspace {0}, a unique positive integer ๐ (the dimension) and a (not unique) basis {® ๐ฃ1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ }, such that ® in ๐ can be uniquely represented by every ๐ค ® = ๐ผ1 ๐ฃ®1 + ๐ผ2 ๐ฃ®2 + · · · + ๐ผ ๐ ๐ฃ® ๐ , ๐ค for some scalars ๐ผ1 , ๐ผ2 , . . . , ๐ผ ๐ . 422 APPENDIX A. LINEAR ALGEBRA Just as a vector in โ ๐ is represented by a ๐-tuple of numbers, so is a vector in a ๐-dimensional subspace of โ ๐ represented by a ๐-tuple of numbers. At least once we have fixed a basis. A different basis would give a different ๐-tuple of numbers for the same vector. We should reiterate that while ๐ is unique (a subspace cannot have two different dimensions), the set of basis vectors is not at all unique. There are lots of different bases for any given subspace. Finding just the right basis for a subspace is a large part of what one does in linear algebra. In fact, that is what we spend a lot of time on in linear differential equations, although at first glance it may not seem like that is what we are doing. Example A.4.2: The standard basis ๐®1 , ๐®2 , . . . , ๐®๐ , is a basis of โ ๐ , (hence the name). So as expected dim โ ๐ = ๐. ® is of dimension 0. On the other hand the subspace {0} The subspace ๐00 from Example A.4.1, that is, the set of vectors (๐, ๐), is of dimension 1. One possible basis is simply {(1, 1)}, the single vector (1, 1): every vector in ๐00 can be represented by ๐(1, 1) = (๐, ๐). Similarly another possible basis would be {(−1, −1)}. Then the vector (๐, ๐) would be represented as (−๐)(1, 1). Row and column spaces of a matrix are also examples of subspaces, as they are given as the span of vectors. We can use what we know about rank, row spaces, and column spaces from the previous section to find a basis. Example A.4.3: In the last section, we considered the matrix ๏ฃฎ1 2 3 4๏ฃน ๏ฃฏ ๏ฃบ ๐ด = ๏ฃฏ๏ฃฏ2 4 5 6๏ฃบ๏ฃบ . ๏ฃฏ3 6 7 8๏ฃบ ๏ฃฐ ๏ฃป Using row reduction to find the pivot columns, we found ๏ฃฑ ๏ฃฎ1 2 3 4๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน๏ฃผ ๏ฃด ๏ฃฒ ๏ฃฏ1๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด ๏ฃบª © ๏ฃฏ๏ฃฏ column space of ๐ด ­ ๏ฃฏ2 4 5 6๏ฃบ๏ฃบ ® = span ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ5๏ฃบ๏ฃบ . ๏ฃด ๏ฃด ๏ฃฏ3๏ฃบ ๏ฃฏ7๏ฃบ ๏ฃด ๏ฃด ๏ฃฏ ๏ฃบ « ๏ฃฐ3 6 7 8๏ฃป ¬ ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ What we did was we found the basis of the column space. The basis has two elements, and so the column space of ๐ด is two-dimensional. Notice that the rank of ๐ด is two. We would have followed the same procedure if we wanted to find the basis of the subspace ๐ spanned by ๏ฃฎ1๏ฃน ๏ฃฎ2๏ฃน ๏ฃฎ3๏ฃน ๏ฃฎ4๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ , ๏ฃฏ4๏ฃบ , ๏ฃฏ5๏ฃบ , ๏ฃฏ6๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ6๏ฃบ ๏ฃฏ7๏ฃบ ๏ฃฏ8๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป 423 A.4. SUBSPACES, DIMENSION, AND THE KERNEL We would have simply formed the matrix ๐ด with these vectors as columns and repeated the computation above. The subspace ๐ is then the column space of ๐ด. Example A.4.4: Consider the matrix ๏ฃฎ1 2 0 0 3 ๏ฃน ๏ฃฏ ๏ฃบ ๐ฟ = ๏ฃฏ๏ฃฏ0 0 1 0 4๏ฃบ๏ฃบ . ๏ฃฏ0 0 0 1 5 ๏ฃบ ๏ฃฐ ๏ฃป Conveniently, the matrix is in reduced row echelon form. The matrix is of rank 3. The column space is the span of the pivot columns. It is the 3-dimensional space ๏ฃฑ ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน ๏ฃฎ ๏ฃน๏ฃผ ๏ฃด ๏ฃฒ ๏ฃฏ1๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด column space of ๐ฟ = span ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ = โ3 . ๏ฃด ๏ฃด ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃด ๏ฃด ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ The row space is the 3-dimensional space row space of ๐ฟ = span 1 2 0 0 3 , 0 0 1 0 4 , 0 0 0 1 5 . As these vectors have 5 components, we think of the row space of ๐ฟ as a subspace of โ5 . The way the dimensions worked out in the examples is not an accident. Since the number of vectors that we needed to take was always the same as the number of pivots, and the number of pivots is the rank, we get the following result. Theorem A.4.2 (Rank). The dimension of the column space and the dimension of the row space of a matrix ๐ด are both equal to the rank of ๐ด. A.4.2 Kernel ® the kernel of ๐ฟ, is a subspace: If ๐ฅ® and ๐ฆ® The set of solutions of a linear equation ๐ฟ ๐ฅ® = 0, are solutions, then ® ๐ฟ(๐ฅ® + ๐ฆ®) = ๐ฟ ๐ฅ® + ๐ฟ ๐ฆ® = 0® + 0® = 0, and ® ๐ฟ(๐ผ ๐ฅ®) = ๐ผ๐ฟ ๐ฅ® = ๐ผ 0® = 0. So ๐ฅ® + ๐ฆ® and ๐ผ ๐ฅ® are solutions. The dimension of the kernel is called the nullity of the matrix. The same sort of idea governs the solutions of linear differential equations. We try to describe the kernel of a linear differential operator, and as it is a subspace, we look for a basis of this kernel. Much of this book is dedicated to finding such bases. The kernel of a matrix is the same as the kernel of its reduced row echelon form. For a matrix in reduced row echelon form, the kernel is rather easy to find. If a vector ๐ฅ® is applied to a matrix ๐ฟ, then each entry in ๐ฅ® corresponds to a column of ๐ฟ, the column that the entry multiplies. To find the kernel, pick a non-pivot column make a vector that has a −1 in the entry corresponding to this non-pivot column and zeros at all the other entries 424 APPENDIX A. LINEAR ALGEBRA corresponding to the other non-pivot columns. Then for all the entries corresponding to pivot columns make it precisely the value in the corresponding row of the non-pivot ® This procedure is best understood by column to make the vector be a solution to ๐ฟ ๐ฅ® = 0. example. Example A.4.5: Consider ๏ฃฎ1 ๏ฃฏ ๐ฟ = ๏ฃฏ๏ฃฏ 0 ๏ฃฏ0 ๏ฃฐ 2 0 0 0 1 0 0 0 1 3๏ฃน๏ฃบ 4๏ฃบ๏ฃบ . 5๏ฃบ๏ฃป This matrix is in reduced row echelon form, the pivots are marked. There are two non-pivot columns, so the kernel has dimension 2, that is, it is the span of 2 vectors. Let us find the first vector. We look at the first non-pivot column, the 2nd column, and we put a −1 in the 2nd entry of our vector. We put a 0 in the 5th entry as the 5th column is also a non-pivot column: ๏ฃฎ?๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ? ๏ฃบ. ๏ฃฏ ๏ฃบ ๏ฃฏ?๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป Let us fill the rest. When this vector hits the first row, we get a −2 and 1 times whatever the first question mark is. So make the first question mark 2. For the second and third rows, it is sufficient to make it the question marks zero. We are really filling in the non-pivot column into the remaining entries. Let us check while marking which numbers went where: ๏ฃฎ1 ๏ฃฏ ๏ฃฏ0 ๏ฃฏ ๏ฃฏ0 ๏ฃฐ 2 0 0 0 0 3๏ฃน๏ฃบ 1 0 4๏ฃบ๏ฃบ 0 1 5๏ฃบ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ 0 ๏ฃบ = ๏ฃฏ0๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ 0 ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป Yay! How about the second vector. We start with ๏ฃฎ ? ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ 0 ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ? ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ? ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−1.๏ฃบ ๏ฃฐ ๏ฃป We set the first question mark to 3, the second to 4, and the third to 5. Let us check, marking things as previously, ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฎ1 2 0 0 3 ๏ฃน ๏ฃฏ 0 ๏ฃบ ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 1 0 4 ๏ฃบ ๏ฃฏ 4 ๏ฃบ = ๏ฃฏ0๏ฃบ . ๏ฃฏ ๏ฃบ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 0 1 5 ๏ฃบ ๏ฃฏ 5 ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป๏ฃฏ ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป A.4. SUBSPACES, DIMENSION, AND THE KERNEL 425 There are two non-pivot columns, so we only need two vectors. We have found the basis of the kernel. So, ๏ฃฑ ๏ฃฎ 2 ๏ฃน ๏ฃฎ 3 ๏ฃน๏ฃผ ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ๏ฃด ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ−1๏ฃบ ๏ฃฏ 0 ๏ฃบ ๏ฃด ๏ฃด ๏ฃฝ ๏ฃด ๏ฃฒ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ๏ฃด ๏ฃด kernel of ๐ฟ = span ๏ฃฏ๏ฃฏ 0 ๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ 4 ๏ฃบ๏ฃบ ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ๏ฃด ๏ฃด ๏ฃด ๏ฃด๏ฃฏ 0 ๏ฃบ ๏ฃฏ 5 ๏ฃบ๏ฃด ๏ฃด ๏ฃด ๏ฃฏ 0 ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃด ๏ฃด ๏ฃณ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป๏ฃพ What we did in finding a basis of the kernel is we expressed all solutions of ๐ฟ ๐ฅ® = 0® as a linear combination of some given vectors. The procedure to find the basis of the kernel of a matrix ๐ฟ: (i) Find the reduced row echelon form of ๐ฟ. (ii) Write down the basis of the kernel as above, one vector for each non-pivot column. The rank of a matrix is the dimension of the column space, and that is the span on the pivot columns, while the kernel is the span of vectors one for each non-pivot column. So the two numbers must add to the number of columns. Theorem A.4.3 (Rank–Nullity). If a matrix ๐ด has ๐ columns, rank ๐, and nullity ๐ (dimension of the kernel), then ๐ = ๐ + ๐. The theorem is immensely useful in applications. It allows one to compute the rank ๐ if one knows the nullity ๐ and vice versa, without doing any extra work. Let us consider an example application, a simple version of the so-called Fredholm alternative. A similar result is true for differential equations. Consider ® ๐ด ๐ฅ® = ๐, where ๐ด is a square ๐ × ๐ matrix. There are then two mutually exclusive possibilities: (i) A nonzero solution ๐ฅ® to ๐ด ๐ฅ® = 0® exists. ® (ii) The equation ๐ด ๐ฅ® = ๐® has a unique solution ๐ฅ® for every ๐. How does the Rank–Nullity theorem come into the picture? Well, if ๐ด has a nonzero ® then the nullity ๐ is positive. But then the rank ๐ = ๐ − ๐ must be solution ๐ฅ® to ๐ด ๐ฅ® = 0, less than ๐. It means that the column space of ๐ด is of dimension less than ๐, so it is a subspace that does not include everything in โ ๐ . So โ ๐ has to contain some vector ๐® not in the column space of ๐ด. In fact, most vectors in โ ๐ are not in the column space of ๐ด. 426 APPENDIX A. LINEAR ALGEBRA A.4.3 Exercises Exercise A.4.1: For the following sets of vectors, find a basis for the subspace spanned by the vectors, and find the dimension of the subspace. ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ3๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 ๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ2 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ5๏ฃบ ๏ฃฐ ๏ฃป e) 1 , 3 ๏ฃฎ0 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1 ๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ0 ๏ฃบ ๏ฃฐ ๏ฃป 0 , 2 ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป −1 −1 ๏ฃฎ−4๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ−3๏ฃบ๏ฃบ , ๏ฃฏ5๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ3๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ3 ๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ3 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4๏ฃบ, ๏ฃฏ ๏ฃบ ๏ฃฏ−4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−5๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−5๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−2๏ฃบ ๏ฃฐ ๏ฃป Exercise A.4.2: For the following matrices, find a basis for the kernel (nullspace). ๏ฃฎ 2 −1 −3๏ฃน ๏ฃฏ ๏ฃบ 0 −4๏ฃบ๏ฃบ b) ๏ฃฏ๏ฃฏ 4 ๏ฃฏ−1 1 2 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1 1 1 ๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ1 1 5 ๏ฃบ๏ฃบ ๏ฃฏ1 1 −4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−4 4 4๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ−1 1 1๏ฃบ๏ฃบ ๏ฃฏ−5 5 5๏ฃบ ๏ฃฐ ๏ฃป Exercise A.4.3: Suppose a 5 × 5 matrix ๐ด has rank 3. What is the nullity? ๏ฃฎ−2 1 1 1๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ−4 2 2 2๏ฃบ๏ฃบ ๏ฃฏ 1 0 4 3๏ฃบ ๏ฃฐ ๏ฃป Exercise A.4.4: Suppose that ๐ is the set of all the vectors of โ3 whose third component is zero. Is ๐ a subspace? And if so, find a basis and the dimension. Exercise A.4.5: Consider a square matrix ๐ด, and suppose that ๐ฅ® is a nonzero vector such that ® What does the Fredholm alternative say about invertibility of ๐ด. ๐ด ๐ฅ® = 0. Exercise A.4.6: Consider ๏ฃฎ 1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๐ = ๏ฃฏ๏ฃฏ 2 ? ?๏ฃบ๏ฃบ . ๏ฃฏ−1 ? ?๏ฃบ ๏ฃฐ ๏ฃป If the nullity of this matrix is 2, fill in the question marks. Hint: What is the rank? Exercise A.4.101: For the following sets of vectors, find a basis for the subspace spanned by the vectors, and find the dimension of the subspace. 1 a) , 2 ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 ๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ3 ๏ฃบ ๏ฃฐ ๏ฃป 1 1 ๏ฃฎ4๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−3๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป e) 1 , 0 ๏ฃฎ2 ๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ2 ๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ2 ๏ฃบ ๏ฃฐ ๏ฃป 2 , 0 ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป 3 0 ๏ฃฎ5๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ3๏ฃบ๏ฃบ , ๏ฃฏ1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ5๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ5๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ , ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป Exercise A.4.102: For the following matrices, find a basis for the kernel (nullspace). ๏ฃฎ2 6 1 9๏ฃน ๏ฃฏ ๏ฃบ a) ๏ฃฏ๏ฃฏ1 3 2 9๏ฃบ๏ฃบ ๏ฃฏ3 9 0 9๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ 2 −2 −5๏ฃน ๏ฃฏ ๏ฃบ 5 ๏ฃบ๏ฃบ b) ๏ฃฏ๏ฃฏ−1 1 ๏ฃฏ−5 5 −3๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ 1 −5 −4๏ฃน ๏ฃฏ ๏ฃบ 3 5 ๏ฃบ๏ฃบ c) ๏ฃฏ๏ฃฏ 2 ๏ฃฏ−3 5 2 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0 4 4๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ0 1 1๏ฃบ๏ฃบ ๏ฃฏ0 5 5๏ฃบ ๏ฃฐ ๏ฃป A.4. SUBSPACES, DIMENSION, AND THE KERNEL Exercise A.4.103: Suppose the column space of a 9 × 5 matrix ๐ด of dimension 3. Find a) Rank of ๐ด. b) Nullity of ๐ด. c) Dimension of the row space of ๐ด. d) Dimension of the nullspace of ๐ด. e) Size of the maximum subset of linearly independent rows of ๐ด. 427 428 A.5 APPENDIX A. LINEAR ALGEBRA Inner product and projections Note: 1–2 lectures A.5.1 Inner product and orthogonality To do basic geometry, we need length, and we need angles. We have already seen the euclidean length, so let us figure out how to compute angles. Mostly, we are worried about the right angle∗ . Given two (column) vectors in โ ๐ , we define the (standard) inner product as the dot product: ๐ h๐ฅ®, ๐ฆ®i = ๐ฅ® · ๐ฆ® = ๐ฆ® ๐ฅ® = ๐ฅ 1 ๐ฆ1 + ๐ฅ2 ๐ฆ2 + · · · + ๐ฅ ๐ ๐ฆ๐ = ๐ Õ ๐ฅ ๐ ๐ฆ๐ . ๐=1 Why do we seemingly give a new notation for the dot product? Because there are other possible inner products, which are not the dot product, although we will not worry about others here. An inner product can even be defined on spaces of functions as we do in chapter 4: h ๐ (๐ก), ๐(๐ก)i = ∫ ๐ ๐ (๐ก)๐(๐ก) ๐๐ก. ๐ But we digress. The inner product satisfies the following rules: (i) h ๐ฅ®, ๐ฅ®i ≥ 0, and h ๐ฅ®, ๐ฅ®i = 0 if and only if ๐ฅ® = 0, (ii) h ๐ฅ®, ๐ฆ®i = h ๐ฆ®, ๐ฅ®i, (iii) h๐ ๐ฅ®, ๐ฆ®i = h ๐ฅ®, ๐ ๐ฆ®i = ๐h ๐ฅ®, ๐ฆ®i, (iv) h ๐ฅ® + ๐ฆ®, ๐ง®i = h๐ฅ®, ๐ง®i + h ๐ฆ®, ๐ง®i and h ๐ฅ®, ๐ฆ® + ๐ง®i = h ๐ฅ®, ๐ฆ®i + h ๐ฅ®, ๐ง®i. Anything that satisfies the properties above can be called an inner product, although in this section we are concerned with the standard inner product in โ ๐ . The standard inner product gives the euclidean length: k ๐ฅ® k = p h ๐ฅ®, ๐ฅ®i = q ๐ฅ12 + ๐ฅ22 + · · · + ๐ฅ ๐2 . How does it give angles? You may recall from multivariable calculus, that in two or three dimensions, the standard inner product (the dot product) gives you the angle between the vectors: h๐ฅ®, ๐ฆ®i = k ๐ฅ® kk ๐ฆ® k cos ๐. ∗ When Euclid defined angles in his Elements, the only angle he ever really defined was the right angle. 429 A.5. INNER PRODUCT AND PROJECTIONS That is, ๐ is the angle that ๐ฅ® and ๐ฆ® make when they are based at the same point. In โ ๐ (any dimension), we are simply going to say that ๐ from the formula is what the angle is. This makes sense as any two vectors based at the origin lie in a 2-dimensional plane (subspace), and the formula works in 2 dimensions. In fact, one could even talk about angles between functions this way, and we do in chapter 4, where we talk about orthogonal functions (functions at right angle to each other). To compute the angle we compute cos ๐ = h ๐ฅ®, ๐ฆ®i . k ๐ฅ® kk ๐ฆ® k Our angles are always in radians. We are computing the cosine of the angle, which is really the best we can do. Given two vectors at an angle ๐, we can give the angle as −๐, 2๐ − ๐, etc., see Figure A.5. Fortunately, cos ๐ = cos(−๐) = cos(2๐ − ๐). If we solve for ๐ using the inverse cosine cos−1 , we can just decree that 0 ≤ ๐ ≤ ๐. ๐ฅ® 2๐ − ๐ ๐ −๐ ๐ฆ® Figure A.5: Angle between vectors. Example A.5.1: Let us compute the angle between the vectors (3, 0) and (1, 1) in the plane. Compute cos ๐ = (3, 0), (1, 1) k(3, 0)kk(1, 1)k = 3+0 1 √ =√ . 3 2 2 Therefore ๐ = ๐/4. As we said, the most important angle is the right angle. A right angle is ๐/2 radians, and cos(๐/2) = 0, so the formula is particularly easy in this case. We say vectors ๐ฅ® and ๐ฆ® are orthogonal if they are at right angles, that is if h๐ฅ®, ๐ฆ®i = 0. The vectors (1, 0, 0, 1) and (1, 2, 3, −1) are orthogonal. So are (1, 1) and (1, −1). However, (1, 1) and (1, 2) are not orthogonal as their inner product is 3 and not 0. 430 A.5.2 APPENDIX A. LINEAR ALGEBRA Orthogonal projection A typical application of linear algebra is to take a difficult problem, write everything in the right basis, and in this new basis the problem becomes simple. A particularly useful basis is an orthogonal basis, that is a basis where all the basis vectors are orthogonal. When we draw a coordinate system in two or three dimensions, we almost always draw our axes as orthogonal to each other. Generalizing this concept to functions, it is particularly useful in chapter 4 to express a function using a particular orthogonal basis, the Fourier series. To express one vector in terms of an orthogonal basis, we need to first project one vector ® onto ๐ฃ® as onto another. Given a nonzero vector ๐ฃ® , we define the orthogonal projection of ๐ค ® ๐ฃ® i h๐ค, ® = proj๐ฃ® (๐ค) ๐ฃ® . h® ๐ฃ , ๐ฃ® i ® on the line For the geometric idea, see Figure A.6. That is, we find the “shadow of ๐ค” spanned by ๐ฃ® if the direction of the sun’s rays were exactly perpendicular to the line. ® is the closest point Another way of thinking about it is that the tip of the arrow of proj๐ฃ® (๐ค) ® In terms of euclidean distance, on the line spanned by ๐ฃ® to the tip of the arrow of ๐ค. ® minimizes the distance k ๐ค ® − ๐ข® k among all vectors ๐ข® that are multiples of ๐ข® = proj๐ฃ® (๐ค) ๐ฃ® . Because of this, this projection comes up often in applied mathematics in all sorts of ® as a multiple of contexts we cannot solve a problem exactly: We can’t always solve “Find ๐ค ® is the best “solution.” ๐ฃ® ,” but proj๐ฃ® (๐ค) ® ๐ค ๐ ® proj๐ฃ® (๐ค) ๐ฃ® Figure A.6: Orthogonal projection. ® should be cos ๐ The formula follows from basic trigonometry. The length of proj๐ฃ® (๐ค) ® that is (cos ๐)k ๐คk. ® We take the unit vector in the direction of ๐ฃ® , that times the length of ๐ค, ๐ฃ® is, k®๐ฃ k and we multiply it by the length of the projection. In other words, ® = (cos ๐)k ๐ค ®k proj๐ฃ® (๐ค) ® ๐ฃk ® ๐ฃ® i ๐ฃ® (cos ๐)k ๐คkk® h๐ค, = ๐ฃ® = ๐ฃ® . 2 k® ๐ฃk h® ๐ฃ , ๐ฃ® i k® ๐ฃk Example A.5.2: Suppose we wish to project the vector (3, 2, 1) onto the vector (1, 2, 3). 431 A.5. INNER PRODUCT AND PROJECTIONS Compute proj(1,2,3) (3, 2, 1) = 3·1+2·2+1·3 h(3, 2, 1), (1, 2, 3)i (1, 2, 3) = (1, 2, 3) 1·1+2·2+3·3 h(1, 2, 3), (1, 2, 3)i 5 10 15 10 , , . = (1, 2, 3) = 14 7 7 7 ® − proj๐ฃ® (๐ค) ® ought to be Let us double check that the projection is orthogonal. That is ๐ค orthogonal to ๐ฃ® , see the right angle in Figure A.6 on the facing page. That is, (3, 2, 1) − proj(1,2,3) 10 15 16 4 −8 5 = , , (3, 2, 1) = 3 − , 2 − , 1 − 7 7 7 7 7 7 ought to be orthogonal to (1, 2, 3). We compute the inner product and we had better get zero: 16 4 −8 16 4 8 , , , (1, 2, 3) = · 1 + · 2 − · 3 = 0. 7 7 7 7 7 7 A.5.3 Orthogonal basis As we said, a basis ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ is an orthogonal basis if all vectors in the basis are orthogonal to each other, that is, if h® ๐ฃ ๐ , ๐ฃ® ๐ i = 0 for all choices of ๐ and ๐ where ๐ ≠ ๐ (a nonzero vector cannot be orthogonal to itself). A basis is furthermore called an orthonormal basis if all the vectors in a basis are also unit vectors, that is, if all the vectors have magnitude 1. For example, the standard basis {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is an orthonormal basis of โ3 : Any pair is orthogonal, and each vector is of unit magnitude. The reason why we are interested in orthogonal (or orthonormal) bases is that they make it really simple to represent a vector (or a projection onto a subspace) in the basis. The simple formula for the orthogonal projection onto a vector gives us the coefficients. In chapter 4, we use the same idea by finding the correct orthogonal basis for the set of solutions of a differential equation. We are then able to find any particular solution by simply applying the orthogonal projection formula, which is just a couple of a inner products. Let us come back to linear algebra. Suppose that we have a subspace and an orthogonal basis ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . We wish to express ๐ฅ® in terms of the basis. If ๐ฅ® is not in the span of the basis (when it is not in the given subspace), then of course it is not possible, but the following formula gives us at least the orthogonal projection onto the subspace, or in other words, the best approximation in the subspace. First suppose that ๐ฅ® is in the span. Then it is the sum of the orthogonal projections: ๐ฅ® = proj๐ฃ®1 (๐ฅ®) + proj๐ฃ®2 (๐ฅ®) + · · · + proj๐ฃ®๐ (๐ฅ®) = h ๐ฅ®, ๐ฃ®1 i h๐ฅ®, ๐ฃ®2 i h ๐ฅ®, ๐ฃ® ๐ i ๐ฃ®1 + ๐ฃ®2 + · · · + ๐ฃ® ๐ . h® ๐ฃ1 , ๐ฃ®1 i h® ๐ฃ2 , ๐ฃ®2 i h® ๐ฃ ๐ , ๐ฃ® ๐ i 432 APPENDIX A. LINEAR ALGEBRA In other words, if we want to write ๐ฅ® = ๐1 ๐ฃ®1 + ๐ 2 ๐ฃ®2 + · · · + ๐ ๐ ๐ฃ® ๐ , then ๐1 = h๐ฅ®, ๐ฃ®1 i , h® ๐ฃ1 , ๐ฃ®1 i ๐2 = h๐ฅ®, ๐ฃ®2 i , h® ๐ฃ2 , ๐ฃ®2 i ..., ๐๐ = h๐ฅ®, ๐ฃ® ๐ i . h® ๐ฃ ๐ , ๐ฃ® ๐ i Another way to derive this formula is to work in reverse. Suppose that ๐ฅ® = ๐ 1 ๐ฃ®1 + ๐ 2 ๐ฃ®2 + · · · + ๐ ๐ ๐ฃ® ๐ . Take an inner product with ๐ฃ® ๐ , and use the properties of the inner product: h๐ฅ®, ๐ฃ® ๐ i = h๐ 1 ๐ฃ®1 + ๐ 2 ๐ฃ®2 + · · · + ๐ ๐ ๐ฃ® ๐ , ๐ฃ® ๐ i = ๐1 h® ๐ฃ1 , ๐ฃ® ๐ i + ๐2 h® ๐ฃ2 , ๐ฃ® ๐ i + · · · + ๐ ๐ h® ๐ฃ ๐ , ๐ฃ® ๐ i. As the basis is orthogonal, then h® ๐ฃ ๐ , ๐ฃ® ๐ i = 0 whenever ๐ ≠ ๐. That means that only one of the terms, the ๐ th one, on the right-hand side is nonzero and we get h๐ฅ®, ๐ฃ® ๐ i = ๐ ๐ h® ๐ฃ ๐ , ๐ฃ® ๐ i. Solving for ๐ ๐ we find ๐ ๐ = h๐ฅ®,® ๐ฃ๐i h® ๐ฃ ๐ ,® ๐ฃ๐i as before. Example A.5.3: The vectors (1, 1) and (1, −1) form an orthogonal basis of โ2 . Suppose we wish to represent (3, 4) in terms of this basis, that is, we wish to find ๐ 1 and ๐ 2 such that (3, 4) = ๐ 1 (1, 1) + ๐2 (1, −1). We compute: ๐1 = h(3, 4), (1, 1)i 7 = , h(1, 1), (1, 1)i 2 ๐2 = h(3, 4), (1, −1)i −1 . = 2 h(1, −1), (1, −1)i So 7 −1 (3, 4) = (1, 1) + (1, −1). 2 2 If the basis is orthonormal rather than orthogonal, then all the denominators are one. It is easy to make a basis orthonormal—divide all the vectors by their size. If you want to decompose many vectors, it may be better to find an orthonormal basis. In the example above, the orthonormal basis we would thus create is 1 1 √ ,√ , 2 2 1 −1 √ ,√ . 2 2 Then the computation would have been 1 1 (3, 4) = (3, 4), √ , √ 2 2 7 1 1 −1 = √ √ ,√ +√ 2 2 2 2 1 1 1 −1 √ , √ + (3, 4), √ , √ 2 2 2 2 1 −1 √ ,√ . 2 2 1 −1 √ ,√ 2 2 433 A.5. INNER PRODUCT AND PROJECTIONS Maybe the example is not so awe inspiring, but given vectors in โ20 rather than โ2 , then surely one would much rather do 20 inner products (or 40 if we did not have an orthonormal basis) rather than solving a system of twenty equations in twenty unknowns using row reduction of a 20 × 21 matrix. As we said above, the formula still works even if ๐ฅ® is not in the subspace, although then it does not get us the vector ๐ฅ® but its projection. More concretely, suppose that ๐ is a subspace that is the span of ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ and ๐ฅ® is any vector. Let proj๐ (๐ฅ®) be the vector in ๐ that is the closest to ๐ฅ®. Then proj๐ (๐ฅ®) = h๐ฅ®, ๐ฃ®1 i h๐ฅ®, ๐ฃ®2 i h๐ฅ®, ๐ฃ® ๐ i ๐ฃ®1 + ๐ฃ®2 + · · · + ๐ฃ® ๐ . h® ๐ฃ 1 , ๐ฃ®1 i h® ๐ฃ 2 , ๐ฃ®2 i h® ๐ฃ ๐ , ๐ฃ® ๐ i Of course, if ๐ฅ® is in ๐, then proj๐ (๐ฅ®) = ๐ฅ®, as the closest vector in ๐ to ๐ฅ® is ๐ฅ® itself. But true utility is obtained when ๐ฅ® is not in ๐. In much of applied mathematics, we cannot find an exact solution to a problem, but we try to find the best solution out of a small subset (subspace). The partial sums of Fourier series from chapter 4 are one example. Another example is least square approximation to fit a curve to data. Yet another example is given by the most commonly used numerical methods to solve partial differential equations, the finite element methods. Example A.5.4: The vectors (1, 2, 3) and (3, 0, −1) are orthogonal, and so they are an orthogonal basis of a subspace ๐: ๐ = span (1, 2, 3), (3, 0, −1) . Let us find the vector in ๐ that is closest to (2, 1, 0). That is, let us find proj๐ (2, 1, 0) . h(2, 1, 0), (3, 0, −1)i h(2, 1, 0), (1, 2, 3)i (1, 2, 3) + (3, 0, −1) h(1, 2, 3), (1, 2, 3)i h(3, 0, −1), (3, 0, −1)i 2 3 = (1, 2, 3) + (3, 0, −1) 7 5 73 4 9 = , , . 35 7 35 proj๐ (2, 1, 0) = A.5.4 The Gram–Schmidt process Before leaving orthogonal bases, let us note a procedure for manufacturing them out of any old basis. It may not be difficult to come up with an orthogonal basis for a 2-dimensional subspace, but for a 20-dimensional subspace, it seems a daunting task. Fortunately, the orthogonal projection can be used to “project away” the bits of the vectors that are making them not orthogonal. It is called the Gram–Schmidt process. We start with a basis of vectors ๐ฃ®1 , ๐ฃ®2 , . . . , ๐ฃ® ๐ . We construct an orthogonal basis ®1, ๐ค ®2, . . . , ๐ค ® ๐ as follows. ๐ค ® 1 = ๐ฃ®1 , ๐ค 434 APPENDIX A. LINEAR ALGEBRA ® 2 = ๐ฃ®2 − proj๐ค® 1 (® ๐ค ๐ฃ 2 ), ® 3 = ๐ฃ®3 − proj๐ค® 1 (® ๐ค ๐ฃ 3 ) − proj๐ค® 2 (® ๐ฃ3 ), ® 4 = ๐ฃ®4 − proj๐ค® 1 (® ๐ค ๐ฃ 4 ) − proj๐ค® 2 (® ๐ฃ4 ) − proj๐ค® 3 (® ๐ฃ4 ), .. . ® ๐ = ๐ฃ® ๐ − proj๐ค® 1 (® ๐ค ๐ฃ ๐ ) − proj๐ค® 2 (® ๐ฃ ๐ ) − · · · − proj๐ค® ๐−1 (® ๐ฃ ๐ ). What we do is at the ๐ th step, we take ๐ฃ® ๐ and we subtract the projection of ๐ฃ® ๐ to the subspace ®1, ๐ค ®2, . . . , ๐ค ® ๐−1 . spanned by ๐ค Example A.5.5: Consider the vectors (1, 2, −1), and (0, 5, −2) and call ๐ the span of the two vectors. Let us find an orthogonal basis of ๐: ® 1 = (1, 2, −1), ๐ค ® 2 = (0, 5, −2) − proj(1,2,−1) (0, 2, −2) ๐ค = (0, 1, −1) − h(0, 5, −2), (1, 2, −1)i (1, 2, −1) = (0, 5, −2) − 2(1, 2, −1) = (−2, 1, 0). h(1, 2, −1), (1, 2, −1)i So (1, 2, −1) and (−2, 1, 0) span ๐ and are orthogonal. Let us check: h(1, 2, −1), (−2, 1, 0)i = 0. Suppose we wish to find an orthonormal basis, not just an orthogonal one. Well, we simply make the vectors into unit vectors by dividing them by their magnitude. The two vectors making up the orthonormal basis of ๐ are: 1 1 2 −1 √ (1, 2, −1) = √ , √ , √ , 6 6 6 6 A.5.5 1 −2 1 √ (−2, 1, 0) = √ , √ , 0 . 5 5 5 Exercises Exercise A.5.1: Find the ๐ that makes the following vectors orthogonal: (1, 2, 3), (1, 1, ๐ ). Exercise A.5.2: Find the angle ๐ between (1, 3, 1), (2, 1, −1). ® = 3 and h® Exercise A.5.3: Given that h® ๐ฃ , ๐คi ๐ฃ , ๐ข® i = −1 compute a) h® ๐ข , 2® ๐ฃi ® + 3® b) h® ๐ฃ , 2๐ค ๐ขi ® + 3® c) h๐ค ๐ข , ๐ฃ® i Exercise A.5.4: Suppose ๐ฃ® = (1, 1, −1). Find a) proj๐ฃ® (1, 0, 0) b) proj๐ฃ® (1, 2, 3) c) proj๐ฃ® (1, −1, 0) Exercise A.5.5: Consider the vectors (1, 2, 3), (−3, 0, 1), (1, −5, 3). a) Check that the vectors are linearly independent and so form a basis. b) Check that the vectors are mutually orthogonal, and are therefore an orthogonal basis. c) Represent (1, 1, 1) as a linear combination of this basis. d) Make the basis orthonormal. 435 A.5. INNER PRODUCT AND PROJECTIONS Exercise A.5.6: Let ๐ be the subspace spanned by (1, 3, −1), (1, 1, 1). Find an orthogonal basis of ๐ by the Gram-Schmidt process. Exercise A.5.7: Starting with (1, 2, 3), (1, 1, 1), (2, 2, 0), follow the Gram-Schmidt process to find an orthogonal basis of โ3 . Exercise A.5.8: Find an orthogonal basis of โ3 such that (3, 1, −2) is one of the vectors. Hint: First find two extra vectors to make a linearly independent set. Exercise A.5.9: Using cosines and sines of ๐, find a unit vector ๐ข® in โ2 that makes angle ๐ with ®๐ค = (1, 0). What is h®๐ค , ๐ข® i? Exercise A.5.101: Find the ๐ that makes the following vectors orthogonal: (1, 1, 1), (1, ๐ , 1). Exercise A.5.102: Find the angle ๐ between (1, 2, 3), (1, 1, 1). ® = 1 and h® Exercise A.5.103: Given that h® ๐ฃ , ๐คi ๐ฃ , ๐ข® i = −1 and k® ๐ฃ k = 3 and a) h3® ๐ข , 5® ๐ฃi ® + 3® b) h® ๐ฃ , 2๐ค ๐ขi ® + 3® c) h๐ค ๐ฃ , ๐ฃ® i Exercise A.5.104: Suppose ๐ฃ® = (1, 0, −1). Find a) proj๐ฃ® (0, 2, 1) b) proj๐ฃ® (1, 0, 1) c) proj๐ฃ® (4, −1, 0) Exercise A.5.105: The vectors (1, 1, −1), (2, −1, 1), (1, −5, 3) form an orthogonal basis. Represent the following vectors in terms of this basis: a) (1, −8, 4) b) (5, −7, 5) c) (0, −6, 2) Exercise A.5.106: Let ๐ be the subspace spanned by (2, −1, 1), (2, 2, 2). Find an orthogonal basis of ๐ by the Gram-Schmidt process. Exercise A.5.107: Starting with (1, 1, −1), (2, 3, −1), (1, −1, 1), follow the Gram-Schmidt process to find an orthogonal basis of โ3 . 436 A.6 APPENDIX A. LINEAR ALGEBRA Determinant Note: 1 lecture For square matrices we define a useful quantity called the determinant. Define the determinant of a 1 × 1 matrix as the value of its only entry det For a 2 × 2 matrix, define det ๐ ๐ ๐ ๐ ๐ def = ๐. def = ๐๐ − ๐๐. Before defining the determinant for larger matrices, we note the meaning of the determinant. An ๐ × ๐ matrix gives a mapping of the ๐-dimensional euclidean space โ ๐ to itself. So a 2 × 2 matrix ๐ด is a mapping of the plane to itself. The determinant of ๐ด is the factor by which the area of objects changes. If we take the unit square (square of side 1) in the plane, then ๐ด takes the square to a parallelogram of area |det(๐ด)|. The sign of det(๐ด) denotes a change of orientation (negative if the axes get flipped). For example, let 1 1 ๐ด= . −1 1 Then det(๐ด) = 1 + 1 = 2. Let us see where ๐ด sends the unit square—the square with vertices (0, 0), (1, 0), (0, 1), and (1, 1). The point (0, 0) gets sent to (0, 0). 1 1 −1 1 1 1 = , 0 −1 1 1 −1 1 0 1 = , 1 1 1 1 −1 1 1 2 = . 1 0 The image of the square is another√square with vertices (0, 0), (1, −1), (1, 1), and (2, 0). The image square has a side of length 2, and it is therefore of area 2. See Figure A.7. 1 1 0 0 0 0 1 2 1 −1 Figure A.7: Image of the unit quare via the mapping ๐ด. In general, the image of a square is going to be a parallelogram. In high school geometry, you may have seen a formula for computing the area of a parallelogram with vertices (0, 0), 437 A.6. DETERMINANT (๐, ๐), (๐, ๐) and (๐ + ๐, ๐ + ๐). The area is det ๐ ๐ ๐ ๐ = |๐๐ − ๐๐|. The vertical lines above mean absolute value. The matrix the given parallelogram. ๐ ๐ ๐ ๐ carries the unit square to There are a number of ways to define the determinant for an ๐ × ๐ matrix. Let us use the so-called cofactor expansion. We define ๐ด ๐๐ as the matrix ๐ด with the ๐ th row and the ๐ th column deleted. For example, if If ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๐ด = ๏ฃฏ๏ฃฏ4 5 6๏ฃบ๏ฃบ , ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป ๐ด12 then 4 6 = 7 9 and ๐ด23 1 2 = . 7 8 We now define the determinant recursively def det(๐ด) = ๐ Õ (−1)1+๐ ๐ 1๐ det(๐ด1๐ ), ๐=1 or in other words ( det(๐ด) = ๐ 11 det(๐ด11 ) − ๐ 12 det(๐ด12 ) + ๐ 13 det(๐ด13 ) − · · · +๐ 1๐ det(๐ด1๐ ) if ๐ is odd, −๐ 1๐ det(๐ด1๐ ) if ๐ even. For a 3 × 3 matrix, we get det(๐ด) = ๐ 11 det(๐ด11 ) − ๐ 12 det(๐ด12 ) + ๐ 13 det(๐ด13 ). For example, ๏ฃฎ1 2 3๏ฃน ๏ฃบª 5 6 4 6 4 5 © ๏ฃฏ๏ฃฏ ๏ฃบ − 2 · det + 3 · det det ­ ๏ฃฏ4 5 6๏ฃบ ® = 1 · det 8 9 7 9 7 8 ๏ฃฏ7 8 9๏ฃบ «๏ฃฐ ๏ฃป¬ = 1(5 · 9 − 6 · 8) − 2(4 · 9 − 6 · 7) + 3(4 · 8 − 5 · 7) = 0. It turns out that we did not have to necessarily use the first row. That is for any ๐, det(๐ด) = ๐ Õ (−1)๐+๐ ๐ ๐๐ det(๐ด ๐๐ ). ๐=1 It is sometimes useful to use a row other than the first. In the following example it is more convenient to expand along the second row. Notice that for the second row we are starting with a negative sign. ๏ฃฎ1 2 3๏ฃน ๏ฃบª 2 3 1 3 1 2 © ๏ฃฏ๏ฃฏ + 5 · det − 0 · det det ­ ๏ฃฏ0 5 0๏ฃบ๏ฃบ ® = −0 · det 8 9 7 9 7 8 ๏ฃฏ7 8 9๏ฃบ «๏ฃฐ ๏ฃป¬ = 0 + 5(1 · 9 − 3 · 7) + 0 = −60. 438 APPENDIX A. LINEAR ALGEBRA Let us check if it is really the same as expanding along the first row, ๏ฃฎ1 2 3๏ฃน ๏ฃบª 5 0 0 0 0 5 © ๏ฃฏ๏ฃฏ det ­ ๏ฃฏ0 5 0๏ฃบ๏ฃบ ® = 1 · det − 2 · det + 3 · det 8 9 7 9 7 8 ๏ฃฏ7 8 9๏ฃบ «๏ฃฐ ¬ ๏ฃป = 1(5 · 9 − 0 · 8) − 2(0 · 9 − 0 · 7) + 3(0 · 8 − 5 · 7) = −60. In computing the determinant, we alternately add and subtract the determinants of the submatrices ๐ด ๐๐ multiplied by ๐ ๐๐ for a fixed ๐ and all ๐. The numbers (−1)๐+๐ det(๐ด ๐๐ ) are called cofactors of the matrix. And that is why this method of computing the determinant is called the cofactor expansion. Similarly we do not need to expand along a row, we can expand along a column. For any ๐, det(๐ด) = ๐ Õ (−1)๐+๐ ๐ ๐๐ det(๐ด ๐๐ ). ๐=1 A related fact is that det(๐ด) = det(๐ด๐ ). A matrix is upper triangular if all elements below the main diagonal are 0. For example, ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0 5 6๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ0 0 9๏ฃบ ๏ฃฐ ๏ฃป is upper triangular. Similarly a lower triangular matrix is one where everything above the diagonal is zero. For example, ๏ฃฎ1 0 0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ4 5 0๏ฃบ . ๏ฃฏ ๏ฃบ ๏ฃฏ7 8 9๏ฃบ ๏ฃฐ ๏ฃป The determinant for triangular matrices is very simple to compute. Consider the lower triangular matrix. If we expand along the first row, we find that the determinant is 1 times the determinant of the lower triangular matrix 58 09 . So the deteriminant is just the product of the diagonal entries: ๏ฃฎ1 0 0๏ฃน ๏ฃบª © ๏ฃฏ๏ฃฏ det ­ ๏ฃฏ4 5 0๏ฃบ๏ฃบ ® = 1 · 5 · 9 = 45. ๏ฃฏ ๏ฃบ « ๏ฃฐ7 8 9๏ฃป ¬ Similarly for upper triangular matrices ๏ฃฎ1 2 3๏ฃน ๏ฃบª © ๏ฃฏ๏ฃฏ det ­ ๏ฃฏ0 5 6๏ฃบ๏ฃบ ® = 1 · 5 · 9 = 45. ๏ฃฏ ๏ฃบ « ๏ฃฐ0 0 9๏ฃป ¬ 439 A.6. DETERMINANT In general, if ๐ด is triangular, then det(๐ด) = ๐ 11 ๐22 · · · ๐ ๐๐ . If ๐ด is diagonal, then it is also triangular (upper and lower), so same formula applies. For example, ๏ฃฎ2 0 0๏ฃน ๏ฃบª © ๏ฃฏ๏ฃฏ det ­ ๏ฃฏ0 3 0๏ฃบ๏ฃบ ® = 2 · 3 · 5 = 30. ๏ฃฏ ๏ฃบ « ๏ฃฐ0 0 5๏ฃป ¬ In particular, the identity matrix ๐ผ is diagonal, and the diagonal entries are all 1. Thus, det(๐ผ) = 1. The determinant is telling you how geometric objects scale. If ๐ต doubles the sizes of geometric objects and ๐ด triples them, then ๐ด๐ต (which applies ๐ต to an object and then it applies ๐ด) should make size go up by a factor of 6. This is true in general: Theorem A.6.1. det(๐ด๐ต) = det(๐ด) det(๐ต). This property is one of the most useful, and it is employed often to actually compute determinants. A particularly interesting consequence is to note what it means for the existence of inverses. Take ๐ด and ๐ต to be inverses, that is ๐ด๐ต = ๐ผ. Then det(๐ด) det(๐ต) = det(๐ด๐ต) = det(๐ผ) = 1. Neither det(๐ด) nor det(๐ต) can be zero. This fact is an extremely useful property of the determinant, and one which is used often in this book: Theorem A.6.2. An ๐ × ๐ matrix ๐ด is invertible if and only if det(๐ด) ≠ 0. In fact, det(๐ด−1 ) det(๐ด) = 1 says that det(๐ด−1 ) = 1 . det(๐ด) So we know what the determinant of ๐ด−1 is without computing ๐ด−1 . Let us return to the formula for the inverse of a 2 × 2 matrix: ๐ ๐ ๐ ๐ −1 1 ๐ −๐ = . ๐๐ − ๐๐ −๐ ๐ Notice the determinant of the matrix [ ๐๐ ๐๐ ] in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero. A common notation for the determinant is a pair of vertical lines: ๐ ๐ = det ๐ ๐ ๐ ๐ ๐ ๐ . Personally, I find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. Also think about how to write the absolute value of a determinant. This notation is not used in this book. 440 APPENDIX A. LINEAR ALGEBRA A.6.1 Exercises Exercise A.6.1: Compute the determinant of the following matrices: a) 3 1 3 b) 2 1 ๏ฃฎ2 1 0๏ฃน ๏ฃฏ ๏ฃบ e) ๏ฃฏ๏ฃฏ−2 7 −3๏ฃบ๏ฃบ ๏ฃฏ0 2 0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2 1 3๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ8 6 3๏ฃบ๏ฃบ ๏ฃฏ7 9 7๏ฃบ ๏ฃฐ ๏ฃป 2 1 c) 4 2 ๏ฃฎ0 ๏ฃฏ ๏ฃฏ0 g) ๏ฃฏ๏ฃฏ ๏ฃฏ3 ๏ฃฏ0 ๏ฃฐ ๏ฃฎ1 2 3๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ0 4 5๏ฃบ๏ฃบ ๏ฃฏ0 0 6๏ฃบ ๏ฃฐ ๏ฃป 2 0 4 0 5 7 ๏ฃน๏ฃบ 2 −3๏ฃบ๏ฃบ 5 7 ๏ฃบ๏ฃบ 2 4 ๏ฃบ๏ฃป ๏ฃฎ0 1 2 0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 −1 2๏ฃบ ๏ฃบ h) ๏ฃฏ๏ฃฏ ๏ฃบ ๏ฃฏ1 1 2 1๏ฃบ ๏ฃฏ2 −1 −2 3๏ฃบ ๏ฃฐ ๏ฃป Exercise A.6.2: For which ๐ฅ are the following matrices singular (not invertible). 2 3 a) 2 ๐ฅ 2 ๐ฅ b) 1 2 ๐ฅ 1 c) 4 ๐ฅ ๏ฃฎ ๐ฅ 0 1๏ฃน ๏ฃบ ๏ฃฏ d) ๏ฃฏ๏ฃฏ 1 4 2๏ฃบ๏ฃบ ๏ฃฏ 1 6 2๏ฃบ ๏ฃป ๏ฃฐ Exercise A.6.3: Compute without computing the inverse. ๏ฃฎ © ๏ฃฏ2 ­ ๏ฃฏ0 det ­­ ๏ฃฏ๏ฃฏ ­ ๏ฃฏ0 ๏ฃฏ0 «๏ฃฐ 1 8 0 0 2 6 3 0 3๏ฃน๏ฃบ 5๏ฃบ๏ฃบ 9๏ฃบ๏ฃบ 1๏ฃบ๏ฃป −1 ª ® ® ® ® ¬ Exercise A.6.4: Suppose ๏ฃฎ1 ๏ฃฏ ๏ฃฏ2 ๐ฟ = ๏ฃฏ๏ฃฏ ๏ฃฏ7 ๏ฃฏ28 ๏ฃฐ 0 0 1 0 ๐ 1 5 −99 0๏ฃน๏ฃบ 0๏ฃบ๏ฃบ 0๏ฃบ๏ฃบ 1๏ฃบ๏ฃป and ๏ฃฎ5 ๏ฃฏ ๏ฃฏ0 ๐ = ๏ฃฏ๏ฃฏ ๏ฃฏ0 ๏ฃฏ0 ๏ฃฐ 9 1 − sin(1)๏ฃน๏ฃบ 1 88 −1 ๏ฃบ๏ฃบ . 0 1 3 ๏ฃบ๏ฃบ 0 0 1 ๏ฃบ๏ฃป Let ๐ด = ๐ฟ๐. Compute det(๐ด) in a simple way, without computing what is ๐ด. Hint: First read off det(๐ฟ) and det(๐). Exercise A.6.5: Consider the linear mapping from โ2 to โ2 given by the matrix ๐ด = 12 ๐ฅ1 for some number ๐ฅ. You wish to make ๐ด such that it doubles the area of every geometric figure. What are the possibilities for ๐ฅ (there are two answers). Exercise A.6.6: Suppose ๐ด and ๐ are ๐ × ๐ matrices, and ๐ is invertible. Suppose that det(๐ด) = 3. Compute det(๐ −1 ๐ด๐) and det(๐๐ด๐−1 ). Justify your answer using the theorems in this section. Exercise A.6.7: Let ๐ด be an ๐×๐ matrix such that det(๐ด) = 1. Compute det(๐ฅ๐ด) given a number ๐ฅ. Hint: First try computing det(๐ฅ๐ผ), then note that ๐ฅ๐ด = (๐ฅ๐ผ)๐ด. 441 A.6. DETERMINANT Exercise A.6.101: Compute the determinant of the following matrices: a) −2 2 −2 b) 1 3 ๏ฃฎ 2 1 0๏ฃน ๏ฃฏ ๏ฃบ e) ๏ฃฏ๏ฃฏ−2 7 3๏ฃบ๏ฃบ ๏ฃฏ 1 1 0๏ฃบ ๏ฃฐ ๏ฃป 2 2 c) 2 2 ๏ฃฎ3 ๏ฃฏ ๏ฃฏ0 g) ๏ฃฏ๏ฃฏ ๏ฃฏ0 ๏ฃฏ2 ๏ฃฐ ๏ฃฎ5 1 3๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ4 1 1๏ฃบ๏ฃบ ๏ฃฏ4 5 1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ2 9 −11๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ0 −1 5 ๏ฃบ๏ฃบ ๏ฃฏ0 0 3 ๏ฃบ๏ฃป ๏ฃฐ 2 0 4 1 5 2 5 2 7๏ฃน๏ฃบ 0๏ฃบ๏ฃบ 0๏ฃบ๏ฃบ 4๏ฃบ๏ฃป ๏ฃฎ0 ๏ฃฏ ๏ฃฏ1 h) ๏ฃฏ๏ฃฏ ๏ฃฏ5 ๏ฃฏ1 ๏ฃฐ 2 1 0 ๏ฃน๏ฃบ 2 −3 4 ๏ฃบ๏ฃบ 6 −7 8 ๏ฃบ๏ฃบ 2 3 −2๏ฃบ๏ฃป Exercise A.6.102: For which ๐ฅ are the following matrices singular (not invertible). 1 3 a) 1 ๐ฅ 3 ๐ฅ b) 1 3 ๐ฅ 3 c) 3 ๐ฅ ๏ฃฎ ๐ฅ 1 0๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ 1 4 0๏ฃบ๏ฃบ ๏ฃฏ 1 6 2๏ฃบ ๏ฃฐ ๏ฃป Exercise A.6.103: Compute without computing the inverse. ๏ฃฎ ๏ฃน −1 © ๏ฃฏ3 4 7 12 ๏ฃบ ª ­ ๏ฃฏ0 −1 9 −8๏ฃบ ® ๏ฃบ ® det ­­ ๏ฃฏ๏ฃฏ ๏ฃบ ® 0 0 −2 4 ­๏ฃฏ ๏ฃบ ® ๏ฃฏ0 0 0 2 ๏ฃบ ๏ฃป ¬ «๏ฃฐ Exercise A.6.104 (challenging): Find all the ๐ฅ that make the matrix inverse 1 2 1 ๐ฅ −1 have only integer entries (no fractions). Note that there are two answers. 442 APPENDIX A. LINEAR ALGEBRA Appendix B Table of Laplace Transforms The function ๐ข is the Heaviside function, ๐ฟ is the Dirac delta function, and ∞ ∫ ๐ Γ(๐ก) = −๐ ๐ก−1 ๐ 0 ๐๐, 2 erf(๐ก) = √ ๐ ∫ ๐ก 2 ๐ −๐ ๐๐, ๐ (๐ก) ๐น(๐ ) = โ ๐ (๐ก) = ๐ถ ๐ข(๐ก − ๐) ๐ถ ๐ 1 ๐ 2 2 ๐ 3 ๐! ๐ ๐+1 Γ(๐+1) ๐ ๐+1 1 ๐ +๐ ๐ ๐ 2 +๐ 2 ๐ ๐ 2 +๐ 2 ๐ ๐ 2 −๐ 2 ๐ ๐ 2 −๐ 2 ๐ −๐๐ ๐ ๐ฟ(๐ก) 1 ๐ฟ(๐ก − ๐) ๐ −๐๐ ๐ก ๐ก2 ๐ก๐ ๐ก๐ (๐ > 0) ๐ −๐๐ก sin(๐๐ก) cos(๐๐ก) sinh(๐๐ก) cosh(๐๐ก) erf √1 ๐๐ก 1 √ ๐๐ก ๐ก 2๐ 1 (๐๐ )2 ๐ ๐ 2 −๐ 4๐ก (๐ ≥ 0) √ 2 − ๐๐ ๐ ๐ก erfc(๐ ๐ก) (๐ > 0) exp erfc(๐ก) = 1 − erf(๐ก). 0 −๐๐ ๐√ ๐ 1 √ ๐ +๐ erfc(๐๐ ) ∫∞ 0 ๐ −๐ ๐ก ๐ (๐ก) ๐๐ก 444 APPENDIX B. TABLE OF LAPLACE TRANSFORMS ∫∞ ๐ (๐ก) ๐น(๐ ) = โ ๐ (๐ก) = ๐ ๐ (๐ก) + ๐ ๐(๐ก) ๐๐น(๐ ) + ๐๐บ(๐ ) ๐ (๐๐ก) ๐ (๐ก − ๐)๐ข(๐ก − ๐) 1 ๐ ๐๐น ๐ ๐ −๐๐ ๐น(๐ ) ๐ −๐๐ก ๐ (๐ก) ๐น(๐ + ๐) ๐ 0(๐ก) ๐ ๐บ(๐ ) − ๐(0) ๐ 00(๐ก) ๐ 2 ๐บ(๐ ) − ๐ ๐(0) − ๐ 0(0) ๐ 000(๐ก) ๐ 3 ๐บ(๐ ) − ๐ 2 ๐(0) − ๐ ๐ 0(0) − ๐ 00(0) ๐ (๐) (๐ก) ๐ ๐ ๐บ(๐ ) − ๐ ๐−1 ๐(0) − · · · − ๐ (๐−1) (0) (๐ > 0) ( ๐ ∗ ๐)(๐ก) = ∫๐ก 0 ๐ (๐)๐(๐ก − ๐) ๐๐ ๐น(๐ )๐บ(๐ ) −๐น0(๐ ) ๐ก ๐ ๐ (๐ก) (−1)๐ ๐น (๐) (๐ ) 0 ๐ (๐ก) ๐ก ๐ (๐)๐๐ ๐ −๐ ๐ก ๐ (๐ก) ๐๐ก ๐ก ๐ (๐ก) ∫๐ก 0 1 ๐ ๐น(๐ ) ∫∞ ๐น(๐)๐๐ ๐ Further Reading [BM] Paul W. Berg and James L. McGregor, Elementary Partial Differential Equations, Holden-Day, San Francisco, CA, 1966. [BD] William E. Boyce and Richard C. DiPrima, Elementary Differential Equations and Boundary Value Problems, 11th edition, John Wiley & Sons Inc., New York, NY, 2017. [EP] C.H. Edwards and D.E. Penney, Differential Equations and Boundary Value Problems: Computing and Modeling, 5th edition, Pearson, 2014. [F] Stanley J. Farlow, An Introduction to Differential Equations and Their Applications, McGraw-Hill, Inc., Princeton, NJ, 1994. (Published also by Dover Publications, 2006.) [I] E.L. Ince, Ordinary Differential Equations, Dover Publications, Inc., New York, NY, 1956. [T] William F. Trench, Elementary Differential Equations with Boundary Value Problems. Books and Monographs. Book 9. 2013. https://digitalcommons.trinity.edu/ mono/9 446 FURTHER READING Solutions to Selected Exercises 0.2.101: Compute ๐ฅ 0 = −2๐ −2๐ก and ๐ฅ 00 = 4๐ −2๐ก . Then (4๐ −2๐ก ) + 4(−2๐ −2๐ก ) + 4(๐ −2๐ก ) = 0. 0.2.102: Yes. 0.2.103: ๐ฆ = ๐ฅ ๐ is a solution for ๐ = 0 and ๐ = 2. 0.2.104: ๐ถ1 = 100, ๐ถ2 = −90 0.2.105: ๐ = −9๐ 8๐ 0.2.106: a) ๐ฅ = 9๐ −4๐ก b) ๐ฅ = cos(2๐ก) + sin(2๐ก) c) ๐ = 4๐ 3๐ d) ๐ = 3 sinh(2๐ฅ) 0.3.101: a) PDE, equation, second order, linear, nonhomogeneous, constant coefficient. b) ODE, equation, first order, linear, nonhomogeneous, not constant coefficient, not autonomous. c) ODE, equation, seventh order, linear, homogeneous, constant coefficient, autonomous. d) ODE, equation, second order, linear, nonhomogeneous, constant coefficient, autonomous. e) ODE, system, second order, nonlinear. f) PDE, equation, second order, nonlinear. 0.3.102: equation: ๐(๐ฅ)๐ฆ = ๐(๐ฅ), solution: ๐ฆ = ๐(๐ฅ) . ๐(๐ฅ) 0.3.103: ๐ = 0 or ๐ = 1 2 1.1.101: ๐ฆ = ๐ ๐ฅ + ๐ฅ2 + 9 1.1.102: 1.1.103: 1.1.104: ๐ฅ = (3๐ก − 2)1/3 √ ๐ฅ = sin−1 ๐ก + 1/ 2 170 1/(1−๐) 1.1.105: If ๐ ≠ 1, then ๐ฆ = (1 − ๐)๐ฅ + 1 . If ๐ = 1, then ๐ฆ = ๐ ๐ฅ . 1.1.106: The equation is ๐ 0 = −๐ถ for some constant ๐ถ. The snowball will be completely melted in 25 minutes from time ๐ก = 0. 1.1.107: ๐ฆ = ๐ด๐ฅ 3 + ๐ต๐ฅ 2 + ๐ถ๐ฅ + ๐ท, so 4 constants. 1.2.101: 448 SOLUTIONS TO SELECTED EXERCISES ๐ฆ = 0 is a solution such that ๐ฆ(0) = 0. 1.2.102: Yes a solution exists. The equation is ๐ฆ 0 = ๐ (๐ฅ, ๐ฆ) where ๐ (๐ฅ, ๐ฆ) = ๐ฅ๐ฆ. The ๐๐ function ๐ (๐ฅ, ๐ฆ) is continuous and ๐๐ฆ = ๐ฅ, which is also continuous near (0, 0). So a solution exists and is unique. (In fact, ๐ฆ = 0 is the solution.) 1.2.103: No, the equation is not defined at (๐ฅ, ๐ฆ) = (1, 0). 1.2.104: a) ๐ฆ 0 = cos ๐ฆ, b) ๐ฆ 0 = ๐ฆ cos(๐ฅ), c) ๐ฆ 0 = sin ๐ฅ. Justification left to reader. 1.2.105: Picard does not apply as ๐ is not continuous at ๐ฆ = 0. The equation does not have a continuously differentiable solution. Suppose it did. Notice that ๐ฆ 0(0) = 1. By the first derivative test, ๐ฆ(๐ฅ) > 0 for small positive ๐ฅ. But then for those ๐ฅ we would have ๐ฆ 0(๐ฅ) = 0, so clearly the derivative cannot be continuous. ∫๐ฅ 1.2.106: The solution is ๐ฆ(๐ฅ) = 1.3.101: ๐ฆ = ๐ถ๐ ๐ฅ 1.3.102: 1.3.103: 1.3.104: ๐ฅ = ๐๐ก + 1 ๐ฅ3 + ๐ฅ = ๐ก + 2 1 ๐ฆ = 1−ln ๐ฅ 1.3.105: sin(๐ฆ) = − cos(๐ฅ) + ๐ถ 1.3.106: The range is approximately 7.45 to 12.15 minutes. ๐ฅ0 ๐ (๐ ) ๐๐ + ๐ฆ0 , and this does indeed exist for every ๐ฅ. 2 3 ๐ก 1.3.107: a) ๐ฅ = 1000๐ . b) 102 rabbits after one month, 861 after 5 months, 999 after 10 ๐ ๐ก +24 months, 1000 after 15 months. 3 1.4.101: ๐ฆ = ๐ถ๐ −๐ฅ + 1/3 1.4.102: 1.4.103: ๐ฆ = 2๐ cos(2๐ฅ)+1 + 1 250 grams 1.4.104: ๐(5) = 1000๐ 2×5−0.05×5 = 1000๐ 8.75 ≈ 6.31 × 106 1.4.105: ๐ดโ 0 = ๐ผ − ๐ โ, where ๐ is a constant with units m2/s. 1.5.101: ๐ฆ= 2 3๐ฅ−2 1.5.102: ๐ฆ= 3−๐ฅ 2 2๐ฅ 1.5.103: ๐ฆ = 7๐ 3๐ฅ + 3๐ฅ + 1 1.5.104: ๐ฆ= 2 p 1/3 ๐ฅ 2 − ln(๐ถ − ๐ฅ) 1.6.101: a) 0, 1, 2 are critical points. b) ๐ฅ = 0 is unstable (semistable), ๐ฅ = 1 is stable, and ๐ฅ = 2 is unstable. c) 1 1.6.102: a) There are no critical points. b) ∞ √ ๐๐+ (๐๐)2 +4๐ด๐ ๐๐ฅ 1.6.103: a) ๐๐ก = ๐๐ฅ(๐ − ๐ฅ) + ๐ด b) 2๐ 1.6.104: a) ๐ผ is a stable critical point, ๐ฝ is an unstable one. 1.7.101: Approximately: 1.0000, 1.2397, 1.3829 b) ๐ผ, c) ๐ผ, d) ∞ or DNE. 449 SOLUTIONS TO SELECTED EXERCISES 1.7.102: a) 0, 8, 12 b) ๐ฅ(4) = 16, so errors are: 16, 8, 4. c) Factors are 0.5, 0.5, 0.5. 1.7.103: a) 0, 0, 0 b) ๐ฅ = 0 is a solution so errors are: 0, 0, 0. 1.7.104: a) Improved Euler: ๐ฆ(1) ≈ 3.3897 for โ = 1/4, ๐ฆ(1) ≈ 3.4237 for โ = 1/8, b) Standard Euler: ๐ฆ(1) ≈ 2.8828 for โ = 1/4, ๐ฆ(1) ≈ 3.1316 for โ = 1/8, c) ๐ฆ = 2๐ ๐ฅ − ๐ฅ − 1, so ๐ฆ(2) is approximately 3.4366. d) Approximate errors for improved Euler: 0.046852 for โ = 1/4, and 0.012881 for โ = 1/8. For standard Euler: 0.55375 for โ = 1/4, and 0.30499 for โ = 1/8. Factor is approximately 0.27 for improved Euler, and 0.55 for standard Euler. 1.8.101: a) ๐ ๐ฅ ๐ฆ + sin(๐ฅ) = ๐ถ b) ๐ฅ 2 + ๐ฅ๐ฆ − 2๐ฆ 2 = ๐ถ c) ๐ ๐ฅ + ๐ ๐ฆ = ๐ถ d) ๐ฅ 3 + 3๐ฅ๐ฆ + ๐ฆ 3 = ๐ถ 1.8.102: a) Integrating factor is ๐ฆ, equation becomes ๐๐ฅ + 3๐ฆ 2 ๐๐ฆ = 0. b) Integrating ๐ฅ ๐ฅ −๐ฆ factor is ๐ , equation becomes ๐ ๐๐ฅ − ๐ ๐๐ฆ = 0. c) Integrating factor is ๐ฆ 2 , equation becomes (cos(๐ฅ) + ๐ฆ) ๐๐ฅ + ๐ฅ ๐๐ฆ = 0. d) Integrating factor is ๐ฅ, equation becomes (2๐ฅ ๐ฆ + ๐ฆ 2 ) ๐๐ฅ + (๐ฅ 2 + 2๐ฅ๐ฆ) ๐๐ฆ = 0. 1.8.103: 1 a) The equation is − ๐ (๐ฅ) ๐๐ฅ+ ๐(๐ฆ) ๐๐ฆ, and this is exact because ๐ = − ๐ (๐ฅ), ๐ = 1 , ๐(๐ฆ) so ๐ ๐ฆ = 0 = ๐๐ฅ . b) −๐ฅ ๐๐ฅ + 1๐ฆ ๐๐ฆ = 0, leads to potential function ๐น(๐ฅ, ๐ฆ) = − ๐ฅ2 + ln|๐ฆ|, solving ๐น(๐ฅ, ๐ฆ) = ๐ถ leads to the same solution as the example. 2 1.9.101: a) ๐ข = b) ๐ข = cos(๐ฅ − 2๐ก) 1 1+(๐ฅ+5๐ก)2 2 1.9.102: ๐ข = cos(๐ฅ − ๐ก)๐ −๐ก /2 1.9.103: ๐ข = ๐ฅ + 4๐ก 2.1.101: Yes. To justify try to find a constant ๐ด such that sin(๐ฅ) = ๐ด๐ ๐ฅ for all ๐ฅ. 2.1.102: No. ๐ ๐ฅ+2 = ๐ 2 ๐ ๐ฅ . 2.1.103: ๐ฆ = 5 2.1.104: ๐ฆ = ๐ถ1 ln(๐ฅ) + ๐ถ2 2.1.105: ๐ฆ 00 − 3๐ฆ 0 + 2๐ฆ = 0 2.2.101: ๐ฆ = ๐ถ1 ๐ (−2+ 2.2.102: ๐ฆ = ๐ถ1 ๐ 3๐ฅ + ๐ถ2 ๐ฅ๐ 3๐ฅ √ 2)๐ฅ √ + ๐ถ2 ๐ (−2− 2)๐ฅ 2.2.103: √ √ √ ๐ฆ = ๐ −๐ฅ/4 cos ( 7/4)๐ฅ − 7๐ −๐ฅ/4 sin ( 7/4)๐ฅ 2.2.104: ๐ฆ= 2.2.105: ๐ง(๐ก) 2(๐−๐) −3๐ฅ/2 ๐ + 3๐+2๐ 5 5 −๐ก = 2๐ cos(๐ก) ๐๐ฅ 2.2.107: ๐๐ฝ−๐ ๐ผ๐ฅ ๐ฝ๐ฅ + ๐−๐๐ผ ๐ฝ−๐ผ ๐ ๐ฝ−๐ผ ๐ ๐ฆ 00 − ๐ฆ 0 − 6๐ฆ = 0 2.3.101: ๐ฆ = ๐ถ1 ๐ ๐ฅ + ๐ถ2 ๐ฅ 3 + ๐ถ3 ๐ฅ 2 + ๐ถ4 ๐ฅ + ๐ถ5 2.2.106: ๐ฆ= 2.3.102: a) ๐ 3 − 3๐ 2 + 4๐ − 12 = 0 ๐ถ3 cos(2๐ฅ) 2.3.103: ๐ฆ = 0 2.3.104: No. ๐ 1 ๐ ๐ฅ − ๐ ๐ฅ+1 = 0. b) ๐ฆ 000 − 3๐ฆ 00 + 4๐ฆ 0 − 12๐ฆ = 0 c) ๐ฆ = ๐ถ1 ๐ 3๐ฅ + ๐ถ2 sin(2๐ฅ) + 450 SOLUTIONS TO SELECTED EXERCISES 2.3.105: Yes. (Hint: First note that sin(๐ฅ) is bounded. Then note that ๐ฅ and ๐ฅ sin(๐ฅ) cannot be multiples of each other.) 2.3.106: ๐ฆ 000 − ๐ฆ 00 + ๐ฆ 0 − ๐ฆ = 0 2.4.101: ๐ = 8/9 (and larger) √ b) ๐ผ = ๐ถ๐ −๐ก cos( 3 ๐ก − ๐พ) 2.4.102: a) 0.05๐ผ 00 + 0.1๐ผ 0 + (1/5)๐ผ = 0 √ 10 −๐ก √ ๐ sin( 3 ๐ก) √ c) ๐ผ = 10๐ −๐ก cos( 3 ๐ก) + 3 2.4.103: a) ๐ = 500000 b) 1 √ 5 2 ≈ 0.141 c) 45000 kg d) 11250 kg 2.4.104: ๐0 = 31 . If ๐ < ๐0 , then the system is overdamped and will not oscillate. 2.5.101: ๐ฆ= −16 sin(3๐ฅ)+6 cos(3๐ฅ) 73 2๐ ๐ฅ +3๐ฅ 3 −9๐ฅ 6 2 = ๐ฅ − 4๐ฅ + √ √ b) ๐ฆ = ๐ถ1 cos( 2๐ฅ) + ๐ถ2 sin( 2๐ฅ) + 2.5.102: a) ๐ฆ = 2.5.103: ๐ฆ(๐ฅ) 2.5.104: ๐ฆ= 2.5.105: ๐ฆ= 2.5.106: ๐ฆ= 2.6.101: ๐= 2.6.102: ๐ฅ ๐ ๐ = ๐0 = q 6 + ๐ −๐ฅ (๐ฅ − 5) 2๐ฅ๐ ๐ฅ −(๐ ๐ฅ +๐ −๐ฅ ) log(๐ 2๐ฅ +1) 4 √ − sin(๐ฅ+๐) 2๐ฅ + + ๐ถ ๐ 1 3 ๐ฅ 2 + 2๐ฅ + 3 √ 31 √ 4 2 (๐02 −๐2 )๐น0 ๐(2๐๐) √ ๐ถ2 ๐ − ๐ถ(๐) = ≈ 0.984 2 2๐ ๐ฅ +3๐ฅ 3 −9๐ฅ 6 2 +๐(๐02 −๐2 ) 2๐ฅ 16 √ 3 7 ≈ 2.016 cos(๐๐ก) + 2๐๐๐น0 2 ๐(2๐๐)2 +๐(๐02 −๐2 ) sin(๐๐ก) + ๐ด๐ , where ๐ = ๐ 2๐ and ๐ ๐. 2.6.103: a) ๐ = 2 b) 25 ๐ถ1 3๐ฅ 2 ๐ , ๐ฆ3 = ๐ฆ(๐ฅ) = ๐ถ3 ๐ ๐ฅ + ๐ถ1 3๐ฅ 2 ๐ 3.1.101: ๐ฆ1 = ๐ถ1 ๐ 3๐ฅ , ๐ฆ2 = ๐ฆ(๐ฅ) = ๐ถ2 ๐ ๐ฅ + 3.1.102: ๐ฅ = 53 ๐ 2๐ก − 23 ๐ −๐ก , ๐ฆ = 53 ๐ 2๐ก + 43 ๐ −๐ก 3.1.103: ๐ฅ10 = ๐ฅ 2 , ๐ฅ 20 = ๐ฅ3 , ๐ฅ30 = ๐ฅ1 + ๐ก 3.1.104: ๐ฆ30 + ๐ฆ1 + ๐ฆ2 = ๐ก, ๐ฆ40 + ๐ฆ1 − ๐ฆ2 = ๐ก 2 , ๐ฆ10 = ๐ฆ3 , ๐ฆ20 = ๐ฆ4 3.1.105: ๐ฅ1 = ๐ฅ 2 = ๐๐ก. Explanation of the intuition is left to reader. 3.1.106: a) Left to reader. b) ๐ฅ10 = ๐๐ (๐ฅ 2 − ๐ฅ 1 ), ๐ฅ20 = ๐๐ ๐ฅ1 − ๐−๐ ๐ ๐ฅ2 . both ๐ฅ 1 and ๐ฅ2 go to zero, explanation is left to reader. 3.2.101: −15 3.2.102: −2 15 3.2.103: ๐ฅ® = −5 3.2.104: a) h 1/๐ 0 0 1/๐ 1 i b) /๐ 0 0 0 1/๐ 0 0 0 1/๐ ๐ก 3.3.101: Yes. 3.3.102: No. 2 cosh(๐ก) 1 − ๐ 1 − ๐ −๐ก 1 = 0® c) As ๐ก goes to infinity, 451 SOLUTIONS TO SELECTED EXERCISES ๐ฅ 0 3.3.103: ๐ฆ 3.3.104: a) ๐ฅ® 0 = 3 −1 ๐ฅ = 0 2๐ก ๐ฅ® 0 2๐ก ๐ก ๐ 0 + ๐ฆ ๐ก 0 b) ๐ฅ® = 3.4.101: a) Eigenvalues: 4, 0, −1 b) ๐ฅ® = ๐ถ1 h1i 0 1 ๐ 4๐ก + ๐ถ2 h0i 1 0 3.4.102: a) Eigenvalues: b) ๐ฅ® = ๐ถ1 ๐ ๐ก/2 √ −2 cos 2 √ cos + 3 sin ๐ฅ® = ๐ถ1 1 3.4.104: ๐ฅ® = ๐ถ1 h 1 √ 3๐ก 2 ๐ ๐ก + ๐ถ2 cos(๐ก) − sin(๐ก) i h i + ๐ถ2 ๐ ๐ก/2 1 −1 h + ๐ถ2 h1i h0i h , 0 1 √ sin , 1 0 h Eigenvectors: 3๐ก i Eigenvectors: 3 5 ๐ −๐ก −2 √ √ 1+ 3๐ 1− 3๐ , 2 2 , + ๐ถ3 √ 3๐ก 2 3.4.103: 2 ๐ถ2 ๐ ๐ก +๐ถ1 2 ๐ถ2 ๐ ๐ก h −2 √ 1− 3๐ −2 sin 2 √ − 3 cos i i h , −2 √ 1+ 3๐ i 3๐ก √ 3๐ก 2 3 5 −2 √ 3๐ก 2 ๐ −๐ก sin(๐ก) cos(๐ก) i √ 3.5.101: a) Two eigenvalues: ± 2 so the behavior is a saddle. b) Two eigenvalues: 1 and 2, so the behavior is a source. c) Two eigenvalues: ±2๐, so the behavior is a center (ellipses). d) Two eigenvalues: −1 and −2, so the behavior is a sink. e) Two eigenvalues: 5 and −3, so the behavior is a saddle. 3.5.102: Spiral source. 3.5.103: The solution does not move anywhere if ๐ฆ = 0. When ๐ฆ is positive, the solution moves (with constant speed) in the positive ๐ฅ direction. When ๐ฆ is negative, the solution moves (with constant speed) in the negative ๐ฅ direction. It is not one of the behaviors we saw. Note that the matrix has a double eigenvalue 0 and the general solution is ๐ฅ = ๐ถ1 ๐ก + ๐ถ2 and ๐ฆ = ๐ถ1 , which agrees with the description above. h 1 i √ √ √ √ h 0 i 3.6.101: ๐ฅ® = −1 ๐ 1 cos( 3 ๐ก) + ๐ 1 sin( 3 ๐ก) + 1 ๐ 2 cos( 2 ๐ก) + ๐ 2 sin( 2 ๐ก) + −2 1 h0i 0 1 ๐ 3 cos(๐ก) + ๐ 3 sin(๐ก) + 3.6.102: + h 1 0 −1 i 3.6.103: h๐ 0 0 0 ๐ 0 0 0 ๐ ๐ 2 cos( p i ๐ฅ® 00 = ๐/๐ ๐ก) −1 1/2 2/3 p cos(2๐ก) ๐ 0 ๐ −2๐ ๐ 0 ๐ −๐ h −๐ + ๐ 2 sin( ๐ฅ2 = (2/5) cos( 1/6 ๐ก) p i ๐ฅ®. Solution: ๐ฅ® = ๐/๐ ๐ก) + h1i − (2/5) cos(๐ก) 1 1 h 1 −2 1 ๐3 ๐ก + ๐3 . i p ๐ 1 cos( p 3๐/๐ ๐ก)+ ๐ 1 sin( 3๐/๐ ๐ก) 452 SOLUTIONS TO SELECTED EXERCISES 3.7.101: a) 3, 0, 0 3.7.102: a) 1, 1, 2 b) Eigenvalue h i 1 has a defect h i of 1h 0 1 −1 c) ๐ฅ® = ๐ถ1 c) ๐ฅ® = ๐ถ1 b) No defects. 1 0 0 ๐ ๐ก + ๐ถ2 +๐ก 0 1 −1 i ๐ ๐ก + ๐ถ3 h h1i ๐ 3๐ก 1 1 3 3 −2 i + ๐ถ2 h 1 0 −1 0 ๐ด= 3.7.104: ๐ 3๐ก +๐ −๐ก 2 ๐ −๐ก −๐ 3๐ก 2 " 2๐ 3๐ก −4๐ 2๐ก +3๐ ๐ก 2๐ ๐ก −2๐ 2๐ก 3๐ก 2๐ −5๐ 2๐ก +3๐ ๐ก 3.8.103: a) ๐ ๐ก๐ด = h 3.8.104: h ๐ −๐ก −๐ 3๐ก 2 ๐ 3๐ก +๐ −๐ก 2 1 0 c) 0 1 0 ๐ก2 2 h 0 i 3 1 ๐ 2๐ก 3๐ ๐ก 2 (๐ก+1) ๐ 2๐ก −๐ก๐ 2๐ก ๐ก๐ 2๐ก (1−๐ก) ๐ 2๐ก 1+2๐ก+5๐ก 2 3๐ก+6๐ก 2 2๐ก+4๐ก 2 1+2๐ก+5๐ก 2 i 3๐ก −๐ 3๐ก +4๐ 2๐ก −3๐ ๐ก 2๐ 2๐ก −2๐ ๐ก 3๐ก −๐ +5๐ 2๐ก −3๐ ๐ก − 3๐2 ๐๐ก 3๐ ๐ก 3๐ 3๐ก 2 − 2 i h b) ๐ฅ® = ๐ 0.1๐ด ≈ # (1−๐ก) ๐ 2๐ก (2−๐ก) ๐ 2๐ก i 1.25 0.36 0.24 1.25 5(3๐ ) − 2๐+2 4(3๐ ) − 2๐+2 a) 5(2๐ ) − 5(3๐ ) 5(2๐ ) − 4(3๐ ) 0 1 if ๐ is even, and if ๐ is odd. 1 0 3.8.105: i 05 ๐ ๐ก๐ด = 3.8.102: + ๐ถ3 0 1 −1 5 5 ๐ ๐ก๐ด = 3.8.101: 0 1 h ๐ 2๐ก 3.7.103: a) 2, 2, 2 b) Eigenvalue h 0 i 2 has a defect h 0 i of 2h 0 i h 1 i h 0 i 2๐ก c) ๐ฅ® = ๐ถ1 3 ๐ + ๐ถ2 −1 + ๐ก 3 ๐ 2๐ก + ๐ถ3 0 + ๐ก −1 + 1 i 3 − 2(3๐ ) 2(3๐ ) − 2 b) 3 − 3๐+1 3๐+1 − 2 3.9.101: The general solution is (particular solutions should agree with one of these): ๐ฅ(๐ก) = ๐ถ1 ๐ 9๐ก + 4๐ถ2 ๐ 4๐ก − ๐ก/3 − 5/54, ๐ฆ(๐ก) = ๐ถ1 ๐ 9๐ก − ๐ถ2 ๐ 4๐ก + ๐ก/6 + 7/216 3.9.102: The general solution is (particular solutions should agree with one of these): ๐ฅ(๐ก) = ๐ถ1 ๐ ๐ก + ๐ถ2 ๐ −๐ก + ๐ก๐ ๐ก , ๐ฆ(๐ก) = ๐ถ1 ๐ ๐ก − ๐ถ2 ๐ −๐ก + ๐ก๐ ๐ก 5 ๐ก 2๐ 3.9.103: ๐ฅ® = 1 3.9.104: ๐ฅ® = 1 + 1 −1 −9 4.1.101: 80 1 −๐ก−1 + 9 1 140 sin(2๐ก) + 1 30 ๐=๐ q + 1√ 120 6 cos(2๐ก) + −1 −๐ก 2 ๐ 1 −1 √ ๐ 6๐ก 9๐ก 40 cos(๐ก) 30 − + + 1√ 120 6 ๐− √ 6๐ก − ๐ก 60 − cos(๐ก) 70 15 2 4.1.102: ๐ ๐ = 4๐ 2 ๐2 for ๐ = 1, 2, 3, . . . 4.1.103: 1 140 ๐ฅ ๐ = cos(2๐๐๐ก) + ๐ต sin(2๐๐๐ก) (for any ๐ต) ๐ฅ(๐ก) = − sin(๐ก) 4.1.104: General solution is ๐ฅ = ๐ถ๐ −๐๐ก . Since ๐ฅ(0) = 0 then ๐ถ = 0, and so ๐ฅ(๐ก) = 0. Therefore, the solution is always identically zero. One condition is always enough to guarantee a unique solution for a first order equation. √ 4.1.105: √ 3 3 −3 ๐ 2 ๐ 3 √ − 3 3 cos √ √ 3 3 ๐ 2 + sin √ √ 3 3 ๐ 2 =0 453 SOLUTIONS TO SELECTED EXERCISES 4.2.101: sin(๐ก) 4.2.102: ∞ Í ๐=1 4.2.103: 1 2 4.2.104: ๐4 5 (๐−๐) sin(๐๐+๐2 )+(๐+๐) sin(๐๐−๐2 ) ๐๐ 2 −๐3 − 12 cos(2๐ก) ∞ Í + ๐=1 4.3.101: a) 8 6 4.3.102: a) ∞ Í 4.3.103: (−1)๐ (8๐2 ๐ 2 −48) ๐4 ∞ Í + 16(−1)๐ ๐2 ๐ 2 ๐=1 ๐=1 (−1)๐+1 2๐ ๐๐ ๐ 0(๐ก) = ∞ Í ๐=1 ๐ก 2 4.3.104: a) ๐น(๐ก) = 4.3.105: a) sin(๐๐ก) ∞ Í ๐=1 ๐๐ 2 ๐ก cos ๐๐ ๐ ๐ก sin ๐ ๐ 2 +1 b) 8 6 2๐ ๐ sin b) − 16 ๐2 cos ๐ ๐๐ก − ๐ 2๐ก ๐ ๐ + sin 4 ๐2 2๐ ๐ ๐ก cos ๐๐ก − 16 9๐2 cos 2๐ 3๐ sin 3๐ ๐ ๐ก + 3๐ 2 ๐ก +··· −··· cos(๐๐๐ก) ∞ Í +๐ถ+ ๐=1 (−1)๐+1 ๐ cos(๐๐ก) 1 ๐4 b) no b) ๐ is continuous at ๐ก = ๐/2 so the Fourier series converges sin(๐๐ก) to ๐ (๐/2) = ๐/4. Obtain ๐/4 = sin(๐๐ก) ∞ Í ๐=1 (−1)๐+1 2๐−1 = 1 − 1/3 + 1/5 − 1/7 + · · · . c) Using the first 4 terms get 76/105 ≈ 0.72 (quite a bad approximation, you would have to take about 50 terms to start to get to within 0.01 of ๐/4). 4.3.106: a) ๐น(0) = 1, b) ๐น(−1) = 0, c) ๐น(1) = 2, d) ๐น(−2) = 1, e) ๐น(4) = 1, f) ๐น(−9) = 0 4.4.101: a) 1/2 + ∞ Í ๐=1 ๐ odd −4 ๐2 ๐ 2 4.4.102: a) cos(2๐ก) b) 4.4.103: a) ๐ (๐ก) 4.4.104: ∞ Í ๐=1 −1 ๐ 2 (1+๐ 2 ) ∞ Í ∞ Í b) −4๐ ๐๐ 2 −4๐ ๐=1 ๐ odd ∞ Í ๐=1 2(−1)๐+1 ๐๐ sin(๐๐ก) sin(๐๐ก) ๐ก ๐ 4.5.101: ๐ฅ= 4.5.102: ๐ฅ= ๐ −๐ 2 3−(2๐) ๐=1 4.5.103: ๐ฅ= 1 √ 2 3 ๐=1 ๐๐ 3 ๐ก b) 0 4.4.105: + cos 1 2๐ (๐−๐ 2 ) √ 1 2−4๐2 sin(2๐๐ก) + ∞ Í + sin(๐๐ก) ∞ Í √ 0.1 2−100๐2 cos(10๐๐ก) cos(2๐๐ก) √−4 2 ๐2 ( 3−๐ 2 ๐2 ) ๐ ๐=1 ๐ odd cos(๐๐๐ก) sin ๐๐ 3 ๐ก 454 SOLUTIONS TO SELECTED EXERCISES 2 ๐ก ๐3 ∞ Í 4.5.104: ๐ฅ= 4.6.101: ๐ข(๐ฅ, ๐ก) = 5 sin(๐ฅ) ๐ −3๐ก + 2 sin(5๐ฅ) ๐ −75๐ก 4.6.102: ๐ข(๐ฅ, ๐ก) = 1 + 2 cos(๐ฅ) ๐ −0.1๐ก 4.6.103: ๐ข(๐ฅ, ๐ก) = ๐ ๐๐ก ๐ ๐๐ฅ for some ๐ 4.6.104: ๐ข(๐ฅ, ๐ก) = ๐ด๐ ๐ฅ + ๐ต๐ ๐ก 1 √ 2 3 4.6.105: a) 0, − sin(๐๐ก) + ๐=3 ๐ odd −4 ๐ 2 ๐4 (1−๐ 2 ) cos(๐๐๐ก) b) minimum −100, maximum 100, 4.7.101: ๐ฆ(๐ฅ, ๐ก) = sin(๐ฅ) sin(๐ก) + cos(๐ก) 4.7.102: ๐ฆ(๐ฅ, ๐ก) = 4.7.103: ๐ฆ(๐ฅ, ๐ก) = 4.7.104: ๐ฆ(๐ฅ, ๐ก) = sin(2๐ฅ) + ๐ก sin(๐ฅ) 4.8.101: ๐ฆ(๐ฅ, ๐ก) = c) ๐ก = ln 2 . 4๐2 1 1 5๐ sin(๐๐ฅ) sin(5๐๐ก) + 100๐ sin(2๐๐ฅ) sin(10๐๐ก) ∞ √ Í 2(−1)๐+1 2 ๐ก) sin(๐๐ฅ) cos(๐ ๐ ๐=1 sin(2๐(๐ฅ−3๐ก))+sin(2๐(3๐ก+๐ฅ)) 2 + cos(3๐(๐ฅ−3๐ก))−cos(3๐(3๐ก+๐ฅ)) 18๐ ๏ฃฑ ๏ฃด ๐ฅ − ๐ฅ 2 − 0.04 if 0.2 ≤ ๐ฅ ≤ 0.8 ๏ฃด ๏ฃฒ ๏ฃด 4.8.102: a) ๐ฆ(๐ฅ, 0.1) = 0.6๐ฅ b) ๐ฆ(๐ฅ, 1/2) = −๐ฅ + if ๐ฅ ≥ 0.8 c) ๐ฆ(๐ฅ, 1) = ๐ฅ − ๐ฅ 2 ๐ฅ2 4.8.103: a) ๐ฆ(1, 1) = −1/2 4.9.101: 4.9.102: 4.10.101: ๐ข(๐ฅ, ๐ฆ) = ∞ Í ๐=1 1 ๐2 ∞ Í sin(๐๐๐ฅ) ๐=1 1 ๐ ๐ ๐2 4.10.102: ๐ข = 1 − ๐ฅ 2 4.10.103: a) ๐ข = −1 4 ๐ + 4.10.104: b) ๐ฆ(4, 3) = 0 ๐ข(๐ฅ, ๐ฆ) = 0.1 sin(๐๐ฅ) ๐ข =1+ 1 ๐ข(๐, ๐) = 2๐ 5.1.101: ๐๐ = (2๐−1)๐ , 2 if ๐ฅ ≤ 0.2 ๏ฃด ๏ฃด ๏ฃด 0.6 − 0.6๐ฅ ๏ฃณ 1 4 ∫ c) ๐ฆ(3, 9) = 1/2 sinh(๐๐(1−๐ฆ)) sinh(๐๐) sinh(๐(2−๐ฆ)) sinh(2๐) sin(๐๐) b) ๐ข = ๐ −๐ −1 2 4 ๐ + 1 4 + ๐ 2 sin(2๐) ๐2 − ๐ 2 ๐(๐ผ) ๐๐ผ ๐ − 2๐๐ cos(๐ − ๐ผ) + ๐ 2 ๐ = 1, 2, 3, . . ., ๐ฆ๐ = cos (2๐−1)๐ ๐ฅ 2 5.1.102: a) ๐(๐ฅ) = 1, ๐(๐ฅ) = 0, ๐(๐ฅ) = ๐ฅ1 , ๐ผ1 = 1, ๐ผ2 = 0, ๐ฝ 1 = 1, ๐ฝ 2 = 0. The problem is not regular. b) ๐(๐ฅ) = 1 + ๐ฅ 2 , ๐(๐ฅ) = ๐ฅ 2 , ๐(๐ฅ) = 1, ๐ผ1 = 1, ๐ผ2 = 0, ๐ฝ1 = 1, ๐ฝ 2 = 1. The problem is regular. 5.2.101: ๐ฆ(๐ฅ, ๐ก) = sin(๐๐ฅ) cos(2๐2 ๐ก) 5.2.102: 9๐ฆ ๐ฅ๐ฅ๐ฅ๐ฅ + ๐ฆ๐ก๐ก = 0 (0 < ๐ฅ < 10, ๐ก > 0), ๐ฆ(0, ๐ก) = ๐ฆ ๐ฅ (0, ๐ก) = 0, ๐ฆ ๐ฅ (10, ๐ก) = 0, ๐ฆ(๐ฅ, 0) = sin(๐๐ฅ), ๐ฆ๐ก (๐ฅ, 0) = ๐ฅ(10 − ๐ฅ). ๐ฆ(10, ๐ก) = 455 SOLUTIONS TO SELECTED EXERCISES 5.3.101: ∞ Í ๐ฆ ๐ (๐ฅ, ๐ก) = ๐=1 ๐ odd −4 ๐ 4 ๐4 cos(๐๐)−1 sin(๐๐) cos(๐๐๐ฅ) − sin(๐๐๐ฅ) − 1 cos(๐๐๐ก). 5.3.102: Approximately 1991 centimeters 6.1.101: 8 ๐ 3 8 ๐ 2 + + 4 ๐ 6.1.102: 2๐ก 2 − 2๐ก + 1 − ๐ −2๐ก 6.1.103: 1 (๐ +1)2 6.1.104: 1 ๐ 2 +2๐ +2 6.2.101: ๐ (๐ก) = (๐ก − 1) ๐ข(๐ก − 1) − ๐ข(๐ก − 2) + ๐ข(๐ก − 2) 6.2.102: ๐ฅ(๐ก) = (2๐ ๐ก−1 − ๐ก 2 − 1)๐ข(๐ก − 1) − 12 ๐ −๐ก + 32 ๐ ๐ก 6.2.103: ๐ป(๐ ) = 6.3.101: 1 2 (cos ๐ก 1 ๐ +1 + sin ๐ก − ๐ −๐ก ) 6.3.102: 5๐ก − 5 sin ๐ก 6.3.103: 6.3.104: 1 2 (sin ๐ก − ๐ก cos ๐ก) ∫๐ก ๐ (๐) 1 − cos(๐ก 0 − ๐) ๐๐ 6.4.101: ๐ฅ(๐ก) = ๐ก 6.4.102: ๐ฅ(๐ก) = ๐ −๐๐ก 6.4.103: ๐ฅ(๐ก) = (cos ∗ sin)(๐ก) = 21 ๐ก sin(๐ก) 6.4.104: ๐ฟ(๐ก) − sin(๐ก) 6.4.105: 3๐ฟ(๐ก − 1) + 2๐ก 6.5.101: ๐ฆ = (๐ฅ − ๐ก)๐ข(๐ก − ๐ฅ) + ๐ก 6.5.102: ๐ฆ = ๐ −๐๐ฅ sin(๐ก − ๐ฅ)๐ข(๐ก − ๐ฅ) 6.5.103: ๐ 2๐(๐ฅ) − ๐ (1 − ๐ฅ 2 ) + 3๐ 00(๐ฅ) + ๐(๐ฅ) = 6.5.104: ๐ฆ = ๐ก๐ฅ 2 + ๐ฅ ๐ + 1 , ๐ 2 ๐(−1) = 0, ๐(1) = 0. ๐ก3 3 7.1.101: Yes. Radius of convergence is 10. 7.1.102: Yes. Radius of convergence is ๐. 7.1.103: 1 1−๐ฅ 7.1.104: ∞ Í 7.1.105: ๐=7 1 = − 1−(2−๐ฅ) so 1 1−๐ฅ = ∞ Í ๐=0 (−1)๐+1 (๐ฅ − 2)๐ , which converges for 1 < ๐ฅ < 3. 1 ๐ฅ๐ (๐−7)! ๐ (๐ฅ) − ๐(๐ฅ) is a polynomial. Hint: Use Taylor series. ๐−5 7.2.101: ๐2 = 0, ๐ 3 = 0, ๐4 = 0, recurrence relation (for ๐ ≥ 5): ๐ ๐ = −2๐ , so: ๐(๐−1) ๐0 5 ๐ 0 10 ๐0 ๐1 6 ๐1 11 ๐1 15 16 ๐ฆ(๐ฅ) = ๐ 0 + ๐ 1 ๐ฅ − 10 ๐ฅ − 15 ๐ฅ + 450 ๐ฅ + 825 ๐ฅ − 47250 ๐ฅ − 99000 ๐ฅ + · · · 456 SOLUTIONS TO SELECTED EXERCISES ๐ ๐−3 +1 , so ๐(๐−1) ๐ +1 ๐ +2 ๐ +1 3 5 5 8 ๐ 0 +3 9 ๐ 1 +3 10 ๐ฆ(๐ฅ) = ๐ 0 + ๐ 1 ๐ฅ + 12 ๐ฅ 2 + 06 ๐ฅ 3 + 112 ๐ฅ 4 + 40 ๐ฅ + 030 ๐ฅ 6 + ๐142+2 ๐ฅ 7 + 112 ๐ฅ + 72 ๐ฅ + 90 ๐ฅ + · · · 1 3 1 4 3 5 1 6 1 7 5 8 1 9 1 10 1 2 ๐ฅ +··· b) ๐ฆ(๐ฅ) = 2 ๐ฅ + 6 ๐ฅ + 12 ๐ฅ + 40 ๐ฅ + 15 ๐ฅ + 21 ๐ฅ + 112 ๐ฅ + 24 ๐ฅ + 30 7.2.102: a) ๐ 2 = 12 , and for ๐ ≥ 1 we have ๐ ๐ = 7.2.103: Applying the method of this section directly we obtain ๐ ๐ = 0 for all ๐ and so ๐ฆ(๐ฅ) = 0 is the only solution we find. 7.3.101: a) ordinary, b) singular but not regular singular, c) regular singular, d) regular singular, e) ordinary. √ 1+ 5 2 + ๐ต๐ฅ √ 1− 5 2 7.3.102: ๐ฆ = ๐ด๐ฅ 7.3.103: ๐ฆ = ๐ฅ 3/2 7.3.104: ๐ฆ = ๐ด๐ฅ + ๐ต๐ฅ ln(๐ฅ) ∞ Í ๐=0 (−1)−1 ๐ ๐ฅ ๐! (๐+2)! (Note that for convenience we did not pick ๐0 = 1.) 8.1.101: a) Critical points (0, 0) and (0, 1). At (0, 0) using ๐ข = ๐ฅ, ๐ฃ = ๐ฆ the linearization is ๐ข 0 = −2๐ข − (1/๐)๐ฃ, ๐ฃ 0 = −๐ฃ. At (0, 1) using ๐ข = ๐ฅ, ๐ฃ = ๐ฆ − 1 the linearization is ๐ข 0 = −2๐ข + (1/๐)๐ฃ, ๐ฃ 0 = ๐ฃ. b) Critical point (0, 0). Using ๐ข = ๐ฅ, ๐ฃ = ๐ฆ the linearization is ๐ข 0 = ๐ข + ๐ฃ, ๐ฃ 0 = ๐ข. c) Critical point (1/2, −1/4). Using ๐ข = ๐ฅ − 1/2, ๐ฃ = ๐ฆ + 1/4 the linearization is ๐ข 0 = −๐ข + ๐ฃ, ๐ฃ 0 = ๐ข + ๐ฃ. 8.1.102: 1) is c), 2) is a), 3) is b) 8.1.103: Critical points are (0, 0, 0), and (−1, 1, −1). The linearization at the origin using variables ๐ข = ๐ฅ, ๐ฃ = ๐ฆ, ๐ค = ๐ง is ๐ข 0 = ๐ข, ๐ฃ 0 = −๐ฃ, ๐ง 0 = ๐ค. The linearization at the point (−1, 1, −1) using variables ๐ข = ๐ฅ + 1, ๐ฃ = ๐ฆ − 1, ๐ค = ๐ง + 1 is ๐ข 0 = ๐ข − 2๐ค, ๐ฃ 0 = −๐ฃ − 2๐ค, ๐ค 0 = ๐ค − 2๐ข. 8.1.104: ๐ข 0 = ๐ (๐ข, ๐ฃ, ๐ค), ๐ฃ 0 = ๐(๐ข, ๐ฃ, ๐ค), ๐ค 0 = 1. 8.2.101: a) (0, 0): saddle (unstable), (1, 0): source (unstable), b) (0, 0): spiral sink (asymptotically stable), (0, 1): saddle (unstable), c) (1, 0): saddle (unstable), (0, 1): source (unstable) 8.2.102: a) 12 ๐ฆ 2 + 13 ๐ฅ 3 − 4๐ฅ = ๐ถ, critical points: (−2, 0), an unstable saddle, and (2, 0), a stable center. b) 12 ๐ฆ 2 + ๐ ๐ฅ = ๐ถ, no critical points. c) 12 ๐ฆ 2 + ๐ฅ๐ ๐ฅ = ๐ถ, critical point at (−1, 0) is a stable center. p 8.2.103: Critical point at (0, 0). Trajectories are ๐ฆ = ± 2๐ถ − (1/2)๐ฅ 4 , for ๐ถ > 0, these give closed curves around the origin, so the critical point is a stable center. 8.2.104: A critical point ๐ฅ0 is stable if ๐ 0(๐ฅ0 ) < 0 and unstable when ๐ 0(๐ฅ0 ) > 0. 8.3.101: a) Critical points are ๐ = 0, ๐ = ๐๐ for any integer ๐. When ๐ is odd, we have a saddle point. When ๐ is even we get a sink. b) The findings mean the pendulum will simply go to one of the sinks, for example (0, 0) and it will not swing back and forth. The friction is too high for it to oscillate, just like an overdamped mass-spring system. 8.3.102: ๐ a) Solving for the critical points we get (0, − โ/๐) and ( ๐ โ+๐๐ ๐๐ , ๐ ). The Jacobian matrix at (0, − โ/๐) is h ๐+๐ โ/๐ 0 −๐ โ/๐ −๐ i whose eigenvalues are ๐ + ๐ โ/๐ and −๐. The eigenvalues 457 SOLUTIONS TO SELECTED EXERCISES are real of opposite signs and we get a saddle. (In the application, however, we are only ๐ looking at the positive quadrant so this critical point is irrelevant.) At ( ๐ โ+๐๐ ๐๐ , ๐ ) we get Jacobian matrix is ( 550 3 , 40) ๐(๐ โ+๐๐) ๐๐ ๐ โ+๐๐ ๐ −๐ 0 − ๐๐ ๐ the matrix is h . b) For the specific numbers given, the second critical point 0 −11/6 3/25 1/4 i , which has eigenvalues √ 5±๐ 327 . 40 Therefore there is a spiral source; the solution spirals outwards. The solution eventually hits one of the axes, ๐ฅ = 0 or ๐ฆ = 0, so something will die out in the forest. 8.3.103: The critical points are on the line ๐ฅ = 0. In the positive quadrant the ๐ฆ 0 is always positive and so the fox population always grows. The constant of motion is ๐ถ = ๐ฆ ๐ ๐ −๐๐ฅ−๐ ๐ฆ , for any ๐ถ this curve must hit the ๐ฆ-axis (why?), so the trajectory will simply approach a point on the ๐ฆ axis somewhere and the number of hares will go to zero. 8.4.101: Use Bendixson–Dulac Theorem. a) ๐๐ฅ + ๐ ๐ฆ = 1 + 1 > 0, so no closed trajectories. b) ๐๐ฅ + ๐ ๐ฆ = − sin2 (๐ฆ) + 0 < 0 for all ๐ฅ, ๐ฆ except the lines given by ๐ฆ = ๐๐ (where we get zero), so no closed trajectories. c) ๐๐ฅ + ๐ ๐ฆ = ๐ฆ + 0 > 0 for all ๐ฅ, ๐ฆ except the line given by ๐ฆ = 0 (where we get zero), so no closed trajectories. 8.4.102: Using Poincaré–Bendixson Theorem, the system has a limit cycle, which is the unit circle centered at the origin, as ๐ฅ = cos(๐ก) + ๐ −๐ก , ๐ฆ = sin(๐ก) + ๐ −๐ก gets closer and closer to the unit circle. Thus ๐ฅ = cos(๐ก), ๐ฆ = sin(๐ก) is the periodic solution. 8.4.103: ๐ (๐ฅ, ๐ฆ) = ๐ฆ, ๐(๐ฅ, ๐ฆ) = ๐(1 − ๐ฅ 2 )๐ฆ − ๐ฅ. So ๐๐ฅ + ๐ ๐ฆ = ๐(1 − ๐ฅ 2 ). The Bendixson–Dulac Theorem says there is no closed trajectory lying entirely in the set ๐ฅ 2 < 1. 8.4.104: The closed trajectories are those where sin(๐) = 0, therefore, all the circles centered at the origin with radius that is a multiple of ๐ are closed trajectories. √ √ √ √ 8.5.101: Critical points: (0, 0, 0), (3 8, 3 8, 27), (−3 8, −3 8, 27). Linearization at (0, 0, 0) 0 using 10๐ฃ, ๐ฃ 0 = 28๐ข − ๐ฃ, ๐ค 0 = −(8/3)๐ค. Linearization √ ๐ข√= ๐ฅ, ๐ฃ = ๐ฆ, ๐ค = ๐ง is ๐ข√ = −10๐ข + √ √ at 0 = −10๐ข+10๐ฃ, ๐ฃ 0 = ๐ข−๐ฃ−3 8๐ค, (3 8, 3√ 8, 27)√using ๐ข = ๐ฅ−3 8, ๐ฃ = ๐ฆ−3 8, ๐ค√= ๐ง−27 is ๐ข √ √ √ ๐ค 0 = 3 8๐ข +3 8๐ฃ −(8/3)๐ค. Linearization at (−3 √ 8, −3 8, 27) √ using ๐ข√ = ๐ฅ +3 8, ๐ฃ = ๐ฆ +3 8, ๐ค = ๐ง − 27 is ๐ข 0 = −10๐ข + 10๐ฃ, ๐ฃ 0 = ๐ข − ๐ฃ + 3 8๐ค, ๐ค 0 = −3 8๐ข − 3 8๐ฃ − (8/3)๐ค. √ √ A.1.101: a) 10 b) 14 c) 3 " −1 # √ 2 √1 2 A.1.102: a) 9 A.1.103: a) −2 A.1.104: a) 20 ๏ฃฎ √1 ๏ฃน ๏ฃฏ 6๏ฃบ ๏ฃฏ −1 ๏ฃบ b) ๏ฃฏ √6 ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฏ√ ๏ฃบ ๏ฃฐ 6๏ฃป −3 b) 3 b) 10 A.1.105: a) (3, −1) 7 4 4 A.2.101: a) 2 3 4 √2 , √−5 , √2 33 33 33 5 c) −3 c) (−1, −1) ๏ฃฎ 5 −3 0๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ 13 10 6๏ฃบ๏ฃบ ๏ฃฏ−1 3 1๏ฃบ ๏ฃฐ ๏ฃป −4 d) 8 c) 20 b) (4, 0) c) 3 e) 7 −8 f) 3 458 SOLUTIONS TO SELECTED EXERCISES −1 13 A.2.102: a) 9 14 22 31 A.2.103: a) 42 44 A.2.104: a) 1/2 A.2.105: a) 2 −5 b) 5 5 ๏ฃฎ18 18 12 ๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ 6 0 8 ๏ฃบ๏ฃบ ๏ฃฏ34 48 −2๏ฃบ ๏ฃฐ ๏ฃป −5 2 c) 3 −1 0 1 b) 1 0 0 0 1/3 1 0 1 A.3.101: a) 0 1 0 ๏ฃฎ1 0 −1/2 0 ๏ฃน ๏ฃฏ ๏ฃบ f) ๏ฃฏ๏ฃฏ0 1 1/2 1/2๏ฃบ๏ฃบ ๏ฃฏ0 0 0 0 ๏ฃบ๏ฃป ๏ฃฐ ๏ฃฎ0 −1 ๏ฃฏ A.3.102: a) ๏ฃฏ๏ฃฏ1 0 ๏ฃฏ0 0 ๏ฃฐ ๏ฃฎ1/4 ๏ฃฏ b) ๏ฃฏ๏ฃฏ 0 ๏ฃฏ0 ๏ฃฐ 1/2 −1 A.3.104: a) 3 A.3.105: a) 3 b) 1 0 0 ๏ฃน๏ฃบ 1/5 0 ๏ฃบ๏ฃบ 0 −1๏ฃบ๏ฃป 1 0 b) 0 1 0๏ฃน๏ฃบ 0๏ฃบ๏ฃบ 1๏ฃบ๏ฃป ๏ฃฎ 11 12 36 ๏ฃฏ c) ๏ฃฏ๏ฃฏ−2 4 5 ๏ฃฏ 13 38 20 ๏ฃฐ d) ๏ฃฎ−1 ๏ฃฏ ๏ฃฏ0 c) ๏ฃฏ๏ฃฏ ๏ฃฏ0 ๏ฃฏ0 ๏ฃฐ 1 1 c) 0 0 0 0 0 0 g) 0 0 0 0 h) −3 b) 1 −1/4 −1/2 1/2 0 1/2 0 0 ๏ฃฎ−2 −12๏ฃน ๏ฃฏ ๏ฃบ 24 ๏ฃบ๏ฃบ d) ๏ฃฏ๏ฃฏ 3 ๏ฃฏ1 9 ๏ฃบ๏ฃป ๏ฃฐ 14 ๏ฃน๏ฃบ −2๏ฃบ๏ฃบ 28 ๏ฃบ๏ฃป 1/2 0 0 ๏ฃน๏ฃบ 0 0 ๏ฃบ๏ฃบ 1/3 0 ๏ฃบ ๏ฃบ 0 10๏ฃบ๏ฃป ๏ฃฎ1 0 0 ๏ฃน๏ฃบ ๏ฃฏ d) ๏ฃฏ๏ฃฏ0 1 −1/3๏ฃบ๏ฃบ ๏ฃฏ0 0 0 ๏ฃบ๏ฃป ๏ฃฐ ๏ฃฎ1 0 0 77/15 ๏ฃน ๏ฃฏ ๏ฃบ e) ๏ฃฏ๏ฃฏ0 1 0 −2/15๏ฃบ๏ฃบ ๏ฃฏ0 0 1 −8/5 ๏ฃบ ๏ฃฐ ๏ฃป 1 2 3 0 0 0 0 1 ๏ฃฎ 5/2 ๏ฃฏ c) ๏ฃฏ๏ฃฏ−1 ๏ฃฏ−1 ๏ฃฐ ๏ฃฎ0 0 1 ๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ0 1 −1๏ฃบ๏ฃบ ๏ฃฏ1 −1 0 ๏ฃบ ๏ฃฐ ๏ฃป A.3.103: a) ๐ฅ1 = −2, ๐ฅ2 = 7/3 ๐ฅ1 = −1 + 3๐ฅ 3 , ๐ฅ 2 = 2 − ๐ฅ3 1 −3๏ฃน๏ฃบ −1/2 3/2 ๏ฃบ ๏ฃบ 0 1 ๏ฃบ๏ฃป c) ๐ = −3, ๐ = 10, ๐ = −8 b) no solution d) ๐ฅ3 is free, c) 2 A.3.106: a) 1 0 0 , 0 1 0 , 0 0 1 ๏ฃฎ7๏ฃน ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ A.3.107: a) ๏ฃฏ๏ฃฏ7๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ 7 ๏ฃบ๏ฃบ , ๏ฃฏ7๏ฃบ ๏ฃฏ 6 ๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ3๏ฃน ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ A.3.108: ๏ฃฏ๏ฃฏ 1 ๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ 3 ๏ฃบ๏ฃบ ๏ฃฏ−5๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ7๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ6๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป A.4.101: 1 1 a) , dimension 2, 2 1 sion 3, ๏ฃฎ2๏ฃน ๏ฃฎ2๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ2๏ฃบ๏ฃบ dimension 2, ๏ฃฏ4๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ6๏ฃบ๏ฃบ , ๏ฃฏ4๏ฃบ ๏ฃฐ ๏ฃป b) 1 1 1 c) 1 0 1/3 , 0 1 −1/3 ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ7๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฎ1๏ฃน ๏ฃฎ5๏ฃน ๏ฃฎ 5 ๏ฃน ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ dimension 2, c) ๏ฃฏ๏ฃฏ3๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ−1๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ 3 ๏ฃบ๏ฃบ dimen๏ฃฏ1๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ 5 ๏ฃบ ๏ฃฏ−4๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป ๏ฃฎ1๏ฃน ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ ๏ฃบ 1 e) dimension 1, f) ๏ฃฏ๏ฃฏ0๏ฃบ๏ฃบ , ๏ฃฏ๏ฃฏ1๏ฃบ๏ฃบ dimension 2 1 ๏ฃฏ0๏ฃบ ๏ฃฏ2๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฐ ๏ฃป 459 SOLUTIONS TO SELECTED EXERCISES ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ A.4.102: a) ๏ฃฏ๏ฃฏ ๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ3๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ3๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ b) ๏ฃฏ๏ฃฏ−1๏ฃบ๏ฃบ ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป A.4.103: a) 3 b) 2 c) 3 d) 2 A.5.101: ๐ = −2 A.5.102: ๐ ≈ 0.3876 A.5.103: a) -15 b) -1 c) 28 A.5.104: a) (−1/2, 0, 21 ) b) (0, 0, 0) ๏ฃฎ1๏ฃน ๏ฃฏ ๏ฃบ c) ๏ฃฏ๏ฃฏ 1 ๏ฃบ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ−1๏ฃน ๏ฃฏ ๏ฃบ d) ๏ฃฏ๏ฃฏ 0 ๏ฃบ๏ฃบ , ๏ฃฏ0๏ฃบ ๏ฃฐ ๏ฃป ๏ฃฎ0๏ฃน ๏ฃฏ ๏ฃบ ๏ฃฏ1๏ฃบ ๏ฃฏ ๏ฃบ ๏ฃฏ−1๏ฃบ ๏ฃฐ ๏ฃป e) 3 c) (2, 0, −2) A.5.105: a) (1, 1, −1) − (2, −1, 1) + 2(1, −5, 3) b) 2(2, −1, 1) + (1, −5, 3) 2(2, −1, 1) + 2(1, −5, 3) A.5.106: (2, −1, 1), (2/3 , 8/3 , 4/3) A.5.107: (1, 1, −1), (0, 1, 1), (4/3, −2/3, 2/3) A.6.101: a) −2 b) 8 c) 0 d) −6 e) −3 f) 28 g) 16 h) −24 A.6.102: a) 3 b) 9 A.6.103: 12 A.6.104: 1 and 3 c) 3 d) 1/4 c) 2(1, 1, −1) − 460 SOLUTIONS TO SELECTED EXERCISES Index absolute convergence, 328 acceleration, 24 adding vectors, 387 addition of matrices, 127 Airy’s equation, 336 algebraic multiplicity, 162 almost linear, 357 amplitude, 98 analytic functions, 330 angular frequency, 98 ansatz, 84 antiderivative, 21 antidifferentiate, 22 associated homogeneous equation, 104, 138 associative law, 400 asymptotically stable, 358 asymptotically stable limit cycle, 374 atan, 99 atan2, 99 attractor, 381 augmented matrix, 132, 408 autonomous, 19 autonomous equation, 51 autonomous system, 124 backsubstitution, 411 basis, 391, 421 beating, 112 Bendixson–Dulac Theorem, 375 Bernoulli equation, 47 Bessel function of second kind, 348 Bessel function of the first kind, 348 Bessel’s equation, 347 boundary conditions for a PDE, 232 boundary value problem, 189 Burger’s equation, 18 cartesian plane, 386 catenary, 14 Cauchy–Euler equation, 82, 89 center, 149, 359 cgs units, 291, 292 chaotic systems, 378 characteristic coordinates, 72, 253 characteristic equation, 85 characteristics, 72 Chebyshev’s equation of order ๐, 340 Chebyshev’s equation of order 1, 83 clamped end of beam, 284 closed curves, 362 closed trajectory, 373 coefficients, 18 cofactor, 130, 438 cofactor expansion, 130, 437 column space, 416 column vector, 127, 387 commute, 129 complementary solution, 104 complete eigenvalue, 162 complex conjugate, 143 complex number, 86 complex roots, 87 conservative equation, 361 conservative vector field, 64 consistent, 412 constant coefficient, 19, 84, 137 constant of motion, 370 convection, 73 convection equation, 320 convergence of a power series, 328 convergent power series, 328 converges absolutely, 328 461 462 convolution, 308 corresponding eigenfunction, 190 cosine series, 220 critical point, 51, 353 critically damped, 101 INDEX elementary row operations, 408 elimination, 407 ellipses (vector field), 149 elliptic PDE, 232 endpoint problem, 189 entry of a matrix, 127, 390 d’Alembert solution to the wave equation, envelope curves, 101 252 equilibrium, 353 damped, 99 equilibrium solution, 51, 353 damped motion, 96 euclidean space, 386 damped nonlinear pendulum equation, 371 Euler’s equation, 82 defect, 163 Euler’s formula, 87 defective eigenvalue, 163 Euler’s method, 57 deficient matrix, 163 Euler–Bernoulli equation, 317 delta function, 314 even function, 202, 218 dependent variable, 10 even periodic extension, 218 determinant, 129, 436 exact equation, 63 diagonal matrix, 153, 403 existence and uniqueness, 30, 80, 90 matrix exponential of, 170 existence and uniqueness for systems, 125 diagonalization, 171 exponential growth, 17 differential equation, 10 exponential growth model, 12 Dirac delta function, 314 exponential of a matrix, 169 direction, 386, 389 exponential order, 296 direction field, 124 extend periodically, 198 Dirichlet boundary conditions, 221, 273 first order differential equation, 10 Dirichlet problem, 259 first order linear equation, 40 displacement vector, 153 first order linear system of ODEs, 136 distance, 24 first order method, 58 distributive law, 400 first order system, 119 divergent power series, 328 first shifting property, 298 dot product, 128, 199, 398 fixed end of beam, 284 Duffing equation, 379 forced motion, 96 dynamic damping, 161 systems, 159 echelon form, 409 four fundamental equations, 13 eigenfunction, 190, 274 Fourier series, 200 eigenfunction decomposition, 273, 278 fourth order method, 60 eigenvalue, 140, 274 Fredholm alternative, 425 eigenvalue of a boundary value problem, 190 simple case, 194 eigenvector, 140 Sturm–Liouville problems, 278 eigenvector decomposition, 179, 186 free end of beam, 284 element of a matrix, 127, 390 free motion, 96 elementary operations, 408 free variable, 133, 412 463 INDEX frequency, 98 Frobenius method, 345 Frobenius-type solution, 345 fundamental frequency, 205, 248 fundamental matrix, 137 fundamental matrix solution, 137, 170 Gauss–Jordan elimination, 409 Gaussian elimination, 409 general solution, 13 general solution to a system, 120 generalized eigenvectors, 163, 166 generalized function, 314 Genius software, 9 geometric multiplicity, 162 geometric series, 270, 333 Gibbs phenomenon, 205 Gram–Schmidt process, 433 half period, 208 Hamiltonian, 361 harmonic conjugate, 71 harmonic function, 71, 258 harvesting, 53 heat equation, 17, 232 Heaviside function, 294 Hermite’s equation of order ๐, 339 Hermite’s equation of order 2, 83 hinged end of beam, 284 homogeneous, 19 homogeneous equation, 48 homogeneous linear equation, 79 homogeneous matrix equation, 413 homogeneous side conditions, 233 homogeneous system, 137 Hooke’s law, 96, 152 hyperbolic cosine, 14 hyperbolic PDE, 232 hyperbolic sine, 14 identity matrix, 128, 400 ill-posed, 323 imaginary part, 87 implicit solution, 35 Improved Euler’s method, 62 impulse response, 313, 315 inconsistent, 412 inconsistent system, 133 indefinite integral, 21 independent variable, 10 indicial equation, 344 inhomogeneous, 19 initial condition, 13 initial condition for a PDE, 72 initial condition for a system, 120 initial conditions for a PDE, 232 inner product, 128, 398, 428 inner product of functions, 200, 277 integral equation, 305, 310 integrate, 22 integrating factor, 40 integrating factor method, 40 for systems, 177 inverse Laplace transform, 297 invertible matrix, 129, 401 IODE software, 9 isolated critical point, 357 Jacobian matrix, 354 kernel, 413 la vie, 106 Laplace equation, 232, 258 Laplace transform, 293 Laplacian, 258 Laplacian in polar coordinates, 265 leading entry, 133, 409 Leibniz notation, 23, 33 limit cycle, 373 linear combination, 80, 90, 391, 413 linear equation, 18, 40, 79 linear first order system, 120 linear mapping, 390 linear operator, 80, 104 linear PDE, 232 464 linear systems, 120 linearity of the Laplace transform, 295 linearization, 354 linearly dependent, 90, 414 linearly independent, 81, 90, 414 for vector-valued functions, 137 logistic equation, 51 with harvesting, 53 Lorenz attractor, 383 Lorenz system, 382 Lotka–Volterra, 368 lower triangular, 438 magnitude, 387 mass matrix, 153 mathematical model, 12 mathematical solution, 12 matrix, 127, 390 matrix exponential, 169 matrix inverse, 129, 401 matrix product, 399 matrix-valued function, 136 Maxwell’s equations, 17 mechanical vibrations, 17 method of characteristics, 72 Method of Frobenius, 345 method of partial fractions, 297 Mixed boundary conditions, 273 mks units, 99, 102, 227 multiplication of complex numbers, 86 multiplicity, 93 multiplicity of an eigenvalue, 162 ๐-dimensional space, 386 natural (angular) frequency, 98 natural frequency, 111, 155 natural mode of oscillation, 155 Neumann boundary conditions, 222, 273 Newton’s law of cooling, 17, 36, 44, 51 Newton’s second law, 96, 97, 122, 152 nilpotent, 171 nonhomogeneous, 19 nonlinear equation, 18 INDEX normal mode of oscillation, 155 nullity, 423 nullspace, 413 odd function, 201, 218 odd periodic extension, 218 ODE, 11, 17 one-dimensional heat equation, 232 one-dimensional wave equation, 243 operator, 80, 390 order, 18 ordinary differential equation, 11 Ordinary differential equations, 17 ordinary point, 335 orthogonal, 429 functions, 193, 200 vectors, 198 with respect to a weight, 276 orthogonal basis, 431 orthogonal projection, 430 orthogonality, 193 orthonormal basis, 431 overdamped, 100 overtones, 205, 248 parabolic PDE, 232 parallelogram, 130, 436 partial differential equation, 11, 232 Partial differential equations, 17 partial sum, 327 particular solution, 13, 104 PDE, 11, 17, 232 period, 98 periodic, 198 periodic extension, 198 periodic orbit, 374 phase diagram, 52, 352 phase plane portrait, 124 phase portrait, 52, 124, 352 phase shift, 98 Picard’s theorem, 30, 125 piecewise continuous, 211 piecewise smooth, 211 INDEX pivot, 409 Poincaré section, 380 Poincaré–Bendixson Theorem, 374 Poisson kernel, 269 potential function, 63 power series, 327 practical resonance, 115, 231 practical resonance amplitude, 115 practical resonance frequency, 115 predator-prey, 368 product of matrices, 128, 399 projection, 200 orthogonal, 430 proper rational function, 298 pseudo-frequency, 102 pure resonance, 113, 229 quadratic formula, 85 radius of convergence, 328 rank, 415 ratio test for series, 329 real part, 87 real-world problem, 12 recurrence relation, 336 reduced row echelon form, 133, 409 reduction of order method, 81 regular singular point, 345 regular Sturm–Liouville problem, 275 reindexing the series, 332 relaxation oscillation, 373 repeated roots, 92 resonance, 113, 160, 229, 310 RLC circuit, 96 Robin boundary conditions, 273 root test for series, 329 row echelon form, 409 row reduction, 409 row space, 416 row vector, 127, 391 Runge–Kutta method, 61 saddle point, 148 465 sawtooth, 201 scalar, 127, 388 scalar multiplication, 127 scale a vector, 388 second order differential equation, 14 second order linear differential equation, 79 second order method, 58 second order system, 119 second shifting property, 302 semistable critical point, 53 separable, 33 separation of variables, 234 shifting property, 298, 302 side conditions for a PDE, 232 Sierpinski triangle, 384 simple harmonic motion, 98 simply connected region, 375 sine series, 220 singular matrix, 129, 401 singular point, 335 singular solution, 35 sink, 147 slope field, 27 solution, 10 solution curve, 124 solution to a system, 120 source, 147 span, 415 spectrum, 205, 248 spiral sink, 149 spiral source, 149 square matrix, 391 square wave, 116, 203 stable center, 359 stable critical point, 51, 357 stable node, 147 standard basis vectors, 391 standard inner product, 428 steady periodic solution, 114, 226 steady state temperature, 241, 258 stiff problem, 61 stiffness matrix, 153 466 strange attractor, 380 Sturm–Liouville problem, 274 regular, 275 subspace, 421 subtracting vectors, 388 superposition, 79, 90, 137, 233 symmetric matrix, 193, 198, 404 system of differential equations, 17, 119 Taylor series, 330 tedious, 106, 108, 114, 182, 269, 378 thermal conductivity, 232 three mass system, 152 three-point beam bending, 317 timbre, 248, 284 total derivative, 63 trajectory, 124 transfer function, 304 transformation, 390 transient solution, 114 transport equation, 17, 72, 320 transpose, 128, 404 trigonometric series, 200 undamped, 98 undamped motion, 96 systems, 152 underdamped, 101 undetermined coefficients, 105 for second order systems, 159, 185 for systems, 182 unforced motion, 96 unit step function, 294 unit vector, 389 unstable critical point, 51, 357 unstable node, 147 upper triangular, 438 upper triangular matrix, 164 Van der Pol oscillator, 373 variation of parameters, 107 for systems, 184 vector, 127, 386 INDEX vector field, 64, 124, 352 vector-valued function, 136, 389 velocity, 24 Volterra integral equation, 310 wave equation, 232, 243, 252 wave equation in 2 dimensions, 17 wavefronts, 256 weight function, 276