%% 1. Introduction % % \setcounter{page}{1} % What if all you had to do to solve an ODE were just to write it % down?\footnote{ODE stands for {\em ordinary differential equation}, % as the reader presumably knows already.} % That is the line we will follow in this book. % Our emphasis is % not just on the mathematics of ODE\kern .5pt s, but on how the solutions behave. % Do they blow up, decay, oscillate? Are there rapid transitions % where they flip from one state to another? % Does the behavior change if % a coefficient is perturbed or a new term is added? % And how can such variety be deployed to explain % the world around us? % We shall not just talk about these matters but explore them in action. % %% % % ODE\kern .5pt s are among the core topics of mathematics, % with applications so ubiquitous that % listing examples almost seems inappropriate. % (Heat conduction, chemical reactions, % chaos, population dynamics, deformations % of a beam, radioactivity, bifurcation theory, stability % theory, differential geometry, quantum mechanics, economics, finance, % infectious diseases, nerve signals, vibrations, optics, % waves, dynamics of networks, special functions, ballistics, planetary % dynamics$,\dots.$)\ \ ODE\kern .5pt s are everywhere. % %% % % To solve ODE\kern .5pt s by writing them down, we will use Chebfun, an open-source % Matlab package that is freely % available at {\tt www.chebfun.org}. % In Matlab, you type \verb|x = A\b| to solve the system % of equations ${\bf A}{\bf x}={\bf b}$, % where ${\bf A}$ is a matrix and ${\bf x}$ and ${\bf b}$ are vectors. % In Chebfun, analogously, you type \verb|y = L\f| to solve % the ODE $Ly=f$, where $L$ is a linear or nonlinear % differential operator with initial or % boundary conditions and $y$ and $f$ are functions. % We will obtain solutions this way on nearly every page, % presenting them with hundreds of computer-generated plots % without discussing the algorithms Chebfun uses % to make this possible.\footnote{To % learn about Chebfun and its ODE algorithms, see % Appendix~A and {\tt www.chebfun.org.}}\ \ This % is not a book about numerical analysis or computer science. % It is a book about ODE\kern .5pt s. % %% % % Many textbooks on ODE\kern .5pt s concentrate on linear problems, % because nonlinear ones are rarely analytically solvable. % Here, with analytical solutions playing a lesser role, we % will be able to give a more balanced treatment and fully appreciate % the remarkable effects that come with nonlinearity. % %% % % Let's get started with the most basic % {\bf initial value problem (IVP)}\footnote{Throughout this % book, some terms are set in italics, while other % particularly important ones are set in bold face. % To review a chapter, a good way to start is to read the items in % italics and bold face and also the chapter summary at the end. Almost all % emphasized terms can be found in the index.}, % $$y'+ y = 0, \quad t\in [\kern .3pt 0,3], \quad y(0) = 1. \eqno (1.1)$$ % We have written this in the standard notation of this book, with % $t$ as the independent variable, $y$ the dependent variable, % and $y' = dy/dt$.\footnote{For boundary value problems, which are % usually associated with space instead of time, we will % change $t$ to $x$. Some books also make a distinction between % $y'$ for a space derivative and $\dot y$ for a time derivative, % but we shall not do this.} % Note that although $y$ and $y'$ are functions of $t$, we usually % do not write them out fully as $y(t)$ and $y'(t)$. % You can quickly check that a solution to (1.1) % is the function $y(t)=\exp(-t)$, and moreover, it is % easily proved that this solution is unique (see Chapter 2). % To calculate it with Chebfun, we make a chebop'' that encodes the % differential operator of (1.1), which we call $L$. % First we prescribe the interval. % ODEformats, L = chebop(0,3); %% % % \noindent % Next we prescribe the differential operator $y \mapsto y' + y$, which is % written in the form of a Matlab anonymous function of $t$ and $y$, % with {\tt diff} denoting differentiation with respect to $t$. % L.op = @(t,y) diff(y) + y; %% % % \noindent % Finally we set the {\em initial condition} with \verb|L.lbc|, which % stands for left boundary condition.'' % L.lbc = 1; %% % % \noindent % (A boundary condition at the right would be specified with {\tt L.rbc.}) % We can now solve (1.1). % y = L\0; %% % % \noindent % As expected, the solution is $e^{-t}$.\footnote{Throughout % this book, the Chebfun code segments listed are sufficient to % reproduce the mathematical essence of each figure, but % Matlab formatting commands like {\tt title}, % {\tt axis}, and {\tt 'linewidth'} have been removed. Users % wanting to see formatting details can download the M-files for % each chapter of the book from {\tt www.chebfun.org}.} % plot(y,CO,ivp) title(['Fig.~1.1.~~The basic linear ODE (1.1): ' ... 'exponential decay'],FS,11) %% % \vskip 1.02em %% % The problem we % have just solved can be classified by the following properties. %% % % \parindent=0pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss F\hss}}}} {\bf First-order} (the highest-order derivative is $y'$) % \par\vskip 2pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss L\hss}}}} {\bf Linear} (there are no terms % like $y^2,$ $\exp(y)$, or $yy'$) % \par\vskip 2pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss A\hss}}}} {\bf Autonomous} (the equation, though % not the solution, is independent of $t\kern .5pt$) % \par\vskip 2pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss S\hss}}}} {\bf Scalar} (there is just one dependent variable $y$ rather % than $u,v,w,\dots$) % \par\vskip 2pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss H\hss}}}} {\bf Homogeneous} % (the right-hand side is % zero\footnote{When we say the right-hand side is zero,'' we really mean that % the equation contains no nonzero terms that do not involve $y$. % Of course it % doesn't matter mathematically whether a term appears on the % left or the right of an equation. For nonlinear ODE\kern .5pt s, the % property of homogeneity does not always have much meaning.}) % \par\vskip 2pt % \mbox{\hbox to 1.5em{\textsf{\textbf{\hss I\hss}}}} {\bf Initial-value problem} % (not a boundary-value or eigenvalue problem) % \vskip 1.02em % %% % % \noindent Note that these % letters spell the easily remembered word {\sf FLASH\kern .3pt I}.\ \ In this % book, we will use this word occasionally to encode some of the % properties of a problem. % If we state that a problem is, say, % of type {\sf Fl\kern .7pt aShi\kern .7pt}, that means that it is a first-order % scalar problem, since the letters {\sf F} and {\sf S} are capitalized. % On the other hand since {\sf l}, {\sf a}, {\sf h}, and {\sf i\kern .7pt} % are in lower case, % the problem is nonlinear, nonautonomous, inhomogeneous, and % a boundary-value or eigenvalue problem rather than an IVP.\ \ In % the chapters ahead, we will vary all of these properties and % explore in the process a great variety of phenomena. % The {\sf FLASH\kern .3pt I} classification will % help add structure to the discussion. % Sometimes one considers an ODE without specifying initial or % boundary conditions, and in this case the {\sf I} % drops away to give just {\sf FLASH}. % %% % % Here is a {\sf FLASH} classification of the theorems in this book. % %% % % \obeylines\parindent=0pt % \vskip .7em % {\em Linear, first-order, scalar} % \mbox{\hbox to .45in{\sf FLASH:}} Thm.~2.1 (separation of variables) % \mbox{\hbox to .45in{\sf FLASh:}} Thm.~2.4 (integrating factor) % \mbox{\hbox to .45in{\sf FLaSH:}} Thm.~2.2 (separation of variables) % \mbox{\hbox to .45in{\sf FLaSh:}} Thm.~2.3 (integrating factor), Thm.~19.1 (periodic) % %% % % \obeylines\parindent=0pt % \vskip .7em % {\em Nonlinear, first-order, scalar} % \mbox{\hbox to .45in{\sf FlASH:}} Thm.~3.2 (separation of variables) % \mbox{\hbox to .45in{\sf FlaSH:}} Thm.~3.1 (separation of variables) % \mbox{\hbox to .45in{\sf FlaSh:}} Thms.~11.1 and 11.3 (Picard iteration) % %% % % \obeylines\parindent=0pt % \vskip .7em % {\em Linear, first-order, system} % \mbox{\hbox to .45in{\sf FLAsH:}} Thm.~14.1 (matrix exponential) % \mbox{\hbox to .45in{\sf FLAsh:}} Thm.~14.2 (matrix exponential), Thm.~14.3 (variation of parameters) % \mbox{\hbox to .45in{\sf FLash:}} Thm.~19.2 (periodic) % %% % % \obeylines\parindent=0pt % \vskip .7em % {\em Nonlinear, first-order, system} % \mbox{\hbox to .45in{\sf FlAsH:}} Thm.~14.4 (linearization), Thm.~15.1 (stability) % \mbox{\hbox to .45in{\sf Flash:}} Thms.~11.2 and 11.3 (Picard iteration) % %% % % \obeylines\parindent=0pt % \vskip .7em % {\em Second-order} % \mbox{\hbox to .45in{\sf f\kern 1pt LASH:}} Thm.~4.1 (solution formula) % \mbox{\hbox to .45in{\sf f\kern 1pt LaSH:}} Thm.~7.1 (eigenproblems), Thm.~19.3 (Hill's eq.) % \mbox{\hbox to .45in{\sf f\kern 1pt lASH:}} Thm.~14.5 (linearization) % \vskip .7em % %% % % As an illustration of a nonlinear ODE, here is an example of type % {\sf f\kern 1pt lASHI}, the second-order % equation known as the {\em van der Pol equation,} % $$0.3y''-(1-y^2)y'+y = 0, \quad t\in [\kern .3pt 0,20\kern .3pt], \quad y(0)=1, ~y'(0)=0. % \eqno (1.2)$$ % (The coefficient $0.3$ is included to make the solution more interesting.) % Because $y''$ is present, the equation is of second rather than % first order (hence {\sf f} not~{\sf F}), and it is nonlinear because of the % coefficient $1-y^2$ multiplying $y'$ (hence {\sf l} not~{\sf L}). % Here are the interval and the operator, % which we name \verb|N| instead of \verb|L| % as a reminder that it is nonlinear. % N = chebop(0,20); N.op = @(t,y) 0.3*diff(y,2) - (1-y^2)*diff(y) + y; %% % % \noindent % Problem (1.1) had just a single boundary condition, but in (1.2), % since it is a second-order equation, there % are two. For a simple scalar problem like this, Chebfun % permits one to prescribe $y$ and $y'$ at a point by supplying % a vector of two numbers. % N.lbc = [1;0]; %% % % \noindent % Here is the solution.\footnote{Readers viewing these % pages in color will note that solutions to linear % IVPs are usually plotted in green and solutions to nonlinear % ones in dark green. Starting in Chapter 5, we will % likewise plot solutions to linear BVPs in blue and % solutions to nonlinear ones in dark blue. The distinctions between % linear and nonlinear equations and between IVPs and BVPs are % important, and the colors will serve as a quiet reminder.} % y = N\0; plot(y,CO,ivpnl) title('Fig.~1.2.~~Van der Pol equation (1.2)',FS,11) %% % \vskip 1.02em %% % % Chebfun gives us ready access to % the properties of a computed solution $y$ (which is represented % as a chebfun,'' with a lower-case c since this is a function % rather than the name of the software system). % For example, here are the positions of the local maxima of $y$. % [mval,mpos] = max(y,'local'); mpos' %% % % \noindent % By taking differences of successive maxima, % we see that this van der Pol oscillation is % settling down to a periodic function with period 4.0725, % diff(mpos)' %% % % This book is aimed at everyone who is interested in ODE\kern .5pt s. If you are an % undergraduate taking a course from one of the big texts like % Boyce and DiPrima or Edwards and Penney, this is your lightweight % companion. (The hardcopy from SIAM is inexpensive, and the online version % is free.) If you are a graduate % student working in any of the mathematical sciences, this % may be just the book to take your % understanding to the next level. % Whoever you are, we aim to increase your % appreciation of this fundamental subject. % %% % % What does it mean to solve'' an ODE\kern .3pt?\ \ One kind of solution % would be an exact explicit formula, % also known as an {\em analytical solution.} % Advantages of analytical % solutions include perfect accuracy, generality, explicit dependence % on parameters, theoretical insight, and the absence % of restriction to a particular range of values of\/ $t$. The trouble is, most % ODE problems, including almost all nonlinear ones, can't be solved % analytically. Another kind of solution is a numerical one obtained on a % computer. The great advantage of numerical solutions is that they can be % obtained for virtually any ODE.\ \ That's not the only advantage, however. % Another is that numbers are a compact and % universal currency, so that by examining results obtained % numerically, one can apply one's analysis to a problem at % hand or check how one ODE solution compares to % another. It is not always obvious how to compare two exact % formulas, but we always know how to compare two numbers, whether % explicitly as numbers or visually in a plot. % %% % % Among the huge variety of interesting ODE\kern .5pt s, there % are five that keep reappearing over and over in this book: % {\vskip 6pt \obeylines\parindent=0pt % {\bf 2nd-order linear oscillator.} Simple harmonic motion, or with damping. % {\bf Van der Pol equation.} Nonlinear oscillator, with solutions on a limit cycle. % {\bf Nonlinear pendulum.} Large-amplitude, with a periodic phase space. % {\bf Lorenz equations.} Archetypical chaotic system, with three coupled variables. % {\bf Linear system.} ${\bf y}' = {\bf Ay}$, with solutions $\exp(t{\bf A}) {\bf y}_0^{}$. % \vskip 6pt % \par} % \noindent % Many other equations will also be mentioned, including the % Airy, Belousov--Zhabotinsky, Bernoulli, Bessel, Blasius, Bratu, brusselator, % Carrier, Duffing, Emden, H\'enon--Heiles, Hill, logistic, Lotka--Volterra, % Mathieu, $n$-body, oregonator, Painlev\'e, and R\"ossler equations. % %% % % Easy computer exploration brings new perspectives on ODE\kern .5pt s, % and we believe we have found distinctive treatments % of most of the topics presented in this book, which we hope % will blend clarity for beginners with unexpected insights % for experts. Here are some items worthy of note % in each chapter. % \vskip 1.02em % %% % % \parindent=0pt % {\em 1. Introduction.} % The {\sf FLASHI}'' classification.\hfill\break % {\em 2. First-order scalar linear ODE\kern .5pt s.} % Fig.~2.3: smooth vs.\ bang-bang forcing. % \hfill\break % {\em 3. First-order scalar nonlinear ODE\kern .5pt s.} % Scalarization by complex arithmetic.\hfill\break % {\em 4. Second-order equations and damping.} % Ex.~4.1: elliptical/non-elliptical orbits.\hfill\break % {\em 5. Boundary value problems.} % Fig.~5.9: side conditions.\hfill\break % {\em 6. Eigenvalues of linear BVPs.} % Fig.~6.2: eigenvalues via response curve.\hfill\break % {\em 7. Variable coefficients and adjoints.} % Automated computation of adjoints.\hfill\break % {\em 8. Resonance.} % Periodic forcing gives periodic solutions, {\em if\/} there % is damping.\hfill\break % {\em 9. Second-order equations in the phase plane.} % BVPs as well as IVPs. \hfill\break % {\em 10. Systems of equations.} % SIR epidemiology models in 6 lines of code.\hfill\break % {\em 11. The fundamental existence theorem.} % Picard iteration on the computer.\hfill\break % {\em 12. Random functions and random ODE\kern .5pt s.} % Stochastics via smooth functions.\hfill\break % {\em 13. Chaos.} % Transient chaos in the 3-body problem.\hfill\break % {\em 14. Linearization.} % Figures showing that locally, any ODE behaves linearly. % \hfill\break % {\em 15. Stable and unstable fixed points.} % Application to transition to turbulence. % \hfill\break % {\em 16. Multiple solutions of nonlinear BVPs.} % Shooting to find multiple solutions.\hfill\break % {\em 17. Bifurcation.} % Fig.~17.18: tracking hysteresis as a parameter varies.\hfill\break % {\em 18. Continuation and path-following.} % Fig.~18.13: numerical bifurcation. % \hfill\break % {\em 19. Periodic ODE\kern .5pt s.} % Application showing the origin of band gaps. % \hfill\break % {\em 20. Boundary and interior layers.} % Plots showing asymptotics in action.\hfill\break % {\em 21. Into the complex plane.} % Analytic continuation of real solutions.\hfill\break % {\em 22. Time-dependent PDE\kern .5pt s.} % How ODE\kern .5pt s arise from PDE\kern .5pt s as $t\to\infty$. % \vskip 1.02em % %% % % \noindent % Readers will also find many phenomena explored in the % exercises that do not appear in other textbooks. % %% % % Any book on ODE\kern .5pt s faces the question of how much space to give to applications. % As a structure that we hope will prove appealing, we % follow the pattern that each chapter ends with a 2--4 page % item designated as an Application. % This is followed in turn by % a few sentences about history, a mention of our favorite reference, % and the exercises for that chapter. % %% % % With the help of Chebfun, can we really solve % any ODE just by writing it down? No, of course not. Examples % can readily be devised that defeat this method of computing % for reasons including singularities, scaling, % stiffness, positivity constraints, or sheer computational scale, % and a page about such challenges can be found at the % end of Appendix~A.\ \ Nevertheless, % we have been gratified in writing this book to find how easy it has % been to explore almost any topic. % %% % % \begin{center} % \hrulefill\\[1pt] % {\sc Applications in this book}\\[-3pt] % \hrulefill % \end{center} % %% % % \parindent=0pt\parskip = 0pt % \def\app#1.#2/{\par\noindent\kern 1.2in % \llap{\em Chapter #1.\kern 1pt} #2} % \app 2. Elimination of caffeine from the bloodstream./ % \app 3. Classic pursuit problems./ % \app 4. Skydiver./ % \app 5. Beam theory and the strength of spaghetti./ % \app 6. Eigenstates of the Schr\"odinger equation./ % \app 7. Adjoints and optimization./ % \app 8. Moon, sun, and tides./ % \app 9. Nonlinear pendulum./ % \app 10. SIR model for epidemics./ % \app 11. Designer nonuniqueness./ % \app 12. Metastability, radioactivity, and tunneling./ % \app 13. Chaos in a food web./ % \app 14. Linearized Lorenz trajectories./ % \app 15. Transition to turbulence in a pipe./ % \app 16. Sending a spacecraft to a destination./ % \app 17. FitzHugh--Nagumo equations of neural signals./ % \app 18. Arrhenius chemical reaction./ % \app 19. Band gaps and forbidden frequencies./ % \app 20. Why is New York hotter than San Francisco?/ % \app 21. Jacobi sine function./ % \app 22. Solitons and the KdV equation./ % \vskip 1.02em % %% % % {\sc History.} % Many of the great mathematicians of the past were % involved in establishing the subject of ODE\kern .5pt s, starting % around 1670, including Newton, % Leibniz, Johann and Jacob Bernoulli, Riccati, % Clairaut, Euler, d'Alembert, Lagrange, Gauss, and Cauchy. Stepping forward to % 100 or so years ago, some other key % figures were Poincar\'e, Picard, Lyapunov, Painlev\'e, and Goursat. % %% % % \smallskip % {\sc Our favorite reference.} For a charismatic tour of the whole subject % of ODE\kern .5pt s with a historical emphasis, see Chapter I of Hairer, % N\o rsett, and Wanner, {\em Solving Ordinary Differential % Equations I,} Second Revised Edition, Springer-Verlag, 1993. % \smallskip % %% % % {\sc Acknowledgments.} % Many people have helped us in preparing this book, and we % can acknowledge just a few: David Allwright, Patrick Farrell, % Abdul-Lateef Haji-Ali, Nick Hale, Des Higham, Hrothgar, % and Tadashi Tokieda. % Michael Rawson was a lively participant in a course at NYU that % class-tested the book in autumn 2016. % We are particularly grateful to Abinand Gopal, Matt Meyers, % Niels M\o ller, and Adam Stinchcombe % for reading the entire manuscript % at a late stage and offering many helpful suggestions. % %% % % \def\equals{\kern -1.5pt =\kern 1.5pt} % \begin{displaymath} % \framebox[4.7in][c]{\parbox{4.5in}{\vspace{2pt}\sl % {\sc Summary of Chapter 1.} % ODE\kern .5pt s can rarely be solved analytically, but they can always % be solved numerically, and Chebfun provides a convenient tool for % doing this. This book explores all kinds of ODE problems, from % the elementary to the advanced, both initial-value % problems (IVPs) and boundary-value problems (BVPs). ODE problems can be % classified by a schema with mnemonic {\sf FLASH\kern .3pt I}:\/ % \kern .5pt{\sf F} \equals first-order, % \mbox{{\sf L} \equals linear,} % \mbox{{\sf A} \equals autonomous,} % {\sf S} \equals scalar, % {\sf H} \equals homogeneous, % {\sf I} \equals IVP. % \vspace{2pt}}} % \end{displaymath} % %% % % \smallskip\small\parskip=1pt % \parindent=0pt % {\em A note on exercises.} % The exercises in this book mix the theoretical and the % computational, and the labels of computational % exercises are {\em\underline{underlined}\kern .3pt.}\ \ If % you are asked, say, to % find a value'' of a solution, a computational result is % usually expected unless it is explicitly % stated that it should be analytical. % As a rule, give computed results to~6 digits of accuracy. % For theoretical problems, though your final solution should be % analytical, you may sometimes find computational explorations % helpful along the way. % \par\vskip 4pt % {\em \underline{Exercise $1.1$}. Local extrema of van der Pol oscillation.} % In the van der Pol example (1.2), you can find the local maxima % with {\tt max(y,'local')}, and similarly for minima with % {\tt min}; you can find both minima and maxima at once with % {\tt minandmax}. % How close is the first local minimum value (at $t\approx 1.2$) to % its asymptotic value for $t\to \infty$? Likewise for % the first local maximum (at $t\approx 3.2$)? % \par % {\em Exercise $1.2$. Classification of ODE problems.} % Classify the following ODE problems according to the % {\sf FLASH\kern .3pt I} scheme. % \par % {\em (a)} $y' = \sin(t) - y$, $t\in [\kern .3pt 0,100\kern .3pt]$, $y(0) = 1$. % \par % {\em (\kern .7pt b)} $y' = \sin(t) - y^3$, $t\in [\kern .3pt 0,100\kern .3pt]$, $y(0) = 1$. % \par % {\em (c)} (Nonlinear pendulum equation) % $y'' = -\sin(y)$, $t\in [\kern .3pt 0,10\kern .3pt]$, $y(0) = y(10) = 2$. % \par % {\em (d)} (Advection-diffusion equation) % $0.02 y'' +y' + y = 0$, $t\in [\kern .3pt 0,1]$, $y(0) =0$, $y(1) = 1$. % \par % {\em (e)} (Airy equation) % $0.02 y'' -t y = 0$, $t\in [-5,5]$, $y(-5) =1$, $y(5) = 0$. % \par % {\em (f)} (Harmonic oscillator) % $u' = v,$ $v' = -u$, $t\in [\kern .3pt 0,100\kern .3pt]$, $u(0) = 1$, % $v(0) = 0$. % \par % {\em (g)} $u' = u^2v,$ $v' = -uv^2$, % $t\in [\kern .3pt 0,2\kern .3pt]$, $u(0) = 1$, $v(0) = 0$. % \par % {\em (h)} (Bessel equation) $t^2y'' + t\kern .3pt y' + (t^2-4)y = 0$, % $t\in [\kern .3pt 0,8]$, $y(0) = 0$, $y(8) = 1$. % \par % {\em (i)} $0.1y'' + yy' = y$, $t\in [-1,1]$, $y(-1) = -2$, $y(1) = 1$. % \par % {\em (j)} (Lotka--Volterra equations) $u' = u(1-v)$, % $v' = v(u-1)$, $t\in [\kern .3pt 0,10\kern .3pt]$, $u(0) = v(0) =1$. % \par % {\em (k)} (Blasius equation) $y''' + 0.5 y y'' = 0$, % $t\in[\kern .3pt 0,10\kern .3pt]$, $y(0)=y'(0) = 0$, $y'(10) = 1$. % \par % {\em \underline{Exercise $1.3$}. Airy equation.} % Plot the solution $y$ of the problem of Exercise 1.2{\em (e)} and % report its maximum value. % Letting $k$ denote the coefficient $0.02$, do the same with % $k=0.002$. Now make a plot of $\max (y)$ as a function % of $k$ for the values $k= 0.001, 0.002, \dots, 0.039, 0.040$. % (We shall explore such effects in Chapter 6.) % \par % {\em \underline{Exercise $1.4$}. Solution with rapid transient.} % Plot the solution $y$ of the problem of Exercise 1.2{\em (i)}, and give its maximum % slope $s = \max_{t\in [-1,1]}^{} y'(t)$. % Do the same with the coefficient $0.1$ reduced to $1/20$, $1/40$, and % $1/80$. % \par % {\em Exercise $1.5$. Reduction to first-order system.} % {\em (a)} Show how the IVP of Exercise 1.2{\em (f)} can be rewritten as a second-order % scalar IVP involving just the dependent variable~$u$. What are % the initial conditions for this IVP? % {\em (\kern .7pt b)} Conversely, show how the third-order IVP of % Exercise 1.2{\em (k)} can be rewritten as a first-order system % involving three variables $u$, $v$, and $w$. Any higher-order % ODE problem can be rewritten as a first-order problem like this, % and numerical software for IVPs often requires the problem to be % expressed in first-order form. % \par % {\em \underline{Exercise $1.6$}. How Chebfun represents functions.} % Chebfun normally represents solutions $y(t)$ to ODE\kern .5pt s by polynomial approximations, % typically of accuracy about 10 digits, whose degree~$n$ % may be quite high. The polynomials can be interpreted as % interpolants through a sufficiently large number $n+1$ of samples % at {\em Chebyshev points} defined by % $t_j = \cos(\pi j/n)$, $0\le j \le n$ for $t\in [-1,1]$, or linearly % transplanted to a different interval $[a,b]$. % {\em (a)} Let {\tt y} be the computed solution of % the problem (1.1). Execute {\tt length(y)} to find the number $n+1$ for % this function, and \verb|plot(y,'.-')| to see the associated Chebyshev % points. % {\em (\kern .7pt b)} Do the same for the computed solution of the van der Pol problem (1.2). % Approximately speaking (say, to within $10\%$), how many interpolation points % are there on average per wavelength? % \par % {\em \underline{Exercise $1.7$}. How Chebfun represents periodic functions.} % Chebfun also has a representation for periodic functions that takes % advantage of the periodicity, based on trigonometric polynomials (i.e., % Fourier series) rather % than ordinary algebraic polynomials. Periodic solutions arise % naturally in ODE\kern .5pt s with periodic coefficients (see Chapter~19). % {\em (a)} Construct an ordinary chebfun for $f(t) = (1.1-\cos(\pi t))^{-1}$, % $t\in [-1, 1]$ with the command % \verb|chebfun('1/(1.1-cos(pi*x))')|. What is its length? % {\em (\kern .7pt b)} How does the length change if you use % \verb|chebfun('1/(1.1-cos(pi*x))','trig')|? % (In an appropriate limit, the ratio of the two % lengths approaches $\pi/2$.) % \par %