186
DRAFTv3- R.Granero-Belinch´on Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, [email protected], Department of Mathematics, University of California, Davis,

Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, [email protected], Department

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Lectures Notes for Differential equations (119Aand B)

Rafael Granero Belinchon,[email protected],Department of Mathematics,University of California, Davis,

Page 2: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Page 3: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Contents

1 Introduction and first order ODE 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Recalling basic definitions and ideas . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Solving ODE’s analytically . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3.1 Linear equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3.2 Separable equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.4 Solving ODE’s numerically . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.4.1 Forward Euler method . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.4.2 Fourth order Runge-Kutta method . . . . . . . . . . . . . . . . . . . 15

2 Review of Second order ODEs and linear systems 17

2.1 The wronskian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.2 Complex roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.3 Repeated roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

2.5 Review of matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

2.6 Linear systems of ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3 Worked examples 39

3.1 Falling objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.2 Malthus’s Law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.3 Von Bertalanffy equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

3.4 Logistic growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3.5 Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

3.6 First order equations and potentials . . . . . . . . . . . . . . . . . . . . . . 48

3.7 The pendulum equation and its linearization . . . . . . . . . . . . . . . . . 51

3.8 Harmonic oscillator and restoring forces . . . . . . . . . . . . . . . . . . . . 52

3.9 Second order equations and potentials . . . . . . . . . . . . . . . . . . . . . 54

3.10 Hamiltonian mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4 Existence and Uniqueness of solution 57

4.1 Existence and uniqueness: The Theorem . . . . . . . . . . . . . . . . . . . . 57

4.2 Some preliminary results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

4.3 Proof of Theorem 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

iii

Page 4: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5 Bifurcation 675.1 Saddle-Node bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

5.2 Transcritical bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

5.3 Supercritical Pitchfork bifurcation . . . . . . . . . . . . . . . . . . . . . . . 705.4 Subcritical Pitchfork bifurcation . . . . . . . . . . . . . . . . . . . . . . . . 73

5.5 Laser Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.6 Overdamped bead on a rotating hoop. . . . . . . . . . . . . . . . . . . . . . 76

5.7 Dimensional analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

6 Nonlinear systems of ODE 816.1 A very useful example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

6.2 Another very useful example . . . . . . . . . . . . . . . . . . . . . . . . . . 826.3 Collecting the previous information . . . . . . . . . . . . . . . . . . . . . . . 83

6.4 Basic ideas for nonlinear systems of ODE’s . . . . . . . . . . . . . . . . . . 84

6.4.1 Existence and uniqueness . . . . . . . . . . . . . . . . . . . . . . . . 846.4.2 Linearized system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

6.4.3 Linear vs. Nonlinear stability . . . . . . . . . . . . . . . . . . . . . . 84

7 Worked examples 89

7.1 SIR models for epidemics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

7.1.1 First model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.1.2 Second model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

7.2 A model for a zombie outbreak . . . . . . . . . . . . . . . . . . . . . . . . . 93

7.3 A model for Bieber fever . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967.4 Combat models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

7.4.1 Combat between two standard armies . . . . . . . . . . . . . . . . . 987.4.2 Combat between two guerrillas . . . . . . . . . . . . . . . . . . . . . 99

7.4.3 Combat between a guerrilla and a standard army . . . . . . . . . . . 99

8 Nonlinear centers and limit cycles 1038.1 The Lotka and Volterra predator-prey model . . . . . . . . . . . . . . . . . 103

8.2 The harmonic oscillator and its symmetries . . . . . . . . . . . . . . . . . . 1078.3 Conservative and reversible systems . . . . . . . . . . . . . . . . . . . . . . 108

8.4 Limit cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

8.5 Gradient systems and the Lyapunov stability Theorem . . . . . . . . . . . . 115

9 Worked examples 117

9.1 Carleman model of chemical kinetics . . . . . . . . . . . . . . . . . . . . . . 1179.2 Competitive exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

9.3 Language competition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

10 Hopf bifurcations 12510.1 Review of bifurcations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

10.2 Supercritical Hopf bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . 12810.3 Subcritical Hopf bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

10.4 Degenerate Hopf bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Page 5: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.5 Saddle-node bifurcation of cycles . . . . . . . . . . . . . . . . . . . . . . . . 13110.6 Infinite period bifurcation of cycles . . . . . . . . . . . . . . . . . . . . . . . 13110.7 The Belousov-Zhabotinsky system . . . . . . . . . . . . . . . . . . . . . . . 13210.8 The forced pendulum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13410.9 A model the for rock-paper-scissors game . . . . . . . . . . . . . . . . . . . 136

11 A primer in Calculus of variations 13911.1 A motivational example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13911.2 The appropriate spaces of functions . . . . . . . . . . . . . . . . . . . . . . . 14011.3 Another example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14211.4 Life is (sometimes) hard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14611.5 The Principle of least action . . . . . . . . . . . . . . . . . . . . . . . . . . . 14711.6 Geodesics in the plane, the Brachistochrone problem and the Isoperimetric problem150

12 The Lorenz system 15512.1 Global existence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15512.2 Symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15612.3 Fixed points and its stability . . . . . . . . . . . . . . . . . . . . . . . . . . 157

12.3.1 Case 0 < r < 1: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15712.3.2 Case 1 < r < rH : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

12.4 Dissipation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16012.5 Numerical simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

12.5.1 Prechaotic regime r = 23 . . . . . . . . . . . . . . . . . . . . . . . . 16112.5.2 Chaotic regime r = 28 . . . . . . . . . . . . . . . . . . . . . . . . . . 16312.5.3 Periodic regime 1 ≪ r . . . . . . . . . . . . . . . . . . . . . . . . . . 163

12.6 Chaotic behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16312.7 Periodic behaviour for large r . . . . . . . . . . . . . . . . . . . . . . . . . . 16912.8 Steinbeck’s bifurcation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17012.9 A chaotic waterwheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

13 Discrete dynamical systems 17313.1 Discrete models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17313.2 The discrete logistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17513.3 The Henon map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Page 6: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Page 7: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1

Introduction and first order ODE

1.1 Introduction

In this course we are going to study ordinary differential equation and their dynamics.This is a very important topic in ’applied’ 1 mathematics, but also in other sciences likephysics, chemistry, biology...

The key point is that, sadly, we can not solve a given ordinary differential equation (fordifferential equations depending in more of a single variable, even to prove the existence ofsolution is a tricky problem!!). However, the fact that we can not find an explicit solutionto an equation should not discourage us of studying them. Actually, we are going to focusour attention into recovering some information from the equation without solving it!.

So, if in 22B, the basic question was ’how to obtain a closed form of the solution to a givenODE?’, in 119 the basic question is ’how does the solution to a given ODE behave (evenif do not have a closed form for it)?’.

1.2 Recalling basic definitions and ideas

Let’s start with the basic definition:Definition 1.1. An ordinary differential equation (ODE) is an expression of the (gen-eral) form

dn

dtny(t) = f(y(t), y′(t), y′′(t), ...,

dn−1

dtn−1y(t), t). (1.1)

n is the order of the differential equation and the function f is called the rate func-tion. When y(t) = ~y(t) ∈ R

d and f(y(t), y′(t), ...t) = ~f(~y(t), ~y′(t), ...t) ∈ Rd then it

is called a system of differential equations. If f is a linear function in the variablesy(t), y′(t), ... d

n−1

dtn−1 y(t) the ODE is called linear. Otherwise it is called nonlinear.Memento 1.1. A function f(x) is linear if and only if has the form f(x) = ax+ b.

1Notice that the definition of applied mathematics depends on the mathematician...

1

Page 8: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

[*** In other words, a differential equation is an equation where the unknownis a function, y(t). This equation establish a relationship between the unknowny(t) and its derivatives. The word ordinary is due to the fact that the functiondepends on a single variable, y = y(t). ***]

In general, one may think that the independent variable t denotes the time.

[*** Why should we study them? It is a very important (and widely spread)tool to understand (and make predictions concerning) several phenomena inreal life:

• Physics (fluid dynamics, weather prediction)

• Chemistry (chemical reactions)

• Biology (population dynamics)

***]Example 1.1. Solve the differential equation P ′(t) = t.

Solution: We know that we have to compute the antiderivative of the function F (P (t), t) =t. In this case,

t2

2+ C.

Notice that this antiderivative is not unique (it depends on the value of the constant C).Consequently,

P (t) =t2

2+ C

is not unique either.[*** Check that P (t) is a solution to the differential equa-tion. ***]Memento 1.2. Recall that the Fundamental Theorem of Calculus says that, given f(x),its antiderivative is unique up to an additive constant. In other words, if F (x) verifiesF ′(x) = f(x), then G(x) = F (x) + c also verifies G′(x) = f(x).Memento 1.3. Recall that, for definite integrals, the Fundamental Theorem of Calculusreads

F (b)− F (a) =

∫ b

af(x)dx,

where F ′(x) = f(x).

To guarantee that every differential equations has only one solution, it is common to attachan initial condition of the form

y(0) = y0 ∈ R.

[*** Let’s assume that we have and initial data y0 and a corresponding solutiony(t). Then, this solution y(t) is also called trajectory. ***]Example 1.2. Solve the differential equation P ′(t) = t with initial condition P (0) = 1.

Solution: We know from the previous example that the general solution is

P (t) =t2

2+ C,

2

Page 9: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.2. Recalling basic definitions and ideas

where C is any constant. Now we impose P (0) = 1 and we get

P (0) = 0 + C = 1 ⇒ C = 1.

Consequently, the unique solution to the previous initial value problem is

P (t) =t2

2+ 1.

Let’s elaborate on the classification of DE. As we have seen, there are different classifica-tions according to different characteristics:

1. Systems of ODE: When we have more than one unknown, we have a system of ODE.For instance, one may consider the evolution of the population of wolves and rabbitsin a prescribed area. Then the ODE problem reads:

w′ = −w + wr, r′ = r − wr.

2. Order: As we have seen, the order of the highest derivative present in the equationis called the order of the ODE. For instance

y′ = y2

is a first order ODE, while

y′′ = −y

is a second order ODE.

3. Linear vs. nonlinear: when the rate function is linear in the variables y, ...dn−1y/dtn−1,we have a linear equation. Otherwise the equation is nonlinear. For instance,

y′ = y2 and y′′ = − sin(y),

are nonlinear equations, while

y′′ = y and y′ = t5y,

are linear equations.

Let’s say some words about the concept of solution of a ODE. We say that f(t) is anexplicit solution to a given differential equation if, when we plug f(t) into the equation,the equation is satisfied. In this way, we obtain that f(t) = sin(t) is a solution to

θ′′ = −θ.

[*** Can you obtain another two solutions to this ODE? ***]Definition 1.2. Let g(t) be a function defined on an interval I, having the n-th derivativefor all t in I. g(t) is called an explicit solution of the equation (1.1) if

3

Page 10: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

1.dn

dtng(t)− f(g(t), g′(t), g′′(t), ...,

dn−1

dtn−1g(t), t),

is defined for all t in I,

2.dn

dtng(t) − f(g(t), g′(t), g′′(t), ...,

dn−1

dtn−1g(t), t) = 0,

for all x in I.Example 1.3. Check that g(t) = et is a solution to

y′ = y.

Solution: We have

g′ = g,

so we conclude.

The solution can also be implicit:Definition 1.3. A relation H(t, y(t)) = 0 is called an implicit solution of the ODE (1.1)if this relation produces at least one function g(t) defined on the interval I, such that g(t)is an explicit solution of (1.1) on I.Example 1.4. Find an implicit solution of y′ = − t

y .

Solution: This expression is equivalent to

2y′y = −2t,

so, by the chain rule,d

dty2 = −2t.

We can integrate and we get

y2(t) + t2 = C.

Our implicit solution is then

H(t, y(t)) = y2(t) + t2 − C.

[*** For the moment, we consider only the case where the rate function doesNOT depend explictly on time, i.e. f(y(t)). ***]Memento 1.4. Given a function f(t), the function decreases if f ′(t) < 0, while thefunction increases if f ′(t) > 0.

Notice that we can, for different values of (t, y(t)), compute y′(t). Consequently, we canplot arrows denoting the increasing/decreasing character of the trajectory, i.e. such that

• the arrow is pointing left for the points y such that y′ < 0. This means that, asy′ < 0, the trajectory moves leftward.

4

Page 11: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.2. Recalling basic definitions and ideas

• the arrow is pointing right for the points y such that y′ > 0. This means that, asy′ > 0, the trajectory moves rightward.

This kind of plots are called (one-dimensional) slope or direction fields.

[*** This slope field gives us a useful interpretation of the solution of an ODE.We can think on the solution of an ODE as the trajectory of a theoreticalparticle according to this slope field. In other words, this theoretical particlewill move following a trajectory tangential to the slope field. ***]

A very important notion in dynamical system is the notion of equilibrium points:Definition 1.4. For a given ordinary differential equation (ODE),

y′(t) = f(y(t)),

the points xi ∈ R such that

f(xi) = 0,

are called equilibrium points.

Notice that if y′(t) = 0, y(t) does not change with time. The idea is that [*** (hopefully)***] for some systems, the solution will approach one of these equilibrium points.

In particular, these equilibria can be stable (i.e. the solution moves towards them) orunstable (i.e. the solution try to avoid them). Let’s state these concepts in a rigorousway:Definition 1.5. Let y′(t) = f(y(t)) be the considered ODE. Assume that x ∈ R is anequilibrium point. Compute f ′(x). Then

• if f ′(x) < 0 the equilibrium is ( locally) stable.

• if f ′(x) > 0 the equilibrium is unstable.

The word locally refers to the fact that the the solution moves towards the equilibria if theinitial point is close enough to the equilibria. In other words, for very large perturbationsof the equilibrium solution, we don’t know if the perturbation decays.

We have (at least) two different interpretations of this stability criterion: the geometricand the analytical ones.

[*** The geometric interpretation: recall that f(x) = 0 (because we are evalu-ating in the critical point x). Then, in the case of stable equilibrium accordingto the previous definition, we have f ′(x) < 0. This implies that the function is(locally) decaying. In particular, for y < x close enough we have f(y) > 0 andif x < y f(y) < 0. In other words

y′(t) = f(y(t)) > 0 if y(t) < x, y(t) close to x,

y′(t) = f(y(t)) < 0 if y(t) > x, y(t) close to x.

And we obtain that y(t) approaches x. We can apply the same reasoning tothe unstable equilibrium. ***]

5

Page 12: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

This geometric understanding of the stability relies in the shape of f . On the other hand,the analytical interpretation relies on a smart use of Taylor’s Theorem:

[*** The analytic interpretation: we use Taylor’s Theorem to get that

f(α) = f(x) + f ′(x)(α − x) +O(|α − x|2) = f ′(x)(α − x) +O(|α− x|2),

sof(y(t)) = f(x) + f ′(x)(y(t) − x) +O(|y(t)− x|2).

Assuming now that the trajectory is very close to the equilibrium point, |y(t)−α| ≪ 1, we can approximate

y′ =d

dt(y(t)− x) ≈ f ′(x)(y(t) − x).

This equation can be written as

η′ = f ′(x)η,

with η(t) being the perturbation, i.e. η = (y(t)−x). Consequently, if f ′(x) > 0 theperturbation η(t) grows. This means that the equilibrium is unstable. On theother hand, if f ′(x) < 0 the perturbation η(t) decreases, thus, the equilibriumis stable. ***]

Notice that the analytic interpretation gives us extra information: the perturbation verifies

η(t) = η(0)etf′(x).

[*** If at a critical point we have f ′(x) = 0, we call this equilibrium point adegenerate equilibrium. ***]

1.3 Solving ODE’s analytically

In this section we are going to review the basics of solving first order ODE’s ’by hand’.

1.3.1 Linear equations

Let’s assume that we have the following equation

y′(t) = −αy(t) + e−αt, y(0) = y0.

We are going to use the Fundamental theorem of Calculus with the chain rule to solve thisequation. The idea is to find a function (the integrating factor) such that, by multiplyingby this function, we get an exact derivative on the left hand side. We multiply the equationby µ(t). This function µ(t) is called in integrating factor and remains unknown at thisstep (it’s part of our job to find it!).

µ(t)y′(t) = −αµ(t)y(t) + µ(t)e−αt, y(0) = y0.

6

Page 13: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.3. Solving ODE’s analytically

Notice that (by product rule)

d

dt(µ(t)y(t)) = µ′(t)y(t) + µ(t)y′(t),

so, if we impose

µ′(t) = αµ(t),

we have

µ(t)y′(t) + αµ(t)y(t) = µ(t)y′(t) + µ′(t)y(t) = µ(t)e−αt, y(0) = y0.

Solving the equation for µ(t), we have

µ(t) = µ(0)eαt.

We may take µ(0) = 1 to simplify (in fact, this choice does not affect the next computations[*** why? ***]). Inserting the expression for µ(t), we have

d

dt(µ(t)y(t)) = µ(t)e−αt, y(0) = y0.

We integrate both sides and we get

y(t) = (y0 + t)e−αt.

Let’s assume now that we have the following equation

y′(t) = −α(t)y(t) + f(t), y(0) = y0. (1.2)

We are going to use the Fundamental theorem of Calculus with the chain rule to solvethis equation. As before, the idea is to find a function (the integrating factor) such that,by multiplying by this function, we get an exact derivative on the left hand side. Noticethat

d

dt

∫ t

0α(s)ds = α(t),

and notice thatd

dt

(

eβ(t)y(t))

= eβ(t)y′(t) + y(t)β′(t)eβ(t).

Our equation can be written

y′(t) + α(t)y(t) = f(t), y(0) = y0,

so, if we multiply both sides by

e∫t

0α(s)ds,

we get

e∫t

0α(s)dsy′(t) + e

∫t

0α(s)dsα(t)y(t) = e

∫t

0α(s)dsf(t), y(0) = y0.

7

Page 14: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

Now we use the previous formula with β(t) =∫ t0 α(s)ds, and we get

d

dt

(

e∫t

0α(s)dsy(t)

)

= e∫t

0α(s)dsf(t).

Integrating(

e∫t

0α(s)dsy(t)

)

=

∫ t

0e∫u

0α(s)dsf(u)du+ C,

y(t) = e−∫t

0α(s)ds

(∫ t

0e∫u

0α(s)dsf(u)du+ C

)

. (1.3)

To fix the constant, notice that

y(0) = y0 = e−∫0

0α(s)ds

(∫ 0

0e∫u

0α(s)dsf(u)du+ C

)

= C.

Example 1.5. Solve

y′(t) = −4y(t) + f(t), y(0) = y0.

Solution: We need to find the integrating factor. As before, notice that the equation reads

y′(t) + 4y(t) = f(t), y(0) = y0,

and, multiplying by e4t we get,

e4ty′(t) + 4e4ty(t) =d

dt

(

e4ty(t))

= e4tf(t), y(0) = y0.

Integrating and using∫

d

dt

(

e4ty(t))

= e4ty(t) + C, (1.4)

we obtain

e4ty(t) =

∫ t

0e4sf(s)ds+ C ⇒ y(t) = e−4t

∫ t

0e4sf(s)ds+ e−4tC,

where C = −C is an arbitrary constant that we have to find. To find this constant we usethe initial data:

y0 = C ⇒ y(t) = e−4t

∫ t

0e4sf(s)ds+ e−4ty0.

Notice that with this method of finding the solution we end by finding a constant using theinitial data. In our previous examples, this constant never appear explicitly as the limitsof our integration process where fixed (compare with (1.4)). Of course, both method arecorrect (if they are correctly used!) and lead to the same answer. In the example 1.7 weare going to explain this further.

8

Page 15: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.3. Solving ODE’s analytically

1.3.2 Separable equations

There is a special kind of nonlinear equations that we can solve: the separable equations.The idea behind them is that the equation can be decomposed into the part dependingexplicitly on t (the independent variable) and the part depending explicitly on y thedependent variable).Definition 1.6. An ODE of the form

f(y(t))y′(t) = g(t)

is called separable.Example 1.6. Solve

y′(t) =t2

y(t).

Solution: Notice that we can write

y(t)y′(t) = t2,

sod

dt

(y(t))2

2= t2.

[*** As you see, we are using one more time the idea of looking for an exactderivative. So, take that in mind when solving an ODE! ***]

Integrating, we have(y(t))2

2− t3

3=

(y(0))2

2.

The good thing about these equations is that you always can reduce them to a simpleintegration procedure. To see this, let’s write F,G for the primitive functions of f, grespectively:

F ′(x) = f(x), G′(x) = g(x).

We have

f(y(t))y′(t) = F ′(y(t))y′(t) = G′(t)

[*** Do you see an exact derivative here? ***] Now notice that, applying thechain rule,

d

dtF (y(t)) = F ′(y(t))y′(t),

sod

dtF (y(t)) = G′(t),

and integrating,

F (y(t))−G(t) = C ≡ F (y(t0))−G(t0). (1.5)

9

Page 16: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

In other words, we have found an implicit representation of the solution. This kind ofexpressions are called implicit because, in general, they can not be written in the formy(t) = H(t).

[*** Notice that, without regarding how intricate are the expressions for f andg, we can always do this computation. Of course, this is sort of cheating in thesense that, in general, we can not use (1.5) to write explicitly the expressionfor the dependent variable, y, as a function of the independent variable, t. ***]

Recall that y′ = dydt , so we can rearrange the expression of a separable ode as follows:

f(y(t))y′(t) = g(t) ⇒ f(y(t))dy = g(t)dt.

[*** Notice that in the latter formula, the LHS only involves explicitly y, whilethe RHS only involves t. ***]Example 1.7. Solve the differential equation

y′(t) = y5(t), y(0) = 2.

Can you say something on its behaviour for large times?

Solution: We are going to solve this equation following two methods.

1. First we are going to leave the limits of integration ’unknown’, so a constant willappear and we have to solve for the constant using the initial data. We have

dy

dt= (y(t))5 ⇒ dy

y5= dt.

Integrating∫

dy

y5=

y−4

−4= t+ C ⇒ 1

y(t)= (−4C − 4t)1/4

So

y(t) =1

(−4C − 4x)1/4.

To fix the constant we use the initial value:

y(0) =1

(−4C)1/4= 2 ⇒ 4C =

1

−16.

We conclude

y(t) =1

( 116 − 4t)1/4

.

2. Now we fixed the limit of integration (so the constant appearing is perfectly known).Integrating

∫ y(t)

y0

dy

y5=

(y(t))−4

−4− (y0)

−4

−4= t

So

y(t) =1

( 116 − 4t)1/4

.

10

Page 17: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.3. Solving ODE’s analytically

Now notice that initially t = 0 and t grows continuously. So, eventually 4t will approach116 and then

limt→ 1

64

y(t) = ∞.

Consequently, there is no solution for large times!!

[*** In this example we have used two different approaches to solving theODE, each of them is perfectly correct. However, there are a number ofcommon errors.Using the method with unknown limits of integration: This method is ratherstraightforward, but one can not forget the constant of integration. Moreover,you have to solve for the constant correctly to obtain the correct solution.Using the method with known limits of integration: One can argue that thismethod is (mathematically) more rigorous. However, one need to write theappropriate limits in the appropriate integral, i.e. you can not get confusedwith the limit in the dependent and the independent variables. Both methodsare perfectly fine. It is up to you which one you want to use. ***]Example 1.8. Solve

y′(x) = log(y(x))y(x), y(0) = y0 > 0.

Solution: This equation can be written as

y′

y log(y)= 1.

As always, we are going to look for an exact derivative on the LHS. Notice that

f(y(x)) = log(log(y(x)))

has derivatived

dxf(y(x)) =

y′

log(y)y,

so, the equation reads,d

dxlog(log(y(x))) = 1.

We integrate both sides to get

log(log(y(x))) − log(log(y0)) = log

(

log(y(x))

log(y0)

)

= x,

so

log(y(x)) = log(y0)ex,

and finally

y(x) = yex

0 .

11

Page 18: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

Solution: [Example 1.8] We are going to solve Example 1.8 in a two-step procedure. Noticethat if z = log(y), then using the chain rule,

dz =dy

y,

so the equation in this new variable reads

dz

z= dx.

Integrating, we have

∫ z(t)

z(0)

dz

z= log(z(t)) − log(z(0)) = x =

∫ x

0dx.

Using the properties of the logarithm

z(t) = z(0)ex.

We have to undo the change of variables, so

log(y(x)) = log(y0)ex ⇒ y(x) = ye

x

0 .

Example 1.9. Solve

y′(t) =1

cos(y(x)), y(1) = π.

Solution: We write our equation as

cos(y)dy = dt.

Notice that we have an exact derivative on the LHS. Consequently, we can easily integrate

∫ y(t)

y(1))cos(y)dy = sin(y(t))− sin(y(1)) = t− 1 =

∫ t

1dt.

So,

sin(y(t)) = t− 1,

and

y(t) = arcsin(t− 1).

[*** For which time t is this y(t) well defined? ***]Example 1.10. Solve

y′(t) = t2 + 1,

and determine the interval in which the solution exists.

12

Page 19: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.4. Solving ODE’s numerically

Solution: We write the equation as

dy = (t2 + 1)dt.

[*** Notice that in this problem we don’t have an initial time or an initial data.In particular, we can not know the limit of integration. Consequently, in thiscase we are forced to use the method with the unknown constant. Integratingwe have

y(t) =t3

3+ t+ C.

As the RHS side is always well-defined, y(t) can be defined for every time t.***]

1.4 Solving ODE’s numerically

1.4.1 Forward Euler method

In general it’s very difficult (or even impossible) to find the exact, explicit solution of agiven differential equation. As you can imagine, we are going to use the computer to findan approximate solution. The construction of numerical methods to approximate solutionsof differential equations is an area of expertise by itself.

Assume that we have the ODE

y′(t) = f(y(t)), y(0) = y0.

Integrating we get

y(t)− y(0) =

∫ t

0f(y(s))ds.

The problem is that, as we don’t have the expression for y(s), the RHS makes no sense.Then we are going to approximate the RHS as

∫ t

0f(y(s))ds ≈ tf(y(0)).

Memento 1.5. This is just some sort of Riemann sum taking the height of the rectangleequal to the left endpoint. Remember that the integral equals the area below the curvef(y(s)), so we are approximating this area by the area of a rectangle.

To achieve a better accuracy, if we want to approximate the solution up to time T > 0, weare going to define a partition (with n subintervals) of the time interval. The step betweentime nodes is h = T/n, consequently, the time nodes are

0 = t0 < t1 = h < t2 = 2h, ..., tn = T.

and we are going to compute n step:

y(t1)− y(t0) =

∫ t1

t0

f(y(s))ds ≈ (t1 − t0)f(y(t0)),

13

Page 20: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

y(t2)− y(t1) =

∫ t2

t1

f(y(s))ds ≈ (t2 − t1)f(y(t1)),

y(t3)− y(t2) =

∫ t3

t2

f(y(s))ds ≈ (t3 − t2)f(y(t2)),

until

y(tn)− y(tn−1) =

∫ tn

tn−1

f(y(s))ds ≈ (tn − tn−1)f(y(tn−1)).

Consequently, the algorithm is

yn+1 = yn + hf(yn).

This method is known as Forward Euler method.

We can give another interpretation, more dynamical. We have seen that F gives us aslope field. Furthermore, we can think on the solution of an ODE as the trajectory of aparticle according to this slope field. Using the Euler method, we are approximating thetrajectory by a piecewise straight trajectory.

In other words, we can think that we are moving by big steps. At every time ti, we lookour slope field, modify if needed our direction to be f(y(ti)) and then we give anotherstep.

Let me show with an example why one should know about differential equations beforeapproximating it solution.Example 1.11. Consider

y′(t) = y(t)2, y(0) = 1.

Approximate this equation using the forward Euler method and compare with the exactsolution.

Solution: First, let’s compute the solution. As before,

dy

y2= dt ⇒ − 1

y(t)= t+C ⇒ y(t) =

1

−t− C.

Now we use the initial data to fix the constant C:

y(0) = 1 =1

−C⇒ C = −1,

so

y(t) =1

1− t.

If we use Matlab to approximate the solution and we compare with the exact solutionobtained before, we get the Figure 1.1. Notice that the approximate solution (blue)EXISTS AFTER t = 1!!! and we know that the exact solution (red) doesn’t!!!

%% Forward Euler Method

%% Number of time steps

14

Page 21: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

1.4. Solving ODE’s numerically

0 0.2 0.4 0.6 0.8 1 1.2 1.40

10

20

30

40

50

60

70

80

90

Figure 1.1: Exact solution (red) and approximate solution (blue) corresponding to thesame initial data, y0 = 1.

N=1000;

%% Final time

T=10;

dt=T/(N-1);

t=[0:dt:T];

%% Initial data

y(:,1)=[0.5]’;

for j=1:length(t)-1

y(:,j+1)=y(:,j)+feval(’RHS’,t(j),y(:,j))*dt;

end

function f=RHS(t,y)

%The right hand side for the ODE

f=y.^2; %Type here the right hand side

1.4.2 Fourth order Runge-Kutta method

Euler’s method is easy to implement, but, however, it is not that great in terms of accuracy.In this section we are going to state another explicit method with much better results interms of accuracy: the classical (explicit) fourth-order Runge-Kutta method.

The Runge-Kutta methods (there are a whole bunch of them!) consist in computingseveral helpful values ki and then add them with appropriate weights to compute yn+1.In this case, we are going to compute

k1 = f(yn),

15

Page 22: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 1. Introduction and first order ODE

k2 = f(yn + 0.5k1h),

k3 = f(yn + 0.5k2h),

k4 = f(yn + k3h).

Then we compute

yn+1 = yn +h

6(k1 + 2k2 + 2k3 + k4) .

%% RK4 Method

%% Number of time steps

N=100000;

%% Final time

T=1000;

dt=T/(N-1);

t=[0:dt:T];

%% Initial data

y(:,1)=[0.5]’;

for j=1:length(t)-1

k1=feval(’RHS’,t(j),y(:,j));

k2=feval(’RHS’,t(j)+0.5*dt,y(:,j)+0.5*k1*dt);

k3=feval(’RHS’,t(j)+0.5*dt,y(:,j)+0.5*k2*dt);

k4=feval(’RHS’,t(j)+dt,y(:,j)+k3*dt);

y(:,j+1)=y(:,j)+(dt/6)*(k1+2*k2+2*k3+k4);

end

function f=RHS(t,y)

%The right hand side for the ODE

f=[y(2),-y(1)]’; %Type here the RHS

16

Page 23: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2

Review of Second order ODEs andlinear systems

In this chapter we review equations of order two, for instance

y′′(t) + g(t)y′(t) + h(t)y(t) = 0. (2.1)

We are going to focus or attention in the case with constant coefficients:

ay′′(t) + by′(t) + cy(t) = 0. (2.2)

[*** Notice that a second order equation can be written as a system of firstorder equations:

y′(t) = u(t)

au′(t) = − (bu(t) + cy(t))

***]

We know that the solution to a linear, homogeneous first order equation is given by someexponential with the appropriate exponent. For instance, the solution to

y′(t) = 5y(t)

is given byy(t) = c1e

5t.

Notice that, once we know how to compute the solution to the homogeneous case, wecan use it to construct the integrating factor and, consequently, the solution to the non-homogeneous case

y′(t) = 5y(t) + f(t).

If we try to look for a solution to (2.2) with the form

y(t) = ert,

17

Page 24: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

we findert(

ar2 + br + c)

= 0.

As the exponential is not zero (at least, for bounded time t), we get

ar2 + br + c = 0.

This is called [*** characteristic equation ***]. Let’s assume for the moment that wecan find two solutions:

r =−b±

√b2 − 4ac

2a.

Now notice that if y1(t) and y2(t) are solutions to (2.2), then the same applies to

y(t) = c1y1(t) + c2y2(t).

This is called Principle of superposition. We can easily check this fact. Let’s insert y(t)into the equation:

