0% found this document useful (0 votes)
19 views

Lecture 2

Uploaded by

Manozer Mensah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lecture 2

Uploaded by

Manozer Mensah
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

2 Separable equations

We now start to systematically study first order ODE of the form

y ′ = f (x, y), (1)

where f is a given function of two variables, x is an independent variable and y = y(x) is the dependent
variable or our unknown function. It is usually said that if our ODE has the form (1) then it is in the
normal form. Do not expect to always see your problems written in the normal form.
Sometimes we will use the initial condition

y(x0 ) = y0 , x0 , y0 ∈ R, (2)

and hence solve the IVP (1)–(2).


Most of the time in the first month of the course we will be learning how to solve problems of
the form (1) or (1)–(2) analytically. This means that our goal is to actually figure out, manipulating
somehow our equation, what is the function y(x) that solves (1) — the answer should be a formula
that depends on an arbitrary constant if we solve (1) and does not have any arbitrary constants if
we solve (1)–(2). From the previous lecture we know how to accomplish this task for the ODE of the
form
y ′ = f (x).
Here is an important generalization.

Definition 1. An ODE of the form


y ′ = f1 (x)f2 (y)
is called separable.

The analytical solution of the separable equation can be found by evaluating two integrals (well,
not always, see below).
First, I present a mathematically rigorous approach. Start separating the variables:

y′
= f1 (x),
f2 (y)

and integrate with respect to x both sides (remember that y actually depends on x)
∫ ′ ∫
y dx
= f1 (x) dx.
f2 (y)

Now, recall from Calculus that y ′ dx = dy, and we can make the change of variables in the left-hand
side of our expression: ∫ ∫
dy
= f1 (x) dx.
f2 (y)
Now evaluate these two integrals, and we are done. Note that by evaluating two indefinite integrals
we obtain two arbitrary constants, say, C1 and C2 , however, if we move them to the same side and

1
use the notation C := C2 − C1 we end up with only one arbitrary constant, as should be expected for
the first order equation.
There is another way of doing the same manipulations, that is based on the Leibnitz notations

y = dxdy
. Consider
dy
= f1 (x)f2 (y),
dx
and collect now all the expressions containing y at the left hand side, and all the expressions with x
at the right hand side:
dy
= f1 (x) dx.
f2 (y)
Now by integrating we get exactly the same final answer
∫ ∫
dy
= f1 (x) dx. (3)
f2 (y)

This formal manipulation usually will not get you to a wrong answer, however, it is useful to
dy
remember that dx is not a fraction, and hence we cannot simply treat dy and dx there as separate
quantities.
Are we done with the separable equations? Not really, since we should be always worried when we
divide something by an expression (in our case by f2 (y)), because we all know that we cannot divide
by zero. Therefore, before formally dividing by f2 (y) we should find out those values of y for which
f2 (y) = 0.
Assume that ŷ is such that f2 (ŷ) = 0. Now I claim that the function y(x) = ŷ is also a solution to
the separable equation. Indeed, left hand side of the equation is y ′ (x) = (ŷ)′ = 0 since ŷ is a constants,
the right-hand side is also zero, hence y(x) = ŷ is a solution. Moreover, this kind of solutions can be
lost if we simply stick to our formula (3).
Now to the examples.

Example 2. The Malthus equation.


Recall from the previous lecture that the Malthus equation has the form

Ṅ = mN, m ∈ R,

where N = N (t), and the dot denotes the derivative with respect to time t. This is a separable
equation, because we can take, e.g., f1 (t) = m and f2 (N ) = N . Therefore, we can separate the
variables. Before using (3), let us find for which N function f2 (N ) turns into zero. Obviously, it is
true only for N̂ = 0. Therefore, we already found one solution to our equation: N (t) = 0. Now we
can separate the variables and integrate
∫ ∫
dN
= m dt =⇒ log |N | = mt + C1 .
N
Here log is the natural logarithm, which is also often denoted as ln := log := loge . Well, we are
usually looking for a general solution in the form N = N (t). It is not always possible to do so, but if
it is possible, it should be done. Here we get

