Professional Documents
Culture Documents
Contents
1 First-Order Dierential Equations
1.1 1.2 1.3 Introduction and Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Some Motivating Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . First-Order: Separable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 1.4 1.5 The Logistic Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1 2 3 4 5 6 6 7 8 9 10 10 10
Bernoulli Equations
Homogeneous Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
First Order: General Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . First Order: General Problems and Solutions 1.8.1 1.8.2 Problems Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The reason for this is that most anything interesting involves change of some kind, and the derivative expresses the rate of change. Thus, anything that can be measured numerically with values that change in some known manner will give rise to a dierential equation. Example: The populations of several species in an ecosystem which aect one another in some way. Example: The position, velocity, and acceleration of a physical object which has external forces acting on it. Example: The concentrations of molecules involved in a chemical reaction. Example: The production of goods, availability of labor, prices of supplies, and many other quantities over time in economic processes.
Here are some examples of single dierential equations and systems of dierential equations, with and without additional conditions.
Example:
y + y = 0. y(x) = Cex
for any constant
Answer:
C.
Example:
y + 2y + y = 3x
, with
y(0) = y (0) = 1
Answer:
Example:
f f = (f )2 , f = 2f g
f (1) = f (1) = 1.
g = f + 2g , with f (0) = g(0) = 2. Answer: f (x) = 2e2x cos(x ) and g(x) = 2e2x sin(x ). 4 4 df df Example: + = s + t. ds dt
Example: and
Answer:
f (x) = ex1 .
f (s, t) = st
and
f (s, t) =
1 2 1 2 s + t . 2 2
Most dierential equations (very much unlike the carefully chosen ones above) are dicult if not impossible to nd exact solutions to, in the same way that most random integrals or innite series are hard to evaluate exactly.
Prototypical example:
However, it is generally possible to nd very accurate approximate solutions using numerical techniques or by using Taylor series. In this course we will only cover how to solve some of the more basic types of equations and systems: rst-order separable, linear, and exact equations; higher-order linear equations with constant coecients; and systems of rst-order linear equations with constant coecients.
If a dierential equation involves functions of only a single variable (i.e., if is called an ordinary dierential equation (or ODE).
is a function only of
x)
then it
We will only talk about ODEs in this course. But for completeness, dierential equations involving functions of several variables are called partial dierential equations, or PDEs. (Recall that the derivatives of functions of more than one variable are called partial derivatives, hence the name.)
PDEs, obviously, arise when functions depend on more than one variable. They occur often in physics (with functions that depend on space and time) and economics (with functions that depend on time and other parameters).
An
nth
nth
derivative.
y + xy = 3x2
y
and
y y =2
are rst-order.
y +y +y =0 e =y (y )3 ,
is second-order.
is fourth-order.
A dierential equation is linear if it is linear in the terms involving there are no terms like
y2 ,
or
or
yy
, or
ln(y),
or
ey .
are linear. are not linear.
1.2
y + xy = 3x2 y y = 3x
2
,
and
y +y +y =0
2
and
x + (y ) = 1,
y = sin(y)
This is a homogeneous rst-order linear dierential equation with constant coecients. It's not hard to see that one population model that works is
dP = k P, dt
where
P (t)
and
P (t) = ekt
More complicated example: The Happy Sunshine Valley is home to Cute Mice and Adorable Kittens. The Cute Mice grow at a rate proportional to their population, minus the number of Mice that are eaten by their predators, the Kittens. The population of Adorable Kittens grows proportional to the number of mice (since they have to catch Mice to survive and reproduce).
dK dM = k1 M k2 K , and = k3 M , where M (t) and K(t) are the populations dt dt and k1 , k2 , k3 are some constants.
This is a system of two linear dierential equations; we will learn how to solve a system like this later in the course. The conditions here are fairly natural for a simple predator-prey system. But in general, there could
be non-linear terms too perhaps when two Kittens meet, they ght with each other and cause injury, which might change the equation to
dK = k3 M k4 K 2 . dt
This system would get even more dicult if we added additional species each of which interacts in some way with the others.
Non-linear example: A simple pendulum consists of a weight suspended on a string, with gravity the only force acting on the weight. If
is the angle the pendulum's string makes with a vertical line, then horizontal
sin().
d2 = k sin(). dt2
This equation cannot be solved exactly for the function can be found by using the rough estimate dierential equation
(t). However, a reasonably good approximation sin() , which turns the problem into the linear second-order
d2 = k , dt2
1.3
First-Order: Separable
A separable equation is of the form to something of this form.
Step 1:
Replace
with
(including
dy ) dx
dy , dx
y -stu
on one side
x-stu
on the other.
x). dy dx dx
to get
dy
and an integral
only.
+C
x-terms. C.
(Otherwise, just leave it where
Step 3: If given, plug in the initial condition to solve for the constant it is.) Step 4: Solve for
as a function of where
x,
if possible.
Example: Solve
y = k y,
is some constant.
Step 1: Rewrite as
Step 2: Integrate
1 dy = k. y dx 1 dy to get dx = k dx, y dx
or
1 dy = k dx. y
.
Evaluate to get
ln(y) = kx + C .
y = ekx+C = C ekx
y = exy .
Step 1: Rewrite as
ey
Step 2: Integrate to
dy = ex . dx y dy get e dx = ex dx. dx
ey = ex + C .
y = ln(ex + C)
Example: Find
given that
y = x + xy 2
and
y(0) = 1.
Step 1: Rewrite as
Step 2: Step 3:
dy = x dx. 1 + y2 1 dy Integrate to get dx = x dx, then simplify and evaluate 2 dx 1+y 1 Plug in the initial condition to get tan (1) = C hence C = /4. y = tan 1 2 x + 2 4
.
to get
tan1 (y) =
1 2 x + C. 2
P = aP (b P ),
where
and
Step 1: Rewrite as
P -integral,
use partial
1 ln(P ) b
1 ln(b P ) = at + C . b
Step 4: Multiply both sides by
ln
P bP
.
= abt + C ;
now
exponentiate to get
P = Ceabt . bP
Solving for
yields, nally,
P (t) =
b 1 + Ceabt
P (0) = P0 ,
C=
b 1. P0
Then
P (t) =
bP0 P0 + (b P0 )eabt
Remark: Dierential equations of this form are called logistic equations. With the explicit solution given here, we can observe some properties of the solution curves.
For example, as
t ,
P0
P (t)
tends
b.
is increasing but that as
We can also see directly from the original dierential equation less than
b,
then
P > 0,
so that
0. (This can also be seen from graphing some of the solution curves.)
b,
then
P <0
and
b,
then
P =0 P
b.
This is an example of a stable critical point. we can see that the value 0 is a repulsing point,
By doing a similar analysis near the value because as time goes on, nearby values of an unstable critical point.
P = 0
1.4
First-Order: Linear
The general form for a rst-order linear dierential equation is (upon dividing by the coecient of by
) given
y + P (x) y = Q(x), y
where
P (x)
and
Q(x)
x.
We would really like it if we could just integrate both sides to solve the equation. However, in general, we cannot: the term is easy to integrate, but the
P (x) y
To solve this equation we use an integrating factor: we multiply by a function left-hand side into the derivative of a single function.
I(x)
When written this way, this sum looks sort of like the output of the product rule. If we can nd that the derivative of
I(x)
so
I(x)
is
I(x)P (x),
What we want is
Motivated by the above logic, here is the method for solving rst-order linear equations:
y + P (x) y = Q(x). e
P (x) dx
to get
P (x) dx
y +e
P (x) dx
P (x) y =
P (x) dx
Q(x).
Step 3: Observe that the right-hand side is Don't forget the constant of integration
C.
d e P (x) dx y dx
Step 4: If given, plug in the initial condition to solve for the constant it is.) Step 5: Solve for
C.
as a function of
x.
and
Example: Find
given that
y + 2xy = x
and
y(0) = 1.
Step 1: We have
P (x) = 2x
Step 5:
ex y + ex 2x y = x ex 1 x2 x2 Taking the antiderivative on both sides yields e y = e + C. 2 1 0 1 0 Plugging in yields e 1 = e + C hence C = . 2 2 1 1 x2 . Solving for y gives y = + e 2 2 e
to get
Q(x) = x.
P (x) dx
= ex
for which
xy = x4 4y .
Step 5:
4 3 and Q(x) = x . x P (x) dx Multiply both sides by e = e4 ln(x) = x4 to get x4 y + 4x3 y = x7 , 1 8 4 Taking the antiderivative on both sides yields x y = x + C. 8 1 4 Solving for y gives y = x + C x4 . 8 y + 4 y = x3 , x
so
P (x) =
Example: Find
given that
y cot(x) = y + 2 cos(x)
with
and
y(0) =
1 . 2
and
Step 1: We have
y y tan(x) = 2 sin(x), e
P (x) dx
P (x) = tan(x)
Q(x) = 2 sin(x).
=e
ln(cos(x))
Step 3: Taking the antiderivative on both sides yields Step 4: Plugging in yields
1 [y cos(x)] = cos(2x) + C . 2
hence
C = 0.
gives
y=
1.5
Substitution Methods
Just like with integration, sometimes we come across dierential equations which we cannot obviously solve, but which, if we change variables, will turn into a form we know how to solve.
Determining what substitutions to try is a matter of practice, in much the same way as in integral calculus. In general, there are two kinds of substitutions: obvious ones that arise from the form of the dierential equation, and formulaic ones which are standard substitutions to use if a dierential equation has a particular form.
in terms of
and
x.
dv dx
in terms of
y , y,
and
Step 3: Rewrite the original dierential equation in Step 4: Solve the new equation in
as a dierential equation in
v.
v.
(The hope is, after making the substitution, the new equation is in
a form that can be solved with one of the other methods.) Step 5: Substitute back for
y.
y = (x + y)2 . x+y
involves
This equation is not linear, nor is it separable as written. The obstruction is that the term both
and
y.
v2
dv = 1 dx, +1
so that
tan1 (v) = x + C ,
An equation of the form restriction that linear, and if for some integer n = 0, 1 is called a Bernoulli equation. (The n not be 0 or 1 is not really a restriction, because if n = 0 then the equation is rst-order n = 1 then the equation is the same as y = (Q(x) P (x))y , which is separable.)
y + P (x)y = Q(x) y n
As with rst-order linear equations, sometimes Bernoulli equations can be hidden in a slightly dierent form. The trick for solving a Bernoulli equation is to make the substitution if we rst multiply both sides of the original equation by So we have For
v = y 1n .
(1 n) y
v = y 1n
v = (1 n)y n y
Substituting in to the original equation then yields the rst-order linear equation
v + (1 n)P (x) v =
(1 n) Q(x)
for
n = 3.
v = y 2
Next, we compute the integrating factor Scaling by the integrating factor gives
= e2x
.
2
2x2
v 4xe
so that
v=
1 2 + Ce2x . 2
1/2
gives
y=
y 2 y = ex y 3 . y +y = e y
x 2
The equation as written is not of Bernoulli type. However, if to both sides we add by y , we n = 2.
v = y3
I(x) = e
3 dx
= e3x ,
e3x v =
3 4x 3 e + C , so v = ex + Ce3x 4 4
y=
3 x e + Ce3x 4
1/3
.
y =f
y x
v=
y = vx.
Then dierentiating
y , x
or equivalently to set
y = vx
shows
v + xv = f (v),
which is
This equation is not separable nor linear, and it is not a Bernoulli equation. If we divide both sides by
2x2
then we obtain
y =
1 1 + 2 2
y x
, which is homogeneous.
1 2 1 2v 1 v v + , and rearranging gives = . 2 2 2 (v 1) x 2dv 1 2 2 Then integrating yields = dx, so = ln(x)+C . Solving for v gives v = 1 , 2 (v 1) x v1 ln(x) + C 2x so y = x . ln(x) + C
Setting
v = y/x
xv =
y =
x2 + y 2 . xy x2 ,
we obtain
y =
1 + (y/x)2 , (y/x)
which is
Setting
v = y/x
yields
xv =
1 + v2 1 v = . v v 1 yields v dv = dx, x
so that
1 2 v = ln(x) + C , 2
so
v=
2 ln(x) + C
and
y=x
2 ln(x) + C
1.6
M (x, y) and N (x, y) with My = Nx (on some rectangle), there F (x, y) with Fx = M and Fy = N (on that rectangle). Then the solutions to the dierential M (x, y) + N (x, y) y = 0 are given (implicitly) by F (x, y) = C where C is an arbitrary constant.
denotes the partial derivative of
My
with respect to
y,
namely
M , y
M (x, y) + N (x, y) y = 0
M (x, y) dx + N (x, y) dy = 0.
In this
form, it is more symmetric between the variables Fun Fact: The part of the theorem stating that that
and
y.
M y = Nx F
such
Fx = M
and
Gy = N
M y = Nx
is equivalent to the
vector eld
M, N
F = M, N
M = f (x)
is a function only of
and
N =
1 g(y)
is a function only of
y,
then our
1 y = 0. Rearranging it gives the general form y = f (x) g(y) of a separable g(y) My = 0 = Nx in this case, separable equations are a special case of exact equations. f (x) M y = Nx .
If the partial derivatives are not equal,
we are not necessarily out of luck like with rst-order linear equations, there may exist an integrating factor
I(x, y)
which we can multiply the equation by, in order to make the equation exact.
Unfortunately, we don't really get much for free: trying to solve for the integrating factor is often as hard as solving the original equation. Finding
I(x, y),
I I M N + y x
I (My Nx ) = 0,
which is just as tricky to solve as the original equation. Only in a few special cases
I(x, y). x
(and not
Case 1: Suppose we want to see if there exists an integrating factor that depends only on on
y ).
Then
I y
y,
and so
I(x) P (x)
M y Nx N
is a function
(and not
y );
The form of this integrating factor should look familiar it is the same as the one from a rst-order linear equation. There is a very good reason for this; namely, a rst-order linear equation is a special case of this form of equation.
Case 2: We could also look to see if there is an integrating factor that depends only on We can do the same calculation, this time using the ratio
and not on
x.
Nx M y M
I = 0, x
is a function
Q(y)
only of
(and not
x);
then
I(y) = e
Q(y) dy
Remark: There is no really good reason only to consider these cases, aside from the fact that they're the easiest. We could just as well try to look for integrating factors that are a function of the variable Or of
t = xy .
v = x/y .
Or of
w = y + ln(x).
In each case we'd end up with some other kind of condition. But
we won't think about those things we really just care about the two kinds of integrating factors above.
y(x),
if
There is no obvious substitution to make, and it is not separable, linear, homogeneous, or Bernoulli. So we must check for exactness. In dierential form the equation is Therefore we have So we want to nd
Therefore,
M = 4y 2 + 2x
and
N = 8xy .
My = 8y
and
Nx = 8y .
F with Fx = M and Fy = N . Taking the anti-partial-derivative of M with respect x yields F (x, y) = 4xy 2 + x2 + g(y) for some function g(y). Checking then shows Fy = 8xy + g (y) so g (y) = 0.
to Therefore, our solutions are given implicitly by
4xy 2 + x2 = C
y(x),
if
There is no obvious substitution to make, and it is not separable, linear, homogeneous, or Bernoulli. So we must check for exactness. In dierential form the equation is
Therefore,
M = 2xy 2 4y
and
N = 3x2 y 8x.
Therefore we have
My = 4xy 4
and
2xy + 4 M y Nx = 2 is not a function of x only. N 3x y 8x Nx M y 2xy 4 1 Second, we have = = is a function of y only. 2 4y M 2xy y (1/y) dy by the integrating factor I(y) = e = y.
First, we have
with
Fx = 2xy 3 4y 2 and Fy = 3x2 y 2 8xy . Taking the anti-partial-derivative F (x, y) = x2 y 3 4xy 2 + f (y) and checking in the second equation shows x2 y 3 4xy 2 = C
.
f (y) = 0.
1.7
Therefore, our solutions are given implicitly by
Note: It is not really necessary to check ahead of time whether the equation is separable or a rst-order linear equation. Separable equations are exact, and rst-order linear equations can be made exact after multiplying by an integrating factor, which will be detected using the
two special types at the beginning only because it's faster to solve it using the usual methods.
M y Nx N
Step 1: Write the equation in the two standard forms check to see if it is rst-order linear or separable.
y = f (x, y)
and
M (x, y) + N (x, y) y = 0
and
Step 1a: If the equation is rst-order linear namely, of the form by the integrating factor
I(x) = e
P (x) dx
y = f (x) g(y) then separate the y -terms and x-terms on opposite sides of the equation and then take the antiderivative of both sides. y = f (x, y)
form).
Step 2a: Check to see if there is any 'obvious' substitution that would simplify the equation.
Step 2b: Check to see if the equation is of Bernoulli type namely, of the form If so, multiply both sides by rst-order linear equation
y for some y =F x y dv function F . If so, make the substitution v = to obtain a separable equation x = F (v) v . x dx Step 3: If the equation is not of a special type, use the M (x, y) + N (x, y) y = 0 form to nd the partial derivatives My and Nx .
Step 2c: Check to see if the equation is homogeneous namely, of the form
substitution
Step 4: If factor
My = Nx ,
M y = Nx , x,
Step 3a:
I(x) = e
Step 3b:
P (x) dx
M y Nx . N Nx My . M
If it is a function
P (x)
only of
. If it is a function
I(y) = e
Compute
Q(y)
only of
y,
Q(y) dy
If neither of these methods works, you're out of luck unless you can nd an integrating factor some other way.
Step 5:
F (x, y)
with
Fx = M
and
Fy = N ,
solutions as
F (x, y) = C .
1.8
1.8.1 Problems
Solve the equation
xy = y + y =
xy .
y 2xy 2 . 3x2 y 2x xy = y + x.
y 1 = y 2 + x3 + x3 y 2 . y = 4x3 y 2 + y . 2x4 y + x
y = xy 3 6xy . y = 2xy + 2x . x2 + 1
1.8.2 Solutions
xy = y +
xy . y = y + x y x y =
and
(y y x
xy) + xy = 0.
y + x
is a homogeneous equation.
Setting
v = y/x
(with
y = vx
and
y = xv + v )
yields
xv =
v.
so
dv 1 = dx x v
2
.
hence
2v 1/2 = ln(x) + C ,
v=
ln(x) +C 2
2
.
Solving for
gives
y=x
ln(x) +C 2
Note: The equation is also of Bernoulli type, and could be solved that way too. Of course, it will give the same answer.
y =
Nx = 6xy 2. 2xy + 1 M y Nx = 2 , Step 4: We need to look for an integrating factor, because My = Nx . We have N 3x y 2x Nx M y 2xy 1 1 which is not a function of x alone. Next we try = = , so the integrating factor is M 2xy 2 y y 1 dy I(y) = e y = y .
Step 3: We have and and Step 5: The new equation is
M = 2xy 2 y
N = 3x2 y 2x
My = 4xy 1
with respect to
gives
(2xy 3 y 2 ) + (3x2 y 2 2xy) y = 0. Taking the anti-partial of the new F (x, y) = x2 y 3 + xy 2 + f (y), and checking shows that f (y) = 0. Hence the
.
solutions are
x2 y 3 + xy 2 = C xy = y + x.
y =
1 y + x x
and
(y
x) + xy = 0.
Rewrite in the usual rst-order linear form We have the integrating factor Thus the new equation is
I(x) = e
y (x1 )y = x1/2 .
1
dx
= e ln(x) = eln(x
= x1 . 1 y = x1/2 + Cx 2
x1 y x2 y = x3/2 . 1 x1 y = x1/2 + C , 2
so .
y 1 = y 2 + x3 + x3 y 2 . y = (y 2 + 1)(x3 + 1).
This equation is
Step 1: Adding 1 and then factoring the right-hand side gives separable. Separating it gives
Integrating yields
y = tan
x4 x2 + +C 4 2
y =
M = 4x3 y 2 + y
and
N = 2x4 y + x
My = 8x3 y + 1
and
Nx = 8x3 y + 1.
M y = Nx .
with respect to
gives
F (x, y) = x4 y + xy + f (y),
.
and checking
f (y) = 0.
x y + xy = C
4 2
y = xy 3 6xy . y + 6xy = xy 3 .
Step 1: The equation is of Bernoulli type when written as Multiply both sides by
2y 3
to get
2y 3 y
12 2 y = 2x. x
then yields the linear equation
v = y 2 e
with
v = 2y 3 y
12 v = 2x. x
(12/x) dx
y =
2xy + 2x . x2 + 1 2x (y + 1). x2 + 1
y =
2x dy = dx, y+1 x2 + 1
2
so that
ln(y + 1) = ln(x2 + 1) + C .
.
Exponentiating yields
y + 1 = e ln(x
+1)+C
C , x2 + 1
so
y=
C 1 x2 + 1
(method #2)
M = 2xy + 2x M y = Nx ,
so
and
My = 2x x
and
Nx = 2x.
and checking
F (x, y) = x2 y + x2 + f (y),
2
.
f (y) = 1
f (y) = y .
x y+x +y =C
Well, you're at the end of my handout. Hope it was helpful. Copyright notice: This material is copyright Evan Dummit, 2012. You may not reproduce or distribute this material without my express permission.