a(c1y1(t) + c2y2(t))′′ + b(c1y1(t) + c2y2(t))

′ + c(c1y1(t) + c2y2(t))

= c1(

ay′′1(t) + by′1(t) + cy1(t))

+ c2(

ay′′2(t) + by′2(t) + cy2(t))

= 0,

where we have used that y1 and y2 are two solutions to (2.2).

Consequently, the general solution to (2.2) is given by

y(t) = c1er1t + c2e

r2t,

where

r1 =−b+

√b2 − 4ac

2a, r2 =

−b−√b2 − 4ac

2a.

Notice that, as there are two arbitrary constants c1 and c2, we require to initial data todetermine a unique solution.Example 2.1. Find the solution to

y′′ − (√5 + 2)y′ + 2

√5y = 0

giveny(0) = 0, y′(0) = 2.

Solution: We insert our ansatzy(t) = ert,

and we getr2 − (

√5 + 2)x+ 2

√5 = 0.

This polynomial has solutionsr =

√5 and r = 2.

Consequently, the general solution is

y(t) = c1e2t + c2e

√5t.

18

Page 25: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.1. The wronskian

Now we insert our initial data. We get

y(0) = c1 + c2 = 0, y′(0) = c12 + c2√5 = 1.

We have to solve this system of equation in the unknown c1 and c2. We obtain

c1 = −c2 =1

2−√5.

We conclude that the solution is

y(t) =1

2−√5e2t − 1

2−√5e√5t.

Example 2.2. Find the general solution to

y′′(t)− 5y(t) = 0.

Solution: The characteristic equation is now

(r −√5)(r +

√5) = 0.

Consequently, the general solution is

y(t) = c1e√5t + c2e

−√5t.

2.1 The wronskian

So far we have a way of finding general solutions to a kind of second order ODE. The mainquestion that arises now is whether the constants in the general solution can be chosen sothat the initial data also hold. In order the general solution with form

y(t) = c1y1(t) + c2y2(t)

verifies

y(t0) = y0, y′(t0) = y′0,

we need that ci verify the system

c1y1(t0) + c2y2(t0) = y0c1y

′1(t0) + c2y

′2(t0) = y′0

The determinant of this system is

W (t0) = y′2(t0)y1(t0)− y′1(t0)y2(t0).

19

Page 26: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

[*** This determinant is called Wronskian. ***] We know that, as long as W 6= 0,there exists a unique solution to this system. So, there are a unique pair c1, c2 and,consequently, a unique y(t).

More generally, for a pair of solutions to (2.2), we can define the Wronskian at time t ≥ t0

W (t) = y′2(t)y1(t)− y′1(t)y2(t).

The pair y1, y2 is called fundamental set of solutions if and only if the wronskian is not zero.The solution y(t) = c1y1(t) + c2y2(t) is called general solution as long as the wronskian isnot zero.

Summarizing: [*** To find the general solution for a given second order ODEwe only have to find two solutions y1(t), y2(t) with a nonzero wronskian. Theny(t) = c1y1(t)+ c2y2(t) is the general solution and the constants ci can be chosenso that (??) also hold. You can also understand that the non-zero wronskiancondition ensures that the ansatz y(t) = ert is valid. ***]Example 2.3. Find the general solution to y′′(t) = y(t).

Solution: We look for solution with the form y(t) = ert and we obtain the characteristicequation

r2 = 1, so r = ±1.

We obtainy(t) = c1e

t + c2e−t.

We know that this is a bona fide general solution because the wronskian is

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

= −1− 1 = −2 6= 0.

However, notice that the functions

y1 = cosh(t) =et + e−t

2y2 = sinh(t) =

et − e−t

2

are also solutions of the ODE. Consequently, we could have chosen y1, y2 as our funda-mental set of solutions because in this case, the wronskian is

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

= cosh2(t)− sinh2(t) = 1 6= 0.

Now observe that with our latter choice, our general solution would be

y(t) = c1 cosh(t) + c2 sinh(t).

The question is [*** are we getting the same answer or a different one???***] As you can imagine, the answer is ’the same’. We compute

y(t) = c1

(

y1(t) + y2(t)

2

)

+ c2

(

y1(t)− y2(t)

2

)

= 0.5 (c1 + c2) y1(t) + 0.5 (c1 − c2) y2(t).

20

Page 27: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.1. The wronskian

Consequently, it is enough if we take

c1 = 0.5 (c1 + c2) , c2 = 0.5 (c1 − c2) ,

to recover the same set of solutions.

Let’s explain this situation with a plane in the 3D space. Let’s consider the plane

x+ y + z = 0.

We know that this plane is perpendicular to the vector (1, 1, 1). Consequently, it can bedescribed as the points p ∈ R

3 such that

p = c1(1,−1, 0) + c2(1, 0,−1),

for some constants c1, c2 ∈ R. You can convince yourself that the situation with a homo-geneous second order ODE is similar somehow. Now notice that the same plane can bedescribed as the points p ∈ R

3 such that

p = c1(1,−0.5,−0.5) + c2(−0.5, 1,−0.5),

for some constants c1, c2 ∈ R. This is exactly the same situation as in the previous examplefor the second order ODE.

To become familiar, let’s compute some examples involving the wronskian:Example 2.4. Compute the wronskian corresponding to

y′′(t)− 5y(t) = 0.

Solution: We know from a previous example that the general solution is

y(t) = c1e√5t + c2e

−√5t.

Then the particular solutions are by

y1(t) = e√5t, y2(t) = e−

√5t.

The wronskian is then

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

= e0t(

−√5−

√5)

6= 0

We obtain that y1, y2 form a fundamental set of solutions.Example 2.5. Compute the wronskian corresponding to the particular solutions

y1(t) = er1t, y2(t) = er2t.

Solution:

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

= e(r1+r2)t (r2 − r1) .

Consequently, as long as r2 − r1 6= 0, y1 and y2 form a fundamental set of solutions.

A legitimate question (and an important topic) is whether this Wronskian determinantmay vanish in some region (being non-zero in other regions).

21

Page 28: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

Theorem 2.1. Let y1 and y2 be two solutions of (2.1) with f(t) ≡ 0, then the wronskianverifies

W (t) = W (0)e−∫t

0g(s)ds.

In particular, the wronskian is either identically zero or always different to zero.

Proof. We have

W (t) = y1y′2 − y2y

′1, W ′(t) = y′1y

′2 + y1y

′′2 − y′2y

′1 − y2y

′′1 = y1y

′′2 − y2y

′′1 .

Now we use the equation (2.2):

W ′(t) = y1(−g(t)y′2 − h(t)y2)− y2(−g(t)y′1 − h(t)y1),

W ′(t) = −g(t)(

y1y′2 − y2y

′1

)

= −g(t)W.

Consequently, the wronskian verifies a first order ODE. We can solve it

d

dtln(W (t)) = −g(t),

ln

(

W (t)

W (0)

)

= −∫ t

0g(s)ds,

soW (t) = W (0)e−

∫t

0g(s)ds.

2.2 Complex roots

We start with the following identity

eiθ = cos(θ) + i sin(θ).

This is called Euler-deMoivre formula. To motivate this formula, we can use Taylor’sTheorem. Once this formula is true, we obtain

cos(θ) =eiθ + e−θi

2

sin(θ) =eiθ − e−θi

2i.

Now the resemblance with its hyperbolic counterparts cosh and sinh seems more clear. Inparticular, we obtain that

e(a+ib)t

is an spiral. In this spiral the term eat gives us the distance towards zero while the termeibt is the rotation part.

Assume now that you have y(t) = e(a+ib)t satisfying the ODE (2.2). Then by the super-position principle we have that both the real and the imaginary part satisfy the equation(2.2).

22

Page 29: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.2. Complex roots

Example 2.6. Find the general solution to

y′′ = −y.

Solution: We know that y1 = cos(t), y2 = sin(t) form a fundamental set of solutions. Let’slook for a solution with the form ert. Then the characteristic equation is

r2 = −1,

so

r = ±i.

Using Euler’s formula, we obtain

y1 = eit = cos(t) + i sin(t), y2 = e−it = cos(t)− i sin(t).

Using the superposition principle, we obtain that

y1 = y1 + y2 = cos(t)

and

y2 = (y1 − y2)/2i = sin(t)

are solutions. Furthermore, both expressions are purely real functions. This will be helpfulbecause generally we are interested problems where only real quantities are involved.Example 2.7. Compute the wronskian corresponding to

y1(t) = Ree(λ+iµ)t, y2(t) = Ime(λ+iµ)t.

Solution: We have that

e(λ+iµ)t = eλt(cos(µt) + i sin(µt)),

so

Ree(λ+iµ)t = eλt cos(µt),

Ime(λ+iµ)t = eλt sin(µt).

The wronskian is then

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

=

eλt cos(µt) eλt sin(µt)λeλt cos(µt)− µeλt sin(µt) λeλt sin(µt) + µeλt cos(µt)

,

so

W (t) = µe2λt.

Example 2.8. Find the general solution to

y′′ + 5y = 0.

23

Page 30: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

Solution: We insert the ansatz y(t) = ert to look for a solution. We find the characteristicequation

r2 + 5 = 0, r1 =√5i, r2 = −

√5i.

Consequently, we can take as fundamental set of solutions the pair

y1(t) = Ree√5it, y2(t) = Ime

√5it.

We computey1(t) = cos(

√5t), y2(t) = sin(

√5t).

2.3 Repeated roots

Some second order polynomial equation may have a repeated root. For instance

(r − 1)2 = 0

has solution r1 = 1 = r2. Consequently, we have the following exampleExample 2.9. Find the general solution of

y′′ − 2y′ + y = 0.

Solution: When we try to find a fundamental set of solutions we end with

y1 = et = y2

[*** But then the wronskian is identically zero!! ***] We have to find a differentcandidate for y2. The idea is then to look for something like y2(t) = v(t)y1(t), where v(t)is unknown (so, the problem is reduced to find this v(t)). We insert y2(t) = v(t)y1(t) inthe equation and we get

(v′′et + 2v′et + vet)− 2(v′et + vet) + (vet) = 0.

Simplifying, we getv′′ + 2v′ + v − 2(v′ + v) + v = v′′ = 0.

Consequentlyv(t) = c1t+ c2.

In this way, we find our candidate

y2 = (c1t+ c2)et.

As c2et can be written in terms of y1, we consider c2 = 0. (in other words, we assume

that this term is absorbed by y1). Equivalently, we can think that we don’t need the fullygenerality of the expression

v(t) = c1t+ c2,

but a non-constant solution to v′′ = 0, so we can take v(t) = t. Let’s compute the wronskian

W (t) =

y1(t) y2(t)y′1(t) y′2(t)

=

et ettet et + tet

= (1 + t)e2t − te2t 6= 0,

24

Page 31: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.4. Examples

2.4 Examples

In the previous sections we have seen how to solve a general second order, homogeneousODE with constant coefficients. In this section we are going to apply the previous toolsto several ODEs.Example 2.10. Find the general solution of

y′′ + 2y′ + 2 = 0

Solution: We find the characteristic equation

r2 + 2r + 2 = 0.

This equation has not real solutions. One of the pair of complex solutions is

r =−2 +

√4− 4 ∗ 22

= −1 + i.

Consequently, a (complex valued) solution is

y = e(−1+i)t = e−t (cos(t) + i sin(t))

Recalling that the real and imaginary parts of y form a set of fundamental solutions wewrite the general solution as

y(t) = c1Ree(−1+i)t + c2Ime(−1+i)t = c1e

−t cos(t) + c2e−t sin(t).

Example 2.11. Find the general solution of

y′′ + 2y′ + 1 = 0

Solution: The characteristic equation is

r2 + 2r + 1 = 0.

We find a repeated solutionr = −1.

Consequently, our set of fundamental solution is given by

y1(t) = e−t, y2(t) = ty1(t).

The general solution is theny(t) = c1e

−t + c2te−t.

Example 2.12. Find the general solution of

y′′ + 2y′ − 1 = 0

25

Page 32: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

Solution: The characteristic equation is

r2 + 2r − 1 = 0.

We find the solutionsr1 =

√2− 1, r2 = −1−

√2.

Consequently, our general solution is

y(t) = c1er1t + c2e

r2t = c1e(√2−1)t + c2e

(−1−√2)t.

[*** Summarizing, if we write r1, r2 the solutions to the characteristic equationthen

1. if r1 6= r2y(t) = c1e

r1t + c2er2t,

2. if r1 = r2y(t) = c1e

r1t + c2ter1t,

3. if r1, r2 are complex (so r1 = r1)

y(t) = c1Re er1t + c2Im er1t.

***]

2.5 Review of matrices

We begin recalling some basic stuff from 22A:

Definitions Let’s consider two matrices

A =

a11 a12 . . . a1ma21 a22 . . . a2m...an1 an2 . . . anm

,

B =

b11 b12 . . . b1lb21 b22 . . . b2l...bk1 bk2 . . . bkl

and a real number λ ∈ R. We also write

D =

(

1 24 5

)

,

26

Page 33: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.5. Review of matrices

E =

(

2 43 6

)

,

F =

9 8 76 5 43 2 1

G =

121

H =

1 2 31 2 41 1 1

Summing two matrices [*** Remember, to add two matrices, you need thatboth matrices have the same dimensions. ***] You need that because you are goingto define the sum of the two matrices by the matrix form by the componentwise sum. Inother words, you will add every component on A with the analogous component on B andsave that outcome in the new matrix.

With the notation for A and B and where k = n, l = m we have

C = A+B =

a11 + b11 a12 + b12 . . . a1m + b1ma11 + b21 a22 + b22 . . . a2m + b2m...an1 + bk1 an2 + bn2 . . . anm + bnm

For instance, considering D and E, we compute

M = D + E =

(

1 + 2 2 + 44 + 3 5 + 6

)

,

Multiplication by a number As before, we define this multiplication componentwise.With the notation for A and B and where k = n, l = m we have

C = λA =

λa11 λa12 . . . λa1mλa21 λa22 . . . λa2m...λan1 λan2 . . . λanm

,

For instance,

2F =

18 16 1412 10 86 4 2

.

27

Page 34: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

Transpose of a matrix We denote At the transpose of a matrix. Then we have

At =

a11 a21 . . . an1a12 a22 . . . an2...a1m a2m . . . anm

.

Notice that if A is a n×m matrix, its transpose At has dimensions m× n. For instance

F t =

9 6 38 5 27 4 1

Gt = (1 2 1)

Matrix multiplication [*** Notice that to multiply two matrices we need acompatibility condition. In particular, if the left matrix has dimensions n×mthe right matrix should have dimensions m× l. ***] Then we have a matrix

C = [cij ] = AB

where

cij =∑

l

ailblj.

For instance, we have

DE =

(

1 24 5

)(

2 43 6

)

=

(

2 + 6 4 + 128 + 15 16 + 30

)

=

(

8 1623 46

)

ED =

(

2 43 6

)(

1 24 5

)

=

(

2 + 16 4 + 203 + 24 6 + 30

)

=

(

18 2427 36

)

Thus,[*** the product of two matrices does not commute!! ***]

FG =

9 8 76 5 43 2 1

121

=

9 + 16 + 76 + 10 + 41 + 4 + 1

=

32206

Determinant and inverse matrix: the 2x2 case We will restrict to the 2 × 2 casefor now. We define the determinant

det(A) = a11a22 − a12a21,

and the inverse

A−1 =1

det(A)

(

a22 −a12−a21 a11

)

.

28

Page 35: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.5. Review of matrices

Let’s check that:

det(A)AA−1 =

(

a11 a12a21 a22

)(

a22 −a12−a21 a11

)

=

(

a22aa11 − a12a21 −a11a12 + a11a12a22a21 − a22a21 a22aa11 − a12a21

)

=

(

det(A) 00 det(A)

)

Let’s see an example:

det(D) = 5− 8 = −3,

D−1 =1

−3

(

5 −2−4 1

)

.

Determinant and inverse matrix: the 3x3 case We define the determinant

det(A) = a11a22a33 + a12a23a31 + a21a32a13 − a13a22a13 − a12a21a33 − a23a32a11.

In particular,

det(F ) = 0.

To compute the inverse matrix, we are going to use Gaussian elimination. Let’s show howto do this by computing H−1. First, we write the extended matrix

H|I =

1 2 3 1 0 01 2 4 0 1 01 1 1 0 0 1

.

The goal is to obtain the identity matrix on the left part by elementary manipulations ofthe rows, I|H−1. We compute

1 2 3 1 0 00 0 1 −1 1 00 −1 −2 −1 0 1

,

1 2 3 1 0 00 −1 −2 −1 0 10 0 1 −1 1 0

,

1 2 3 1 0 00 1 2 1 0 −10 0 1 −1 1 0

,

1 0 −1 −1 0 20 1 2 1 0 −10 0 1 −1 1 0

,

29

Page 36: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

1 0 −1 −1 0 20 1 0 3 −2 −10 0 1 −1 1 0

,

1 0 0 −2 1 20 1 0 3 −2 −10 0 1 −1 1 0

= I|H−1.

Let’s check:

H−1H =

−2 1 23 −2 −1−1 1 0

1 2 31 2 41 1 1

.

Given a matrix A we want to solve the eigenvalues/eigenvectors problem, i.e. we want tosolve

Ax = λx.

In this problem, we have to find the real number λ and the vector x.Example 2.13. Given

A =

(

1 22 2

)

,

find the eigenvalues and eigenvectors.

Solution: To find the eigenvalues, we have to find the λ such that

det(A− λId) = (1− λ)(2− λ)− 4 = 0.

This second order equation is

2− λ− 2λ+ λ2 − 4 = λ2 − 3λ− 2 = 0,

and has solutions

λ1 =3 +

(−3)2 + 8

2=

3 +√17

2,

λ2 =3−

(−3)2 + 8

2=

3−√17

2.

Now we have to solve the systems

(A− λ1Id)x1 = 0, (A− λ2Id)x2 = 0.

The first system in equations form is

(

1− 3 +√17

2

)

x1 + 2x2 = 0, 2x1 +

(

2− 3 +√17

2

)

x2 = 0.

To solve this system notice that the system reduces to

(

0.25 +

√17

4

)

x1 = x2.

30

Page 37: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.6. Linear systems of ODEs

Consequently, the set of solutions can be written as((

0.25 +

√17

4

)

α,α

)

, α ∈ R

.

The second system is(

1− 3−√17

2

)

x1 + 2x2 = 0, 2x1 +

(

2− 3−√17

2

)

x2 = 0.

We solve this system by noticing that

x1 = −(

0.25 +

√17

4

)

x2.

Then, the set of solutions can be written as(

−(

0.25 +

√17

4

)

α,α

)

, α ∈ R

.

2.6 Linear systems of ODEs

[*** Given a homogeneous system with n unknowns, we have to find n solutions~xi, i = 1, 2...n, such that its wronskian

W (t) = det

x11(t) x21(t) ... xn1(t)x12(t) x22(t) ... xn2(t)

......

......

x1n(t) x2n(t) ... xnn(t)

6= 0.

***]

Of course, this seems analogous (as it is), to the second order ODE. Recall that for agiven second order ODE, we have to look for two solutions with a non-zero wronskian.Furthermore, we proved that if the wronskian is not zero initially, then it does not vanishlater. [*** This is also true for the wronskian of a system. ***]

Let’s consider the system~x′ = A~x.

We are going to look for a solution of the form

~x = ~ξert.

Inserting this ansatz into the equation, we have

r~ξert = A~ξert,

31

Page 38: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

so

(A− rId)~ξert = 0.

We conclude that r is an eigenvalue and ~ξ is an eigenvector. Consequently, if we haven eigenvectors with n corresponding eigenvalues (that, for the moment, we assume to bedifferent and real), the general solution is

~x(t) = c1~ξ1er1t + c2~ξ2e

r2t + ...+ cn~ξnernt

[*** Again, this situation is analogous to the second order ODE. For a secondorder ODE we look for solutions with exponential form and non-zero wronskianto find the general solution. ***]Example 2.14. Find the general solution to

~x′ = A~x,

where

A =

(

1 22 2

)

.

Solution: Using a previous example, we know that the eigenvalues/eigenvectors are

λ1 =3 +

(−3)2 + 8

2=

3 +√17

2,

(

0.25 +

√17

4, 1

)

.

and

λ2 =3−

(−3)2 + 8

2=

3−√17

2,

(

−(

0.25 +

√17

4

)

, 1

)

.

Consequently, the general solution is

~x = c1

(

0.25 +

√17

4, 1

)

e3+

√17

2t + c2

(

−(

0.25 +

√17

4

)

, 1

)

e3−

√17

2t.

Example 2.15. Compute the wronskian corresponding to

~x1 =

(

0.25 +

√17

4, 1

)

e3+

√17

2t

~x2 =

(

−(

0.25 +

√17

4

)

, 1

)

e3−

√17

2t.

32

Page 39: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.6. Linear systems of ODEs

Solution: We have the matrix

X =

(0.25 +√174 )e

3+√

17

2t −

(

0.25 +√174

)

e3−

√17

2t

e3+

√17

2t e

3−√

17

2t

.

The determinant is then

W (t) = det(X) = e3−

√17

2te

3+√

17

2t

(

(0.25 +

√17

4) +

(

0.25 +

√17

4

))

6= 0.

Of course, there are other two situations depending on the character of the eigenvalues,say, complex roots and double roots. In the case of complex eigenvalues, the eigenvectorswill be complex too. The linear combination of these two complex vectors is a complexvalued solution

~y(t) = c1~χ1ez1t + c2~χ2e

z2t.

[*** As we are interested in real solutions, we fix one of the terms ~χiezit and

take its real and imaginary parts to form our general solution:

~x(t) = c1Re ~χ1ez1t + c2Im ~χ1e

z1t.

***]Example 2.16. Find the general solution to

~x′ = A~x,

where

A =

(

0 −11 0

)

.

Solution: To find the eigenvalues, we have to solve the second order polynomial equation

λ2 + 1 = 0.

The solutions areλ1 = i, λ2 = −i

To find the first eigenvector, we have to solve the system

(

−i −11 −i

)(

x1x2

)

= 0,

finding−ix1 = x2.

Consequently, the first eigenvector is

(1,−i).

33

Page 40: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

To find the second eigenvector, we have to solve the system

(

i −11 i

)(

x1x2

)

= 0,

findingix1 = x2.

Consequently, the second eigenvector is

(1, i).

We take i = 1 and consider the function

(1,−i)eit = (cos(t) + i sin(t)) (1,−i) = (cos(t) + i sin(t),− cos(t)i+ sin(t)) ,

so,(1,−i)eit = (cos(t), sin(t)) + i (sin(t),− cos(t))

We define the function

~x(t) = c1Re (1,−i)eit + c2Im (1,−i)eit,

and, substituting,

~x(t) = c1 (cos(t), sin(t)) + c2 (sin(t),− cos(t)) .

Example 2.17. Check that

~x(t) = c1 (cos(t), sin(t)) + c2 (sin(t),− cos(t)) .

is a solution to the system~x′ = A~x,

with

A =

(

0 −11 0

)

.

Solution: We have

~x′ = c1 (− sin(t), cos(t)) + c2 (cos(t), sin(t)) .

We compute

A~x = c1

(

− sin(t)cos(t)

)

+ c2

(

cos(t)sin(t)

)

.

Example 2.18. Compute the wronskian corresponding to

~x1 = (cos(t), sin(t)) ,

~x2 = (sin(t),− cos(t)) .

34

Page 41: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.6. Linear systems of ODEs

Solution:

X =

(

cos(t) sin(t)sin(t) − cos(t)

)

.

The determinant is thenW (t) = det(X) = −1.

This example shows that, by taking the real and imaginary parts, we can form a generalsolution to a given system of ODEs.Example 2.19. Find the general solution to

~x′ = A~x,

where

A =

(

2 −11 0

)

.

Solution: The equation for the eigenvalues in this case is

p(λ) = −λ(2− λ) + 1 = λ2 − 2λ+ 1 = (λ− 1)2 = 0,

so, we only find one eigenvalue

λ = 1.

The eigenvector corresponding to this eigenvalue is a solution to

(2− 1)ξ1 − ξ2 = 0,

so, we can take~ξ1 = (1, 1).

We guess that the second solution has the form

~x2 = ~ξ1teλ1t + ~ηeλ1t.

Using this latter expression into the equation, we find

~x′2 = λ1~ξ1te

λ1t + ~ξ1eλ1t + λ1~ηe

λ1t, (2.3)

andA~x2 = A~ξ1te

λ1t +A~ηeλ1t. (2.4)

As ~x2 should be a solution of the system

~x′2 = A~x2,

we find thatλ1ξ1te

λ1t = Aξ1teλ1t,

~ξ1eλ1t + λ1~ηe

λ1t = A~ηeλ1t. (2.5)

35

Page 42: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

[*** Notice that this pair of equations is obtained by matching the terms withequal powers of t. Equivalently, you may take t = 0 in (2.3) and (2.3) to obtainequation (2.5) and then the other equation follows. ***] We rewrite equation (2.5)as

~ξ1 = (A− λ1Id)~η,

so

1 = η1 − η2.

Consequently, we can choose

η = (2, 1).

Then we have the general solution given by

~x = c1~ξ1eλ1t + c2

(

~ξ1teλ1t + ~ηeλ1t

)

.

Example 2.20. Check that

~x = c1~ξ1eλ1t + c2

(

~ξ1teλ1t + ~ηeλ1t

)

.

is a solution to the system

~x′ = A~x,

with

A =

(

2 −11 0

)

.

Solution: We have

~x′ = c1λ1~ξ1e

λ1t + c2

(

λ1~ξ1te

λ1t + ~ξ1eλ1t + λ1~ηe

λ1t)

.

We compute

A~x = c1A~ξ1eλ1t + c2

(

A~ξ1teλ1t +A~ηeλ1t

)

.

Using the definition of A, ~ξ and ~η, we have

A~x = c1λ1~ξ1e

λ1t + c2

(

λ1~ξ1te

λ1t + (λ1~η + ~ξ)eλ1t)

.

Example 2.21. Compute the wronskian corresponding to

~x1 = (1, 1)et,

~x2 = (1, 1)tet + (2, 1)et.

36

Page 43: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

2.6. Linear systems of ODEs

Solution:

X =

(

et tet + 2et

et tet + et

)

.

The determinant is then

W (t) = det(X) = e2t(t+ 1− t− 2) = −e2t.

[*** For a system of ODE’s we need a term ηeλ1t that did not appear whensolving a single ODE’s. The reason for that is that, as we are now in 2 (ormore) dimensions, the linear map ~v = ~at +~b generally requires ~a and ~b to belinearly independent. Then we construct our second solution as

~x2 = ~veλt

for the appropriate choice of ~a and ~b. Notice that in one dimension (so a, b arenumbers), the linear map v = at+ b gives us

y2 = atert + bert,

being the first solutiony1 = ert.

Consequently, the term with b add no extra information, and it can be ab-sorbed by y1. This does NOT happen in several dimensions due to the linearindependence of the vectors ~a and ~b. So, the term with ~b adds useful extrainformation that we can NOT forget. ***]

As we can expect, when dealing with the non-homogeneous system

~x′ = A~x+ ~f(t),

we should proceed as with a single, second order ODE. First we obtain the general solutionto the homogeneous system

~x′h = A~xh,

~xh = c1~x1eλ1t + c2~x2e

λ2t.

Then we have to find a particular solution of the non-homogeneous problem

~xp.

To find this particular solution we can use undetermined coefficients and variation ofparameters.

37

Page 44: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 2. Review of Second order ODEs and linear systems

38

Page 45: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3

Worked examples

3.1 Falling objects

Example 3.1. Write a mathematical model of a falling object near sea level without

considering friction.

Solution: We measure the mass in kg, time in seconds and the height in meters. Let’swrite M for the mass of the object. Then the unknown is the height at time t. We denotethis unknown function by h(t). Notice that the book consider that the velocity is positivein the downward direction (the object is falling). We consider our origin of coordinatesat the sea level (height zero) and then we consider that the velocity is negative in thedownward direction (the sign meaning that the object is falling).

The Second Newtonian Law states that the force equals mass times acceleration, i.e.

F = Ma.

We know that, near sea level, the gravity acts with acceleration given by −g = −9.8m/s2.Notice that the − in front indicates that the movement is directed downward.

Now notice that if h(t + s), h(t) are two different heights for different times t < t+ s, wehave

v =h(t+ s)− h(t)

s,

is the mean velocity (with units of m/s). Taking the limit s → 0, we recover

h′(t) = velocity at t.

With the same reasoning, we have

h′′(t) = acceleration at t.

Collecting both expressions for the acceleration, we obtain

h′′(t) = −gM.

39

Page 46: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

Example 3.2. Solve the previous mathematical model of a falling object near sea levelwithout considering friction assuming that the initial height is h(0) = 1 and the initialvelocity is h′(0) = 0.

Solution: The model ish′′(t) = −gM.

Consequently, applying the Fundamental Theorem of Calculus

h′(t)− h′(0) =∫ t

0−gMds = −gMt.

So, applying FTC again

h(t)− h(0) =

∫ t

0h′(s)ds =

∫ t

0−gMsds =

−gMt2

2.

We get the final answer

h(t) = 1− gMt2

2.

In particular, h(t) < h(0) and the object is falling.Example 3.3. Assume that an object is falling from a helicopter with initial velocityv(0) = 0. Write a mathematical model for this falling object near sea level consideringfriction.

Solution: The drag due to friction is usually modeled with a term −γv(t), where v(t) isthe velocity and γ is a constant with units of kg/s. Consequently, the term γv(t) is anacceleration.

We use our previous model with the new term and we get

h′′(t) = −gM − γv(t).

As v(t) = h′(t), we can write the previous equation as

v′(t) = −gM − γv(t), v(0) = 0. (3.1)

Example 3.4. Find the equilibrium solution of the model derived in Example 3.3.

Solution:

We have to solve the equation

−gM + γv = 0 ⇒ v =gM

γ.

So,

v(t) ≡ v =gM

γ,

is the equilibrium solution. In this context, the equilibrium solution is called terminalvelocity.

Notice that, as we can see in the figure, the velocity will decrease until the terminalvelocity).

40

Page 47: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.2. Malthus’s Law

−2 −1.8 −1.6 −1.4 −1.2 −1 −0.8 −0.6 −0.4 −0.2 0−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Figure 3.1: The RHS for (3.1) (and fixed values for the constants).

3.2 Malthus’s Law

Let’s introduce our first model in population dynamics: Malthus’ Law. This populationdynamics model was introduced by Thomas Robert Malthus (XVIII). There are two basichypotheses:

1. the population change is proportional to itself.

2. there is no growth restriction (as it might be caused by finite space,...)

The ordinary differential equation (ODE) is

dy

dt= ry(t), y(0) = y0,

where y0 ≥ 0 is the initial population and r ∈ R is the constant of proportionality.Example 3.5. Solve Malthus’ Law.

Solution: We solve that using that it’s a separable equation:

dy

dt= ay(t) ⇒ dy

y= rdt,

and, integrating,∫ y(t)

y0

dy

y= r

∫ t

0dt ⇒ log(y(t)) − log(y0) = r(t− 0) ⇒ y(t) = y0e

rt.

41

Page 48: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

Figure 3.2: a) Cable about the muskrats to the New York Times b) A muskrat.

Remark 3.1. When r < 0, Malthus law models exponential decay and it is widely usedas a model of radiactive decay.

In this way, we can find the solution of

y′(t) = y(t), y(0) = y0,

for y0 ∈ R fixed but arbitrary. The solution is then

y(t) = y0et.

Example 3.6. In Figure 3.2, we can see how the muskrats appear in Europe. The ques-tion is: Assuming that the muskrat population grows according to Malthus law, estimateusing the numbers and dates in the cable to The New York Times the constant of propor-tionality/rate of growth r.

42