|N | = emt+C1 = C2 emt , C2 := eC1 ,

2
where I used a new arbitrary constant C2 , which now takes only positive values. Getting rid of the
absolute value, we find
N = ±C2 emt = C3 emt , C3 := ±C2 ,
where I again use a new arbitrary constant, which now takes any values from R except for zero.
Finally, I recall that N = 0 actually is a solution, hence if instead of C3 I take an arbitrary constant
C, which takes any value from R, then all possible solutions to the Malthus equation are given by
N (t) = Cemt .
This formula is the general solution to the Malthus equation. It is quite important, so you should
memorize it. Q: Can you sketch the graphs of N (t) for positive and negative m?
Carefully look through the solution process for this equation. In most of the cases we will not be
spending our time to painstakingly distinguish all the arbitrary constants in the calculations. With
more experience, the shortcut solution in the form
∫ ∫
dN
Ṅ = mN =⇒ = m dt =⇒ log |N | = mt + C =⇒ N (t) = Cemt
N
will be sufficient, especially if you understand all the hidden steps in this derivation. Note also that
I used the same letter C to denote different arbitrary constants. This will be the rule: any arbitrary
constant will be usually denoted as C, and one C can be different from C on another line.
Finally, convince yourself that if there is the initial condition N (t0 ) = N0 , then the particular
solution is
N (t) = N0 em(t−t0 ) .
Example 3. We are given
y ′ = y 2 t.
Separate the variables and integrate
∫ ∫
dy
= t dt =⇒
y2
1 t2
− = + C =⇒
y 2
1 t2
=C− =⇒
y 2
1
y= 2 =⇒
C − t2
2
y= .
C − t2
Please make sure that you understand how the arbitrary constants, all of which are denoted by the
same letter C, are related to each other.
Did we find the general solution? Not really, because, as you can check, y = 0 is also a solution to
our equation (plug it in). Convince yourself that for no value of C our formula gives us this particular
solution. Hence, the final answer is
2
y(t) = or y(t) = 0.
C − t2

3
Example 4. Logistic equation.
The Malthus equation is unrealistic in the sense that it predicts unlimited exponential growth in
the case m > 0. On the other hand, we know that no population can grow to infinity. Here is how we
can fix this issue. While solving Malthus equation, it was supposed that m is a constant. It is more
realistic to assume that m = m(N ), i.e., a function that depends on the current population size. What
is the simplest function different from a constant? A reasonable answer would be “a linear function
m(N ) = a + bN ,” hence we get
Ṅ = (a + bN )N.
More often a different parametrization is used:
( )
N
Ṅ = rN 1 − ,
K
and this ODE is often called the logistic equation (Q: Can you figure out how a, b are related to r, K?).
Both constants here are supposed to be positive, and K is called the carrying capacity because its
value predicts the final population size (see below).
This is a separable equation, let us solve it (again, skipping some of the steps):
(K − N )
Ṅ = rN =⇒
∫ ∫ K
K dN
= r dt =⇒
N (K − N )
∫ ( ) ∫
1 1
+ dN = r dt =⇒
N K −N
log |N | − log |K − N | = rt + C =⇒
N
= Cert =⇒
K −N
KCert
N (t) = =⇒
1 + Cert
K
N (t) = .
1 + Ce−rt
Again, C in one line is probably different from C in another line. Did we find all the solutions? Using
the reasoning described above, we note that there are two values of N for which the right hand side of
the logistic equation vanishes: N̂1 = 0 and N̂2 = K. Hence we also have the solutions N (t) = 0 and
N (t) = K. The second solution can be obtained if we put C = 0 in our solution found by integration,
and N = 0 cannot be obtained for any values of C. Hence the general solution to the logistic equation
is
K
N (t) = or N (t) = 0.
1 + Ce−rt
If we were given the initial condition N (0) = N0 , we would get C = K−N
N0 , and (check!)
0

KN0
N (t) = .
N0 + (K − N0 )e−rt
Note that if N0 > 0 then N (t) → K when t → ∞, there is no unlimited growth.
We will return to the logistic equation in the forthcoming lectures.

You might also like