Chapters 1 and 2 1 Introduction

Chapters 1 and 2
1
Introduction
Reading assignment: Study Sections 1.1 and 1.2. (If you have time it might be
good to read Section 1.3 to get an understanding of modeling applications of
Ordinary Differential Equations)
An Ordinary Differential Equation (ODE) is a relation between an independent variable
dj y
x and and a dependent variable y (i.e., y = y(x) depends on x) and its derivatives y (j) = j
dx
for j = 1, · · · , n. So it is an equation that can be written in the form
F (x, y, y (1) , · · · , y (n) ) = 0,
(1)
For example, in this chapter we will learn to solve equations like the following:
x−y
.
y 0 − x cos(x2 ) = 0, y 0 − sin(x + y) = 0, y 0 − 2xy − x = 0, and y 0 =
x+y
The main reason to study differential equations due to the many practical physical applications. Solving ODEs can be very difficult or even impossible. But in this class we will
focus on the solution of very simple problems in order to give students some idea of what is
involved in the more general case. The main tools needed by the students is a background
in college algebra and calculus (differentiation and integration).
The goal is to find all functions y(x) satisfying the equation (1). Unfortunately this
objective is beyond reach other than some very special cases. In this class we will eventually
study a few of these special cases.
Notation and Terminology: The following discussion may seem a bit over the top. The
main purpose is to introduce the standard notation and terminology used in talking about
ODEs. DO NOT BE OVERWHELMED they are just words. Also read the book
where more examples are also given. The main words to understand are written in italics
and underlined.
Definition 1.1.
1. The order of highest order derivative, n, is called the order of the equation.
1
2. If we can solve for the highest order derivative term, then we say the equation can be
put in normal form:
dn y
= f (x, y, y (1) , · · · , y (n−1) ).
dxn
3. An ODE is said to be Linear if it can be written in the form
an (x)
dn y
dn−1 y
d1 y
+
a
+
·
·
·
+
a
(x)
+ a0 (x)y(x) = g(x).
n−1
1
dxn
dxn−1
dx1
(2)
(a) A linear equation is is said to be homogeneous if g(x) = 0. If g(x) 6= 0 then the
equation is called non-homogeneous.
(b) A solution y(x) may only exist on a certain domain called the interval of existence.
The interval of existence may be open, e.g., (a, b), closed, e.g., [a, b] or it may be
open on one end and closed on the other, e.g., (a, b]. It is possible that this interval
is all of (−∞, ∞).
4. Sometimes it is possible that y = 0 is a solution. In this case we call this the
trivial solution.
5. If we have a solution given in the form y = y(x) then we say that y(x) is an explicit solution.
But very often it is either difficult or even impossible to obtain an explicit solution
even if we know that it exists. In this case we may still be able to find a so-called
implicit solution. We define an implicit solution as follows:
A relation G(x, y) = 0 is called an implicit solution of the ODE (1) if there exists
a function ϕ(x) (whether we can find it or not) so that G(x, ϕ(x)) = 0 and also
F (x, ϕ(x), ϕ(1) (x), · · · , ϕ(n) (x)) = 0
6. Generally speaking an nth order ODE has an n-parameter family of solutions. That
is to say that the solution depends on n arbitrary constants (constants of integration). Thus we would write an implicit solution as G(x, y, c1 , c2 , · · · , cn ) = 0 where
c1 , c2 , · · · , cn are arbitrary parameters. If we can find an implicit or explicit solution
containing n arbitrary parameters then we call the solution the general solution. For
example, a general explicit solution of y (3) = 0 is y = c1 + c2 x + c3 x2 .
2
7. The Initial Value Problem (IVP) is to find a unique solution of (1) satisfying the n
constraints (called initial conditions)
y(x0 ) = y0 , y 0 (x0 ) = y1 , · · · , y (n−1) (x0 ) = yn .
Remark 1.1.
(3)
1. In order to solve the IVP we generally we somehow find a general solu-
tion which depends on n parameters c1 , c2 , · · · , cn . We then use the n constraints (3)
to evaluate the parameters cj , j = 1, · · · , n to obtain a unique solution.
2. In case F (x, y) in (1) does not depend explicitly on the independent variable then (1) is
called autonomous, i.e., y 0 = F (y). In many ways, as you will see later on, autonomous
equations are much easier to study than the nonautonomous case.
Example 1.1. The general solution to the nonautonomous differential equation y 0 = 3x2
is y(x) = x3 + c where c (just integrate both sides) is an arbitrary constant. The unique
solution satisfying the initial condition y(2) = −1 is y(x) = x3 − 9.
2
First Order Equations and IVPs
Reading assignment: Your need to study Chapter 2, Sections 2.1 through 2.5.
In this section we will consider first order equations and, for the most part, we are
interested in those equations that can be put in the normal form
y 0 = f (x, y)
(4)
and the associated IVP
y 0 = f (x, y),
y(x0 ) = y0 .
(5)
Theorem 2.1 (Fundamental Existence Uniqueness Theorem). Let R be a rectangular region
R = {(x, y) : a ≤ x ≤ b, c ≤ y ≤ d} that contains the point (x0 , y0 ) in its interior. If f (x, y)
and ∂f /∂y are continuous in R, then there exists an interval I0 = (x0 − h, x + h) ⊂ (a, b)
for a number h > 0, and a unique function y(x) defined on I0 that solves the IVP (5) on I0 .
3
42
The first order autonomous equations y 0 = f (y) are particularly interesting and the
1.4 Phase Line and Bifurcation Diag
behavior of solutions can be described rather nicely even without solving the equation.
A fixed point (or equilibrium point) of a differential equation y 0 = f (y) is a root of the
Technical publications may use special diagrams to display qu
equation f (y) = 0. Notice thatinformation
an equilibrium about
point gives
a solution to points
the differential
the equilibrium
of the differential e
equation – it is a constant solution. In particular, suppose that y0 is an equilibrium point,
y ! = f (y).
(1)
i.e., f (y0 ) = 0, then set y(x) = y0 for all x (a constant function). Since y(x) is a constant its
This equation
independent
of x, hence
there are no externa
derivative is zero and y0 is an equilibrium
point weishave
y 0 = f (y). Qualitative
information
terms that depend on x. Due to the lack of external controls,
tion is said to be self-governing or autonomous.
about the equilibrium points of the differential equation y 0 = f (y) can be obtained from
special diagrams called phase diagrams.
A phase line diagram for the autonomous equation y ! = f (y
A phase line diagram for the autonomous
equation
y 0 sink,
= f (y)source
is a line segment
with
labels
segment with
labels
or node,
one
for each root of
for so-called sinks, sources or nodes,
forequilibrium;
each root of f see
(y) =Figure
0, i.e. each
i.e. one
each
11. equilibrium.
source
sink
y0
y1
Figure 11. A phase line diagram
autonomous equation y ! = f (y).
The labels
areis borrowed
from
thefunction
theoryofofy.fluids,
The simplest first order autonomous
equation
when f (y) is
a linear
The and they
IVP can be written as
following special definitions:6
dy
= 0y) 0= y0 , a The
=Sink
ay, yy(x
∈ R. equilibrium y = y0 attracts nearby solu
dx
x = ∞: for some H > 0, |y(0) − y0 | < H
|y(x) − y0 | decreases to 0 as x → ∞.
y(x) y==
y0 eyax
Source
The equilibrium y = y1 repels nearby solut
1.
x = ∞: for some H > 0, |y(0) − y1 | < H
This equation is a basic model for many important growth
and|y(x)
decay−problems
(e.g., poputhat
y1 | increases
as x → ∞.
lation dynamics and the decay of radioactive
Theequilibrium
main method
such a a sink nor a
Node y =materials).
y2
The
y to
= solve
y2 is neither
The solution is given by
problem is described in the next subsection.
In fluids, sink means fluid is lost and source means fluid is cr
memory device for these concepts is the kitchen sink, wherein t
as a tool to guess the shape of the
to a first
is solution
the source
andorder
the equation
drain is the sink. The stability test
Theorem 2 is motivated by the vector calculus results Div(P)
sink and
y 0 = Div(P)
f (x, y). > 0 for a source, where P is the velocity fie
fluid and Div is divergence.
In this section we briefly discuss the idea of using the notion of derivative of a function
Note that if ϕ is a solution of this equation then and ϕ(x0 ) = x0 then the slope of the tangent
Stability
The
terms
equilibrium
line to the graph of y = ϕ(x) at (x,
y) is givenTest.
by f (x, y).
Since
we stable
can compute
f (x, y) at and unstab
librium refer to the predictable plots of nearby solutions. T
stable means that solutions that start near the equilibrium
nearby as x → ∞. The term unstable means not stable. Th
4 and a source is unstable.
sink is stable
every point we can plot the direction a solution will take starting from any given point. The
Precisely, an equilibrium y0 is stable provided for given ! >
Direction Field for a first order ODE (4) is a figure in which arrows are placed at a grid of
points in the xy-plane with an arrow at each point (x, y) of the grid pointing in the direction
f (x, y). By starting at a point (x0 , y0 ) one can move in the directions of the arrows to get
an idea what the solution of the IVP looks like.
Let us consider an example to demonstrate the idea.
y 0 = y 2 − x.
For this example we plot the solution satisfying y(0) = 0.
Notice that the above example is non-autonomous, i.e., f depends on x and y. As we
5
have already mentioned, things are simpler for autonomous equations. Consider the example
y 0 = sin(y).
We notice that the function f (y) = sin(y) which does explicitly depend on x. The
equilibria (or stationary) solutions are given by
sin(y) = 0
⇒
y = kπ,
k = ±1, ±2, · · · .
For autonomous equations these solutions have very special properties. Generally, solutions of the differential equation either approach of are repelled by the equilibrium solutions.
Direction Field for y 0 = sin(y)
For this example we have plotted two solutions with initial conditions y(0) = 2 (Blue
curve) and y(0) = 5 (Green Curve), respectively. Notice that both solutions approach the
sink corresponding to the stationary solution y0 = π.
6
It is sometimes useful to look at the graph of f (y) to determine the direction of the
arrows. What we gain from this picture is that if a solution begins in a region in which f (y)
is positive the y 0 = f (y) > 0 so the function y(x) must be increasing. Notice that, other
than nodes, solutions are trapped between sources and sinks and these solutions move away
from sources and toward sinks.
+
2.1
+
+
-
-
-
+
+
+
Separable Equations
A very important class of problem (autonomous and nonautonomous) are ones that can be
“separated.” These are problems that can be written in the form
dy
= f (y)g(x).
dx
7
In this case we can rewrite the problem in the form
1 dy
= g(x)
f (y) dx
or
1 dy
= g(x).
f (y) dx
Integrating both sides we arrive at
Z
1 dy
dx =
f (y) dx
Z
g(x) dx + C
and we say the problem is solved “up to quadrature.” This simply means we must evaluate
the indefinite integrals.
This shows already how hard solving differential equations are since it is easy to write
down functions that cannot be integrated exactly in terms of elementary functions. For
example,
ẏ = e−x
2
has solution which can be expressed as
Z
y(x) =
x
2
e−s ds + C
0
but it is well known that this integral cannot be expressed “in closed form.”
In spite of this example, the simplest class of separable first order equations are ones in
the form y 0 = f (x) which can be written in the separated form dy = f (x) dx. Therefore by
R
the Fundamental Theorem of Calculus y = f (x) dx.
Example 2.1. Consider the differential equation y 0 = xy 2 . We separate the dependent and
8
independent variables and integrate to find the solution.
dy
= xy 2
dx
y −2 dy = x dx
Z
Z
−2
y dy = x dx + c
x2
+c
2
1
y=− 2
x /2 + c
−y −1 =
Example 2.2. The equation y 0 = y − y 2 is separable.
y0
=1
y − y2
We expand in partial fractions and integrate.
1
1
−
y y−1
y0 = 1
ln |y| − ln |y − 1| = x + c
We have an implicit equation for y(x). Now we solve for y(x).
y =x+c
ln y − 1
y x+c
y − 1 = y
= ±x+c
y−1
y
= cx
y−1
(Here we have substituted c for ±c .)
cx
cx − 1
1
y=
1 + cx
y=
9
2.2
First Order Linear Equations
A first order, linear, homogeneous equation has the form
dy
+ p(x)y = 0.
dx
Note that if we can find one solution, then any constant times that solution also satisfies the
equation. If fact, all the solutions of this equation differ only by multiplicative constants.
Notice that we can solve any equation of this type because it is separable.
dy
= −p(x) dx
y
Z
ln |y| = − p(x) dx + c
R
y = ±e−
y = ce−
R
p(x) dx+c
p(x) dx
(Here we have renamed the arbitrary constant ±ec to c).
First Order, Linear Homogeneous Differential Equations. We have just shown that
the first order, linear, homogeneous differential equation,
dy
+ p(x)y = 0,
dx
has the general solution
y = ce−
R
p(x) dx
.
Notice that solutions differ by multiplicative constants.
Example 2.3. Consider the equation
dy 1
+ y = 0.
dx x
10
(6)
We use Equation (6) to determine the solution.
y(x) = c e−
R
1/x dx
,
for x 6= 0
y(x) = c e− ln |x|
c
y(x) =
|x|
c
y(x) =
x
First Order, Linear Non-Homogeneous Differential Equations.
The first order, linear, nonhomogeneous differential equation has the form
dy
+ p(x)y = f (x).
dx
(7)
This equation is not separable. To solve Equation (7), we multiply by an integrating factor.
Multiplying a differential equation by its integrating factor has the effect of transforming
the left hand side of the equation into an exact derivative. By this we mean that multiplying
Equation (7) by the integrating factor, I(x), yields,
I(x)
dy
+ p(x)I(x)y = f (x)I(x).
dx
In order that I(x) be an integrating factor, it must satisfy
dy
I(x) = p(x)I(x).
dx
This is a first order, linear, homogeneous equation with the solution
R
I(x) = c
p(x) dx
.
This is an integrating factor for any constant c. For simplicity we will choose c = 1.
11
So to solve the equation (7) we multiply by the integrating factor and integrate. Let
R
P (x) = p(x) dx.
dy
+ p(x)eP (x) y = eP (x) f (x)
dx
dy P (x) e
y = eP (x) f (x)
dx Z
y = e−P (x) eP (x) f (x) dx + ce−P (x)
eP (x)
y ≡ yp + c yh
The general solution is the sum of a particular solution, yp , that satisfies y 0 + p(x)y = f (x),
and an arbitrary constant times a homogeneous solution, yh , that satisfies y 0 + p(x)y = 0.
Example 2.4. Consider the differential equation
1
y 0 + y = x2 ,
x
x > 0.
First we find the integrating factor.
Z
I(x) = exp
1
dx
x
= ln x = x
We multiply by the integrating factor and integrate.
dy
(xy) = x3
dx
1
xy = x4 + c
4
1 3 c
y= x + .
4
x
The particular and homogeneous solutions are
1
yp = x3
4
and
yh =
1
.
x
Note that the general solution to the differential equation is a one-parameter family of functions.
12
2.3
Exact Equations
Any first order ordinary differential equation of the first degree can be written (in infinitely
many ways) in differential form,
M (x, y) dx + N (x, y) dy = 0.
We know from Calculus III that if F (x, y) is a function satisfying
dF = M dx + N dy = 0,
then this equation is called exact. An (implicit) general solution of the differential equation
is
F (x, y) = c,
where c is an arbitrary constant. Since the differential of a function, F (x, y), is
dF ≡
∂F
∂F
dx +
dy,
∂x
∂y
M and N are the partial derivatives of F :
M (x, y) =
∂F
,
∂x
N (x, y) =
∂F
.
∂y
Example 2.5.
xdx + ydy = 0
is an exact differential equation since
d
dx
1 2
(x + y 2 )
2
13
=x+y
dy
dx
The solution of the differential equation is
1 2
(x + y 2 ) = c.
2
A necessary and sufficient condition for exactness. Consider the exact equation,
M dx + N dy = 0.
A necessary and sufficient condition for exactness is
∂M
∂N
=
.
∂y
∂x
What this means is that if the equation is exact then we are guaranteed there exits a
function F (x, y) so that
M=
∂F
∂x
and N =
∂F
∂y
(8)
and a general solution to the problem can be written as F (x, y) = 0.
More importantly (8) provides a method for finding F (x, y). Namely, integrating the
first equation of we see that
Z
F (x, y) =
M (ξ, y) dξ + f (y),
for some f (y).
If we differentiate this equation with respect to y and use the the second equation in (8)
∂F
= N (x, y)
∂y
we arrive at an equation
Z
My (x, y) dx + f 0 (y) =
∂F
= N (x, y).
∂y
It can be shown that, after simplifying, we will arrive at an equation only in y for which
14
we can find f (y).
Let us reconsider the earlier example
Example 2.6.
xdx + ydy = 0.
Here M = x and N = y so
∂M
∂N
=0=
∂y
∂x
so the equation is exact and we know there exists a function F (x, y) so that Fx = M and
Fy = N .
Integrating Fx = M with respect to x we have
Z
F (x, y) =
x dx =
x2
+ f (y).
2
Differentiating with respect to y and using Fy = N we have
y = N = Fy = f 0 (y)
⇒
f 0 (y) = y.
Thus, integrating we obtain
f (y) =
y2
2
and we find
F (x, y) =
x2 y 2
+ .
2
2
The implicit general solution is
x2 y 2
+
=c
2
2
which, by renaming the constant c can be written as
x2 + y 2 = c.
15
2.4
Homogeneous Equations
Consider a first order equation
dy
= f (x, y).
dx
We say that this equation is Homogeneous if the right hand side can be written in the form
dy
= F (y/x).
dx
(9)
If this is possible the we can reduce the equation to a separable equation using the change
of dependent variable
u = y/x.
Note that u = y/x implies y = xu which, in turn, implies
du
dy
=u+x .
dx
dx
Therefore the equation (9) can be written as
u+x
du
= F (u)
dx
which is separable. Namely, we can write
du
dx
=
F (u) − u
x
and we obtain an implicit solution by integration
Z
du
=
F (u) − u
Z
dx
+ C.
x
Example 2.7. Consider the problem
x
dy
y2
=
+ y.
dx
x
16
Dividing by x we obtain
dy y 2 y =
.
+
dx
x
x
Proceeding as above, we set u = y/x implies y = xu which, in turn, implies
dy
du
=u+x .
dx
dx
Thus the equation becomes
u+x
du
= u2 + u.
dx
Now we simplify by subtracting the u on both sides and separate the variables to obtain
du
dx
=
.
2
u
x
Integrating both sides we have
−
1
= ln |x| + C.
u
So we get
u=
−1
ln |x| + C
and finally
y = xu =
2.5
−x
ln |x| + C
Bernoulli equations
A Bernoulli equation is any equation that can be written in the form
y 0 + f (x)y = g(x)y α ,
α 6= 0, 1.
(10)
Note that if α = 0, 1 then the equation is first order linear.
The Bernoulli equation can be reduced to a first order linear equation using the following
substitution:
u = y 1−α .
17
This relation implies
dy
du
= (1 − α)y −α .
dx
dx
Multiplying the Bernoulli equation by (1 − α)y −α we see that it can be written as
(1 − α)y −α
dy
+ (1 − α)f (x)y 1−α = (1 − α)g(x)y α y −α
dx
which simplifies to
du
+ (1 − α)f (x)u = (1 − α)g(x).
dx
If we let p(x) = (1 − α)f (x) and q(x) = (1 − α)g(x) then we obtain the first order linear
equation
du
+ p(x)u = q(x)
dx
which can be solved using the methods discussed in the Section on first order linear problems.
Example 2.8. Consider the problem
y0 + y = y4.
This is a Bernoulli equation with α = 4 so (1 − α) = −3 and we set u = y −3 . Then we
obtain the linear equation
du
− 3u = −3.
dx
To solve this problem we find the integrating factor
I = e−3
R
dx
= e−3x .
Multiplying by I we obtain
0
e−3x u = −3e−3x .
Next we integrate to obtain
Z
e
−3x
Z
u dx =
18
−3e−3x dx
which gives
e−3x u = e−3x + C
or
u(x) = 1 + Ce3x .
Finally, converting back to y we have
y(x)−3 = 1 + Ce3x .
2.6
RHS Linear in x and y
If the equation (4) has the right hand side a linear function of in x and y, i.e., it has the form
F (ax + by + c) then a simple substitution transforms the problem into a separable problem.
Namely, if we set v = ax + by + c then v 0 = a + bf (v) which is separable.
Example 2.9. Consider the problem
y 0 = e−(x+y) − 1.
We set v = x + y which implies v 0 = 1 + y 0 = 1 + (e−v − 1) = e−v . The equation v 0 = e−v is
separable and seperating the variables we have
ev
dv
=1
dx
⇒
ev dv = dx
⇒
ev = x + c ⇒
Thus we have an implicit general solution ex+y = x + c.
19
ex+y = x + c.