Page 49: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.3. Von Bertalanffy equation

Solution: We take the initial time 1905. We have

y(0) = the population in Czech Republic at 1905 = 20,

y(9) = the population in Czech Republic at 1914 = 200000.

Thus, using the formula for the solution, we have

y(9) = 200000 = y0er9 = 20e9r ,

so,10000 = e9r ⇒ ln(10000)/9 = r ≈ 1.02.

3.3 Von Bertalanffy equation

Let’s consider a population of some kind of animal. When the growth is restricted (forinstance because the space is finite or the available resources are finite), the Malthus’sLaw doesn’t apply and should be modified.Example 3.7. Obtain a model of the population with the following hypotheses:

1. the rate of change of the population is a linear function of the population.

2. there is growth restriction.

Solution: Let’s write y(t) for the number of animals in the population. We want to definea function f(y(t)) such that

1. f(y) is a linear function of y.

2. there exists a number N such that f(N) = 0. Or, in other words, there is growthrestriction.

3. f(y) > 0 if 0 < y < N . In other words, the population should grow if its number isstill small.

With these hypotheses we get

dy

dt= r(N − y(t)), y(0) = y0, (3.2)

where r > 0 is the rate of growth and N is the maximum amount of individuals that theenvironment may hold.Example 3.8. Solve (3.2).

Solution: We can solve the ODE as before,

− dy

N − y= −rdt ⇒ log(|N − y|) = −rt+ C ⇒ N − y(t) = e−rt+C ,

where C is the constant appearing from the integration procedure. We need to find thisconstant C. We have

y(t) = N − e−rt+C , y(0) = N − eC = y0 ⇒ ln(N − y0) = C.

43

Page 50: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Figure 3.3: f(y) = 1− y.

We conclude

y(t) = N − e−rt(N − y0).

Remark 3.2. This equation is called von Bertalanffy eq. and it can be used to describethe length of some fish.

We notice that

limt→∞

y(t) = N,

and also that, if y(t) = N , then y′(t) = 0. This is an example of an extremely importantconcept in differential equations: equilibrium point.

Now we see that y = N is an equilibrium and f ′(N) = −r < 0, so it’s stable.

3.4 Logistic growth

Now the hypotheses are

1. if the population is small, its change is proportional to itself.

2. there is growth restriction.

3. as the population grows, the effect of the growth restriction is higher.

44

Page 51: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.4. Logistic growth

It is then when we use the logistic equation:

dy

dt= ry(t)(1− y(t)

N), y(0) = y0.

where r > 0 is the rate of growth and N is the maximum population.Example 3.9. Solve the logistic equation

Solution: As before, we have a separable equation, so

dy

y − y2

N

= rdt,

dy

y − y2

N

=

rdt,

using partial fractions, we get

(

1N

1− yN

+1

y

)

dP = rt+ C,

where C is the constant appearing from the indefinite integration. Thus,

− log |1− y

N|+ ln |y| = rt+ C ⇒ Ny(t)

N − y(t)= ert+C ,

y(t) =Nert+C

N + ert+C.

We need to find the constant C. We use that at t = 0 we have y(0) = y0, so

y(0) =NeC

N + eC⇒ Ny0

N − y0= eC ⇒ C = ln

(

Ny0N − y0

)

.

When we introduce this expression for C we get

y(t) =Nert Ny0

N−y0

N + ert Ny0N−y0

=Ny0e

rt 1N−y0

1 + ert y0N−y0

=Ny0e

rt

N + (ert − 1)y0.

This is our final expression.Example 3.10. Find the equilibrium solution of the logistic equation.

Solution: Asf(y) = ry(1− y/N)

the equilibria for the logistic equation are

y = 0 and y = N.

In this case the derivative is

f ′(y) =d

dy(ry(1− y/N)) =

d

dy(ry − ry2/N) = r − 2ry/N.

45

Page 52: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−2

−1.5

−1

−0.5

0

0.5

Figure 3.4: f(y) = y(1− y).

0 5 10 150

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Figure 3.5: Solutions corresponding to different initial data, y0 = 0.2 (black),y0 = 0.001(blue) and y0 = 0.5 (red)

46

Page 53: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.4. Logistic growth

When we evaluate f ′(y) at the equilibria, using r > 0, we get

f ′(0) = r > 0 and f ′(N) = r − 2r = −r < 0,

so, y = 0 is an unstable equilibrium and y = N is a stable equilibrium (see Figure 3.5).

Example 3.11. Let’s assume that the world population follows a logistic growth. Usingthe table

Year Population (millions)

1990 5263

1995 5674

2000 6070

2005 6454

2010 6972

Compute the parameters r and N . What is your approximation to the human populationin 2015? (The UN estimation is 7324 millions)

Solution: Taking 1990 as our initial time we get P (0) = P0 = 5263. We have

P (5) = 5674 =5263Ner5

N + 5263(e5r − 1),

P (10) = 6070 =5263Ner10

N + 5263(e10r − 1).

From these two equations we get N as a function of r in two equivalent ways:

N =5674 · 5263(e5r − 1)

5263e5r − 5674,

N =6070 · 5263(e10r − 1)

5263e10r − 6070.

As both expressions are for the same value N (which is a unique number), we have anequation for r

5674 · 5263(e5r − 1)

5263e5r − 5674=

6070 · 5263(e10r − 1)

5263e10r − 6070.

Using e10r − 1 = (e5r + 1)(e5r − 1), after some simplifications,

5674

5263e5r − 5674=

6070(e5r + 1)

5263e10r − 6070,

and5674(5263e10r − 6070) = 6070(e5r + 1)(5263e5r − 5674).

If we write x = e5r the previous equation is a second order algebraic equation thar we cansolve with the second order equation formula getting

r ≈ 0.036.

47

Page 54: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

With this value of r we recover

N ≈ 9400 million people.

Using these two values we estimate that, in 2015, would be 7123 million people on Earth.

3.5 Threshold

Let’s consider now the equation

y′ = −y(1− y), y(0) = y0 > 0.

In this equation, the critical points are y1 = 0, y2 = 1. Now notice that (see Figure 3.4)

f(y) = −y(1− y) < 0, for 0 < y < 1.

Consequently, in this region the solution approaches the equilibrium point y1 = 0. On theother hand, we have

f(y) = −y(1− y) > 0, for 1 < y,

and we obtain that the solution runs away the equilibrium point y2 = 1. We conclude thaty1 = 0 is stable while y2 = 1 is unstable (see Figure 3.5). Furthermore, as the solutiongrows if initially is bigger than y2 = 1, we can think on y2 = 1 as a threshold level.

Recall that sometimes we use the name linear (or local) stability. This means that thethe solution verifies

limt→∞

y(t) = 0,

if the initial point y0 is close enough to the equilibria. In particular, in this example, wesee that if y0 > 1, the solution verifies

limt→∞

y(t) = ∞.

Consequently, x = 0 is a linearly stable equilibrium point, but it is not globally stable (asthere are initial data moving away from the equilibrium point).

[*** This equation is separable. Can you solve it? HINT: try to use thesame approach as for the logistic case in the previous section. ***]

3.6 First order equations and potentials

We consider now the situation where a particle is moving under the effects of a potentialforce (given by the potential function V (·)). This implies the equation

y′(t) = − d

dyV (y(t)) y(0) = y0,

48

Page 55: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.6. First order equations and potentials

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−0.5

0

0.5

1

1.5

2

Figure 3.6: f(y) = −y(1− y).

where the − sign is a physical convention saying that the particle try to minimize thepotential energy. Then, we notice that, due to chain rule,

d

dtV (y(t)) =

d

dyV (y(t))

dy

dt= −

(

d

dyV (y(t))

)2

≤ 0.

We obtain that the value of the potential function V (·) decreases along trajectories. Thisequations are also called of gradient type.

Of course, this implies that the critical points of the function V (·) are the equilibria ofthe ODE. Furthermore, the equilibrium point will be stable if its a local minima of V (·),while the equilibrium point will be unstable if its a local maxima.Example 3.12. Find the potential and the equilibrium points for the ODE

y′ = −y.

What is the behaviour of y(t) for large times?

Solution: We have

− d

dyV (y) = −y ⇒ V (y) =

y2

2+ c.

As we are interested in the force, −V ′, we can take c = 0. [*** Notice that thepotential can be defined up to an additive constant. ***] Then we redefine

V (y) =y2

2,

49

Page 56: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

and the only critical point is x = 0, which is a global minima. Consequently, x = 0 is astable equilibrium point for the ODE and we have

limt→∞

y(t) = 0.

Example 3.13. Find the potential and the equilibrium points for the ODE

y′ = y − y3.

What is the behaviour of y(t) for large times?

Solution: We have

− d

dyV (y) = y − y3 ⇒ V (y) = −y2

2+

y4

4.

The critical points are

x = 0, x = 1, x = −1.

x = ±1 are global minima while x = 0 is a local maximum. Consequently, x = 0 is aunstable equilibrium point and x = ±1 are stable equilibria. Then we have

1. if y0 > 0,

limt→∞

y(t) = 1,

2. if y0 < 0,

limt→∞

y(t) = −1.

Example 3.14. Find the potential and the equilibrium points for the ODE

y′ = sin(y).

What is the behaviour of y(t) for large times?

Solution: We have

− d

dyV (y) = sin(y) ⇒ V (y) = cos(y).

The critical points are

x = kπ

x = ±1 are global minima while x = 0 is a local maximum. Consequently, x = 0 is aunstable equilibrium point and x = ±1 are stable equilibria. Then we have

1. if k is odd, x = kπ is a local minimum. Thus x is stable,

2. if k is even, x = kπ is a local maximum. Thus x is unstable.

With this information, we can conclude the large time behaviour of the solution dependingon the initial data. [*** Can you explicit write this large time behaviour? ***]

50

Page 57: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.7. The pendulum equation and its linearization

3.7 The pendulum equation and its linearization

Let’s study an important example:Example 3.15. Obtain the equation of the pendulum.

Solution: Let’s assume that the rod has length 1, and the lentil has mass equal to 1. Wefurther assume that the only force acting is the gravity (in particular, there is no friction).Then, the force is

F = g · e2,with e2 = (0, 1) (the gravity points downwards). We can write F as a component parallelto the rod and a component perpendicular to the rod. The latter component is the angularone. The component parallel to the rod balances with the force that the rod does to preventthe lentil to escape. Consequently, we only have the angular component playing a role. Alittle bit of basic trigonometry gives us that this angular component can be written as

Fa = g sin(θ),

where θ is the angle of the rod with the vertical (the y−axis). As this is a restoring force,we need to consider it with a − sign in front of it.

We end with the pendulum equation:

θ′′ = −g sin(θ).

There is an interesting behaviour hidden in this equation. Let’s consider the evolution ofthe total energy

E(t) = Ec(t) + Ep(t),

where

Ec(t) =1

2(θ′(t))2, (kinetic)

Ep(t) = −g cos(θ(t)), (potential).

We haved

dtE(t) = sin(θ(t))θ′ + θ′θ′′ = sin(θ(t))θ′ − θ′g sin(θ) = 0.

Consequently, the energy is conserved along trajectories:

E(t) = E(0)

As we have seen, the pendulum equation is a nonlinear, second order equation. However,observe that, if the angle θ is very small |θ| ≈ 0, we have

sin(θ) ≈ θ

[*** This is obtained using Taylor’s Theorem. can you complete the details?***] Consequently, we can approximate our original, nonlinear equation by a simpler,linear equation

θ′′ = −gθ.

51

Page 58: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

[*** This equation is called the harmonic oscillator. ***]

[*** Notice that a second order ODE can be written as a system of first orderODE. To do that, we define the new variable u = θ′ (so, u′ = θ′′). Then we havethe new (equivalent) system

θ′ = u

u′ = −gθ

***]

3.8 Harmonic oscillator and restoring forces

The harmonic oscillator is given by the second order ODE

y′′ = −y,

or, equivalently, the system

y′ = u

u′ = −y.

Now notice that if we define

E(t) =1

2(y2 + u2),

we have

E′(t) = yy′ + uu′ = yu+ u(−y) = 0,

so, the energy is conserved:

E(t) = E(0).

We can see this from the equation by multiplying against y′ :

y′(y′′ + y) =1

2(y2 + (y′)2) = 0.

Of course, this is not a huge surprise because we know that the solution to the equationis given in terms of

y1 = sin(t), y2 = cos(t).

[*** There is an interesting feature of these conservative systems that ariseswhen trying to approximate their solutions using a naive numerical scheme.If we use an explicit method (like to ones in Chapter 1) to approximate thesolutions, we see that the numerical solution does not conserve the energy(see Figure 3.7). Of course, this is a purely numerical artifact that can bemitigated using better explicit integrators like Runge-Kutta4 (see Figure 3.8)or with the (so called) simplectic integrators. ***]

52

Page 59: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.8. Harmonic oscillator and restoring forces

−150 −100 −50 0 50 100 150−150

−100

−50

0

50

100

150

Figure 3.7: Numerical solution (using Forward Euler) to the Harmonic oscillator up totime T = 1000 with time step h = 0.01.

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Figure 3.8: Numerical solution (using RK4) to the Harmonic oscillator up to time T = 1000with time step h = 0.01.

53

Page 60: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

Consider now a spring under certain (unknown) restoring force F (y). This restoring forcesatisfy

F (y) > 0 if y < 0,

F (y) < 0 if y > 0,

F (0) = 0.

Assume also that F (y) is small enough. Then the Second Newtonian Law gives us

y′′ = F (y) ≈ F (0) + F ′(0)y +O(F 2).

As F (y) is decreasing at y = 0, we have that the original ODE can be approximated by

y′′ = −ky′′,

where −k = F ′(0) < 0.

3.9 Second order equations and potentials

Let’s consider a potential function V (·) and the equation

y′′ = − d

dyV (y(t)).

We write this equation as a system

y′ = u

u′ = − d

dyV (y(t)).

We define the energy function

E(t) =1

2u2 + V (y).

We have

d

dtE(t) = uu′ +

d

dyV (y(t))y′

= u

(

− d

dyV (y(t))

)

+d

dyV (y(t))u

= 0.

[*** A typical behaviour of these kind of conservative system is the oscillation.***]

54

Page 61: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

3.10. Hamiltonian mechanics

3.10 Hamiltonian mechanics

Given a function (called the Hamiltonian, H(·, ·), we consider the system

p′(t) = −∂H(q(t), p(t))

∂q

q′(t) =∂H(q(t), p(t))

∂p.

This system appear ins Hamiltonian dynamics. In Hamiltonian formulation, a classicalphysical system is described by (q, p), where q denotes the coordinate (some sort of de-scribing position) and p denotes momentum (p = mv, where v denotes the velocity).

Notice that this system conserves the Hamiltonian (which has units of energy) alongtrajectories:

d

dtH(q(t), p(t)) =

∂H(q(t), p(t))

∂pp′ +

∂H(q(t), p(t))

∂qq′

=∂H(q(t), p(t))

∂p

(

−∂H(q(t), p(t))

∂q

)

+∂H(q(t), p(t))

∂q

∂H(q(t), p(t))

∂p

= 0.

55

Page 62: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 3. Worked examples

56

Page 63: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4

Existence and Uniqueness ofsolution

4.1 Existence and uniqueness: The Theorem

So far, we are able to solve linear and separable ODE’s and we know how to sketch theslope field. However, given an ODE there is a chance that this ODE has no solution.Or has many. We need a theory that clearly states whether the ODE gives us a well-posed problem (and consequently, our slope field makes sense). Also notice that we don’twant to work hard trying to solve or understand an ODE with no solution. Another veryimportant reason is that, if a given ODE appearing in physics, let’s say, has more thanone solution, then we can not forecast the behaviour of the physical system.

So, we want to know if a given ODE has a solution and if this solution isunique.

Let’s consider first a linear ODE

y′ + α(t)y(t) = f(t), y(t0) = y0. (4.1)

Then, we have the following theorem:Theorem 4.1. Let α(t), f(t) be continuous functions in an interval I = [a, b] such thatt0 ∈ I, then there exists a unique function y(t) (see (1.3)), defined for t ∈ I and satisfying(4.1).

Now, using that we have an explicit solution for the linear case we can extract severalconsequences from it. [***

1. Assuming that the coefficients α(t), f(t) are continuous, there is a generalsolution, containing an arbitrary constant (which depends on the initialdata), that includes all solutions of the differential equation:

y(t) = e−∫t

0α(s)ds

(∫ t

0e∫u

0α(s)dsf(u)du+ C

)

.

57

Page 64: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4. Existence and Uniqueness of solution

2. The solution y(t) is as good (or as bad) as the coefficients α(t), f(t). Inparticular, if α(t), f(t) are continuous for every t, then the function y(t) isdefined and is differentiable for every t.

***]

If instead of a linear equation we have the nonlinear equation

y′ = f(y(t), t), y(t0) = y0, (4.2)

the situation is much more involved. We haveTheorem 4.2. Let the functions f and ∂f

∂y be continuous in some rectangle R = [a, b]×[c, d]containing the point (t0, y0). Then, in some (maybe very small) interval t0−h < t < t0+hcontained in [a, b], there is a unique solution y(t) of the initial value problem (4.2).

[*** Notice that the uniqueness implies that two integral curves can not toucheach other! ***]

Let’s study an important example showing bad behaviour:Example 4.1. Study the following initial value problem

y′ = y1/3, y(0) = 0.

Solution: This ODE is separable, an it can be solved with these methods. We have

dy

y1/3= dt,

and integrating,1.5(y(t))2/3 = t

y(t) =

(

2

3t

)3/2

.

Now notice that y(t) = 0 is also a solution. Furthermore, −(

23t)3/2

. is also a solution.We see that we can construct a whole bunch of different solutions just by glueing togetherthese three basic bricks.

Finally, notice that f(y) = y1/3 has no a well defined partial derivative, so the Theoremdoes not apply to this case.

[*** There are a bunch of important remarks concerning nonlinear equationsthat we should keep in mind.

1. If the theorem can not be applied, we can have examples where theuniqueness blows up (so, more than one solution!). See for instance Ex-ample 4.1.

2. If the theorem can not be applied, we can have examples where there isno solution.

3. We can have a unique solution that exists for a small time. See forinstance Example 1.7.

58

Page 65: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

4.2. Some preliminary results

***]

We observe that there are few similarities between the behaviour of linear and non-linearODE. Furthermore, almost none of the statements that work for linear eq. actu-ally work for nonlinear eq. Maybe the one that we should take more cautiously is thelack of global existence even for very smooth and well-behaved rate functions f(y, t).

4.2 Some preliminary results

We start with the definition of Lipschitz function:Definition 4.1. A function f is called Lipschitz if there exists L ∈ R

+ such that

|f(x)− f(y)| ≤ L|x− y| ∀x, y.

In the case where 0 < L < 1, we say that f is a contraction mapping.

In particular, notice that, if f ∈ C1 function on a compact domain Ω ⊂ R, using Taylor’sTheorem, we have

f(x) = f(y) + f ′(ξ)(x − y),

where ξ ∈ [x, y]. Notice that Taylor’s Theorem ensures the existence of ξ, but we don’tknow its value!!

Then we have

|f(x)− f(y)| ≤ |f ′(ξ)||x− y| ≤ maxξ∈Ω

|f ′(ξ)||x − y| = L|x− y|.

In other words, [*** every C1 function is locally Lipschitz! ***]Definition 4.2. A vector space, X, endowed with a norm such that every Cauchy sequenceconverges to a point in X is called complete.Definition 4.3. A normed, complete vector space, X, is called a Banach space.

Now, we are going to introduce a famous Lemma:Lemma 4.1 (Banach’s fixed point Theorem). Let X be a Banach space, a contractionmapping, f : X → X has a unique fixed point x∗ such that

x∗ = f(x∗).

Proof. Let’s take X = R, bu the proof can be carried out in the more general setting. Foran arbitrary point x0 ∈ R, we define the iteration

xn+1 = f(xn).

We have

|f(x1)− f(x0)| ≤ L|x1 − x0|,|f(x2)− f(x1)| ≤ L|x2 − x1| = L|f(x1)− f(x0)| ≤ L2|x1 − x0|,

|f(xn)− f(xn−1)| ≤ Ln|x1 − x0|.

59

Page 66: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4. Existence and Uniqueness of solution

If you are on the very rigorous side, you can proof the general case using mathematicalinduction.

As a consequence|xn+1 − xn| ≤ Ln|x1 − x0|.

We want to prove that the sequence xn is Cauchy. By doing so, we obtain the existenceof a limit.

Memento 4.1. As the real numbers form a complete space, every Cauchy sequence (ofreal numbers) converges.

We fix n > m ≥ 1 two integers. We have

|xn − xm| = |xn − xn−1 + xn−1 − xm| = |xn − xn−1 + xn−1 − xn−2 + xn−2 − xm|...,

so

|xn − xm| ≤ |xn − xn−1|+ |xn−1 − xn−2|+ ...+ |xm+1 − xm|≤ Ln−1|x1 − x0|+ Ln−2|x1 − x0|+ ...+ Lm|x1 − x0|≤ Lm

(

1 + L+ L2 + ...+ Ln−1−m)

|x1 − x0|

≤ Lm

( ∞∑

k=0

Lk

)

|x1 − x0|

≤ Lm

1− L|x1 − x0|.

By taking m big enough, we have

|xn − xm| < ǫ,

for every fixed ǫ. So, xn form a Cauchy sequence. And consequently, xn converges to alimit x∗.

Notice thatx∗ = lim

n→∞xn = lim

n→∞f(xn−1) = f( lim

n→∞xn−1) = f(x∗),

and x∗ is a fixed point.

We only have to prove the uniqueness of the fixed point, but this step is easy. We aregoing to argue by contradiction: assume that y is another fixed point. Then

|x∗ − y| = |f(x∗)− f(y)| ≤ L|x∗ − y|.

Example 4.2. The Babylonians (600 B.C.) used computed√a by iterating the mapping

f(x) =1

2

(a

x+ x)

.

Explain why.

60

Page 67: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

4.2. Some preliminary results

Solution: We have that a fixed point of f(x) verifies

f(x∗) =1

2

( a

x∗+ x∗

)

= x∗,

so1

2x∗ =

1

2

a

x∗,

or(x∗)2 = a.

Example 4.3. The Newton’s Method is an iterative procedure to find roots of a functionf(x). The iteration is given by

xn+1 = xn − f(xn)

f ′(xn).

Explain why this converges to a root of f .

Solution: Define

g(x) = x− f(x)

f ′(x).

By iterating, we approximate to a fixed point of g(x). So,

g(x∗) = x∗ − f(x∗)f ′(x∗)

= x∗,

orf(x∗)f ′(x∗)

= 0,

sof(x∗) = 0.

Definition 4.4. We denote by C([a, b]) the vector space of continuous functions definedon the interval [a, b]:

C([a, b]) = f : [a, b] → R, f continuous.

Lemma 4.2. C([a, b]) endowed with the norm

‖f‖∞ = maxξ∈[a,b]

|f(ξ)|,

is a Banach space.

Proof. That C([a, b]) is a vector space is trivial. We have to prove that ‖ · ‖∞ is a normand that C([a, b]) is complete with this norm. To prove that ‖ · ‖∞ is a norm, we have tocheck the following:

1. ‖f‖∞ = 0 if and only if f = 0.

61

Page 68: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4. Existence and Uniqueness of solution

2. (Scalability) ‖λf‖∞ = |λ|‖f‖∞ for all λ ∈ R and f .

3. (Triangle inequality)

‖f + g‖∞ ≤ ‖f‖∞ + ‖g‖∞.

The first two points follow from the definition. The third point is

‖f + g‖∞ = maxξ

|f(ξ) + g(ξ)|

≤ maxξ

|f(ξ)|+ |g(ξ)| (triangle inequality for real numbers)

≤ maxξ

|f(ξ)|+maxξ

|g(ξ)|

= ‖f‖∞ + ‖g‖∞.

We have to check that C([a, b]) endowed with the norm ‖ · ‖∞ is complete. We split theproof of this part in several steps: first, we prove the existence of the limit, then we provethat the limit is bounded and continuous.

Existence of a limit: Let fn ∈ C([a, b]) be a Cauchy sequence. Then we have that, forevery ǫ > 0 there exists n0(ǫ), such that

‖fn − fm‖∞ ≤ ǫ ∀n,m ≥ n0(ǫ). (4.3)

In particular, for every x ∈ [a, b], we have

|fn(x)− fm(x)| ≤ ‖fn − fm‖∞ ≤ ǫ ∀n,m ≥ n0(ǫ),

so fn(x) form a Cauchy sequence of real numbers. As R is a Banach space, we have thatthere exists a limit f(x). In other words, we can define a pointwise limit

limn→∞

fn(x) = f(x) ∀x ∈ [a, b].

Furthermore, by taking n0(ǫ) such that (4.3) holds, we have that

|fn(x)− f(x)| = |fn(x)− limm→∞

fm(x)|

= limm→∞

|fn(x)− fm(x)|

≤ ǫ.

As the previous bound holds for every x ∈ [a, b], we have

‖fn − f‖∞ ≤ ǫ ∀n ≥ n0(ǫ), (4.4)

or, equivalently

limn→∞

‖fn − f‖∞ = 0.

[*** This latter limit in fact gives us that f is not a merely pointwise limit,but a rather stronger notion of limit called uniform limit. ***]

62

Page 69: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

4.2. Some preliminary results

Continuity of the limit: This pointwise limit is in fact continuous. We have

|f(x)− f(y)| = |f(x)− fn(x) + fn(x)− f(y)|≤ |f(x)− fn(x)|+ |fn(x)− fn(y) + fn(y)− f(y)|≤ |f(x)− fn(x)|+ |fn(x)− fn(y)|+ |fn(y)− f(y)|.

Recall that fn is a continuous function converging pointwise to f , so

|f(x)− f(y)| ≤ ‖f − fn‖∞ + |fn(x)− fn(y)|+ ‖fn − f‖∞,

and, by taking δ = |x− y| small enough and n large enough, we have

|f(x)− f(y)| ≤ ǫ,

and we conclude that f is continuous.

Boundedness of the limit: As fn form a Cauchy sequence in C([a, b]), we can taken0 such that

‖fn − fn0‖∞ ≤ 1 ∀n ≥ n0.

We have

‖fn‖∞ ≤ ‖fn − fn0‖∞ + ‖fn0

‖∞ ≤ ‖fn0‖∞ + 1 ∀n ≥ n0,

and

‖fn‖∞ ≤ max‖f1‖∞, ‖f2‖∞...‖fn0‖∞ ∀n ≤ n0.

As a consequence of both estimates, we have

‖fn‖∞ ≤ max‖f1‖∞, ‖f2‖∞...‖fn0‖∞, ‖fn0

‖∞ + 1 ∀n ≥ 1.

[*** This shows that every Cauchy sequence is bounded. ***]

Then, the pointwise limit f(·) verifies

‖f‖∞ = ‖f − fn‖∞ + ‖fn‖∞ ≤ max‖f1‖∞, ‖f2‖∞...‖fn0‖∞, ‖fn0

‖∞ + 1+ 1,

where we have chosen n large enough and used (4.4).

Summarizing, we have constructed a limit f(x) which is in C([a, b]), such that ‖f‖∞ < 0.This concludes the proof.

Let’s consider the following ODE

y′ = f(t, y), y(0) = y0.

As f may be nonlinear, we need to apply the theorem 4.2 to ensure the existence. However,how can Theorem 4.2 be proved?

63

Page 70: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4. Existence and Uniqueness of solution

4.3 Proof of Theorem 4.2

Proof of Theorem 4.2: Without losing generality, we consider t0 = 0 and the rectangle

R = [−a, a]× [−c, c].

We consider T < a a number that will be specified below and fix t ∈ [0, T ]. We write

M = max(s,ξ)∈R

|f(s, ξ)|,

L = max(s,ξ)∈R

∂f(s, ξ)

∂y

.

First, notice that the ODE can be written as

y(t) = y0 +

∫ t

0f(s, y(s))ds.

If y(t) is a smooth function, then both approaches are equivalent. We are going to use theintegral formulation to construct a sequence of approximate solutions with the flavour ofthe Banach’s fixed point Theorem. The limit of this sequence will be our desired solution.This method is called of successive approximations or Picard’s iterates. We start with

y1(t) = y0 +

∫ t

0f(s, y0)ds,

y2(t) = y0 +

∫ t

0f(s, y1)ds,

y3(t) = y0 +

∫ t

0f(s, y2)ds,

yn+1(t) = y0 +

∫ t

0f(s, yn(s))ds. (4.5)

[*** Notice that if n = ∞, we have

y∞(t) = y0 +

∫ t

0f(s, y∞(s))ds,

and this y∞ is a solution to our original ODE in the integral formulation. ***]We define the mapping

Tt[y] = y0 +

∫ t

0f(s, y(s))ds.

We have that Y (t) = Tt[y] is continuous in t. Indeed, to see that, we fix t and consider

Y (t+ h)− Y (t) = Tt+h[y]− Tt[y] =

∫ t+h

tf(s, y(s))ds ≤ hM,

64

Page 71: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

4.3. Proof of Theorem 4.2

so Y (t) = Tt[y] is a continuous function of t. Consequently,

Tt[y] : C([−T, T ]) → C([−T, T ]).

Furthermore, we have‖Tt[y]‖∞ ≤ y0 + TM,

so, if

T <c− y0M

,

‖Tt[y]‖∞ < c. [*** We need this condition to make sure that Tt[y] does not leavethe rectangle R where the rate function f is smooth. ***]

To apply the Banach’s fixed point Theorem, we have to prove that Tt[y] is a contractivemapping. We have

‖Tt[y]− Tt[x]‖∞ = maxt∈[−T,T ]

∫ t

0f(s, y(s))− f(s, x(s))ds

≤ maxt∈[−T,T ]

∫ t

0|f(s, y(s))− f(s, x(s))| ds

≤ L

∫ t

0max

t∈[−T,T ]|y(t)− x(t)| ds

≤ LT‖y − x‖∞.

If we take T < 1/L, we obtain that the mapping Tt is contractive. Consequently, we take

T ≤ min

a,c− y0M

,1

L

,

and we can ensure that

1.Tt[y] ∈ [−c, c] ∀ t ∈ [−T, T ],

2. Tt[y] is contractive.

Applying Banach’s fixed point Theorem, Tt[y] has a unique fixed point y(t). This uniquefixed point is the unique solution to the ODE.

Example 4.4. Solvey′ = −y − 1, y(0) = 0,

using the method of successive approximations.

Solution: We haveφ0(t) = 0,

φ1(t) = −∫ t

0φ0 + 1ds = −t,

φ2(t) = −∫ t

01− sds = −t+ t2/2,

65

Page 72: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 4. Existence and Uniqueness of solution

φ3(t) = −∫ t

01 + (−s+ s2/2)ds = −t+ t2/2 − t3/6.

Consequently, we can guess that

φn(t) = −t+ t2/2− t3/6 + ...− tn/n!, if n is odd,

andφn(t) = −t+ t2/2 − t3/6 + ...+ tn/n!, if n is even.

We can check that our guessing is correct easily. Let’s compute φn+1 assuming that wecan use our formulas for φn. Let’s start with the case n odd. We have

φn+1(t) = −∫ t

01 + (−s+ s2/2− s3/6 + ...− sn/n!)ds

= −(

t− t2/2 + t3/6− ...− tn+1/n!(n+ 1))

.

As n+ 1 should be even (recall that n was odd), this is the appropriate formula. We canproceed similarly with the case n even [*** Can you finish the details? ***].

We know the following Taylor’s expansion

ex = 1 + x+ x2/2 + x3/6 + ...

As a consequencee−x = 1− x+ x2/2− x3/6 + ...

It seems thatφ∞ = e−t − 1

Now, let’s try to solve the original ODE by means of the integrating factors. We have

µ(t)y′ + µ(t)y = −µ(t),

and we imposeµ′ = µ,

so

µ(t)y′ + µ(t)y = µ(t)y′ + µ′(t)y =d

dt(µ(t)y(t)) .

We know thatµ(t) = et.

We compute thend

dt

(

ety(t))

= −et

and, integrating,ety(t) = −et + 1,

soy(t) = e−t − 1,

so, our successive approximation scheme was converging to the appropriate function.

66

Page 73: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5

Bifurcation

We have seen that the value of the parameters present in the problem is of great importancefor the large time behaviour. The changes in the qualitative behaviour of the solution asthe value of the parameter changes are called bifurcations and the parameter values atwhich they occur are called bifurcation points.

5.1 Saddle-Node bifurcation

Let’s consider the ODE

y′(t) = r + y(t)2, y(0) = y0.

Here r is a constant. In this ODE the rate function is

fr(x) = r + x2.

Consequently, the equilibrium points are

• x = 0 if r = 0,

• x = ±√−r if r < 0,

• there is not such an equilibrium point if r > 0.

In particular, [*** even the existence of equilibrium points depends on the valueor the parameters. ***] Notice that if r < 0, one of the equilibria is stable, while theother one is unstable (see Figure 5.1). The change in the qualitative behaviour appearsas r crosses the value r = 0, as a consequence, [*** r = 0 is the bifurcation point***]. [*** This kind of bifurcation is called saddle-node bifurcation and it’sthe standard procedure in which equilibria appear/disappear. ***] Usually, wecollect this information about the equilibria in the (so-called) [*** bifurcation diagram***] (see Figure 5.1). [*** Notice that in this example fr(x) = r+x2. In particular,by changing the value of r we are moving the graph of fr(x) up and down. Thus,the fact that new equilibria appear as a consequence is not a big surprise. ***]

67

Page 74: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

−3 −2 −1 0 1 2 3−1

0

1

2

3

4

5

6

7

8

−3 −2 −1 0 1 2 3−1

0

1

2

3

4

5

6

7

8

−3 −2 −1 0 1 2 3−1

0

1

2

3

4

5

6

7

8

Figure 5.1: fr(x) with a)r < 0, b) r = 0, c) r > 0.

[*** At this point you may want to read the example 3.1.2 from the book.***]Example 5.1. Consider the function

fr(x) = r + e−|x|,

and the ODE

y′ = f(y).

Sketch all the qualitatively different vector fields that occur as r is varied. Show that asaddle-node bifurcation occurs at a critical value of r to be determined (the bifurcationpoint). Finally, sketch the bifurcation diagram of fixed point versus r.

Solution: Notice that if r < −1 or r ≥ 0, there are no equilibrium points. This is becauseif r < −1, fr(x) < 0, while if r ≥ 0, fr(x) > 0. If r = −1, there is an equilibrium point,namely x = 0. In the intermediate cases, −1 < r < 0, we have that

x = ± log (−r) ,

are equilibria. In particular, notice that

|x| → ∞ as r → 0.

We can collect all this information:

• r = 0 and r = 1 are the bifurcation points,

• the qualitatively different vector fields that occur as r can be plotted in Figure 5.3[*** finish this part!! ***],

• the bifurcation diagram of fixed point versus r is plotted in Figure 5.4.

68

Page 75: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.2. Transcritical bifurcation

−3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

r

x

Figure 5.2: In red, dashed line, the unstable equilibrium point, in blue, solid line, thestable one. The black line is the r axis.

5.2 Transcritical bifurcation

In this situation, the equilibrium point exists for every value of the parameters, however,its stability may change. The main example is

fr(x) = rx− x2,

and the ODE

y′ = fr(y).

Notice that x = 0 is always an equilibrium point. However, if r < 0, this equilibrium pointis stable, while if r ≥ 0, it’s unstable.

The point x = r is the another equilibrium point. This second equilibrium point is unstableif r ≤ 0 and stable if r > 0.

We collect this information in the Figures 5.5 and 5.6:

[*** Notice the main difference between the transcritical bifurcation and thesaddle-node bifurcation: in the transcritical bifurcation, the equilibrium pointsdo not disappear, just change its stability. ***]

[*** At this point you may want to read the example 3.2.1 and 3.2.2 fromthe book. ***]Example 5.2. Consider

fr(x) = rx+ 1− ex2

,

and the ODE

y′ = fr(y) y(0) = y0 ≥ 0.

69

Page 76: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

−0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8−1.5

−1

−0.5

0

0.5

1

−3 −2 −1 0 1 2 3−1.5

−1

−0.5

0

0.5

1

−3 −2 −1 0 1 2 3−1.5

−1

−0.5

0

0.5

1

−3 −2 −1 0 1 2 3−1.5

−1

−0.5

0

0.5

1

Figure 5.3: fr(x) with a) r < −1, b) r = −1, c) −1 < r < 0, d) r = 0.

Sketch all the qualitatively different vector fields that occur as r is varied. Show that asaddle-node bifurcation occurs at a critical value of r to be determined (the bifurcationpoint). Finally, sketch the bifurcation diagram of fixed point versus r.

Solution: We only have to consider the case x ≥ 0. Notice that the equilibrium pointsare solutions of

fr(x) = 0 ⇒ log(1 + rx) = x2.

In particular, there is always a second equilibrium point. This second equilibrium pointtends to infinity as r tends to infinity [*** Why? ***]. The stability of the critical pointx = 0 depends on the sign of r: if r ≥ 0, x = 0 is unstable, while if r < 0, x = 0 isstable. As a consequence, r = 0 is the bifurcation point. [*** Plot the vector fieldcorresponding to Figure 5.7. ***] The bifurcation diagram is qualitatively similarto the one in Figure 5.6 [*** Why? ***].

5.3 Supercritical Pitchfork bifurcation

In this case, [*** the bifurcation appears related to some symmetry inherent tothe problem. As a consequence, the equilibrium points appear/disappear insymmetric pairs. ***] Let’s consider

fr(x) = rx− x3,

and the ODEy′ = fr(y).

Let us remark that fr(x) is odd, so, fr(−y) = −fr(y). Then we see that the equation isinvariant to the change of variables y → −y. This is a symmetry.

70

Page 77: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.3. Supercritical Pitchfork bifurcation

−1 −0.9 −0.8 −0.7 −0.6 −0.5 −0.4 −0.3 −0.2 −0.1 0−5

−4

−3

−2

−1

0

1

2

3

4

5

r

x

Figure 5.4: In red, dashed line, the unstable equilibrium point, in blue, solid line, thestable one.

Notice that if r < 0, the unique equilibrium point is y∗ = 0. To see this, notice that theequation

r − x2 = 0

has no (real) solution if r < 0. In this case, y∗ is stable. Furthermore, if we define theperturbation

η(t) = y(t)− y∗,

we can linearize, i.e. take

η3 ≈ 0

and we get

η′ = rη.

We see that in the case r < 0, the perturbation decays exponentially fast to zero

η(t) = η(0)ert.

In the case where r = 0, y∗ is the only equilibrium point. This eq. point is stable.However, we see that the perturbation η(t) decays, but the decay is not exponential. Nowwe have

y′ = −y3,

so

y(t) =1

1y(0)2

+ 2t.

[*** Why? ***] So, the decay is not exponential, but merely algebraic. Thus, there issomething happening at r = 0. In the case where r > 0, we have three equilibrium points:

y∗ = 0, y∗1 = −√r, y∗2

√r.

71

Page 78: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

−0.5 0 0.5 1−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

−0.5 0 0.5−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

−1 −0.5 0 0.5−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Figure 5.5: fr(x) with a)r < 0, b) r = 0, c) r > 0.

[*** Why? ***] We conclude that r = 0 is the bifurcation point. In Figure 5.8 you cansee the bifurcation diagram .

[*** Maybe you want to read the examples 3.4.1 and 3.4.2 from the book***]

[*** One can think that, in the supercritical pitchfork bifurcation we have theprevious two effects together:

1. we have new eq. points appearing,

2. we have that the stability of some eq. points changes.

***]Example 5.3. Consider

fr(x) = x− r2 sin(x),

and the ODEy′ = fr(y) y(0) = y0.

Sketch all the qualitatively different vector fields that occur as r is varied. Show thata supercritical pitchfork bifurcation occurs at a critical value of r to be determined (thebifurcation point). Finally, sketch the bifurcation diagram of fixed point versus r.

Solution: In Figure 5.9, we have the function fr(x) for certain values of r [*** Plotthe appropriate arrows and mark the eq. points. ***]. We observe that y∗ = 0is an eq. point. Furthermore, if r ≤ 1, it’s the only eq. point. We note that, linearizingthe equation, we obtain

y′L = yL − r2yL,

thus, if r < 1, we have that y∗ = 0 is a stable eq. point and the perturbation yL(t) decaysto zero exponentially fast. If r = 1, y∗ is still a stable eq. point, however, the rate of decayis slower. So far, what we know about this equation suggest the supercritical pitchforkbifurcation. Now notice that if r > 1, two new eq. points appear and that y∗ changes its

72

Page 79: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.4. Subcritical Pitchfork bifurcation

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

r

x

Figure 5.6: In red, the equilibrium point x = r, in blue, the equilibrium point r = 0. Thesolid line means that the point is stable, while the dashed line means that the point isunstable.

stability. This is the confirmation that we have a supercritical pitchfork bifurcation. Thebifurcation diagram is qualitatively similar to the one in Figure 5.8.

5.4 Subcritical Pitchfork bifurcation

One may think in the case

fr(x) = rx+x3.

Notice that the sign in now +!. In this case, for r < 0,the equilibrium points now are

y∗ = 0, y∗1 = −√−r, y∗2

√−r.

y∗ is stable and the other two eq. points are unstable. Then if r ≥ 0, we have thaty∗ is the only equilibrium point and it is unstable. Thus, the situation is symmetric tothe situation in the previous section. [*** Can you repeat the analysis includingevery detail? ***]

[*** Notice that the main difference between subcritical and supercriticalpitchfork bifurcation is the direction of the pitchfork in the bifurcation di-agram. ***]

Let’s consider now the case

fr(x) = rx+ x3 − x5.

We see that if −1 ≪ r < 0, we have 5 eq. points, three of them stable. If r ≪ −1, wehave only one eq. point, namely y∗ = 0. If r > 0, we have three eq. points, y∗ and other

73

Page 80: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

Figure 5.7: fr(x) with a)r < 0, b) r = 0, c) r > 0.

two symmetric eq. points. These two symmetric eq. points are stable. [*** Can yousketch the bifurcation diagram? ***]

5.5 Laser Threshold

This sections complements to section 3.3 in the book. Here we are going to presenta model for a solid-state laser. For a more careful presentation of the model and thephysical situation you should read the section 3.3. We are going to focus on the followingbehaviour of the lasers:

If the atoms are excited weakly, then the atoms act independently. However,if the excitation is high enough, the atoms oscillate in phase. This means thatthe atoms are now radiating more intensely.

Our goal is to prove that (already observed) behaviour using a mathematical model of thelaser.

The model in this case is

n′(t) = (GN0 − k)n(t)− αGn(t)2,

whereN0 = the number of excited atoms,

n(t) = the number of photons in the laser field,

G = the, so-called, gain coefficient,

1/k = the average lifetime of a phton in the laser.

[*** Using this notation, to have a laser is the same as to have a nonzerostable point for n(t). The parameter that we are allow to move is N0, whichcorresponds to the external excitement for the atoms. ***]

74

Page 81: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.5. Laser Threshold

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Figure 5.8: In red, the equilibrium point x = 0, in blue, the equilibrium points x = ±√r.

The solid line means that the point is stable, while the dashed line means that the pointis unstable.

We proceed now with the analysis of the dynamical system. Notice that n∗ = 0 is anequilibrium point. This point is [*** exponentially ***] stable if

GN0 − k < 0 → N0 <k

G.

When

GN0 − k = 0 → N0 =k

G,

n∗ is still stable, but not any more exponentially stable. Finally, if

GN0 − k > 0 → N0 >k

G,

n∗ is not any more stable. There is a new stable equilibrium:

n+ =GN0 − k

αG> 0.

This new stable equilibrium corresponds to the laser. The bifurcation point

N0 =k

G,

is called the laser threshold. [*** To clarify concepts, let’s clearly state that wehave a transcritical bifurcation here. ***][*** Why? ***]

75

Page 82: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

−2 −1 0 1 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

−2 −1 0 1 2−1.5

−1

−0.5

0

0.5

1

1.5

−2 −1 0 1 2−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

Figure 5.9: a)r < 1, b) r = 1, c)r > 1

5.6 Overdamped bead on a rotating hoop.

This sections complements to section 3.5 in the book. We have a bead with mass mmoving in a rotating hoop with radius r. The hoop rotates around the vertical axis withconstant angular velocity ω.

We denote φ(t) ∈ [−π, π] the angle between the bead and the vertical direction. Weassume that only three forces act on the bead: gravity, friction and centrifugal force.

We have that

rφ′(t) = velocity of the mass,

rφ′′(t) = (tangent) acceleration of the mass.

We have to valance the forces tangents to the hoop. The gravity acts with a force

Fg = −mg(0, 1).

Consequently, the tangent component is

F tg = −mg sin(φ(t)).

The friction gives us

F tf = −γφ(t).

The (horizontal) centrifugal force has magnitude

Fc = ρω2m,

76

Page 83: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.6. Overdamped bead on a rotating hoop.

−1.5 −1 −0.5 0 0.5 1 1.5−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

−1.5 −1 −0.5 0 0.5 1 1.5−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

−1.5 −1 −0.5 0 0.5 1 1.5−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

Figure 5.10: fr(x) for: a)r = −0.1, b) r = 0, c)r = 0.1

where ρ is the (horizontal) distance between the bead and the vertical axis. The tangentialcomponent is then

F tc = ρω2m cos(φ(t)) = r sin(φ(t))ω2m cos(φ(t)).

Collecting all these expressions and using the Second Newton’s law, we have

mrφ′′(t) = −γφ′(t) + r sin(φ(t))ω2m cos(φ(t)) −mg sin(φ(t)).

Furthermore, we assume that the system is overdamped, which means that the accelerationis small compared to friction (and we can neglect it). We obtain

φ′(t) =mg

γsin(φ(t))

(

rω2

gcos(φ(t))− 1

)

.

To study this dynamical system, we look for its eq. points. We have

sin(φ) = 0 ⇒ φ+ = 0,

orcos(φ) =

g

rω2.

This second equation only has solution if

g

rω2≤ 1.

Furthermore, ifg

rω2= 1,

77

Page 84: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

there is a single eq. point, namely, φ = 0. Then, if

g

rω2< 1,

we have two new eq. points, φ∗ > 0 and −φ∗ < 0.

At this point, it is easy to check that φ+ is stable for

g

rω2≥ 1,

and unstable otherwise. Then, two new eq. points appear. These new eq. points arestable [*** Why? ***]. [*** Finally, let’s clearly state that in this case wehave a supercritical pitchfork bifurcation. ***][*** Why? Can you plot thebifurcation diagram? ***]

5.7 Dimensional analysis

Let us introduce a very useful tool: dimensional analysis. Usually, the dynamical systemcomes from a real life application. Consequently, the unknown and the parameters presentin the problem have units. For instance, we know that Malthus’s Law

y′ = ry,

is a model of a population. Consequently, y is the number of people in the population andwe have

[y] := units of y = people.

Notice that the units for y′ are not people, but

[y′] =people

time.

To see this, you have to recall the definition of derivative:

[y′(t)] =

[

limh→0

y(t+ h)− y(t)

h

]

=people

time.

[*** Notice that, if [y] =people and [y′]=people/time, the constant r shouldhave units! Otherwise we would get a contradiction ***]. Then, notice

[y′] = [ry] = [r][y],

thus

[r] =1

time.

This is called dimensional analysis. It can be used to reduce the number of parameterspresent in an equation and to understand better how one quantities are related to other

78

Page 85: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

5.7. Dimensional analysis

quantities (allowing the some notion of smallness, for instance). To see how to use dimen-sional analysis to reduce the number of parameters in an equation, let’s go back to theODE

φ′(t) =mg

γsin(φ(t))

(

rω2

gcos(φ(t))− 1

)

.

Notice that φ is an angle, consequently, [*** it has no units! ***]. In other words,[*** angles are dimensionless ***]. [*** Why? ***] Let’s check the different units:

[φ′] =1

time,

then, recalling that γφ′ was the [*** force ***] due to friction, and applying Newton’slaw, we have

[γφ′] =mass length

time2,

so

[mg

γ] =

mass length/time2

mass length/time=

1

time.

Finally,

[rω2

g] =

length 1/time2

length/time2= 1,

so

α =rω2

g,

is a dimensionless parameter.

Now we define a new independent variable

τ =t

a.

Then, using chain rule,d

dt=

d

dt=

d

1

a.

The main idea is that a is a constant with units that is going to absorb other parameters.In particular, we choose

[a] = [time],

so the new independent variable τ is dimensionless. We have

γ

amg

d

dτφ(τ) = sin(φ(τ)) (α cos(φ(τ)) − 1) .

We fixa =

γ

mg,

and we obtain the new ODE

d

dτφ(τ) = sin(φ(τ)) (α cos(φ(τ))− 1) .

79

Page 86: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 5. Bifurcation

If the acceleration was taken into account, the equation would be

mrφ′′(t) = −γφ′(t) +mg sin(φ(t))

(

rω2

gcos(φ(t))− 1

)

.

Thus, doing the same change of variables and dividing everything by mg,

r

ga2d2

dτ2φ(τ) = − d

dτφ(τ) + sin(φ(τ)) (α cos(φ(τ)) − 1) .

We writeβ =

r

ga2,

with units

[β] =length

(length/time2)time2= 1,

thus, β is a dimensionless parameter. Equation

βd2

dτ2φ(τ) = − d

dτφ(τ) + sin(φ(τ)) (α cos(φ(τ)) − 1) ,

is a dimensionless equation. The smallness of the dimensionless parameter β decides if thesystem is overdamped (β ≪ 1).

80

Page 87: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 6

Nonlinear systems of ODE

6.1 A very useful example

Let’s consider the systemx′ = Ax,

where

A =

(

a 00 −1

)

.

[*** This is not a system because the equations are decoupled. ***] The solutionare

x1(t) = x1(0)eat,

andx2(t) = x2(0)e

−t.

We are going to study the phase diagram for different values of a. We obtain Figure 6.1and 6.1. In Figure 6.1 we find that if a < 0, the origin is a [*** stable node ***], whileif a > 0, the origin is a [*** (unstable) saddle node ***]. In this saddle node situationwe have a unstable manifold (in black) and a stable manifold (in red).

There are two more situation that are somehow special. In Figure 6.1 we see the casewhere one of the components (in this case x1) does not decay and the case where x1 andx2 decay with the same velocity. This latter situation is called [*** stable star ***] (forobvious reasons).

This stable star is not the only degenerate stable situation that we can face. We couldhave a system where the solution was given by

~x(t) = ~v1eλt + ~v2te

λt

for λ < 0. Then the solutions tends to zero but in a very curvy fashion [*** Use acomputer to plot

~x(t) = [c1(1, 0) + c2[t(0, 1) + (0, 1)]]e−t,

for certain values of c1, c2. ***]

81

Page 88: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 6. Nonlinear systems of ODE

−3 −2 −1 0 1 2 3−3

−2

−1

0

1

2

3a=−2

−3 −2 −1 0 1 2 3−3

−2

−1

0

1

2

3a=−0.5

−40 −20 0 20 40−2

−1.5

−1

−0.5

0

0.5

1

1.5

2a=0.5

Figure 6.1: 1)a = −2, 2) a = −0.5, 3) a = 0.5 (in red the stable manifold, in black theunstable manifold.

6.2 Another very useful example

Let’s consider now the systemx′ = Ax,

where

A =

(

a 1−1 a

)

.

Notice that the eigenvalues of this system are solutions to

λ2 + a2 − 2aλ+ 1 = 0.

In particular, if a = 0 (the harmonic oscillator), we find λ = ±i. In this case, thetrajectories of the system oscillate around the origin [*** Why? ***]. [*** The originis called a center ***].

The centers are called [*** Lyapunov stable ***]. The difference with our previousnotion of (asymptotic) stability (for instance, when we talk about stable nodes or stars)is that the trajectories are not tending to the center. However, they are not leaving thecenter either. They just move around in a closed curve. This behaviour is typical inHamiltonian systems. We will talk more about this later on.

In the case where |a| ≪ 1, we have that the discriminant is

4a2 − 4(1 + a2) = −4 < 0,

thus, the eigenvalues are still complex but they have now a non zero real part. Then thetrajectories form spirals around the origin [*** Why? ***]. [*** The origin is thenan spiral point or focus ***]. In particular, the spiral can be stable (the trajectorytends to the origin) or unstable (the trajectory leaves the origin.)

82

Page 89: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

6.3. Collecting the previous information

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1a=0

−3 −2 −1 0 1 2 3−3

−2

−1

0

1

2

3a=−1

Figure 6.2: 1)a = 0, 2) a = −1

6.3 Collecting the previous information

Let’s consider now a 2x2 matrix A. This matrix has a trace τ = a11+a22 and a determinant∆ = a11a22−a12a21. Then we can characterize the type of equilibrium point just by lookingto these two quantities. The main point is that τ corresponds to the sum of the eigenvaluesand ∆ corresponds to the product of the two eigenvalues. Actually, if we solve for theeigenvalues, we have

λ =τ ±

√τ2 − 4∆

2.

[*** Why? ***]

1. If the ∆ < 0, then we have two eigenvalues, one of them is positive and the otherone is negative. Thus, we have a saddle-node.

2. If ∆ > 0, τ2 − 4∆ > 0, then we have two real eigenvalues with the same sign. Wehave a stable node if τ < 0 and a unstable node if τ > 0.

3. If ∆ > 0, τ2 − 4∆ < 0, then we have two complex eigenvalues. We have a stablefocus if τ < 0 and a unstable focus if τ > 0.

4. If ∆ > 0, τ2 − 4∆ < 0, and τ = 0 then we have a center.

5. If ∆ > 0, τ2−4∆ = 0, then we have only one eigenvalues. This is a degenerate case.

[*** Maybe you want to sketch these cases in a plot in the plane (∆, τ). ***]

83

Page 90: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 6. Nonlinear systems of ODE

6.4 Basic ideas for nonlinear systems of ODE’s

6.4.1 Existence and uniqueness

Let f1(x, y), f2(x, y) be to C1 functions (not necessarily linear). Then we consider thesystem of ODE

~x′ = (f1(x1, x2), f2(x1, x2)). (6.1)

The existence of solution to the system is provided with the theory that we developed inChapter 4. A very useful fact that emanates from the theory is that [*** two trajectorieswill never touch. ***] Otherwise, the uniqueness breaks down.

[*** The goal is to find and study (locally) the equilibrium points. Then, weare going to glue together the different trajectories keeping in mind that thetrajectories can not overlap. ***]

6.4.2 Linearized system

Here we explain how to linearize a system around an equilibrium point. Let’s assume that(x∗1, x

∗2) is an equilibrium point. Then, using Taylor’s Theorem, we have

f1(x1(t), x2(t)) ≈ f1(x∗1, x

∗2) +∇f1(x

∗1, x

∗2) · (x1(t)− x∗1, x2(t)− x∗2),

f2(x1(t), x2(t)) ≈ f2(x∗1, x

∗2) +∇f2(x

∗1, x

∗2) · (x1(t)− x∗1, x2(t)− x∗2).

Thus, the linearized (around the equilibrium point) system is

~η′(t) = Df |(x∗1,x∗

2) · ~η(t),

where ~η(t) = ~x(t)− (x∗1, x∗2) is the perturbation and Df is the matrix given by

Df =

(

∇f1∇f2

)

.

Now the equilibrium point can be classified according to our previous discussion for linearsystems. [*** We expect that, under certain conditions, the trajectories ofthe nonlinear dynamical system look like the trajectories to the linearizeddynamical system. ***]

6.4.3 Linear vs. Nonlinear stability

Let us collect here the very basic definitions and theorems that we are going to use inthe subsequent part of the course. We have been talking with some lack of rigour aboutstability or unstable equilibria. At a intuitive level, our naive notions worked, however nowit’s time to introduce the precise (and official) definitions:

84

Page 91: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

6.4. Basic ideas for nonlinear systems of ODE’s

Definition 6.1 (Attracting equilibrium point). An equilibrium point x∗ is attracting ifthere exists δ such that

limt→∞

x(t) = x∗,

for all trajectory x(t) such that

|x(0) − x∗| < δ.

Definition 6.2 (Lyapunov stable equilibrium point). An equilibrium point x∗ is Lyapunovstable if there exists δ such that

|x(t)− x∗| < ǫ, ∀, t ≥ 0 and ∀ ǫ > 0

for all trajectory x(t) such that

|x(0) − x∗| < δ.

[*** In particular, a center is Lyapunov stable. ***]Definition 6.3 (Asymptotically stable equilibrium point). An equilibrium point x∗ isasymptotically stable if its attracting and Lyapunov stable.

[*** Make sure that you understand the differences between the previousthree definitions. ***]Definition 6.4 (Basin of attraction). For a given equilibrium point x∗ we define its basinof attraction as the set of initial data x(0) such that

x(t) → x∗.

Definition 6.5 (Unstable equilibrium point). An equilibrium point x∗ is unstable if forevery ǫ > 0, there exists a trajectory x(t), δ and t∗ < ∞ such that

|x(0) − x∗| < ǫ,

and

|x(t)− x∗| > δ, ∀, t ≥ t∗.

[*** The very basic question that we have now is: when do the linearizedsolutions, xL(t), describe the nonlinear solutions, x(t), near the stable point?***] IN PARTICULAR, NOTICE THAT, A PRIORI, IT IS NOT OBVIOUS (ANDTHERE IS NOT A RIGOROUS REASON) WHETHER THE NONLINEAR SYSTEMBEHAVES LIKE THE LINEAR ONE.

To answer this (very important) question we have the following Theorem:Theorem 6.1 (Hartman-Grubman). Let ~x∗ be the equilibrium point for the nonlinearsystem (6.1). Consider the linearized system given by the matrix Df |~x=~x∗ and write λi

for the eigenvalues. Then, if Reλ 6= 0, the trajectories of the nonlinear system, ~x(t), arehomeomorphic to the trajectories of the linear system ~xL(t).Memento 6.1. An homeomorphism is a continuous, bijective function. Consequently,two trajectories are homeomorphic if there exists a homeomorphism between them.

85

Page 92: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 6. Nonlinear systems of ODE

[*** So, as long as the equilibrium point for the linearized system is not acenter, the solutions to the nonlinear system behaves similarly. Ok, so, whathappen if the linearized system has a center? Then we don’t know, and wehave to work further. ***]

Actually, we have the following example:Example 6.1. Study the linear and nonlinear stability for the following example:

x′ = −y + ax(x2 + y2),

y′ = x+ ay(x2 + y2).

Solution: We have

f1(x, y) = −y + ax(x2 + y2), ∇f1(x, y) = (ay2 + 3ax2,−1 + 2axy),

f2(x, y) = x+ ay(x2 + y2), ∇f2(x, y) = (1 + 2ayx, ax2 + 3ay2).

The point (0, 0) is an equilibrium point. When we evaluate Df |(x,y)=(0,0), we find thematrix

A =

(

0 −11 0

)

.

We obtain that (0, 0) is a center for the linear system.

The nonlinear system can be explicitly solved. To do that, let’s use polar coordinates. Wehave

r(t)2 = x(t)2 + y(t)2,

so2rr′ = 2xx′ + 2yy′,

and, after a short computation [*** do it! ***]

r′ = ar3.

We need to study the evolution of the angle θ. Notice that

θ(t) = arctan(y(t)/x(t)),

so

θ′ =y2(x/y)′

r2=

y2(x′/y − xy′/y2)r2

.

We conclude

θ′ =yx′ − xy′

r2= 1.

Collecting the behaviour of θ and r, we obtain that

• if a = 0, we have a center,

• if a > 0, we have a unstable focus (a spiral leaving the origin),

• if a < 0, we have a stable focus (a spiral tending to the origin).

86

Page 93: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

6.4. Basic ideas for nonlinear systems of ODE’s

[*** As the radius may change with time if a 6= 0, the equilibrium point (0, 0) isNOT a center for the nonlinear system. However, the equilibrium point (0, 0)is a center for the linear system!! ***] [*** So, there are examples where alinear center does NOT imply a nonlinear center. ***]

87

Page 94: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 6. Nonlinear systems of ODE

88

Page 95: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7

Worked examples

7.1 SIR models for epidemics

Let’s assume that we have a population that can be split in three subsets:

• Susceptible (S)

• Infected (I)

• Recovered/Resistant (R)

7.1.1 First model

The flow of an epidemic is

S → I → R,

which means that, initially the person is susceptible, then, eventually, the person will be-come infected and finally, after passing the disease, the person will be recovered. Recoveredpeople can never have the disease again.

The model is

S′ = −rS(t)I(t)I ′ = rS(t)I(t)− βI(t)R′ = βI(t)

(7.1)

where r is the rate of new infected coming from encounters between infected individualsand susceptible individuals and β is the amount of people that are healthy again.

Notice that the total population is

N(t) = S(t) +R(t) + I(t),

89

Page 96: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

and its variation is

d

dtN(t) =

d

dtS(t) +

d

dtR(t) +

d

dtI(t) = using the system = 0.

So, [*** the total population does not change. ***] Then, as the total populationdoesn’t change,

N(t) = N(0) = S(0) +R(0) + I(0) ⇒ R(t) = N(0)− I(t)− S(t).

To simplify, let’s take N(0) = 1 (thus, S,R, I are percentages). The system (7.1) nowreads

S′ = −rS(t)I(t)I ′ = rS(t)I(t)− βI(t)

(7.2)

s ’ = − r s i i ’ = r s i − b i

r = 0.2b = 0.1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

s

i

Modelo S−I−R

Figure 7.1: SIR Model

The equilibria are solutions of

−rSI = 0 and rSI − βI = 0,

so, I = 0. Thus, eventually, the infection will be under control, however, it can spreadwildly initially. Then notice that the evolution of the amount of infected people dependson the amount of healthy people in a straightforward way:

if S(t) =β

r⇒ d

dtI(t) = 0,

90

Page 97: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.1. SIR models for epidemics

if S(t) >β

r⇒ d

dtI(t) > 0,

if S(t) <β

r⇒ d

dtI(t) < 0.

So, we conclude a very interesting fact: if initially

S(0) >β

r⇒ the number of infected individuals grows,

S(0) <β

r⇒ the number of infected individuals decays.

[*** This means that every process (for instance a instantaneous vaccinationprocedure) that ensure a low number of susceptible individuals S(0) is veryuseful to guarantee the health of the group. ***]

Notice another interesting feature of this model: the slope of the vector field dIdS only

depends on S. To see that we compute

dI

dS=

dI/dt

dS/dt=

rS(t)I(t)− βI(t)

−rS(t)I(t)= −1 +

β

r

1

S(t).

Thus, we can integrate in S to find I(S)

I = −S +β

rlog(S) + c.

[*** Now we obtain that the function

F (I, S) = I + S − β

rlog(S),

is constant along the trajectories. Furthermore, we have that the trajectoriesof this system verify

F (I(t), S(t)) = F (I(0), S(0)).

We call the function F a conserved quantity for the system. When such aconserved quantity exists, solutions can only move along level curves of theconserved quantity F . ***] To check that we can directly compute

I ′ + S′ − β

r

S′

S= rSI − βI − rSI +

β

r

rSI

S= 0.

7.1.2 Second model

Assume now that the population has a vaccination procedure, so αS become part of theresistant class. Furthermore, the vaccine is only effective for a limited time, so, γR(t)become susceptible again. At the same time, assume that ρI people pass the disease but,

91

Page 98: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

instead being part of the resistant class, they become part of the susceptible class again.The flow is then

S

// Ioo

R

__

The new model is

S′ = −rS(t)I(t)− αS(t) + ρI(t) + γR(t)I ′ = rS(t)I(t)− βI(t)− ρI(t)R′ = βI(t) + αS(t) − γR(t)

(7.3)

As before, N(t) = S(t) + I(t) +R(t) is preserved by the time evolution, so, we can studythe system given by

I ′ = r(1− I(t)−R(t))I(t)− βI(t)− ρI(t)R′ = βI(t) + α(1 − I(t)−R(t))− γR(t)

The equilibrium points are (I∗, R∗) and (I+, R+) with

I∗ = 0,

R∗ =α

α+ γ,

and the solution to

I+ +R+ = 1− β+ρr

(α− β)I+ + (α+ γ)R+ = α

The solution to this last system is

I+ = 1− β + ρ

r− β + (α− β)β+ρ

r

β + γ,

R+ =β + (α− β)β+ρ

r

β + γ.

We see that I∗ is a disease-free equilibrium, while I+ is an equilibrium where the diseasebecomes endemic. We want to know which one is stable under certain values of theparameters. To see that, we have to compute the jacobian matrix for the rate function.In this system the rate function is given by

~f(I,R) = (f1(I,R), f2(I,R)) ,

withf1(I,R) = r(1− I −R)I − βI − ρI

f2(I,R) = βI + α(1 − I −R)− γR.

Thus,∇f1 = (r(1− I −R)− rI − β − ρ,−rI),

92

Page 99: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.2. A model for a zombie outbreak

∇f2 = (β − α,−α− γ).

Then, to study the equilibrium point (I∗, R∗), we have to study the eigenvalues of thematrix

Df∗ =

(

r(1− I∗ −R∗)− rI∗ − β − ρ −rI∗

β − α −α− γ

)

=

(

r γα+γ − β − ρ 0

β − α −α− γ

)

.

To have a stable equilibrium, we need

α+ γ− β − ρ < 0.

In this case, we will have τ < 0 and ∆ > 0, so we have a stable spiral or node.

[*** Notice that, as the real part of the eigenvalues is not zero, we can apply theHartman-Grubman theorem to conclude that the behaviour of the nonlinearsystem is similar to the linearized one. ***]

Then, we have that [*** for every possible value of the parameters (which theparameters depend on the illness), if α is big enough (big related to the otherparameters) the disease-free equilibrium is stable. Thus, a strong vaccinationprocedure is useful for every possible disease. ***]

7.2 A model for a zombie outbreak

We are going to explain the model by P. Munz, I, Hudea, J. Imad, R. Smith? (notice thatthe ’?’ is not a typo, it’s his real name), When zombies attack!: mathematical modelling ofan outbreak oz zombie infection. Now the population can be split (again) in three subsets:

• Susceptible (S)

• Zombie (Z)

• Removed (R)

The removed set is formed by the people who recently died and defeated zombies. Azombie can appear from two different situations:

1. Resurrected from the recently deceased (from R group).

2. People recently bitten by a zombie (from S group).

A zombie can move from group Z to group R if its brain is destroyed. The flow of thissituation is more complicated than the standard SIR model:

S

// Z

R

OO

93

Page 100: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

Figure 7.2: Dr. Zombie by Jorge David (Wikipedia)

The system for this situation is, where α, β, γ, δ are positive constants,

S′ = −αS(t)Z(t)− βS(t)Z ′ = αS(t)Z(t) − γS(t)Z(t) + δR(t)R′ = βS(t) + γS(t)Z(t)− δR(t)

(7.4)

where

αS(t)Z(t) the rate of alive people that are bitten,

βS(t) the rate of alive people that die by other reasons (traffic accident, let’s say),

γS(t)Z(t) the rate of zombies that die (again),

δR(t) the rate of dead people that resurrect as a zombie.

Notice that

N(t) = S(t) + Z(t) +R(t)

verifies

N ′ = 0,

so

N0 − S(t)− Z(t) = R(t)

94

Page 101: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.2. A model for a zombie outbreak

and (7.4) reduces to

S′ = −αS(t)Z(t)− βS(t)Z ′ = αS(t)Z(t)− γS(t)Z(t) + δ (N0 − S(t)− Z(t))

(7.5)

Assuming δ > 0, the (interesting) equilibrium point is

S∗ = 0, Z∗ = N0.

Every other eq. point is for negative Z or S.

If δ = 0 (which means that Zombies only appear as healthy people are bitten), the equi-librium points are

S+ = 0,

and every Z.

To see if these equilibria are stable or not, we linearize the equation. We have

f1(S,Z) = −αSZ − βS

f2(S,Z) = αSZ − γSZ + δ (N0 − S − Z) .

Thus,

∇f1(S,Z) = (−αZ − β,−αS),

∇f2(S,Z) = (αZ − γZ − δ, αZ − γZ − δ).

The matrix is then

Df =

(

−αZ − β −αSαZ − γZ − δ αZ − γZ − δ

)

.

We we plug the values of the equilibria in, we get

Df∗ =

(

−αN0 − β 0αN0 − γN0 − δ αN0 − γN0 − δ

)

,

and

Df+ =

(

−αZ+ − β 0αZ+ − γZ+ αZ+ − γZ+

)

.

We have

trace(Df∗) < 0, det(Df∗) > 0,

so, we have that (S∗, Z∗) is a stable node. For the case δ = 0, we can proceed in the sameway [*** Can you finish this case? ***]

95

Page 102: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

7.3 A model for Bieber fever

We are going to explain the model by V. Tweedle and R. Smith? (notice that the ’?’ isnot a typo, it’s his real name), A mathematical model of Bieber Fever: The most infectiousdisease of our time?. Now the population can be split (again) in three subsets:

• Susceptible (S)

• Bieber infected or ’Belieber’ (B)

• Recovered (R)

We assume that susceptible people can become Bieber infected according to some rate β(due Bieber’s music) and rate P due to (positive) media effect. Susceptible people, dueto (negative) media effect, can become recovered at rate N . Beliebers can become boredof Bieber (recovered) at rate b and due to (negative) media effect may become susceptibleagain (due to negative media effect) at rate N . Due to (positive) media effect, a recoveredperson may become susceptible again at rate P . The flow now is

S

// Boo

R

__

The system is

S′(t) = NB(t)−NS(t)− βS(t)− PS(t) + PR(t)B′(t) = −NB(t)− bB(t) + βS(t) + PS(t)R′(t) = NS(t) + bB(t)− PR(t)

(7.6)

Notice that A(t) = S(t) +B(t) +R(t) is preserved, so, we can write (7.6) as

S′(t) = (N − P )B(t) + (−N − β − 2P )S(t) + PA0

B′(t) = (−N − b)B(t) + (β + P )S(t)(7.7)

To see what are the consequences of the media effects on the dynamics of this system wetake P = N = 0 (no media effects). The system for a isolated population is

S′(t) = −βS(t)B′(t) = −bB(t) + βS(t)

The origin (S∗, B∗) = (0, 0) is an equilibrium point. Notice that this equilibrium pointimplies that the whole population is resistant to Biever fever R. Furthermore, the systemis linear, so we can study the matrix directly. We have that the matrix has

trace = −β − b < 0, determinant = βb > 0.

96

Page 103: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.4. Combat models

Thus, the origin is a stable node. This means that, without media effect, Biever fever willextinguish. Let’s consider now the case where the media has negative effects, i.e. N > 0:

S′(t) = NB(t) + (−N − β)S(t)B′(t) = (−N − b)B(t) + βS(t)

The origin is again an equilibrium point. In this case, the matrix verifies

trace = −2N − β − b < 0, determinant = (N + b)(N + β)−Nβ.

We are only interested on the sign of the determinant. Thus, we study the quantity

p(N) = (N + b)(N + β)−Nβ = N2 +Nb+ bβ ≥ 0,

so, we have a stable node again.

Now notice that if the media has positive effect (P > 0), then the origin is NOT anymorean equilibrium point and B∗ is not anymore a rest state. In particular, Biever fever cannot disappear if P > 0.

7.4 Combat models

In the beginning of the twentieth century, Richardson formulated several combat models.Let’s assume two armies x, y and write OLR the operational losses rate (due to illness,desertions...), CLR are the combat losses rate and RR is the rate of reinforcements, then

dx

dt= −(OLR+ CLR) +RR

and the same is true for y. According to this, the model for the combat of two armies is

x′(t) = −ax(t)− by(t) + P (t)y′(t) = −cx(t)− dy(t) +Q(t)

. (7.8)

In this model, the combat is modelled by the terms −by and −cx, the OLR is given by−ax and −dy and P and Q are the reinforcements.

The model for the combat between two guerillas is given by

x′(t) = −ax(t)− gx(t)y(t) + P (t)y′(t) = −dy(t)− hx(t)y(t) +Q(t)

. (7.9)

Notice that now the combat term is nonlinear. This is because the guerrilla soldiers arehidden in some region, so, even if the enemy shoots at the region, the losses depend onthe number of shoots but also on the number of guerrilla soldiers.

Finally, the model for the combat between a guerrilla and a standard army is

x′(t) = −ax(t)− gx(t)y(t) + P (t)y′(t) = −cx(t)− dy(t) +Q(t)

(7.10)

Notice that in the previous models, every parameter is non-negative.

97

Page 104: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

7.4.1 Combat between two standard armies

Let’s assume that there is no OLR or RR. Then the model reduces to

x′(t) = −by(t)y′(t) = −cx(t)

. (7.11)

We study now the slope:dy

dx=

cx

by,

so

b

∫ y(t)

y0

ydy = c

∫ x(t)

x0

xdx,

b(y2 − y20) = c(x2 − x20)

where y0 and x0 are the initial data. Define K = by20 − cx20, then

by2 − cx2 = K.

These curves are hyperbolas. Some of these hyperbolas intersect the x−axis at x =√

−Kc ,

while other hyperbolas intersect the y−axis at y =√

Kb . Notice that we can solve this

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

x

y

Figure 7.3: Combat between two armies.

system explicitly. To do that, we take another derivative to the equation:

d2x

dt2= −b

dy

dt= bcx.

This equation is almost the harmonic oscillator. The solution to the equation is

x(t) = x0 cosh(βt)− γy0 sinh(βt)

98

Page 105: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.4. Combat models

where β =√bc and γ =

b/c. In the same way, for y we have

y(t) = y0 cosh(βt)−y0γ

sinh(βt).

[*** Classify the equilibrium point (x, y) = (0, 0). ***]

7.4.2 Combat between two guerrillas

Again, neglecting the terms coming from RR and OLR, we have

x′(t) = −gx(t)y(t)y′(t) = −hx(t)y(t)

(7.12)

As before, we study the quantitydy

dx=

h

g.

We can integrateg(y(t) − y0) = h(x(t) − x0)

We write this asgy − hx = L

where L = gy0 − hx0. The y army wins if L > 0 and it losses otherwise. Notice that

dy

dx=

h

g⇒ y(x) =

h

gx,

so

x′ = −hx2 ⇒ dx

x2= −hdt ⇒ −1

x+

1

x0= −ht,

and we can solve for x:x(t) =

x01 + htx0

In the same way, we can find the expression for y.

7.4.3 Combat between a guerrilla and a standard army

Again, let’s assume that OLR=RR=0, so the system reduces to

x′(t) = −gx(t)y(t)y′(t) = −cx(t)

(7.13)

where x is the guerrilla and y is the standard army. As before, we have

dy

dx=

c

gy,

so,gy2 = 2cx+M

99

Page 106: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

0 0.2 0.4 0.6 0.8 1 1.2 1.40

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

y

Figure 7.4: Combat between two guerrillas

where M = gy20 − 2cx0. The guerrilla wins if M < 0.

We can integrate the previous equation to find

dy

dx=

c

gy⇒ y =

2c

gx,

and, if we plug in, we find

dx

dt= −gx

2c

gx = −

2cgx3 ⇒ x−3

2 dx = −√

2cgdt.

Integrating

−2x−1

2 = −√

2cgt ⇒ x =4

2cgt2

We can use this information in the equation to obtain

y =2

gt

100

Page 107: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

7.4. Combat models

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.60

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x

y

Figure 7.5: Combat between a guerrilla and standard army

101

Page 108: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 7. Worked examples

102

Page 109: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8

Nonlinear centers and limit cycles

In Chapter 6, we have explained that a [*** linear center (i.e. a center for thelinearized system) does NOT imply that the nonlinear center has a center!! Inthe case of centers we have to work harder than with other kind of equilibriumpoints (we can not apply Theorem 6.1) ***]. We are going to present several ideasusing a pair of well-known applications. Later, we will develop these ideas in a morerigorous manner.

8.1 The Lotka and Volterra predator-prey model

In the mid 20’s, an italian biologist, D’Ancona, was studying the variations in the popu-lations of different fish in the Mediterranean sea.

1 2 3 4 5 6 7 810

15

20

25

30

35

40

Años

Pro

porc

ión

de ti

buro

nes

capt

urad

os

Figure 8.1: Evolution of the shark captures (percentage)

He noticed that from 1914 to 1918 the captures go from 11.9 to 36.4 %. Let’s recall that theGreat War (World War I) devastate Europe and Africa during the same years. D’Anconaask Vito Volterra, an italian mathematician, about the problem. Volterra simplified theproblem with some hypotheses:

103

Page 110: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

Year % sharks

1914 11.91915 21.41916 22.11917 21.21918 36.41919 27.31920 16.01921 15.9

Table 8.1: Shark captures

1. There are only preys, F , and predators, S.

2. There is no growth restriction for the preys. This means that, in absence of sharks,the prey population grows according to Malthus law.

3. The number of encounters between preys and predators depends from the popula-tions itself as FS.

4. In absence the preys, the predators starve and die with an exponential decay.

5. The predator population grows when the sharks are fed.

6. There is no other effect (like fishing...).

With these hypotheses, the system of equations is

F ′ = aF − bSFS′ = −cS + bSF

For the moment, let’s assume that a = b = c = 1. To find the equilibria of this system weneed to solve

0 = F − SF

0 = −S + SF

The solutions are (F ∗, S∗) = (0, 0) and (F+, S+) = (1, 1). The first point, the origin is notvery interesting as it represent the absence of animals in the sea. Around the point (1, 1),we find closed curves (see Figure 8.2). This means that the fish and shark populationoscillates (the qualitative behaviour is like sin(x) and cos(x)).

To prove rigorously this qualitative behaviour is not so easy. So, we are going to addressthe problem in a different way. Let’s assume that the populations are

S(t) = 1 + δs(t), F (t) = 1 + δf(t) with |δ| << 1.

104

Page 111: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.1. The Lotka and Volterra predator-prey model

prey ’ = (A − B predator) prey predator ’ = (D prey − C) predator

B = 0.01D = 0.005

A = 0.4C = 0.3

0 20 40 60 80 100 120

0

10

20

30

40

50

60

70

80

prey

pred

ator

Lotka−Volterra

Figure 8.2: Fishes vs. Sharks

This means that initially our populations are close to (1,1). If we plug our assumption inthe equations, we get

S′ = δd

dts,

d

dtF = δ

d

dtf.

δf ′ = 1 + δf − (1 + δs)(1 + δf)δs′ = −(1 + δs) + (1 + δs)(1 + δf)

δf ′ = 1 + δf − (1 + δf + δs + δsδf)δs′ = −1− δs + 1 + δf + δs + δfδs

δf ′ = −δs − δsδfδs′ = δf + δfδs

Now, we simplify δ

f ′ = −s− sδfs′ = f + fδs

As δ << 1 we can approximate the system by the easier system

f ′ = −ss′ = f

Now, notice that, if we take a second derivative in any of the previous equation, we get

f ′′ = − d

dts = by the second equation = −f.

Recall thatd2

dt2sin(x) = − sin(x),

105

Page 112: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

so, we can expect (kind of) periodic solutions close to the equilibrium (1,1). Now, to makesure that the previous computation is meaningful, we can linearize

f1(F, S) = F − SF, f2 = −S + SF,

and

∇f1(F, S) = (1− S,−F ), ∇f2 = (S,−1 + F ).

Thus, the matrix is

Df+ =

(

0 −11 0

)

,

with

trace(Df+) = 0,det(Df+) = 1.

[*** The trace being 0 suggests the following alternative:

1. saddle-node, or,

2. complex eigenvalues (actually, pure imaginary eigenvalues).

As the determinant is positive, we can discard the first case and we concludethe existence of two pure imaginary eigenvalues (thus, this equilibrium pointis a center for the linearized system). ***]

[*** The question now is if the nonlinear system behaves like the linear system,at least, for trajectories close enough to the equilibrium point. In particular,notice that, as the eigenvalues are pure imaginary numbers, we can not applyTheorem 6.1. ***]

In this case, we can prove that the nonlinear system behaves similarly to the linear onebecause we can compute the equation for the closed curves. We compute

F ′

SF=

1

S− 1,

S′

SF= − 1

F+ 1.

FurthermoreS′F ′

SF=

S′

S− S′,

S′F ′

SF= −F ′

F+ F ′,

and

0 =S′

S− S′ +

F ′

F− F ′.

Notice that a function E(F, S) evaluated on the trajectories verifies

dE

dt= ∂SE(S,F )S′ + ∂FE(S,F )F ′.

106

Page 113: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.2. The harmonic oscillator and its symmetries

So, if E is constant along the trajectories of the dynamical system, we have

dE

dt= ∂SE(S,F )S′ + ∂FE(S,F )F ′ = 0.

Consequently, we want

∂SE(S,F ) =1

S− 1,

∂FE(S,F ) =1

F− 1.

We takeE(S,F ) = log(S)− S + log(F )− F,

and we get that the trajectories verify

E(S(t), F (t)) = c,

for c = E(S(0), F (0)). These function form a family of closed curves in the first quadrant.

8.2 The harmonic oscillator and its symmetries

[*** This is exercise 5.1.12 ***] Consider the harmonic oscillator

x′ = y, y′ = −x.

The point (0, 0) is a center [*** why? ***]. [*** Then we can conclude that thetrajectories are closed curves. We want to prove this fact using only symmetryarguments. ***] To do this assume that the trajectory starts are the point (0,−y0) and,after a time t0, it intersects the x−axis at (x0, 0). Now notice that if (x(t), y(t)) is asolution, then (x1(t), y1(t)) = (x(−t),−y(−t)) is also a solution. To see that, notice that

d

dtx1(t) = −x′(−t) = due to the equation for x = −y(−t) = y1(t),

d

dty1(t) = −(−y′(−t)) = due to the equation for y = −x(−t) = −x1(t).

So, if (x(0), y(0)) = (0,−y0) and (x(t0), y(t0)) = (x0, 0), we have that (x1(t), y1(t)) verifies

(x1(0), y1(0)) = (x(0),−y(0)) = (0, y0),

and(x1(−t0), y1(−t0)) = (x(t0),−y(t0)) = (x0, 0).

Consequently, the original trajectory (x, y) must continue beyond t0 as (x1, x2), otherwise,two different trajectories intersect each other and this would break the uniqueness fromthe well-posedness Theorem. In this way, we proved that the original trajectory verifies

(x(0), y(0)) = (0,−y0), (x(t0), y(t0)) = (x0, 0), (x(t1), y(t1)) = (0, y0).

107

Page 114: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

Now, we define(x2(t), y2(t)) = (−x(−t), y(−t)).

We haved

dtx2(t) = x′(−t) = y(−t) = y2(t),

andd

dty2(t) = −y′(−t) = x(−t) = −x2(t),

so, (x2, y2) is also a solution. This new solution obtained using the symmetry verifies

(x2(0), y2(0)) = (0,−y0), (x2(−t0), y2(−t0)) = (−x0, 0), (x2(−t1), y2(−t1)) = (0, y0).

Again, due to the uniqueness of the trajectories, we obtain that (x2, y2) is an extension ofour previous trajectory (x, y). Then, we obtain that (x, y) form a closed curve.

[*** Finally, let us remark the extensive use of the trajectories-do-not-cross

argument that we have along the course. ***]

8.3 Conservative and reversible systems

Let us consider now equations of the form

x′′ = −V ′(x), (8.1)

or, in its system formx′ = yy′ = −V ′(x).

(8.2)

We already know that these equations have a conserved quantity:

E(t) = y(t)2/2 + V (x(t)).

This conserved quantity is akin to the total energy in a physical system. To see how thisquantity is preserved, we multiply equation (8.1) by x′,

x′x′′ + V ′(x)x′ = 0.

Now notice thatd

dtV (x) =

dV

dxx′ = V ′(x)x′,

soE(x(t), y(t)) = (x′(t))2 + V (x(t)) = E(x0, y0).

Of course, this situation can be exported to systems like

~x′′ = −∇V (~x).

[*** Maybe you want to repeat the computation to make sure that theenergy is preserved also in several dimensions. ***] The cornerstone of theseconserved quantities or energies is that [*** the trajectories must move along levelcurves of E(x, y) ***]

108

Page 115: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.3. Conservative and reversible systems

Definition 8.1. Given the system

~x′ = f(~x),

a conserved quantity E(~x(t)) is a function that is constant on solutions and non-constantin any open ball. A system with a conserved quantity is called a conservative system.

We have the following result:Theorem 8.1. A conservative system can not have a stable (or unstable) equilibriumpoint.

Proof. The proof is rather easy. Assume that there exists a stable point ~y and considerevery initial data ~x0 such that

|~y − ~x0| < δ

for 0 < δ ≪ 1. Then the corresponding trajectories verify

|~x(t)− ~y| < ǫ ∀ t > t∗ > 0.

Then

E(~x0) = E(~x(t)) = E(~y).

This is a contradiction due to the fact that E can not be constant in open balls.

Theorem 8.2. Define

S = ~x ∈ Rd, E(~x) = E(~x0).

Then, a conservative system can not blow up if S ⊂ Rd is bounded.

Proof. [*** Do it!! ***]

Consider now the equation (8.2). Write x0 for a local minimum of V (x). Then,

V ′(x0) = 0, V ′′(x0) > 0.

The linearized version of (8.2) around the equilibrium point (x0, 0) is then

(x− x0)′ = y

y′ = −V ′′(x0)(x− x0).

The matrix is then

A =

(

0 1−V ′′(x0) 0

)

,

and we have

det(A) = V ′′(x0) > 0, trace(A) = 0.

This means that the equilibrium point (x0, 0) is a linear center. So far, there is nothingnew in our approach. The question now is whether the quilibrium point (x0, 0) is anonlinear center. To see that notice that the function

E(x, y) =y2

2+ V (x),

109

Page 116: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

has Hessian

H(x, y) =

(

V ′′(x) 00 1

)

.

This means that (x0, 0) is a local minimum of the function

E(x, y) : R2 → R.

Then, we see that, trajectories close enough to the equilibrium point will be closed curves.Consequently, we have a nonlinear center.

Notice that not every system is conservative, thus we want to relax a little bit the conceptswithout losing the main properties. This is how we came up with reversible systems:Definition 8.2. The system

~x′ = f(~x)

is reversible if it is invariant under the replace t 7→ −t and y 7→ −y. Namely, given~x = (x(t), y(t)) a solution to the system, then the functions

X(t) = x(−t), Y (t) = −y(−t)

are a solution to the same system.

[*** Let me explain this a little bit. Notice that the change t 7→ −t makes thetime going backward. The change y 7→ −y seems more obscure. However, no-tice that if a particle is moving rightward as time advances, then, by changingthe arrow of time, the particle is moving leftward. Consequently, the velocitychanges sign. That explains the change y 7→ −y. ***]Example 8.1. Show that the harmonic oscillator

x′ = y, y′ = −x.

is reversible.

Solution: If we define

X(t) = x(−t), Y (t) = −y(−t),

then

X ′(t) = −x′(−t) = −y(−t) = Y (t),

Y ′(t) = −(−y(−t))′ = y′(−t) = x(−t) = X(t).

Theorem 8.3. Assume that f1 is odd in the y variable and f2 is even in the y variable,then the system

x′ = f1(x, y)y′ = f2(x, y).

is reversible.

The importance of this type of system is the following result

110

Page 117: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.4. Limit cycles

Theorem 8.4. Assume that the system

x′ = f1(x, y)y′ = f2(x, y).

is reversible and such that x∗ = (0, 0) is an equilibrium point. Assume furthermore thatx∗ is a linear center. Then, it is also a nonlinear center.

Proof. The sketch of the proof is as follows. The nonlinear solutions are close to the linearones. We don’t know if the nonlinear trajectories are closed, but we know that they arenot very far from the trajectories for the linear system. Then, the nonlinear trajectoriesare closed to be a half circle and in particular, they close the x axis. Once they form onehalf of a closed curve, by the reversibility, they should form and entire closed curve.

Example 8.2. Show that the system has a nonlinear center

x′ = y − y3, y′ = −x− y2.

at (0, 0).

Solution: Notice that the matrix corresponding to the linear system is

A =

(

0 1−1 0

)

.

Thus, it is a linear center. To obtain that it is a nonlinear center, we only have to chekcthe reversibility. We can do it luddite friendly (inserting the changes t 7→ −t and so on)or we can just check the symmetry of f1 and f2. [*** Maybe you want to fill everydetail ***]

A particularly special closed curves are the homoclinic and the heteroclinic solutions:Definition 8.3. The homoclinic orbits start and ends in the same equilibrium point.Definition 8.4. The heteroclinic orbits links two different equilibrium points, i.e. theystart and ends in two different equilibrium points.Example 8.3. Show that the system

x′ = y, y′ = x− x2.

has a homoclinic solution at (0, 0).

Solution: When we linearize around the point (0, 0), we get a (linear) saddle node.Applying the standard theorem, we now that a linear saddle node is also a nonlinear saddlenode. Now notice that the system is reversible. Consequently, due to the reversibility, ifthe trajectory cuts the x axis, then it should go back towards the origin. To see the reasonwhy the trajectory will cut the x axis, notice that if x > 1, then y′ < 0.

8.4 Limit cycles

A particularly interesting kind of periodic solution is the, so-called, limit cycles:

111

Page 118: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

Definition 8.5. A limit cycle is an isolated closed trajectory. If all neighboring trajectoriesapproach it it is said to be stable. Otherwise is unstable (there is also a notion of half stablelimit cycles).

[*** The difference with centers is that there is no closed, neighboring tra-jectories. Also, notice that this (as finite time blow-up or chaos) is a purelynonlinear phenomenon. It is not present in linear systems. ***]Example 8.4. Show that the system (written in polar coordinates)

r′ = r(1− r), θ′ = 1.

has a limit cycle.

Solution: The solution (r, θ) = (1, t) is a solution. Furthermore, if there is anothersolution (r1, θ1) close by, then r1 → 1, so, it can not be a closed orbit.

In general it is not easy to prove that a system has a limit cycle. In fact, this has been asubject of very hot research. In this section we are going to see the celebrated Poincare-Bendixon Theorem:Theorem 8.5. Assume that R is a compact set in the plane and ~x′ = ~f(~x) is a systemdefined in an open set containing R and such that there is no equilibrium points inside R.Furthermore, assume that there exists a trajectory C that is confined in R. Then, we havethe following alternative:

• either C is a closed orbit (a limit cycle) or

• C spirals toward a closed orbit.

In any case, the set R contains at least a closed orbit.

[*** The importance of this Theorem relies on the fact that it characterizesthe possible behaviours of a dynamical system in the plane. The trajectoriescan

1. leave every compact region in the plane (maybe in finite time)

2. tend to an equilibrium point

3. tend to a limit cycle.

In particular this says that chaotic behaviour is not possible in the plane. ***]

We can use this theorem to prove the existence of limit cycles. To do that, we can tryto look for a trapping region where once the solutions enter, they live there forever. If inthis trapping region there is not equilibrium points (or, if there is an unstable equilibriumpoint), then there exists at least a limit cycle.Example 8.5. Consider the system written in polar coordinates

r′ = r − r3 +r

1 + θ2

θ′ = 1.

Show that there is a limit cycle.

112

Page 119: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.4. Limit cycles

Solution: We define the annulus

A = (x, y), s.t. 0.5 ≤ r ≤√3.

Notice that

r′ < 0 at r =√2.

To see this, we observe that

r′ = r − r3 +r

1 + θ2= r

(

1− r2 +1

1 + θ2

)

≤ 2− r2.

Furthermore, we have

r′ > 0 at r = 0.5.

To see this, we compute

r′ = r − r3 +r

1 + θ2= r

(

1− r2 +1

1 + θ2

)

≥ r(1− r2).

Consequently, A is a trapping region without equilibrium points. We conclude the exis-tence of (at least) one limit cycle in the region A.

Consider now the system

x′′ + f(x)x′ + g(x) = 0. (8.3)

These systems are known as Lienard systems. The previous equation can be written as asystem as follows

x′ = y, y′ = −g(x) − f(x)y.

Then we have the following theorem:Theorem 8.6. Suppose that f(x) and g(x) satisfy

1. f, g ∈ C1(R),

2. g is odd,

3. g > 0 if x > 0,

4. f is even,

5. the function

F (x) =

∫ x

0f(s)ds

has one zero at x = a, it’s negative for 0 < x < a, positive for x > a andlimx→ F (x) = ∞.

Then, the system (8.3) has a unique stable limit cycle surrounding the origin.Example 8.6. Show that the Van der Pol system

x′′ + µ(x2 − 1)x′ + x = 0, µ ≥ 0,

has a limit cycle.

113

Page 120: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

[*** The term µ(x2 − 1)x′ is a positive damping if x > 1 and a negative one ifx < 1. Consequently, if x gets too small, that term pushes x back to highervalues. ***]

Solution: We have to check that

g(x) = x, f(x) = µ(x2 − 1),

verify the hypotheses of the theorem. The symmetry hypotheses are easily checked. Con-sequently, we only have to check the fifth hypothesis. We can easily compute

F (x) = µ(x3/3− x).

Notice that F (√3) = 0 and F (x) < 0 if x <

√3 and it’s positive otherwise. Consequently,

the Van der Pol equations has a unique limit cycle.

If proving the existence of limit cycles we have partial success, discarding its appearancewe have been more successful. We are going to see several situations where we can provethat there is not limit cycles. We start with Dulac’s criterion and then we will continuedeveloping these tools in the next section.Theorem 8.7. Assume that there exists a smooth function g such that

∇ · (g~x′)

has one sign on the simply connected region R ⊂ R2. Then, there is not a limit cycle

inside R.

Proof. Assume that ~x(t) is a limit cycle enclosing the region A. Then

A∇ · (g~x′) =

~x(t)g~x′ · nds = 0.

This is a contradiction. [*** Do you see why? ***]

Example 8.7. Consider the system

x′ = x(2− x− y)

y′ = y(4x− x2 − 3).

Show that there is no a limit cycle in the first quadrant.

Solution: Define

g(x, y) =1

xy.

Then

∇ · (g~x′) = −1

y< 0.

Then, we conclude due to Dulac’s criterion.

114

Page 121: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

8.5. Gradient systems and the Lyapunov stability Theorem

8.5 Gradient systems and the Lyapunov stability Theorem

The system

x′ = −V ′(x), (8.4)

is a gradient system. Actually, we showed previously that the energy V (x) decreases alongtrajectories:

d

dtV (x) = V ′(x)x′ = −(V ′(x))2.

[*** Can you generalize this computation for the system

~x′ = −∇V (~x), (8.5)

***] Notice that the critical points of V corresponds to the equilibrium points of thedynamical system. Then, we see that if the trajectories tries to minimize the function Vand the point x∗ is a global minimum, then, we can expect x∗ to be a stable point.

In particularTheorem 8.8. The gradient system (8.5) can not have periodic orbits.

Proof. The proof is rather easy. Just consider that there exists a periodic orbit. Then, afterone circuit, the value of the potential function V has decreased. This is a contradiction.

This is a particular case of the more general Lyapunov stability Theorem:Theorem 8.9. If there exists a function L(~x) such that strictly decreases on the trajecto-ries of the system

~x′ = f(~x),

except at x∗ where it has a global minimum, then

x(t) → x∗.

[*** The function L(~x) is called a Lyapunov function. ***] More precisely,Definition 8.6. A function L(~x) that decreases on trajectories of a dynamical system iscalled a Lyapunov function for that dynamical system.Example 8.8. Find a Lyapunov function for the system

x′ = −x+ 4y, y′ = −x− y3.

Solution: In general, we need some sort of epiphany to find a Lyapunov function. How-ever, as we want something positive, we are going to try with the sum of squares. Let’sdefine

L(x, y) = x2 + ay2.

Thend

dtL(x, y) = 2xx′ + 2ayy′ = −2x2 + 8xy − 2ayx− 2ay4.

115

Page 122: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 8. Nonlinear centers and limit cycles

Now we choose a = 4 to obtain

d

dtL(x, y) = −2x2 − 8y4 ≤ 0.

For a system with a Lyapunov function, we can prove that there is no limit cycles:Theorem 8.10. If the system

~x′ = f(~x),

has a Lyapunov function L(x), then it can not have periodic orbits.

[*** Notice that the situation is not the same in the case where the functionthat decreases has not a isolated minimum. Consider

x′ = x(1− y2 − x2)− yx

y′ = y(1− x2 − y2) + x2.

ThenL(x, y) = (1− x2 − y2)2

decreases along trajectories. However, the level set

(x, y), L = 0

is not a single equilibrium point. ***]

116

Page 123: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 9

Worked examples

9.1 Carleman model of chemical kinetics

We consider the system

x′ = y2 − x2

y′ = x2 − y2

This is a model of a chemical kinetics with a reversible chemical reaction of the form2S1 → 2S2. The first remarkable fact from the equations is the conservation of thenumber of particles

N(t) = x(t) + y(t) = N(0).

[*** Why? ***] Notice that if x(0), y(0) are non-negative, then x(t) and y(t) are also non-negative. To see that we can argue by contradiction. Assume that there exists 0 < t0 < ∞such that x(t0) = 0 and y(t0) > 0. Then we also have x′(t0) > 0, so x(t) ≥ 0. In thesame way we obtain that y(t) ≥ 0. This makes perfect physical sense because x andy are numbers of particles of a given substances, thus, they can not be negative. Thepositiveness and the conservation of N(t) prevents the solution to develop a blow up.[*** Why? ***] In particular, the dynamics is confined to a bounded region in the firstquadrant.

Let’s study further the dynamics. A very important concept in physics is the entropy. Weare not going to go over these concepts very deeply. Just keep in mind that the entropyis a monotone function (depending on the definition, it will be increasing or decreasing).Let’s define the functional

H(t) = x log(x) + y log(y).

This functional corresponds to minus the standard entropy (the one in the standard bookof thermodynamics). H is a functional mapping trajectories into real numbers. Then wehave

H ′ = x′ log(x) + y′ log(y) + x′ + y′ = x′ log(x) + y′ log(y).

117

Page 124: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 9. Worked examples

Using the equations for x and y, we have

H ′ = (y2 − x2)[log(x)− log(y)] = (y2 − x2) log

(

x

y

)

≤ 0. (9.1)

We see that H is a monotone decreasing function. [*** In dynamical system languagewe know that H is called a Lyapunov function. ***] In particular, the trajectoriesof the system try to minimize the value of H, thus, the trajectory (x(t), y(t)) approximatesto some point (x∗, y∗) on the straight line x = y. We can see that because at that linethe functional H is not changing. Once we see that the trajectories approach the straightline x = y, we can ask ourselves what is the value of x∗. [*** This is a good logicexercise that, maybe, you want to solve alone. In that case, stop reading!***] To obtain the value of x∗, we need to use the other conservation law (also calledconserved quantity):

N(t) = x(t) + y(t) = N(0). (9.2)

We know that the trajectory (x(t), y(t)) with initial value (x0, y0) approach the point(x∗, x∗). But, at the same time, the trajectory preserves N(0), so x∗ should verify

limt→∞

N(t) = x∗ + x∗ = x0 + y0 = N(0).

So,

x∗ = N(0)/2.

The next question that we want to address is the particular form of the trajectories. Inother words, how are the trajectories approaching the line x = y? To see that, we studythe slope

y′

x′=

dy

dx= −1,

so, integrating, we have that

y = −x+ C.

Furthermore, due to the conservation of the number of particles (9.2), we have C = N(0).We see that the trajectories approach the straight line x = y perpendicularly. The finalquestion that we want to address is the velocity of the convergence. In other words, wewant to know how fast the trajectory approach the straight line x = y. To see that, noticethat the system can be written as

x′ = (y − x)(y + x)

y′ = −(y − x)(y + x).

If we subtract both equations and use the conservation of mass (9.2), we have

x′ − y′ = 2(y − x)(y + x) = 2(y − x)N(0).

Writing

M(t) = x(t)− y(t),

118

Page 125: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

9.2. Competitive exclusion

we have

M ′(t) = −2N(0)M(t).

This is just the well-known Malthus law. We can solve and we find

M(t) = M(0)e−2N(0)t .

As a consequence, we see that the trajectories converge exponentially fast towards thestraight line x = y. We have fully characterized the dynamics of the Carleman model.

Finally, notice that (9.1) implies

N(0) log(N(0)/2) −H(0) =

∫ ∞

0H ′(s)ds =

∫ ∞

0(y2(s)− x2(s)) log

(

x(s)

y(s)

)

ds ≤ 0.

One step forward 9.1. In particular, for every a, b ≥ 0, we have the inequality

2c log (c) ≤ a log(a) + b log(b),

where

c =a+ b

2.

Writing

f(x) = x log(x),

the previous inequality can be written as

f

(

a+ b

2

)

≤ f(a) + f(b)

2.

The functions f verifying the previous inequality are called midpoint convex. For contin-uous functions f , it is known that midpoint convexity implies convexity. In other words,we have proved the convexity of the function x log(x) using the evolution of the entropy ofa dynamical system. This technique is used in partial differential equations (where, some-times, it is called the entropy-entropy production, entropy dissipation or Bakry-Emerymethod) to obtain rates of decay and new functional inequalities similar to

maxx

f(x)2 ≤ 2

(∫

R

f(x)2dx

)0.5(∫

R

f ′(x)2dx

)0.5

, ∀ function f ∈ C1 decaying fast enough at infinity.

9.2 Competitive exclusion

Assume that we have two animal populations competing for the same food. Let’s write xfor one kind of animals and y for the other. We have to write a model for the dynamics.We assume the growth rates x′/x and y′/y are affected by:

1. the reproduction rate of each species,

2. the diminished food supply due to animals of the same species,

119

Page 126: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 9. Worked examples

3. the diminished food supply due to animals of the other species.

Then we have the equations

x′ = x(a− bx− cy)

y′ = y(d− ex− fy)

To understand the dynamics, we look for the equilibrium points. We impose

x(a− bx− cy) = 0 ⇒ x = 0, a− bx− cy = 0

y(d− ex− fy) = 0 ⇒ y = 0, d − ex− fy = 0.

Then we have three easy equilibrium points:

(0, 0), (0, d/f), (a/b, 0),

and a difficult equilibrium point, which is solution of

a = bx+ cy

d = ex+ fy.

Writing

A =

(

b ce f

)

,

we have that the equilibrium point (if it exists) is the solution to

A−1(a, b)t.

To simplify the exposition, let’s fix the values

a = 3, b = 2, c = 1, d = 2, e = 1, f = 1.

Then the jacobian is given by

Df =

(

3− 2x− 2y −2x−y 2− x− 2y

)

.

We have then the equilibrium points

1. (0,0) with matrix

Df =

(

3 00 2

)

.

2. (0,2) with matrix

Df =

(

−1 0−2 −2

)

.

120

Page 127: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

9.3. Language competition

3. (3,0) with matrix

Df =

(

−3 −60 −1

)

.

4. (1,1) with matrix

Df =

(

−1 −2−1 −1

)

.

We conclude that one of the species goes extinct [*** Why? ***].

[*** This is known as Gause’s law in honor of the russian biologist GeorgiiFrantsevich Gause. ***]

9.3 Language competition

There are about 6900 languages currently spoken in the world. Unfortunately, 90% of themare facing extinction during this century century as a result of language competition. Theloss of linguistic diversity means the loss of cultural diversity. A quick search in wikipediashows a list of indigenous languages

Root languages of California: Athabaskan Family: Hupa, Mattole, Lassik,Wailaki, Sinkyone, Cahto, Tolowa, Nongatl, Wiyot, Chilula; Hokan Fam-ily: Pomo, Shasta, Karok, Chimiriko; Algonquian Family: Whilkut, Yurok;Yukian Family: Wappo; Penutian Family: Modok, Wintu, Nomlaki, Konkow,Maidu, Patwin, Nisenan, Miwok, Coast Miwok, Lake Miwok, Ohlone, North-ern Valley Yokuts, Southern Valley Yokuts, Foothill Yokuts; Hokan Family:Esselen, Salinan, Chumash, Ipai, Tipai, Yuma, Halchichoma, Mohave; Uto-Aztecan Family: Mono Paiute, Monache, Owens Valley Paiute, Tubatulabal,Panamint Shoshone, Kawaisu, Kitanemuk, Tataviam, Gabrielino, Juaneno,Luiseno, Cuipeno, Cahuilla, Serrano, Chemehuevi.

Furthermore,

according to the 2007 American Community Survey, 42.6% of California’s pop-ulation older than age 5 spoke a language other than English at home, with73% of those persons also speaking English well or very well, and 9.8% notspeaking English at all.

So, roughly speaking, there is a 5% of people not speaking English at all. We want tounderstand the evolution of the number of speakers of two languages in direct competition.To do that we are going to present several models. The first model was obtained by Abramsand Strogatz (Nature 424, 900 (2003)). Let’s write x for the percentage of the populationspeaking language X and y for the percentage of the population speaking language Y .Other assumptions as

1. The population size is constant. Each individual only speak one of the two language,namely monolingual. So, x+ y = 1.

121

Page 128: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 9. Worked examples

2. The population is highly connected, with a uniform spatial and social structure. Theindividuals interact with each other at the same rate. [*** Sadly, this is highlyunreal. Ghettos do exists ***]

3. The switch from one language to its competing partner is related to the level ofattraction of the competing language.

4. The attractiveness of a language increase with both its number of speakers andits perceived status, denoted as sX and sY . This parameter reflects the social oreconomic perception of the given language. We have sX + sY = 1.

Let’s write

PX→Y , PY→X ,

for the probabilities of a speaker changing from language X to language Y and conversely.We assume the expressions

PX→Y = sY ya = (1− sX)(1 − x)a

PY→X = sXxa,

where a is a constant that measures how attractive is a language depending on its numberof speakers. Furthermore a = 1.31 is a constant over different cultures [*** ??? ***].

The equation then reads

x′ = yPY→X − xPX→Y = (1− x)sXx1.31 − x(1− sX)(1− x)1.31.

Notice that x∗ = 1 is an equilibrium point. This equilibrium point means that language Xis the only language surviving. To see the stability of this eq. point, we take the derivativeof the rate function

f(x) = (1− x)sXx1.31 − x(1− sX)(1− x)1.31.

We have

f ′(x)

x=1

= −sX ≤ 0.

So, x∗ is linearly stable. The point x+ = 0 is an equilibrium point. Repeating the process,we have

f ′(x)

x=0

= sX − 1 ≤ 0.

Consequently, x+ is also linearly stable. Then, the model therefore predicts that twolanguages cannot coexist stably, i.e. one will eventually drive the other to extinction.Notice also that this forces the existence of a third equilibrium point 0 < x− < 1 which isunstable.

[*** Ey! Wait! Bilingual societies DO exist in the real world. What doAbrams and Strogatz say of this? Let’s go to the actual paper in Nature:

122

Page 129: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

9.3. Language competition

Contrary to the model’s stark prediction, bilingual societies do, infact, exist. But the histories of countries where two languages coexisttoday generally involve split populations that lived without signifi-cant interaction, effectively in separate, monolingual societies. Onlyrecently have these communities begun to mix, allowing languagecompetition to begin.

This is one of the most hazardous comments that I ever seen in a researchpaper. I don’t know which countries they are referring to. In my opinion thisis a mistake. For instance one can take France. France has several languagesin its land. At the same time, France (since the 1700’s) has been a verycentralist nation-state. Still today, french is the only language that is taughtin public schools (and private schools are very uncommon). We can say thesame about Spain. Spain has many different languages all along the countryand at the same time, there are enough historical evidences showing the, so-called, interactions of its inhabitants. Nowadays, in the spanish public schoolsystem (and again, private schools are uncommon) the students may chosewhich language (castilian, basque, catalan...) they want to use. ***]

We need to fix this model. To do that, we follow the work by Mira and Paredes (arXiv:physics/0501097).These authors consider a extended model with a new unknown b denoting the percentageof bilingual speakers. Now we have x + y + b = 1. Furthermore, they consider a newparameter 0 ≤ k ≤ 1 measuring the similarity between different languages.

Then, we have the probabilities

PX→Y = (1− k)sY (1− x)a,

PX→B = ksY (1− x)a.

To see that, just notice that a speaker can leave X to speak Y only or to become bilingualB. In the same fashion,

PY→X = (1− k)sX(1− y)a,

PY→B = ksX(1− y)a.

We imposePB→X = PY→X , PB→Y = PX→Y

The system now reads

x′ = yPY→X + bPB→X − x(PX→Y + PX→B)

y′ = xPX→Y + bPB→Y − y(PY→X + PY→B)

[*** To reduce the number of unknowns from 3 x − y − b to just two x − y,we take advantage of the conservation x+ y + b = 1. Do you agree? ***]

The system can be further simplified

x′ = yPY→X + (1− x− y)PY→X − x(PX→Y + PX→B)

y′ = xPX→Y + (1− x− y)PX→Y − y(PY→X + PY→B)

123

Page 130: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 9. Worked examples

and then,

x′ = (1− x)(1− k)sX(1− y)a − x(1− sX)(1− x)a

y′ = (1− y)(1− k)sY (1− x)a − ysX(1− y)a.

We want to look for an equilibrium point such that y = 0 but x 6= 0. In this way, weensure that b = 1− x 6= 0. Under this assumption, the equation reduces to

x′ = (1− x)(1− k)sX − x(1− sX)(1− x)a.

Let’s denote the rate function

f(x) = (1− x)(1− k)sX − x(1− sX)(1 − x)a.

Then, we notice that

f(0) ≥ 0, f(1) = 0, f ′(1) = −(1− k)sX .

Then the question is whether there exists other solutions to

f(x) = 0.

Take x1 = 0.5. Then

f(0.5) = 0.5[(1 − k)sX − (1− sX)0.5a].

Now notice that if k = 1− ǫ for ǫ ≪ 1, we have

f(0.5) = 0.5[ǫsX − (1− sX)0.5a] ≈ −(1− sX)0.51+a ≤ 0.

So, we conclude that a bilingual society is possible according to this model if the similaritybetween both languages is high enough. Notice that this condition is not optimal.

124

Page 131: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10

Hopf bifurcations

10.1 Review of bifurcations

We have been studying several kind of bifurcations, namely saddle-node, transcritical andpitchfork. Roughly speaking we have

• saddle-node: It’s the basic mechanism in which new equilibrium points appear/disappear.The easier example for a single ODE is

y′ = y2 + r.

Then we see that if r < 0 there are two equilibrium points, namely y∗ = ±√−r.

When r = 0 there is only one equilibrium point y∗ = 0. For r > 0 there is noequilibrium points. Now notice that if we add more dimensions, i.e. we have asystem of ODEs, the situation is similar

x′ = −x

y′ = y2 + r.

• transcritical: It’s the basic mechanism in which the equilibrium points change itsstability. The easier example for a single ODE is

y′ = y2 + ry.

Then we see that for r 6= 0 there are two equilibrium points while if r = 0, there isonly one. Notice that y∗ = 0 is always an equilibrium point. Furthermore, if r < 0,y∗ is stable, while if r > 0 it’s unstable [*** Why? ***]. In more dimensions thesituation is similar

x′ = −x

y′ = y2 + ry.

[*** Find the equilibrium points of the latter system and see whathappen when you move r. ***]

125

Page 132: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

• pitchfork: This is some sort of mix. Some equilibrium points will appear (usually ina symmetric way) and some other equilibrium point will change their stability. Theexample is

y′ = ry − y3.

Notice that y∗ = 0 is always an equilibrium point. Furthermore, if r < 0 it is theonly equilibrium point. Notice also that for r < 0 y∗ is exponentially stable. Forr = 0, the equilibrium point is still stable, but now we have

y(t) → 0

algebraically [*** Can you compute the rate of decay? ***]. If r > 0,y∗ is no longer stable. Furthermore, two new equilibrium points appear, namelyy± = ±√

r [*** Notice that they are symmetric ***]. In more dimensions, wehave

x′ = −x

y′ = ry − y3.

[*** Find the equilibrium points of the latter system and see whathappen when you move r. ***]

Example 10.1. Consider the following dynamical system:

x′ = −ax+ y

y′ =x2

1 + x2− y,

for a > 0. Study the bifurcation when a changes.

Solution: First we have to find the equilibria. As always, the equilibria are the intersec-tions of the curves

f1(x, y) = −ax+ y = 0,

and

f2(x, y) =x2

1 + x2− y = 0.

Consequently, we have to find the solutions of

ax =x2

1 + x2. (10.1)

Notice that x = 0 is always a solution. To find analytically every solution of this equationthis may be hard (well, not in this particular case, but anyway). Thus, we are going toargue using the graph. We have that

g(x) =x2

1 + x2,

tends to 1 as x grows, is non-negative and g(0) = 0. Furthermore, since we have that

g(x) ≈ x2 if |x| ≪ 1,

126

Page 133: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.1. Review of bifurcations

we obtain g(x) is convex (or concave up) if x is small enough. Of course, for large values ofx, the geometry changes and now the function is concave (or concave down). Furthermore,notice that g(x) is tangent to the x axis at the origin. In other words, g′(0) = 0. We cancollect all this information to conclude that if a is small enough, there are three solutionsto equation (10.1). If a is big enough, then the straight line ax grows that sharply thatsome of the equilibrium points disappear.

Notice that, if we think that we are moving a from 0 to 1, say, this geometrically meansthat the straight line will move up, intersecting g(x) in two points (other than x = 0). Aswe move a this two points happen to get closer. At some point, these two points are goingto collide. This particular value of a is called bifurcation point. After that, there is oneequilibrium point x = 0, y = 0. Notice also that at this particular value of a, the straightline is tangent to the curve g(x). We can find that value of a just by inspection. Noticethat if a = 0.5, we have

a ∗ 1 = 0.5 = g(1) = 0.5.

So, if a = 0.5, x = 1 is an equilibrium value. At the same time g′(1) = 0.5, so at x = 1 theboth lines are tangent to each other. We conclude that ac = 0.5 is the bifurcation point[*** See the book for an explicit approach to ac ***]. The bifurcation occurringis a saddle-node bifurcation. [*** Study the stability of the equilibrium pointsfor 0 < a < 0.5. ***]Example 10.2. Consider the following dynamical system:

x′ = µx+ y + sin(x)

y′ = x− y,

Study the bifurcation when µ changes.

Solution: Notice that the origin is always an equilibrium point. The jacobian at (0, 0) is

A =

(

µ+ 1 11 −1

)

.

We have

detA = −µ− 2, traceA = µ.

Then, the origin is stable if µ < −2 and a saddle-node if µ > −2. Thus, µ = 2 isthe bifurcation point. To conclude which kind of bifurcation, we look for some otherequilibrium points. Using the system, equilibrium points are solutions to

(µ+ 1)x+ sin(x) = 0.

Notice that if µ < −2, we don’t have more equilibrium points. This is due to the fact thatwe have

| sin(x)| ≤ |x| < (1 + ǫ)|x| if x 6= 0

and the equation for µ = −2− ǫ (ǫ > 0) reads

(µ+ 1)x+ sin(x) = (−1− ǫ)x+ sin(x) = 0.

127

Page 134: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

However, if µ = −2 + ǫ (ǫ > 0), we can find two more solutions [*** Maybe you wantto fill the details. ***] These new equilibrium points appear symmetrically in x. Weconclude that this is a pitchfork bifurcation.

[*** As for the one-dimensional examples, in all these purely two-dimensionalexamples, bifurcations occurs when two or more equilibrium points collide.Let’s study a different case. ***]

10.2 Supercritical Hopf bifurcation

Example 10.3. Consider the following dynamical system in polar coordinates:

r′ = µr − r2

θ′ = 1

Study the stability of its equilibria.

Solution: Let’s consider first the case µ = 0:

r′ = −r2

θ′ = 1

Here, we see that the origin r = 0 (x = 0, y = 0), is a stable focus. Now, Let’s considerfirst the case µ 6= 0. Then we see that if µ ≤ 0, the origin r = 0 is (linearly and globally)stable. However, if µ > 0, then the origin becomes unstable. [*** So far, this seemslike a standard transcritical bifurcation. But it is NOT. ***] However, the newequilibrium r = µ in cartesian coordinates is the circle with radius µ and centered atthe origin. [*** This is a new kind of bifurcation called (supercritical) Hopfbifurcation. ***]Example 10.4. Consider the following dynamical system in polar coordinates:

r′ = µr − r3

θ′ = 1 + r2

Study the stability of its equilibria.

Solution: Let’s consider first the case µ = 0:

r′ = −r3

θ′ = 1

As before, we see that the origin r = 0 (x = 0, y = 0), is a stable focus. Now, Let’sconsider first the case µ 6= 0. Then we see that if µ ≤ 0, the origin r = 0 is (linearly andglobally) stable. Notice also that if µ < 0 the decay of the radius is exponential while ifµ = 0, the decay is merely algebraic. Finally notice that, if µ > 0, then the origin becomesunstable. The new equilibrium is the circle with radius r =

õ. The origin becomes a

128

Page 135: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.3. Subcritical Hopf bifurcation

unstable focus and the limit cycle (the circle with radius r =õ) appears. This limit

cycle is stable [*** why? ***].

[*** Thus, a supercritical Hopf bifurcation is when a stable spiral changes intoa unstable spiral surrounded by a new limit cycle (this cycle appeared whilethe stability changed). The way this happened was that the eigenvalues ofthe linearized system at the origin cross the imaginary axis. The eigenvalueswhere given by

µ± i,

so, if µ < 0, we see the stable spiral, and if µ > 0, the spiral becomes unstable.Notice also that at the point of bifurcation, the equilibrium point is stablebut is not exponentially stable. The trajectories tend to the equilibrium pointwith an algebraic rate. ***]

10.3 Subcritical Hopf bifurcation

Example 10.5. Consider the following dynamical system in polar coordinates:

r′ = µr + r2 − r3

θ′ = 1

Study the stability of its equilibria.

Solution: Let’s consider first the case µ = 0:

r′ = r2 − r3

θ′ = 1

Here, we see that the origin r = 0 (x = 0, y = 0), is a unstable focus. At the same time,r = 1 is a stable limit cycle. If µ < 0, the origin is a stable focus and the other equilibriaare solutions of

−µ− r + r2 = 0,

so

r =1±√

1 + 4µ

2.

Now notice that if µ < 0 and µ > −1/4, we have

1 + 4m > 0.

Furthermore, in this case, we have two other solutions

rmax =1 +

√1 + 4µ

2,

rmin =1−√

1 + 4µ

2> 0.

129

Page 136: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

This implies that we have three equilibrium, namely, the origin, and the limit cycles withradius rmin and rmax. We have that the limit cycle with radius rmin is unstable and thelimit cycle with radius rmax is stable. Now notice that

rmin → 0 as µ → 0−.

In other words, as the parameter changes, the unstable limit cycle shrinks until it collideswith the (so far) stable origin. After that, the origin turns to be unstable. At the sametime, the limit cycle with radius rmax does NOT disappear. This is (subcritical) Hopfbifurcation occurring at bifurcation point µ = 0.

[*** Then, subcritical Hopf bifurcation occurs when unstable limit cycles dis-appear after colliding with an equilibrium point. As a consequence, the basinsof attractions change dramatically. As before, the way this happened was thatthe eigenvalues of the linearized system at the origin cross the imaginary axis.***]Example 10.6. Consider the following dynamical system in polar coordinates:

r′ = µr + r3 − r5

θ′ = 1

Study the stability of its equilibria.

Solution: [*** Using that the solutions to

0 = µ+ r2 − r4

can be obtained from the solutions to

−µ− r + r2 = 0,

with an easy change of variables, we can repeat the argument. ***] [*** Youshould fill the details... ***]

10.4 Degenerate Hopf bifurcation

Example 10.7. Consider the damped pendulum:

x′′ + µx′ + sin(x) = 0.

Study the stability of its equilibria.

Solution: The system can be written as

x′ = y

y′ = −µy − sin(x).

130

Page 137: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.5. Saddle-node bifurcation of cycles

Then, we see that the linearized behaviour around the origin is given by the eigenvaluesof the matrix

A =

(

0 1−1 −µ

)

,

which are

λ =−µ±

µ2 − 4

2,

so, if 0 < µ < 2, we have a stable spiral, while if 0 > µ > −2, we have a unstable spiral.[*** However, the bifurcation occurring at µ = 0 is NOT of super/subcriticalHopf type. The reason is that there is no limit cycles involved. Sometimesit’s called a DEGENERATE Hopf bifurcation. Let us remark here that at thepoint of bifurcation, the equilibrium point at a degenerate Hopf bifurcation isa center, not a focus. ***]

10.5 Saddle-node bifurcation of cycles

Example 10.8. Consider the following dynamical system in polar coordinates:

r′ = µr + r2 − r3

θ′ = 1

Study the dynamics as µ changes from −0.3 to 0.2.

Solution: Notice that, whenµ → −0.25+,

we havermin = 0.5 = rmax,

i.e. the limit cycles collide. At the same time, equation

y′ = µy + y2 − y3,

has a saddle-node bifurcation.

[*** When some limit cycles appear/disappear, it is called saddle-node bifur-cation of cycles. Notice that here, the other equilibrium, the origin, remainsstable as the saddle-node bifurcation of cycles occurs. In other words, the onlychange is that the number of limit cycles varies. ***]

10.6 Infinite period bifurcation of cycles

Example 10.9. Consider the following dynamical system in polar coordinates:

r′ = r(1− r)

θ′ = µ− sin(θ)

Study the dynamics as µ changes.

131

Page 138: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

Solution: For µ > 0 there are two equilibrium, namely the circle with radius 1 and theorigin. The limit cycle is stable and the origin is unstable. Then, at µ = 1, there is a newequilibrium point

(0, 1).

This point appears WITHIN the limit cycle. Consequently, a trajectory in the limit cyclewill not be closed! That’s why it’s called infinite period bifurcation.

10.7 The Belousov-Zhabotinsky system

For µ > 0, consider the system

x′ = 10− x− 4xy

1 + x2

y′ = µx

(

1− y

1 + x2

)

.

This is a model of a chemical reaction [*** (see the book for further details or,even better, see this youtube video https://youtu.be/IBa4kgXI4Cg). ***]We are going to analyse this model.

Non-negativeness is preserved. First, as x, y are concentrations, we want to make surethat the trajectories remain positive for positive µ. We are going to do it by contradiction.First assume that our trajectory cross the x axis for a positive value of x. Then we havey′ = µx > 0, so, the trajectory remains in the first quadrant. Now assume that thetrajectory is leaving the first quadrant after crossing the y axis at a point y > 0. Thenx′ = 10 so, the trajectory returns to the first quadrant. There is only one case left.Namely, the trajectory leaves the first quadrant after crossing the origin. This is notpossible because if this happens we have y′ = 0 and x′ = 10, so, the trajectory is notleaving the first quadrant but remaining in the x−axis. However, once x > 0, y′ = µx > 0and you leave the x−axis to go to the first quadrant again. [*** Read the previousargument again if needed. Make sure that you understand the argument.***]

Equilibrium points. There exists at least one equilibrium point. To see that we studythe conditions

10− x− 4xy

1 + x2= 0 ⇔ y =

(10 − x)(1 + x2)

4x,

and

µx

(

1− y

1 + x2

)

= 0 ⇔ y = 1 + x2.

Then we have that

g1(x) =(10 − x)(1 + x2)

4x,

tends to ∞ as x tends to zero and to −∞ if x tends to ∞. Thus, g1 should intersect

g2(x) = 1 + x2.

132

Page 139: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.7. The Belousov-Zhabotinsky system

Actually, we can solve and we find

g1 = g2 ⇒ x = 2.

Then only equilibrium point is then (2, 5) [*** why? ***].

Stability of the equilibrium point. We linearize the system around the point (2, 5).We have

Df =

(

4(x2−1)y(1+x2)2

− 1 − 4x1+x2

µ(x2−1)y(1+x2)2 + µ − µx

1+x2

)

.

When we restrict to the equilibrium point (2, 5), we get

Df

(2,5)

=

( 75 −8

5µ85 −µ2

5

)

.

This matrix has determinant and trace given by

det =14µ

25+

64µ

25> 0, trace =

7

5− 2µ

5> 0,

if µ < 72 . Thus, if

0 < µ <7

2

the equilibrium point is unstable while if

µ >7

2,

the equilibrium is stable. [*** There is some sort of bifurcation going on here.***]

The road towards limit cycles. In this section, assume that

0 < µ <7

2.

Now we want to obtain trapping region where we can apply the Poincare-Bendixon The-orem. [*** Think on how the equilibrium point affects. ***] We already knowthat the x and the y axes are good walls for our trapping region (since our trajectory willnot cross them). Our plan now is to conclude that the straight lines given by x = X andy = Y for X and Y large enough are the other walls. Now we see that it is enough totake X ≥ 10 to obtain that, for the points in that straight line (parallel to the y−axis),we have x′ < 0. Now we take Y = 102. Then, for the points in that straight line (parallelto the x−axis), we have y′ < 0. The only problem is that, inside this region, there isan equilibrium point and the Poincare-Bendixon Theorem requires the trapping region tobe empty of equilibria. Then we cut our box around the point (2, 5). As this point isunstable, the punctured box is a good trapping region for Poincare-Bendixon purposes,so, we conclude the existence of (at least) one limit cycle in that punctured box.

133

Page 140: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

The bifurcation occurring. [*** In general, it is very difficult to distinguisha supercritical Hopf bifurcation from a subcritical Hopf bifurcation. No-tice that, since at the linear level they are similar (the eigenvalues cross-ing the imaginary axis), we can not just try to linearize an see what happen.Consequently, using the analytical tools that we have now, we can just saythat this is a Hopf bifurcation (without classifying it as sub/supercritical).One can try to use a computer to get some idea about this. ***]

10.8 The forced pendulum

Let’s consider here the equation

φ′′(t) + rφ′(t) + sin(φ(t)) = f.

Here φ ∈ [0, 2π] is the angle of the pendulum, rφ′ is the friction and f is the forcing, whichis assume to be constant. We assume that f ≥ 0.

We can write the previous ode as a system as follows

φ′ = y

y′ = f − ry − sin(φ).

Equilibrium points. The equilibrium points are solutions to

f = sin(φ), y = 0.

Consequently, we have a bifurcation depending on the value of f . If 0 ≤ f ≤ 1 we havetwo equilibrium points. The jacobian is given by the matrix

Df =

(

0 1− cos(φ) −r

)

.

We obtain that one equilibrium point is a saddle and the other ons is stable [*** Maybeyou want to fill the details. ***]

The bifurcation occurring. At f = 1, there is a standard saddle-node bifurcation (ofequilibrium points) [*** Make sure that you understand why. ***]

The (rocky) road towards periodic solutions. For f > 1 there is no equilibriumpoints. We can not expect a finite time blow up to occur. Consequently, we should lookfor periodic solutions i.e. limit cycles. Notice that if

y = ytop =f + 1

r+ 1,

we have y′ < 0. At the same time, if

y = ybottom =f − 1

r− ǫ,

134

Page 141: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.8. The forced pendulum

we have y′ > 0, consequently, the dynamics occurs in the box

B = (φ, y) ∈ [0, 2π] × [ybottom, ytop].

Furthermore, [*** we take ǫ > 0 as small as needed so ybottom > 0. ***] AS now thebox is part of the first quadrant, we have that θ′ > 0, so, our trajectory navigates fromthe left to the right.

[*** Then, given (0, y0) the initial condition, after some time, the trajectoryhits the point (2π, P (y0)). P is called the Poincare map. Now notice that ifP (y0) = y0, then this is a periodic solution. The drawback is that, most likely,we can not compute P without solving the system (which is something thatwe can not do in general). So, we need to obtain the existence of a fixed point

y∗ = P (y∗)

with merely geometrical reasoning. To do that, notice that

P (ybottom) > ybottom, P (ytop) < ytop,

and P should be a monotone function. Otherwise there is at least two tra-jectories colliding (which can not happen due to the existence and uniquenesstheorem). Applying the existence and uniqueness theorem, we also concludethat P is continuous. Collecting all this properties implies the existence of afixed point. The fixed point for the Poincare map provides us with a peri-odic solution. ***] [*** You should draw a picture. Make sure that youunderstand. ***]

The periodic solution is unique. We are going to prove that the periodic solution isunique. We are going to argue by contradiction. Assume that there are two limit cyclesyup and ydown. We define

E =y2

2− cos(φ).

For a periodic solution, the energy should be the same at y0 and at P (y0) = y0 due to theperiodicity of cos. Thus,

0 =

∫ 2π

0

dE

dφdφ,

anddE

dφ= y

dy

dφ+ sin(φ) = y

y′

φ′ + sin(φ).

We obtain

0 =

∫ 2π

0f − ry − sin(φ) + sin(φ)dφ =

∫ 2π

0f − rydφ.

In particular,∫ 2π

0ydφ =

2πf

r.

This is true for every periodic solution. In particular, this is a contradiction with the factthat the periodic solution are ordered. [*** Why? ***]

135

Page 142: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

10.9 A model the for rock-paper-scissors game

Let’s consider the rock-paper-scissors game ([*** the original paper is Toupo andStrogatz ArXiv 1502.03370 ***]). Consider x, y, z the relative frequencies of individ-uals playing rock,paper and scissors, respectively.

We consider a modified game where the payoffs are

Rock vs. Rock : 0

Rock vs. Paper : −(1 + ǫ)

Rock vs. Scissors : 1

Paper vs. Rock : 1

Paper vs. Paper : 0

Paper vs. Scissors : −(1 + ǫ)

Scissors vs. Rock : −(1 + ǫ)

Scissors vs. Paper : 1

Scissors vs. Scissors : 0,

where ǫ ≥ 0 is a given value. We assume that the number of players remain constant.Then we have

x+ y + z = 1.

As usual, we can use this conserved quantity to write the system in 2 dimensions, namelyx, y.

We define the fitness of playing rock as the expected payoff:

fx = 0 ∗ number of rocks + 1 ∗ number of scissors + (−1− ǫ) ∗ number of papers

= 1 ∗ (1− x− y) + (−1− ǫ) ∗ y= 1− x− (2 + ǫ)y.

In the same way,

fy = 1 ∗ number of rocks + (−1− ǫ) ∗ number of scissors + 0 ∗ number of papers

= x+ (−1− ǫ) ∗ (1− x− y)

= (1 + ǫ)(y − 1) + (2 + ǫ)x,

fz = (−1− ǫ) ∗ number of rocks + 0 ∗ number of scissors + 1 ∗ number of papers

= (−1− ǫ)x+ y.

Now we define the average fitness as the average payoff

φ = xfx + yfy + zfz

= x(1− x− (2 + ǫ)y) + y((1 + ǫ)(y − 1) + (2 + ǫ)x) + (1− x− y)((−1− ǫ)x+ y).

136

Page 143: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

10.9. A model the for rock-paper-scissors game

Then, assuming a constant rate of strategy change µ, the system can be written as

x′ = x(fx − φ) + µ(−2x+ y + (1− x− y))

y′ = y(fy − φ) + µ(−2y + x+ (1− x− y)).

Notice that(1/3, 1/3),

is an equilibrium point for all µ. Let me rewrite the system as

x′ = µ(1− 3x)− x(ǫ(x2 + x(y − 1) + y2) + x+ 2y − 1)

y′ = µ(1− 3y) + y(−ǫ(x2 + x(y − 2) + (y − 1)2) + 2x+ y − 1).

We writef1 = µ(1− 3x)− x(ǫ(x2 + x(y − 1) + y2) + x+ 2y − 1),

f2 = µ(1− 3y) + y(−ǫ(x2 + x(y − 2) + (y − 1)2) + 2x+ y − 1).

So,∂xf1 = −3µ+ x(−3xǫ+ (2− 2y)ǫ− 2) + y2(−ǫ)− 2y + 1,

∂yf1 = x(−2yǫ− 2)− x2ǫ,

∂xf2 = y(−yǫ+ 2ǫ+ 2)− 2xyǫ,

and∂yf2 = −3µ+ x(−xǫ− 2yǫ+ 2ǫ+ 2) + y(−3yǫ+ 4ǫ+ 2)− ǫ− 1.

The jacobian at (1/3, 1/3) is

A =

(

−3µ− 13 −1

3(ǫ+ 2)ǫ3 +

23 −3µ+ ǫ

3 + 13

)

.

The eigenvalues are solutions of

p(λ) = (−3µ− 1

3− λ)(−3µ +

ǫ

3+

1

3− λ) +

1

3(ǫ+ 2)(

ǫ

3+

2

3) = 0.

Then,

λ = −3µ+ǫ

√3

6

−ǫ2 − 4ǫ− 4.

We see that we have complex eigenvalues for every possible ǫ. Furthermore, if we thinkon µ at the bifurcation parameter, we have that at

µ =ǫ

18,

a Hopf bifurcation occurs [*** Why? ***] To decide whether this bifurcation is sub/supercriticalor degenerate, we can use the computer to simulate a trajectory close to the origin whenµ = ǫ/18. If we get something like a center, then that suggest that it is degenerate, if weget a stable focus, then that suggest a supercritical Hopf [*** Why? ***].

137

Page 144: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 10. Hopf bifurcations

138

Page 145: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11

A primer in Calculus of variations

11.1 A motivational example

Consider the forced harmonic oscillator

x′′(t) + x(t) = f(t).

Usually, such a problem has initial data

x(0) = x0,

x′(0) = x′0.

Physically, these data represents the initial position and the initial velocity (respectively)of the (linearized) pendulum. We know, from 22B (or the review in previous chapters)how to solve that problem. However, one may ask the following question:

Given the period of the pendulum, can we recover the solution? In otherwords, if we don’t know the initial position or velocity, but we know theperiodic, can we recover the full dynamics?

Mathematically, the previous statement is equivalent to solve

x′′(t) + x(t) = f(t),

with boundary data

x(0) = 0,

x(T ) = 0,

where T is the period. Here we measured the period as the time the pendulum need topass through the vertical.

[*** So far, we don’t know how to solve such a problem. Strictly speaking, wecan NOT even claim the existence of solution. ***]

139

Page 146: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

11.2 The appropriate spaces of functions

Given a function f(t) defined in [0, 1], we define the functional

‖f‖0 =√

∫ 1

0f(s)2ds.

Example 11.1. Is the previous functional always well-defined?

Solution: Sadly, the answer is no. Take

g(t) =1√t.

Then

‖g‖20 =

∫ 1

0

(

1√s

)2

ds = ∞.

The class of functions such that ‖ · ‖0 is finite form a vector space. This space is a Banachspace endowed with the norm ‖ · ‖0. In other words, we define

H0(0, 1) = f, f : [0, 1] → R, ‖f‖0 < ∞ .

[*** Maybe you want to fill the details ***]

[*** Actually, H0 is a Hilbert space, which means that the ‖ · ‖0 is induced byan inner product 〈·, ·〉. In this case, we have

〈f, g〉 =∫ 1

0f(t)g(t)dt,

and

‖f‖20 =∫ 1

0(f(t))2dt = 〈f, f〉.

***]Example 11.2. Prove the inequality

2ab ≤ a2 + b2, ∀ a, b ∈ R.

Solution: Just notice that(a− b)2 ≥ 0.

[*** Can you prove the inequality

2ab ≤ ǫa2 +b2

ǫ, ∀ a, b ∈ R.?

***]

Then we have the following Lemma

140

Page 147: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.2. The appropriate spaces of functions

Lemma 11.1. We have the inequality∫ 1

0f(s)g(s)ds ≤ ‖f‖0‖g‖0.

[*** This is called the Cauchy-Schwartz inequality. ***]

Proof. We have

f(s)g(s) ≤ ǫ

2f2(s) +

1

2ǫg2(s),

so∫ 1

0f(s)g(s)ds ≤ ǫ

2

∫ 1

0f2(s)ds +

1

∫ 1

0g2(s)ds.

Then,∫ 1

0f(s)g(s)ds ≤ ǫ

2‖f‖20 +

1

2ǫ‖g‖20.

Now we take

ǫ =‖g‖0‖f‖0

,

to obtain∫ 1

0f(s)g(s)ds ≤ 1

2‖g‖0‖f‖0 +

1

2‖g‖0‖f‖0 = ‖f‖0‖g‖0.

Recalling that we had the boundary data

x(0) = x(1) = 0,

we can define

H1(0, 1) =

f, f : [0, 1] → R, f(0) = f(1) = 0, ‖f ′‖0 < ∞

,

and the scale of spaces

Hk(0, 1) =

f, f : [0, 1] → R, f(0) = f(1) = 0, ‖fk)‖0 < ∞

,

Usually, we write‖f‖k = ‖fk)‖0.

One step forward 11.1. The space H0 is usually denoted L2. In general, the notationfor the space

f, f : [0, 1] → R, f(0) = f(1) = 0, ‖f ′‖0 < ∞

,

is H10 (0, 1), the zero emphasizing the fact that the functions vanish at the boundary of the

interval. There are very subtle issues with the boundary data, but we are going to makeour lives much easier and keep that for higher courses. The space H0 was introduced by F.Riesz back in the nineteenth century. The spaces Hk are called Sobolev spaces in honorof the soviet mathematician Sergei Sobolev, one of the most important mathematiciansof the twentieth century. These spaces were also introduced (in a more or less similarmanner) by the italian mathematician Gaetano Fichera, the german mathematician KurtOtto Friedrichs and the french mathematician Jean Leray.

141

Page 148: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

[*** Ok, we have defined a bunch of spaces, and we claimed that they form ascale. Can we prove that they actually form a scale? ***]Lemma 11.2. The following inequalities hold true

•max0≤t≤1

|f(t)| ≤ ‖f‖1, (Sobolev inequality)

•‖f‖0 ≤ ‖f‖1 (Poincare inequality)

As a consequence, we haveHk+1 ⊂ Hk ∀ k ≥ 0.

Proof. Given f in H1, due to the fundamental theorem of calculus, we have

f(t) = f(t)− f(0) =

∫ t

0f ′(s)ds ≤ ‖f‖1.

where we have used the Cauchy-Schwartz inequality 11.1 and the fact that t ≤ 1. Thereare two important conclusions of the previous computation. The first one is that

max0≤t≤1

|f(t)| ≤ ‖f‖1,

so, every H1(0, 1) function is bounded. The second one is that

f(t)2 ≤ ‖f‖21,

and, integrating,‖f‖0 ≤ ‖f‖1.

11.3 Another example

We plan to study the problem

−x′′(t) + x(t) = f(t)x(0) = 0x(1) = 0

(11.1)

where f ∈ H0 is a given function.

[*** ASSUME that u is a solution to (11.1). Then, multiplying by y ∈ H1(0, 1)and integrating by parts, we have

∫ 1

0x′(s)y′(s)ds +

∫ 1

0x(s)y(s)ds −

∫ 1

0f(s)y(s)ds = 0.

***] First, we need a new concept of solution:

142

Page 149: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.3. Another example

Definition 11.1. We say that x is a (weak) solution of (11.1) if

∫ 1

0x′(s)y′(s)ds+

∫ 1

0x(s)y(s)ds−

∫ 1

0f(s)y(s)ds = 0, ∀ y ∈ H1.

[*** Now we CLAIM that this solution is given by the following minimizationproblem

miny(t)∈H1

F [y(t)] = miny(t)∈H1

1

2

∫ 1

0(y′)2(s) + y2(s)ds −

∫ 1

0fyds

.

The previous minimization problem is non-trivial because we are minimizinga functional (over a space of functions) and not a function (over R

d). Tominimize this problem is part of what is called calculus of variations. ***]

Assume that F (~x) = F (x1, x2, ..., xd) : Rd → R has a minimum. Then, every directional

derivative

D~yF (~x) = limh→0

F (~x+ h~y)− F (~x)

h,

should vanish. It is reasonable, that the minimum of functionals verify the same property.We define the (Gateaux) directional derivative

Dy(t)F [x] = limh→0

F [x(t) + hy(t)] −F [x(t)]

h.

Then the minimizer should verify

Dy(t)F [x] = 0.

Notice that here h ∈ R. We compute

F [x+ hy] =1

2

∫ 1

0(x′)2 + h2(y′)2 + 2hx′y′ + x2 + h2y2 + 2hxy −

∫ 1

0f(x+ hy).

Thus,

F [x+ hy]−F [x] =1

2

∫ 1

0h2(y′)2 + 2hx′y′ + h2y2 + 2hxy −

∫ 1

0fhy,

F [x+ hy]−F [x]

h=

1

2

∫ 1

0h(y′)2 + 2x′y′ + hy2 + 2xy −

∫ 1

0fy,

and

Dy(t)F [x(t)] =

∫ 1

0x′(s)y′(s) + x(s)y(s)ds −

∫ 1

0f(s)y(s)ds. (11.2)

We then realize that

Dy(t)F [x] = 0

implies that x is a weak solution to the desired problem.

Then, we have proved the following result

143

Page 150: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

Lemma 11.3. Given f ∈ H0(0, 1), the weak solution to (11.1) is given by the minimum

miny(t)∈H1

F [y(t)],

with

F [y(t)] =1

2

∫ 1

0(y′)2(s) + y2(s)ds −

∫ 1

0fyds.

In particular x(t) ∈ H1.

Another possible reasoning is to realize that if we have a minimum x, then

Fx,y(0) = F [x] ≤ F [x+ hy] = Fx,y(h),

where the latter is understood as a standard, real variable function

Fx,y(h) : R → R.

Furthermore, we can easily obtain better regularity:Lemma 11.4. Given f ∈ Hk(0, 1), the weak solution to (11.1) x(t) verifies

x ∈ Hk+2

Proof. The proof reduces to the observation of

∫ 1

0x′′yds = −

∫ 1

0x′y′ds = −

∫ 1

0(f − x)yds,

thus, by taking y = x′′, we have

‖x′′‖20 =∫ 1

0(x′′)2ds = −

∫ 1

0(f − x)yds ≤ ‖f − x‖0‖x′′‖0,

so

‖x‖2 = ‖x′′‖0 ≤ ‖f − x‖0.Now we can proceed by induction.

[*** There are some very interesting subtleties in the previous proof, but theyare beyond the scope of this course. ***]

[*** So far, we have proved that IF THERE IS A MINIMUM, then thereexists a solution of the desired problem (11.1). We also know that, IF THEREEXISTS A SOLUTION, then it has two more derivatives than f . But WEDO NOT KNOW IF THERE EXISTS A SOLUTION TO START WITH.Sometimes, this is a complicated issue. ***]

If we want to be sure that a real (standard) function has a minimum, we first need thisfunction to be boundedd below. Otherwise, the function may go to −∞. However, thisis not enough, for instance one may consider the function f(t) = et. This function is

144

Page 151: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.3. Another example

bounded below but it has a infimum, not a minimum. Consequently, we need some sortof bound

f(t) ≥ |t|p − c,

for p > 1. [*** This property is called coercivity. ***] This will prevent the functionto have an horizontal asymptote.Lemma 11.5. There exists a minimizer x of the following minimization problem

miny(t)∈H1

F [y(t)],

with

F [y(t)] =1

2

∫ 1

0(y′)2(s) + y2(s)ds −

∫ 1

0fyds.

Furthermore, the minimizer is unique among the H1 functions.

Proof. [*** We are not going to give the full proof. We are merely goingto show that the functional is bounded below and coercive. ***] Write m =infy(t)∈H1 F [y(t)]. Now notice that we have

F [y(t)] ≥ ‖y‖212

− ‖f‖0‖y‖0 ≥‖y‖214

− ‖f‖20.

In particular m ≥ −‖f‖20 > −∞. Then, if xn is a minimizing sequence, i.e.

limn→∞

F [xn] = m,

we have

4(m+ ‖f‖20) ≥ ‖xn‖21.

Consequently, the minimizing sequence lies in a bounded set in H1. As the sequence isbounded, this implies the existence of a (weak) limit x [*** this is delicate ***] Wehave to prove that (F )[x] = m, but to do that is rather technical at this level. To showthe uniqueness we argue by contradiction. Assume that there are two minimizers x andX. Then, both are solutions to the problem (11.1), so Z = x−X solves

−Z ′′ + Z = 0 Z(0) = Z(1) = 0.

Then, we have∫ 1

0−Z ′′Z + Z2ds =

∫ 1

0(Z ′)2 + Z2ds = 0,

so Z should be identically zero.

One step forward 11.2 (The variational derivative). Recall equation (11.2). Integratingby parts, we have

Dy(t)F [x] =

∫ 1

0(−x′′(s) + x(s)− f(s))y(s)ds.

145

Page 152: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

We define the variational derivative as

δFδx

= −x′′(s) + x(s)− f(s).

For a general functional J , we have

Dy(t)J [x] =

∫ 1

0

δJδx

y(s)ds.

Notice that, in the basic vector calculus, we have

D~yF (~x) = ∇F (~x) · ~y,

for ~x, ~y vectors in the plane andF : R2 → R,

a given function. Notice that · is the inner product in the Hilbert space R2. Recalling the

definition of the inner product 〈·, ·〉 in H0, we have

Dy(t)J [x] = 〈δJδx

, y〉.

Thus, we see that the situation is very similar. Of course, this is not coincidence.

11.4 Life is (sometimes) hard

In this section we are going to show that the existence of minimizers may be problematic.Example 11.3 (Weierstrass comes to play). Find the minimizer of the following func-tional

J [x] =

∫ 1

−1(sx′(s))2ds,

for smooth functions such that x(1) = 1 and x(−1) = −1.

Solution: Notice that the sequence of functions

xn(t) =tanh(nt)

tanh(n),

verifiesxn(1) = 1, xn(−1) = −1,

and

J [xn] =

∫ 1

−1

(

sn

tanh(n)

1

cosh2(ns)

)2

ds → 0

as n → ∞. One expect then that 0 is the actual minimum of the functional J . However,notice that as the functional is nonnegative, the only way that J may vanish is whenx′ = 0. Then x should be a constant, but a constant does NOT verify the boundary data

x(1) = 1 and x(−1) = −1.

[*** Then we obtain the existence of a infimum (0) but the non-existence ofminimum!! This suggests the subtleties of the calculus of variations. ***]

146

Page 153: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.5. The Principle of least action

Example 11.4 (Eikonal equation). Find the minimizer of the following functional

J [x] =

∫ 1

−1

(

1− (x′(s))2)2

ds,

for SMOOTH functions such that x(1) = 0 = x(−1).

Solution: We consider the function

X(t) =

t+ 1 if − 1 < x < 0−t+ 1 if 0 < x < 1

This function verifies

J [X] = 0.

On the other hand, J [x] ≥ 0 and X is not smooth. Consequently, the key issue is if we canconstruct a sequence of smooth functions Xn approximating X. In particular, we want toremove the peak at t = 0. We can construct our sequence Xn as follows: we file down Xvery close to zero (between (−1/n, 1/n), say) and we keep the rest of X the same. Afterdoing so, we have

J [Xn] =

∫ 1

n

− 1

n

(

1− (X ′n(s))

2)2

ds ≪ 1.

This sequence shows that there is no minimum (actually there is an infimum) in the setof smooth functions.

11.5 The Principle of least action

[*** So far, our perspective is to use the minimization of a functional to provethe existence of solutions to a differential equation. These solutions appearas minimizer of certain functionals F. To the best of my knowledge, the firstmathematician doing this was Riemann. However, there is a second viewpointthat uses the functional setting to obtain the differential equation. This secondapproach appears prior to the first approach and it was used to obtain manyof the differential equations in physics. ***]

We started this chapter with the harmonic oscillator

x′′ + x = 0,

where we know the boundary data

x(0) = x(1) = 0.

We know that this equation is conservative and we have the total energy (or Hamiltonian)

H(x, x′) =1

2

(

x2 + (x′)2)

147

Page 154: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

conserved (see Chapter 3). This Hamiltonian is obtained as the sum of the kinetic

Ekin =1

2(x′)2,

and the potential energy

Epot =1

2x2.

[*** Another interesting quantity is the Lagrangian

L(x, x′) = Ekin − Epot =1

2(x′)2 − 1

2x2.

Given the Lagrangian, we define the Action of a trajectory x(t) as

A[x] =

∫ t1

t0

L(x(s), x′(s))ds.

The principle of least action says that if the system was in coordinate x0 attime t0 and in coordinate x1 at time t1, then its trajectory is the curve whichminimizes the action A(t0, t1), subject to the constraints

x(t0) = x0, x(t1) = x1.

***] Now assume that, for some reason, we do not know the harmonic oscillator ode, butwe know the physical system and the interesting quantities Epot and Ekin. Then we candefine L and A. The trajectory x will minimize the action means that

(

d

dhA[x+ hy]

) ∣

h=0

= 0,

for every (fixed) trajectory y(t) such that y(0) = y(1) = 0. We obtain

A[x+ hy] =1

2

∫ 1

0−(x(s) + hy(s))2 + (x′(s) + hy′(s))2ds,

sod

dhA[x+ hy] =

∫ 1

0−(x(s) + hy(s))y(s) + (x′(s) + hy′(s))y′(s)ds,

and(

d

dhA[x+ hy]

) ∣

h=0

=

∫ 1

0−x(s)y(s) + x′(s)y′(s)ds.

Integrating by parts and using the boundary conditions

x(0) = x(1) = 0,

we have(

d

dhA[x+ hy]

) ∣

h=0

= 0

148

Page 155: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.5. The Principle of least action

is equivalent to∫ 1

0(x(s) + x′′(s))y(s)ds = 0.

In all this computations y(t) was a fixed but arbitrary trajectory. As a consequence, theprevious integral condition is the same as

x(t) + x′′(t) = 0,

which is the desired ordinary differential equation. [*** With this ideas, we canobtain the differential equations modelling the dynamics of a physical systemwith certain explicit forms for the kinetic and potential energies. ***]Example 11.5. There is a (unit mass) particle moving under the effect of potential U(x).We know the initial and final positions:

x(0) = x0, x(1) = x1.

Find the equations of motion.

Solution: As the particle is moving in the space, its trajectory x(t) denotes a point in 3dimensions. The force due to the potential is

F = −∇U(x).

The kinetic energy is

Ekit =1

2|x′|2,

while the potential energy isEpot = U(x).

The Lagrangian is

L(x, x′) =1

2|x′|2 − U(x),

and the action is

A[x] =

∫ 1

0L(x(s), x′(s))ds =

∫ 1

0

1

2|x′(s)|2 − U(x(s))ds.

We fix y(t) ∈ R3 such that y(0) = y(1) = 0. We want to compute

(

d

dhA[x+ hy]

) ∣

h=0

.

We have

d

dhA[x+ hy] =

∫ 1

0(x′(s) + hy′(s)) · y′(s)−∇U(x(s) + hy(s)) · y(s)ds,

thus,(

d

dhA[x+ hy]

) ∣

h=0

=

∫ 1

0x′(s) · y′(s)−∇U(x(s)) · y(s)ds,

149

Page 156: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

and, after an integration by parts together with the fact that y(0) = y(1) = 0, we have

(

d

dhA[x+ hy]

) ∣

h=0

=

∫ 1

0(−x′′(s)−∇U(x(s)) · y(s)ds.

As this is true for every y(t), we obtain the stronger condition

−x′′(s)−∇U(x(s) = 0,

which is the desired ordinary differential equation.

11.6 Geodesics in the plane, the Brachistochrone problemand the Isoperimetric problem

Example 11.6 (Geodesics). Given two points (a1, a2), (b1, b2) ∈ R2, find the curve that

minimizes the distance between them.

Solution: The length of the curve (x, f(x)) is given by

L[f(x)] =∫ b1

a1

1 + (f ′(x))2dx.

Here we assume that f ∈ C1 and

f(a1) = a2, f(b1) = b2.

We have to minimize this functional. We fix y(x) ∈ C1 such that

y(a1) = y(b1) = 0,

and consider

L[f(x) + hy(x)] =

∫ b1

a1

1 + (f ′(x) + hy′(x))2dx,

we have thatDy(t)F [x] = 0,

implies∫ b1

a1

f ′(x)y′(x)√

1 + (f ′(x))2dx = 0.

Integrating by parts we find,

∫ b1

a1

(

f ′(x)√

1 + (f ′(x))2

)′

y(x)dx = 0.

As this should be true for every y(x), we have that

(

f ′(x)√

1 + (f ′(x))2

)′

=f ′′(x)

(1 + (f ′(x))2)1.5= 0,

150

Page 157: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.6. Geodesics in the plane, the Brachistochrone problem and the Isoperimetric problem

which meansf ′′(x) = 0 ⇐ f ′(x) = c1 ⇐ f(x) = c1x+ c2.

Then we impose the boundary conditions

f(a1) = a2, f(b1) = b2,

to get

c1a1 + c2 = a2

c1b1 + c2 = b2.

After solving for c1, c2, we have our minimizer, which, of course, is the straight line between(a1, a2) and (b1, b2).Example 11.7 (Brachistochrone). Given the points (0, 0), (a1, a2) ∈ R

2, a1, a2 < 0, findthe shape of the curve down which a (unit mass) bead sliding from rest and driven bygravity will slip (without friction) from one point to another in the least time.

Solution: [*** We pick a system of coordinates such that x is the vertical axis.f(x) is then a graph over the vertical axis. ***]

Given the curve f(x), we have that the time will be

T =L

V=

length

velocity,

furthermore, as there is no friction, the energy is conserved

Ekit =1

2v2 = gx = Epot

thus

T [f(x)] =

∫ a1

0

1 + (f ′(x))2

vdx =

∫ a1

0

1 + (f ′(x))2√2gx

dx.

We compute

T [f(x) + hy(x)] =

∫ a1

0

1 + (f ′(x) + hy′(x))2√2gx

dx,

we have thatDy(t)F [x] = 0,

is equivalent to∫ a1

0

f ′(x)y′(x)√

1 + (f ′(x))21√2gx

dx = 0.

Since y is arbitrary, the latter condition is equivalent to

f ′(x)√

1 + (f ′(x))21√2gx

= c1,

where c1 is a constant. Then, we obtain

(f ′(x))2

1 + (f ′(x))2= c2x,

151

Page 158: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

(f ′(x))2 =c2x

1− c2x,

as everything is positive (c1 is big enough) we can take the square root and integrate,

f(x) =

∫ x

0

c2s

1− c2sds.

One can even write down the exact form for this curve using a smart trigonometric sub-stitution. The resulting curve is called cycloid.Example 11.8 (Isoperimetric problem). Dido (a phoenician queen also know as Elissa)arrived to the coast of Africa. There, she and her group, asked for land to build the cityof Carthago. The gaetuli (the people living in what is now the modern Tunisia and Lybia)agreed to give as much land as she can cover with a ox’s skin (poor ox :-(). Dido cut theskin forming a rope. The problem now is, what can Dido do to obtain the maximum area?

Solution: Mathematically, we have a curve in the plane (x, f(x)). We assume thatf(x0) = 0 = f(x1) and we are only concerned with the upper plane [*** Can you givea geometric argument to show that only the upper plane matters? ***].We have to maximize the area

∫ x1

x0

f(s)ds,

while keeping the length fixed (the ox has a finite, fixed amount of skin)

∫ x1

x0

1 + (f ′(s))2ds = L.

We are going to apply the Lagrange’s multiplier technique (see your 21D notes), i.e.instead of solving the constrained optimization problem

max f ∈ C1A[f ] =

∫ x1

x0

f(s)ds given L[f ] =∫ x1

x0

1 + (f ′(s))2ds = L,

we from a new unconstrained optimization problem.

max f ∈ C1F [f ] =

∫ x1

x0

f(s)ds+ λ√

1 + (f ′(s))2ds.

We approach this problem as usual. We find that

Dy(t)F [f ] = 0

implies∫ x1

x0

(

y(s) + λf ′(s)y′(s)

1 + (f ′(s))2

)

ds = 0,

and, after an integration by parts, we obtain

∫ x1

x0

(

1− λ

(

f ′(s)√

1 + (f ′(s))2

)′)

y(s)ds = 0.

152

Page 159: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

11.6. Geodesics in the plane, the Brachistochrone problem and the Isoperimetric problem

As y(s) is arbitrary, we conclude that

1 = λ

(

f ′(t)√

1 + (f ′(t))2

)′

,

(c1t+ c2)2 =

f ′(t)2

1 + (f ′(t))2,

where ci depend on λ. Solving for f ′, we have

(c1t+ c2)2

1− (c1t+ c2)2= f ′(t)2.

[*** Can you conclude the details? ***]

153

Page 160: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 11. A primer in Calculus of variations

154

Page 161: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12

The Lorenz system

In this section we are going to study the Lorenz system of ODEs

x′ = σ(y − x)

y′ = rx− y − xz

z′ = xy − bz,

where r, σ, b are fixed, non-negative parameters. We are going to keep them written ingeneral form, however, typical values are

σ = 10,

andb = 8/3.

This equation was derived as a (caricature) model of convection in the atmosphere, how-ever, we are going to motivate it from a different application. But, before doing so, letstudy it mathematically.

12.1 Global existence

As the rate functionsf1(x, y, z) = σ(y − x),

f2(x, y, z) = rx− y − xz,

f3(x, y, z) = xy − bz,

are smooth, there exists a local in time solution (x(t), y(t), z(t)). However, we know thatnonlinear ODE may have finite time blow up [*** Recall y′ = y2 ***]. This blow upmeans that

|(x(t), y(t), z(t))| → ∞.

We are going to construct a trapping region, so we can discard a finite time blow up.

155

Page 162: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

Example 12.1 (Exercise 9.2.3). Show that all trajectories eventually enter and remaininside the large sphere S

S = (x, y, z), x2 + y2 + (z − r − σ)2 ≤ C,

for certain C.

Solution: We defineL(t) = x(t)2 + y(t)2 + (z(t)− r − σ)2,

for (x, y, z) a trajectory of the Lorenz system. We compute

L′ = 2xx′ + 2yy′ + 2(z − r − σ)z′

= 2xσ(y − x) + 2y(rx− y − xz) + 2(z − r − σ)(xy − bz)

= −2σx2 − 2y2 − 2bz(z − r − σ)

= −2(

σx2 + y2 + b(z − (r + σ)/2)2 − b(r + σ)2/4)

.

Notice that the condition

σx2 + y2 + b(z − (r + σ)/2)2 ≤ b(r + σ)2/4,

defines a fixed ellipsoid E (once you fix r, σ, b, the ellipsoid is fixed). Now we take C largeenough such thatthe ellipsoid E is strictly contained in the sphere S:

E ⊂ S.

Outside the ellipsoid E, the function L decreases, so S is a trapping region.

[*** Once we know that trajectories enter (and then never leave) the trappingregion S, we know that there is no blow up and the solution is global. Also,notice that the global existence holds for every value of the parameters r, b, σ.If we had a two dimensional system, we could say that the trajectories ap-proach fixed points or limit cycles. However, in the three dimensional settingPoincare-Bendixon Theorem does NOT hold. ***]

12.2 Symmetry

If we change variablesX = −x, Y = −y, Z = z,

we have that the Lorenz system can be written in these new variables as

−X ′ = −σ(Y −X)

−Y ′ = −rX + Y +XZ

Z ′ = XY − bZ,

which are the same equations. We see that either a given trajectory (x, y, z) is symmetricor there is a symmetric friend trajectory (X,Y,Z).

156

Page 163: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.3. Fixed points and its stability

12.3 Fixed points and its stability

We compute the fixed points:

f1 = f2 = f3 = 0.

We find

C0 = (0, 0, 0), C+ = (√

b(r − 1),√

b(r − 1), r−1) and C− = (−√

b(r − 1),−√

b(r − 1), r−1).

[*** Maybe you want to fill the details ***] Of course, for C± to exist, we needr > 1.

12.3.1 Case 0 < r < 1:

Let us study the linear stability of the origin. We have that the jacobian at the origin is

A3 =

−σ σ 0r −1 00 0 −b

.

We see that the linearized behavior of the system in the z component is very easy. Itdecays exponentially fast

z(t) = z0e−bt.

Notice also that the evolution on the two first coordinates x and y, does not depend onthe value of z. Thus, we can consider the projection of the trajectory on the x, y plane.We have then the 2D jacobian

A2 =

(

−σ σr −1

)

.

This matrix has det(A2) = σ(1 − r) and trace(A2) = −σ − 1. We then conclude that if0 < r < 1, the only fixed point is the origin and it is linearly stable, while if r > 1, theorigin becomes unstable (stable in two directions and unstable in one direction, so, it’s asaddle node) and two new equilibrium points appear.

Furthermore, we can see that the origin is globally stable for 0 < r < 1, which means thatthere are not limit cycles or chaotic behaviour.Example 12.2. Construct a Lyapunov function for the Lorenz system when 0 < r < 1.

Solution: Consider

L = σ−1x2 + y2 + z2,

157

Page 164: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

then

L′ = 2σ−1xx′ + 2yy′ + 2zz′

= 2x(y − x) + 2y(rx− y − xz) + 2z(xy − bz)

= −2x2 − 2y2 − 2bz2 + 2xy(1− r)

= −2(

x2 + y2 + bz2 − xy(1− r))

= −2

(

x2 − y2 + bz2 − 2xy1− r

2

)

= −2

(

(

x− 1− r

2y

)2

+

(

1−(

1− r

2

)2)

y2 + bz2

)

≤ 0

12.3.2 Case 1 < r < rH:

We know that the origin loses its stability and becomes some sort of saddle node. At thesame time, two other equilibrium points appear, namely, C±. [*** This seems like asupercritical pitchfork bifurcation. ***] Let’s take

σ > b+ 1,

and

r = rH = σ

(

σ + b+ 3

σ − b− 1

)

.

[*** Notice that as σ > b+ 1, the denominator is positive (so, rH is positive).Furthermore,

rH = σ

(

1 +2b+ 4

σ − b− 1

)

> 1.

***]Example 12.3 (Exercise 9.2.1). Prove that there exists a supercritical pitchfork bifurcationat r = 1.

Solution: The jacobians are then

A+3 =

−σ σ 0

1 −1 −√

b(r − 1)√

b(r − 1)√

b(r − 1) −b

at C+,

and

A−3 =

−σ σ 0

1 −1√

b(r − 1)

−√

b(r − 1) −√

b(r − 1) −b

at C−.

158

Page 165: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.3. Fixed points and its stability

The characteristic equation is then [*** why? ***]

p(λ) = λ3 + (σ + b+ 1)λ2 + (r + σ)bλ+ 2bσ(r − 1) = 0.

We would like to conclude the sign of the real part of the eigenvalues. However, we do notwant to compute the eigenvalues explicitly [*** Notice that we could use the cubicequation formula to find explicitly the solutions or we could use the computer.***] Instead we are going to give a reasoning based on basic calculus. First, due to thesign of the leading term λ3 and the equality p(0) > 0 we know that at least one root isreal and negative. Compute

p′(λ) = 3λ2 + 2(σ + b+ 1)λ+ (r + σ)b.

Notice that p′(λ) > 0 if λ ≥ 0, this, together with p(0) > 0 implies that, in the casewhere the other two roots of p(λ) = 0 are real numbers, they should be negative. Assumenow that the other two solutions are complex numbers, then, they should be complexconjugates. Write R for the real part of the other two solutions, so,

λ1,2 = R± Ii.

Now we recall the following property:

’R is the value of the x coordinate of the tangency point of a line that is tangentto the cubic curve and intersects the horizontal axis at the same place as doesthe cubic curve’.

Consequently,

R < 0

at least of r close enough to 1. [*** Draw a picture! ***] This implies that there is asupercritical pitchfork bifurcation happening at r = 1.

We claim that there is a Hopf bifurcation happening at r = rH . To see that, we haveto prove that some eigenvalues cross the imaginary axis (i.e. at r = rH the eigenvaluesshould be purely imaginary).Example 12.4. Prove that there exists a Hopf bifurcation at r = rH

Solution: Let’s look for solutions of the form ai for certain real a. Then we have

−ia3 + (σ + b+ 1)(−a2) + (rH + σ)bia+ 2bσ(rH − 1) = 0.

If the previous equality is true, then the real and the imaginary parts should vanish at thesame time:

−a3 + a(rH + σ)b = 0,

and

(σ + b+ 1)(−a2) + 2bσ(rH − 1) = 0.

The first equation implies

a = ±√

b(rH + σ).

159

Page 166: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

Thus, the problem reduces to see that the second equation also vanish for that value of a.We compute

(σ + b+ 1)(−b(rH + σ)) + 2bσ(rH − 1) = 0

2σ(rH − 1) = (σ + b+ 1)(rH + σ)

(2σ − (σ + b+ 1))rH = (σ + b+ 1)σ + 2σ,

which is always true due to the definition of rH . Once we have these two eigenvalues, wecan find the last one

λ = −b− σ − 1.

[*** Thus, we see that there is a Hopf bifurcation at r = rH . Furthermore, thisHopf bifurcation is subcritical. ***]

[*** Notice that for r > rH there are no stable equilibrium points. ***]

12.4 Dissipation

In this section we are going to prove that the Lorenz system dissipates volume. Let’sconsider a surface S(t) enclosing a finite volume V (t). We want to study the behavior ofV (t). Writing the Lorenz system as

~x′(t) = ~f(~x(t)),

we have that, if ~n is the outward normal (unitary) vector to S(t),

~f · ~n

is the outward velocity. Then, if we take a patch of area dA, this patch gives us a newvolume of

~f · ~ndtdA,and

V (t+ dt) = V (t) +

S(t)

~f · ~ndAdt,

V (t+ dt)− V (t)

dt=

S(t)

~f · ~ndA,

and, taking limits and applying the divergence theorem

V ′(t) =∫

S(t)

~f · ~ndA =

V(t)∇ · ~fdV.

For the case of the Lorenz system, we have

∇ · ~f = ∂xf1 + ∂yf2 + ∂zf3 = −σ − 1− b < 0.

Consequently,V ′ = (−σ − 1− b)V,

160

Page 167: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.5. Numerical simulations

so

V (t) = V (0)e(−σ−1−b)t ,

and the volume tends to zero. [*** This implies that there can NOT be repellinglimit cycles. ***]

[*** So far, we know that trajectories are bounded and they can not scape toinfinity, there is no stable fixed points or limit cycles close to the equilibriumpoints but volumes shrinks. In particular, the limiting set A where the trajec-tories eventually go should have zero volume (like points, curves, manifolds...***]

12.5 Numerical simulations

To have better intuition, before we continue with our analytic study of the Lorenz system,we are going to simulate numerically some trajectories.

The code for the Lorenz system is

function f=RHS(t,y)

% Do not change these values

sigma=10;

b=8/3;

% Change this value

r=350;

%The right hand side for the ODE

f=[sigma*(y(2)-y(1)),r*y(1)-y(2)-y(1)*y(3),y(1)*y(2)-b*y(3)]’; %Type here the RHS

To advance in time you can use the time integrator RK4 from chapter 1.

Notice that if

σ = 10, b = 8/3,

then

rH =470

19≈ 24.7.

12.5.1 Prechaotic regime r = 23

If we approximate the trajectory for a long time, we find Figure 12.1. Notice that thereare many loops at the center of the figure. That seems like a stable spiral. In fact,componentwise, we have figure 12.2.

161

Page 168: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

−20−15

−10−5

05

1015

2025

30

−30−20

−100

1020

3040

50−30

−20

−10

0

10

20

30

40

50

60

Figure 12.1: The trajectory corresponding to (−0.5, 10,−25).

0 10 20 30 40 50 60 70 80 90 100−20

−10

0

10

20

30

x(t)

0 10 20 30 40 50 60 70 80 90 100−30

−20

−10

0

10

20

30

40

50

y(t)

0 10 20 30 40 50 60 70 80 90 100−40

−20

0

20

40

60

z(t)

Figure 12.2: Each component as a function of time of the trajectory corresponding to(−0.5, 10,−25).

162

Page 169: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.6. Chaotic behaviour

−15−10

−50

510

1520

25

−20

−10

0

10

20

30

40

−20

−10

0

10

20

30

40

50

60

Figure 12.3: The trajectory corresponding to (−0.5, 10,−25).

12.5.2 Chaotic regime r = 28

If we approximate the trajectory for a long time, we find Figure 12.3, while if we plot eachcomponent as a function of time we recover Figure 12.4

More remarkably, if we plot together two trajectories for close initial data we discover thatthey separate.

12.5.3 Periodic regime 1 ≪ r

We take r = 350. If we approximate the trajectory for a long time, we find Figure 12.6,while if we plot each component as a function of time we recover Figure 12.7

12.6 Chaotic behaviour

We continue now with our mathematical analysis of the dynamics. After seeing the nu-merics, it may seem that the behaviour is aperiodic and somehow random, however, as weknow that there exists a unique solution, the behaviour is completely deterministic. Oneof the main characteristic of chaotic behaviour is the exponential divergence of nearbytrajectories (see Figure 12.5). Let us explain this more deeply. If we consider two initial

163

Page 170: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

0 10 20 30 40 50 60 70 80 90 100−20

−10

0

10

20

30

x(t)

0 10 20 30 40 50 60 70 80 90 100−30

−20

−10

0

10

20

30

40

50

y(t)

0 10 20 30 40 50 60 70 80 90 100−40

−20

0

20

40

60

80

z(t)

Figure 12.4: Each component as a function of time of the trajectory corresponding to(−0.5, 10,−25).

0 5 10 15−20

−15

−10

−5

0

5

10

15

20

25

30

x(t)

Figure 12.5: Each component as a function of time of the trajectory corresponding to(−0.5, 10,−25) (blue) and (−0.4, 9.9,−25.1) (red).

164

Page 171: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.6. Chaotic behaviour

−60

−40

−20

0

20

40

60

−150

−100

−50

0

50

100

150

280

300

320

340

360

380

400

420

440

Figure 12.6: The trajectory corresponding to (−0.5, 10,−25) for large times.

90 90.2 90.4 90.6 90.8 91 91.2 91.4 91.6 91.8 92−60

−40

−20

0

20

40

60

x(t)

90 90.2 90.4 90.6 90.8 91 91.2 91.4 91.6 91.8 92

−100

−50

0

50

100

y(t)

90 90.2 90.4 90.6 90.8 91 91.2 91.4 91.6 91.8 92280

300

320

340

360

380

400

420

440

z(t)

Figure 12.7: Each component as a function of time of the trajectory corresponding to(−0.5, 10,−25) for times between t = 90 and t = 92.

165

Page 172: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

data

(x0, y0, z0), (x0, y0, z0),

and their corresponding solutions

(x(t), y(t), z(t)), (x(t), y(t), z(t)),

we can define the distance

d(t) = (x(t), y(t), z(t)) − (x(t), y(t), z(t)).

Then we have

|d(t)| ≈ |d(0)|eλt .

In the case λ > 0, then two solutions will diverge. In other words, no matter the initialdistance, after some t, they will be completely different trajectories. In the case of theLorenz system, we can estimate

λ ≈ 0.9.

This λ is part of the so-called, Lyapunov exponents.Definition 12.1. Consider the evolution of a ball of initial data. The ball changes into anellipsoid with axis having length δi(t). Then the Lyapunov exponent in the i−coordinateis defined as

δi(t) ≈ δi(0)eλit.

[*** Lyapunov exponents give us the rate of separation of close trajectories.***]

Of course, the Lyapunov exponents may not be positive, but in that case the behaviouris qualitative different:Example 12.5. Estimate the Lyapunov exponents for the system

x′ = −x+ yz2

y′ = −2y − xz2

z′ = −z.

Solution: Define the function

L(t) = x2(t) + y2(t) + z2(t).

Then we have

L′ = 2(xx′ + yy′ + zz′) ≤ −2(x2 + 2y2 + z2) ≤ −2L.

Thus,

L(t) ≤ L(0)e−2t,

and√

L(t) ≤√

L(0)e−t,

166

Page 173: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.6. Chaotic behaviour

If we know consider initial data in the ball

B(0, 0.5),

i.e. the ball with center the origin and radius r = 0.5, we have that the largest initialdistance is 1. Due to the Lyapunov function, we have that, after time t, B(0, 0.5) iscontained in the ball

B(0, 0.5e−t),

so, the largest distance after time t is e−t. This means that the largest Lyapunov exponentis

λ ≈ −1.

Of course, this is not saying anything on the Lyapunov functions in the other directions.

Example 12.6. Estimate the Lyapunov exponents for the system

x′ = x

y′ = −yz2

z′ = −y2z.

Solution: Notice that if we consider the ball B(0, 1), we have that the trajectories withinitial data

(1, 0, 0), (0, 0,−1)

are(et, 0, 0), (−et, 0, 0).

Thus, λ1 = 1. If now we consider initial data in the plane x = 0, we have that

y(t), z(t) → 0.

To see that, one can consider the Lyapunov function

L(t) = y2(y) + z2(t),

with evolutionL′ = 2(yy′ + zz′) = −4y2z2 ≤ 0.

Thus, this suggests that B(0, 1) changes into a very narrow ellipsoid around the x axis.This means that λ2, λ3 < 0.

The fact that some of the Lyapunov exponents is positive implies the existence of anhorizon for our predictions. To see that, imagine that our tolerance is 0 < T ≪ 1.This means that if our prediction is T units apart from the real state of the system, ourprediction is acceptable. Let us also mention that there is an error in the measurements.Consequently, our initial data is known only up to certain amount of error, δ. Then wehave two important trajectories:

1. the one corresponding to the real initial data, i.e. the initial data with no errormeasurement. This one is the real state of the system.

167

Page 174: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

2. the one corresponding to the initial data that we measured, i.e. the initial data thatwe can obtain by our own means. This one is our prediction.

Notice that in general are not the same, but, we can not see the difference (or we can seethat and is not that important, for instance the difference between start raining at 10 andraining at 10:10). Write d(t) for the distance between both trajectories. The idea behindthe prediction is that if our initial measurement is good enough, d(0) = T 2, say, bothtrajectories will be close enough so, we can make useful predictions. The problem is thatwe have

d(t) ≈ d(0)eλt.

Then, eventually, we haved(th) = T,

for

th =1

λlog

(

T

d(0)

)

=− log(T )

λ.

When the tolerance is reached, our prediction makes no sense. Furthermore, notice thateven if the initial error is several times smaller than T ,

d(0) = T k,

for certain k. Then we expect that the time horizon is larger. However, it is not muchlarger. We have that the new time is

th =1

λlog

(

T

d(0)

)

=−(k − 1) log(T )

λ.

[*** In other words, if you work hard enough to decrease the initial errors inseveral orders of magnitude, the new time horizon grows by some multiples ofthe original time horizon. ***]

This motivates the following definition of chaotic dynamical system and attractors (whichare not unique)Definition 12.2. A deterministic dynamical system with trajectories that do not settledown to stable fixed points/periodic solutions and showing sensitive dependent on initialconditions is called chaotic.Definition 12.3. A set A is an attractor if

1. it is invariant (any trajectory that starts in A stays in A)

2. it attracts an open set U (the basin of attraction)

3. it is minimal (there is no subsets of A with these properties)

An attractor is called strange attractor if it shows sensitivity on the initial conditions.

[*** Very often strange attractors are fractal sets, however, notice that this isnot required by the definition. ***]Example 12.7. Consider the system

x′ = x− x3

y′ = −y

168

Page 175: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.7. Periodic behaviour for large r

Is the intervalI = (x, 0), −1 ≤ x ≤ 1

an attractor?

Solution: Let’s check the definition. First of all, we realize that I is invariant. To seethat notice that the solution for the second component is

y(t) = y0e−t.

Thus, y0 = 0 ⇒ y(t) = 0. Clearly. it attracts some open set. However, it is not minimal.Notice that inside I we have the point (−1, 0) and (1, 0), who are stable fixed points.Thus, I is NOT an attractor.

[*** Thus, we see that for certain values of r > rH we may have chaotic be-haviour. ***]

12.7 Periodic behaviour for large r

[*** So far, we have proved that as r grows the long time behaviour changesfrom settle down at a fixed point to chaotic behaviour. When we increase rfurther, we discover that there are windows of periodic behaviour (see Figures12.6 and 12.7). ***]

Then, we ask ourselves if we can prove this analytically. To do that we define ǫ = r−0.5.If r is large enough, ǫ is very small. Now we define the new variables

u = ǫx, v = ǫ2σy, w = σ(ǫ2z − 1),

orx = ǫ−1u, y = ǫ−2σ−1v, z = ǫ−2(σ−1w + 1),

together with the new variableτ = ǫt

Then we have,

u′ = v − σǫu

v′ = −uw − ǫv

w′ = uv − bǫ(w + σ)

and, if ǫ ≪ 1, the dynamics is similar to

u′ = v

v′ = −uw

w′ = uv

169

Page 176: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

This latter system has some conserved quantities:

C1 = u2 − 2w, C2 = v2 − w2.

This strongly suggest periodic behaviour. To rigorously prove that, we can use the previousconserved quantities to write a single equation for w:

w′′ = u′v + uv′ = v2 − u2w = (C2 + w2) + w(−C1 − 2w) = C2 − C1w −w2.

The term −C1w suggests that the solution w is periodic.

12.8 Steinbeck’s bifurcation

Let me finish the analysis of the Lorenz system with a nice quote of Steinbeck showingdifferent bifurcations leading to chaotic behaviour:

Two gallons is a great deal of wine, even for two paisanos. Spiritually the jugsmay be graduated thus: Just below the shoulder of the first bottle, serious andconcentrated conversation. Two inches farther down, sweetly sad memory.Three inches more, thoughts of old and satisfactory loves. An inch, thoughtsof old and bitter loves. Bottom of the first jug, general and undirected sadness.Shoulder of the second jug, black, unholy despondency. Two fingers down, asong of death or longing. A thumb, every other song each one knows. Thegraduation stops here, for the trail splits and there is no certainty. From thispoint on anything can happen.John Steinbeck, Tortilla flat.

12.9 A chaotic waterwheel

Finally, we provide a physical system modelled by Lorenz system. There is a waterwheelwith paper cups suspended from its rim. The water cups have an opening below. Wateris poured in steadily from the top. If the flow rate is slow, then the water can leave thecup using the opening below and the waterwheel remains motionless. If the flow increases,the waterwheel starts its movement. This movement will be periodic. If the flow is faster,then this periodic motion changes to a chaotic behaviour where the waterwheel may spinin either direction. [*** There is a video of this in your email! ***].

The quantities of this system are

• ω(t) the angular velocity,

• m(θ, t) mass distribution of water at time t at angle theta,

• Q(θ) inflow,

• r radius of the wheel,

• K leakage rate,

170

Page 177: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

12.9. A chaotic waterwheel

• ν rotational damping rate,

• I moment of inertia of the wheel (assumed to be constant).

The equation for the conservation of the mass is obtained as follows. First, fix a sector[θ1, θ2]. The mass in that sector is

M(t) =

∫ θ2

θ1

m(θ, t)dθ.

The change in mass is given by the amount of water leaving (due to rotation and theleaking −

Kmdθ) and the amount of water entering (because of the rotation and due tothe inflow

Qdθ). Then

M(t+ h)−M(t) = h

(∫ θ2

θ1

Q(θ)−Km(θ, t)dθ

)

+ hω(t) (m(θ1, t)−m(θ2, t)) ,

so

M(t+ h)−M(t)

h=

∫ θ2

θ1

Q(θ)−Km(θ, t)dθ[∗ ∗ ∗ − ∗ ∗ ∗]ω(t)∫ θ2

θ1

∂θm(θ, t)dθ,

and∫ θ2

θ1

∂tm(θ, t)dθ =

∫ θ2

θ1

Q(θ)−Km(θ, t)dθ − ω(t)

∫ θ2

θ1

∂θm(θ, t)dθ.

As this holds for very θi, we should have

∂tm(θ, t) = Q(θ)−Km(θ, t)− ω(t)∂θm(θ, t).

The second Newtonian law in rotational form is

τ = ω′(t)I,

where τ is the torque. The damping torque due to friction is modelled as

−νω(t),

the torque due to gravity is

gr

∫ 2π

0m(θ, t) sin(θ)dθ.

Thus, we have

Iω′ = gr

∫ 2π

0m(θ, t) sin(θ)dθ − νω(t).

Then the motion of the waterwheel is given by the system

∂tm(θ, t) = Q(θ)−Km(θ, t)− ω(t)∂θm(θ, t)

Iω′ = gr

∫ 2π

0m(θ, t) sin(θ)dθ − νω(t).

171

Page 178: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 12. The Lorenz system

Using Fourier series we obtain that the first modes follow the ode

a′1 = ωb1 −Ka1

b′1 = −ωa1 −Kb1 + q1

ω′ =−νω + πgra1

I.

To simplify the exposition now, forget about the exact value of the constants and takeevery constant to be equal to 1. Then

a′1 = ωb1 − a1

b′1 = −ωa1 − b1 + 1

ω′ = −ω + a1.

If we defineω = x, a1 = y, b1 = −z + 1,

we have

y′ = x(−z + 1)− y

z′ = xy − z

x′ = −x+ y,

which is the Lorenz system in the case r = σ = b = 1.

172

Page 179: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 13

Discrete dynamical systems

13.1 Discrete models

We consider the problems

yn+1 = f(yn), y0 = α, n = 1, 2, 3, ... (13.1)

These kind of problems are known as difference equations. Notice that,

y1 = f(y0), y2 = f(y1) = f(f(y0)) = f2(y0),

y3 = f(y2) = f(f(f(y0))) = f3(y0), yn+1 = f(yn) = fn+1(y0).

Definition 13.1. A sequence of values yn such that

yn+1 = f(yn) = fn+1(y0),

is called a solution to the problem (13.1). A solution such that yn has the same value forevery n is called an equilibrium solution.Example 13.1 (Fibonacci numbers). We consider the discrete problem

yn+2 = yn+1 + yn, y0 = 1 = y1 = 1.

Compute the first 5 elements in the solution.

Solution: This constitutive relation gives us the famous Fibonacci numbers. We compute

y0 = 1 = y1 = 1, y2 = y0 + y1 = 2, y3 = y2 + y1 = 3,

y4 = y3 + y2 = 3 + 2 = 5, y5 = y4 + y3 = 5 + 3 = 8.

This model was proposed by Leonardo Pisano (aka Fibonacci) as a model of a populationof rabbits.

173

Page 180: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 13. Discrete dynamical systems

Example 13.2 (Linear difference equation). We consider the discrete problem

yn = ryn−1 + b, y0 = α.

Compute the solution and study its large time behaviour depending on the value of r.

Solution: We have

y1 = rα+ b, y2 = ry1 + b = r(rα+ b) + b,

so,yn+1 = ryn + b = rnα+ b+ rb+ r2b+ ...+ rn−1b.

In the case r = 1, we can easily get the expression for the solution:

yn = α+ nb.

Let’s consider the case r 6= 1. Now notice that if we write Sn−1 = 1+ r+ r2 + ...rn−1, wehave

Sn = rSn−1 + 1,

andSn − Sn−1 = rn.

Using both expressions, we have

Sn − Sn−1 = rSn−1 + 1− Sn−1 = rn,

and

Sn−1 =rn − 1

r − 1.

Consequently, the solution is

yn = rnα+rn − 1

r − 1b.

Using the expressions that we have computed, we obtain that

• if r = 1, yn is unbounded.

• if |r| ≤ 1, yn → −1r−1b.(Notice that rn → 0 in this case)

• if |r| > 1, then yn is unbounded (unless α+ b/(r − 1) = 0). If r = −1, the solutionoscillates.

To find the equilibrium solution in a discrete model (13.1), we look for solutions of thealgebraic equation

y∗ = f(y∗).

This corresponds to the equilibrium condition yn+1 = yn. We want to characterize whetherthe equilibrium point y∗ is stable. We use Taylor’s Theorem

f(y) = f(y∗) + f(y∗)(y − y∗) = y∗ + f(y∗)(y − y∗),

174

Page 181: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

13.2. The discrete logistic

so

yn+1 − y∗ = f ′(y∗)(yn − y∗).

Write ηn = yn − y∗. Then,ηn+1 = f ′(y∗)ηn,

with solution

ηn = η0f′(y∗)

n.

If y∗ is stable, then ηn → 0, so

f ′(y∗)n → 0,

and we see that we need

|f ′(y∗)| < 1.

Now, consider the discrete system

~y = ~f(~y),

and assume that ~y∗ = ~f(~y∗). As before, we want to characterize whether the equilibriumpoint ~y∗ is stable. To do that, we use Taylor’s theorem

~f(~y) = ~f(~y∗) +D~f

~y∗

(~y − ~y∗) = ~y∗ +D~f

~y∗

(~y − ~y∗).

Repeating the previous argument, we see that we look for solutions of

~ηn+1 = D~f

~y∗

~ηn.

Denote by λi the eigenvalues of D~f

~y∗

. Thus, y∗ will be stable as long as

maxi

|λi| < 1.

13.2 The discrete logistic

Let’s focus now in a nonlinear example:

yn = kyn−1(1− yn−1).

Notice that

φ1n ≡ 0,

and

φ2n ≡ 1− 1

k,

are equilibrium solutions. Let’s see how this system evolves using the computer.

175

Page 182: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 13. Discrete dynamical systems

% We study numerically the system Xn+1=kXn(1-Xn)

disp(’---First Experiment:---’)

k1=input(’Give me the value of $k$ from 0 to 4:’);

x0=input(’Give me the initial value from 0 to 1:’);

x1(1)=x0;

for i=1:100

x1(i+1)=k1*x1(i)*(1-x1(i));

end

disp(’---Second Experiment:---’)

k2=input(’Give me the value of $k$ from 0 to 4:’);

y0=input(’Give me the initial value from 0 to 1:’);

y1(1)=y0;

for i=1:100

y1(i+1)=k2*y1(i)*(1-y1(i));

end

disp(’---Third experiment:---’)

k3=input(’Give me the value of $k$ from 0 to 4:’);

z0=input(’Give me the initial value from 0 to 1:’);

z1(1)=z0;

for i=1:100

z1(i+1)=k3*z1(i)*(1-z1(i));

end

subplot(4,1,1)

plot(x1);title(’First experiment’);

subplot(4,1,2)

plot(y1);title(’Second experiment’);

subplot(4,1,3)

plot(z1);title(’Third experiment’);

subplot(4,1,4)

plot(z1,’r’);

hold on

plot(x1);

hold on

plot(y1,’k’);title(’All together’);

hold off

a=input(’Press a key’)

disp(’Lets plot a bifurcation diagram’)

K=0:0.01:4; % Different values of k

X=zeros(length(K),5000);;

X(:,1)=0.3; % the initial data (the same for every experiment)

for j=1:length(K);

for i=1:5000

X(j,i+1)=K(j)*X(j,i)*(1-X(j,i));

end

end

176

Page 183: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

13.2. The discrete logistic

Y1=X(:,4000:end);

figure

plot(Y1);title(’Bifurcation diagram’)

0 20 40 60 80 100 120−1

0

1

2First experiment

0 20 40 60 80 100 1200.44

0.46

0.48

0.5Second experiment

0 20 40 60 80 100 1200.45

0.5

0.55

0.6Third experiment

0 20 40 60 80 100 1200.4

0.5

0.6All together

Figure 13.1: a) k = 2, y0 = 0.5,b) k = 2, y0 = 0.45, c) k = 2, y0 = 0.55

0 20 40 60 80 100 1200.4

0.6

0.8First experiment

0 20 40 60 80 100 1200.4

0.6

0.8Second experiment

0 20 40 60 80 100 1200.4

0.6

0.8Third experiment

0 20 40 60 80 100 1200.4

0.6

0.8All together

Figure 13.2: a) k = 3, y0 = 0.5,b) k = 3, y0 = 0.45, c) k = 3, y0 = 0.55

Now let’s explain the last picture. The last picture shows the large time behaviour of thesolution for a given value of k. We see that if 0 ≤ k ≤ 1, the equilibrium solution φ1

n ≡ 0 isstable. Then if k is bigger than 1, the stability changes and now is the other equilibriumsolution φ2

n the one that is stable. Later on, if k ≥ 3, the stability changes again and thereis a periodic solution (with period two). Finally, for k close to 4 (around 3.6) we havechaotic behaviour. This means that the dynamics is very complicated and it seems thatthere is a lack of patterns (but there is not such lack!). Another key characteristic of thechaotic regime is that it is very sensitive to the initial conditions. This means that twovery similar initial conditions lead to very different solutions in a very short time.

177

Page 184: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 13. Discrete dynamical systems

0 20 40 60 80 100 1200

0.5

1First experiment

0 20 40 60 80 100 1200

0.5

1Second experiment

0 20 40 60 80 100 1200

0.5

1Third experiment

0 20 40 60 80 100 1200

0.5

1All together

Figure 13.3: a) k = 3.7, y0 = 0.5,b) k = 3.7, y0 = 0.45, c) k = 3− 7, y0 = 0.55

0 50 100 150 200 250 300 350 400 4500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1Bifurcation diagram

Figure 13.4: k from 0 to 4, y0 = 0.3.

13.3 The Henon map

Let’s consider now the dynamical system

xn+2 = 1− ax2n+1 + bxn.

We use Matlab to compute the iterates up to a large value N and we plot them.

a=1.4;

b=0.3;

x(1)=0.2;

x(2)=0.1;

N=1000;

for i=3:N+2

x(i)=1-a*(x(i-1)^2)+b*(x(i-2));

end

178

Page 185: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

13.3. The Henon map

subplot(1,2,1);plot(x)

subplot(1,2,2);plot(x(301:end),x(300:end-1),’*’)

0 50 100 150 200 250 300 350 400 450 500−1.5

−1

−0.5

0

0.5

1

1.5

n

x n

−1 −0.5 0 0.5 1−1.5

−1

−0.5

0

0.5

1

1.5

xn+1

x n

Figure 13.5: a)(n, xn), b) (xn+2, xn+1)

First (left), we plot (n, xn). In our second picture (right), we plot (xn+2, xn+1). Noticethat even if the solution seems highly chaotic in the first Figure, in the second one we seethe hidden pattern that it is present in the system.

179

Page 186: Lectures Notes for Differential equations (119A and …n Lectures Notes for Differential equations (119A and B) Rafael Granero Belinch´on, rgranero@math.ucdavis.edu, Department

DRAFTv3-R.Granero-Belinchon

Chapter 13. Discrete dynamical systems

180