Chapter 2
First Order Equations
It turns out that first-order differential equations express the behavi o r of several real-world
problems mathematically. Since there is no hope to solve general first-order equations in
closed form, we confine our study to equations for which a standard method has already be en
developed. In the last section of this chapter, we study the existence-uniqueness prob lem of
the general first-order differential equations.
2.1 Linear r st-orde r eq uati ons
2.1.1 General form
Perhaps the most important type of differential equations is linear equations. The general
form of a linear first-order equation is
a(x) y
0
+ b(x)y = c(x): (2.1)
Note that the algebraic exp o ne nt of y and of y
0
is one. If c(x) is identically zero, the equation
is called linear homogeneous, otherwise, linear non-homogeneous equation. The canonical
form of a linear first-order equation is obtained by dividing the equation by a(x) as
y
0
+ p(x)y = r(x): (2.2)
The equation models the behavior of several real phenomena. For example, the population
dynamics of a ty pical living species, the voltage across the capacitor in a RC circuit, the
change in the height of a falling body, the growth of the money you deposited in financial
institute, the carbon dating of an old fossil, and many other real-world problems. For all
those example, the rate of change of the amount of some quantity y(x) i s proportional to
the current amount of that quantity, i.e,
dy
dx
/y(x), and an external factor r(x). The linear
differential equations is a special case of a general non-linear on e, for example, it turns out
that the rate of change of the population of some living species has the form
dp
dt
= α(x; p)p;
where α(y) = r
¡
1 ¡
p
K
, where r; K can be constant or functions of x. That is a non-linear
equation that in general can not be solved in closed form.
1
On the other hand, linear differential equations enjoys pretty nice properties and for
this are very popular in different fields of sciences. If we rewrite a first-order equation in the
following operator form
d
dx
+ p(x)
[y] = r;
and denote the differential operator by T , we reach the compact form of the equation T [y]=r.
With this notation, the operator T maps a function y(x) to another function r(x) in the
linear manner, that is,
T [αy
1
+ βy
2
] = αT [y
1
] + βT [y
2
];
for arbitrary functions y
1
(x); y
2
(x) and constants α; β. Therefore, a linear differential equa-
tion refers to the linearity of its differential operator . A fun ction y
h
(x) is c alled a homogeneous
solution of linear mapping T if T [y
h
] = 0, and moreover, T [c y
h
] = 0 for arbitrary con-
stant c. The homogeneous equation for r 0 is
dy
dx
+ p(x) y = 0;
or equivalently in the differential form
1
y
dy + p(x) dx = 0;
that through integration yields
y
h
(x) = ce
¡
Z
p(x)dx
;
for arbitrary constant. On the other hand, if y
p
(x) is a ny particular solution of T [y] = r,
then y(x) = y
h
(x) + y
p
(x) is also solves the equation d ue to the following argument
T [y
h
+ y
p
] = T [y
h
] + T [y
p
] = 0 + r:
2.1.2 General solution
To solve Eq.2.2, we multiply it by factor µ(x) = e
Z
p(x)dx
which is called an integrating factor
that will be clear immediately. By multiplying, we reach
e
Z
p(x)dx
y
0
+ p(x) e
Z
p(x)dx
y = r(x) e
Z
p(x)dx
;
and according to the equality
e
Z
p(x)dx
y
0
+ p(x) e
Z
p(x)dx
y =
d
dx
e
Z
p(x)dx
y
;
we can write
d
e
Z
p(x)dx
y
= r(x) e
Z
p(x)dx
dx:
2 First Order Equations
The obtained equation is an integrable equation and f o r this µ(x) is called an integrating
factor since it transforms the original equation to an integrable one. Now, by integrating the
above equation, we reach the following solution:
y(x) = ce
¡
Z
p(x)dx
+ e
¡
Z
p(x)dx
Z
r(x) e
Z
p(x)dx
dx: (2.3)
The above formula is called the general solution of the g iven linear-first order equation.
Before we justify the terminology of the general solution, let us solve an example.
Example 2. 1. For equation y
0
+ ay = r(x), where a is a constant., the integrating factor is
µ = e
ax
, as thus
e
ax
y
0
+ ae
ax
y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
d
dx
(e
ax
y)
= e
ax
r(x);
or equivalently,
d(e
ax
y) = e
ax
r(x) dx
that by integration yields
e
ax
y = c +
Z
e
ax
r(x) dx;
and finally
y(x) = ce
¡ax
+ e
¡ax
Z
e
ax
r(x) dx:
Note that y(x) consists two terms
y(x) = ce
¡ax
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
homogeneous solution
+ e
¡ax
Z
e
ax
r(x) dx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{z
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
solution associated to r( x)
:
The first term y
h
= ce
ax
which is called the homogeneous solution, is the solution of the
homogeneous equation
y
0
+ ay = 0;
and the second term which is called the particular solution is contributed by the external
term r(x).
2.1.3 Initial value problem
The general form of a linear first-order initial value problem is
y
0
+ p(x)y = r(x)
y(x
0
) = y
0
; (2.4)
where y
0
is called the init ial value of the solution y(x) at x = x
0
. The point x
0
is usually
chosen such that functions p; r are continuous in a n open interva l centered at x
0
. There are
two methods to solve the above problem: 1) definite integration, 2) substitution in th e general
solution. The formula for the definite integration for solving the above problem is as follow s
y(x) = y
0
e
¡
Z
x
0
x
p(t)dt
+ e
¡
Z
x
0
x
p(t)dt
Z
x
0
x
r(t) e
Z
x
0
t
p(s)ds
dt: (2.5)
2.1 Linear first-order equations 3
It is simply verified that y(x
0
) = y
0
, and furthermore
y
0
(x) = ¡p(x)
"
y
0
e
¡
Z
x
0
x
p(t)dt
+ e
¡
Z
x
0
x
p(t)dt
Z
x
0
x
r(t) e
Z
x
0
t
p(s)ds
dt
#
+ r(x);
or equivalently y
0
(x) = ¡p(x) y(x) + r(x).
Example 2.2. Consider the following IVP
(
xy
0
¡y = x
2
y(1) = ¡ 1
:
The canonical form of the equation is y
0
¡
1
x
y = x, and the integrating factor is
µ(x) = e
Z
1
x
¡
1
t
dt
=
1
x
:
Multiplying by µ, we reach
d
1
x
y
= 1 )
Z
1
x
d
1
t
y
=
Z
1
x
dx )
1
x
y(x) ¡y
0
= x ¡1:
Finally, the solution is obtained as y(x) = x(x ¡2).
Example 2.3. (Cont.) Let us s o lve the above problem by using the general solution. Note
that the general solution of the equation is
y(x) = cx + x
2
;
and applying the initial condition y = ¡1 at x = 1 yields c = ¡2, and thus y(x) = x(x ¡2)as
before.
2.1.4 Existence, uniquenes s and extension
Assume that p; q are continuo us function in an interval I = (x
0
¡ a; x
0
+ a) in the initial
value problem (2.4). Then it can be proved that the solution (2.5) is the unique continuously
differentiable solution on I. The uniqueness is justifies as follows. Assume y
1
(x); y
2
(x) are
two solutions to the problem, t hus for y = y
1
¡y
2
, we have
(
d
dx
y + p(x) y = 0
y(x
0
) = 0
:
We should prove that y = 0 is the unique solution to the equation. Consider the function
z(x)= y(x) e
Z
x
0
x
p(t)dt
. The continuity of p(x) guarantees that the term e
Z
x
0
x
p(t)dt
never vanishes
for x 2I. We have
dz
dx
= y
0
e
Z
x
0
x
p(t)dt
+ p(x) e
Z
x
0
x
p(t)dt
y(x) = 0;
4 First Order Equations
and thus z(x) = c a c o nstant that implies
y(x) = c e
¡
Z
x
0
x
p(t)dt
:
The condition y(x
0
) = 0 implies c = 0 and finally y(x) = 0. The existence and extension of
the solution to I are directly concluded from solution (2.5).
Example 2.4. Consider the following problem
(
cos(x) y
0
+ sin(x) y =
1
2
sin(2x)
y(0) = 0
: (2.6)
Since the initial point is x
0
= 0 and the term cos(x) is non-zero in the interval (¡π /2; π /2),
we can safely rewrite the equation in the standard form
y
0
+ tan(x) y = sin(x);
for x 2(¡π /2; π/2). The general solution to the equation is
y(x) = c cos(x) + cos(x) lnjsec(x)j:
Applying initial condition determines c as c = 0 and thus y = cos(x) lnjsec(x)j for x 2(¡π /2;
π / 2). T he graph of the solutio n is shown in Fig.(2.1). The solution is continuous beyond
this domain, however, y
0
goes unbounded at x = ±
π
2
. Remember that the solution to an OD E
must be continuously differentiable, and the obtained solution is not a classical solution even-
though it is continuous everywhere.
1
2
π
1
4
π
1
4
π
1
2
π
0
.
2
y
(
x
)
Figure 2.1.
2.1.5 Singular differential equatio ns
Although, the differential equation in the above example fails at x = 0, the solution for the
given initial condition extends on (¡1; 1). However, this is not the case for all initial
conditions. For example, the following problem does not have any solution
(
xy
0
¡y = x
2
y(0) = ¡ 1
;
2.1 Linear first-order equations 5
while the problem
(
xy
0
¡y = x
2
y(0) = 0
;
has infinitely many solutions.
Example 2.5. Consider the following IVP
(
x
2
y
0
¡y = x
2
y(1) = ¡ 1
:
The integrating factor is
µ(x) = e
Z
1
x
¡
1
t
2
dt
= e
1
x
;
and thus
Z
1
x
d
e
1
t
y
=
Z
1
x
e
1
t
dt ) y(x) = ¡e
1¡
1
x
+ e
¡
1
x
Z
1
x
e
1
t
dt:
Obviously, lim
x!0
¡
y(x) does not exist and therefor x = 0 is a singular point f o r the solution,
and hence the domain of the solution is (0; 1).
2.1.6 System interpretation
From applied science po int of view, a system is a transaction that transforms an input to
an output.
S
r y
Several transactions in applied sciences can be described by differential equations. A
system is called linear if its response to inputs is linear, that is, if its response to αr
1
+ βr
2
is equal to αy
1
; +βy
2
where y
1
; y
2
are the responses to r
1
; r
2
respectively. A linear differential
equation that is described by the linear differential operator T is a linear system. For the
initial value problem (2.4), the respo nse consists two terms, the response to the initial
condition y(x
0
) that can be considered as the internal energy of the system, and the respo nse
to the external factor r(t). For example, consider the following LC circuit:
The input to the system is the voltage supply V
s
and the output is V
c
, the voltage across
the capacitor. The differential equation that describes the system is as follows
dV
c
dt
+
1
RC
V
c
=
1
RC
V
s
:
6 First Order Equations
The response depends in addition to V
s
on the initial voltage in the capacitor V
c
(0). This is
a linear system with the transaction T
¡1
[V
s
] = V
c
where
T : =
d
dt
+
1
Rc
:
It is simply seen that T
¡1
is defined by
T
¡1
[V
s
] =
1
RC
Z
0
t
V
s
(s) e
¡
(t¡ s)
RC
ds:
2.2 Linear piecewise equations
2.2.1 Jump discontinuities
If either function p(x) or r(x) in Eq.2.2 is piecewise continuous, the equation is called
a piecewise or switching equation. A piecewise continuous functions is a function that is
continuous everywhere except possibly at some finite points, and that its discontinuity points
only are finite jumps. Assume that r(x) in the following equation has a jump at x
0
y
0
+ p(x)y = r(x):
This jump must be due to a jump in y
0
only. The reason is that if the jump is associated to
y(x), then y
0
(x) will have an infinite jump at x
0
due to the definition of y
0
(x
0
)
y
0
(x
0
) = lim
h!0
y(x
0
+ h) ¡ y(x
0
)
h
:
Therefore, y(x) is continuous at x
0
, and y
0
(x) has finite jump at x
0
.
Example 2.6. Let us solve the following initial value problem and draw the solution
y
0
+ y = r(x)
y(0 ) = 0
;
where r(x) is the following piecewise function.
1 1 < x < 2
0 otherwise
:
We solve the problem by two methods
Method I. In the domain x < 1, the equation reads
y
0
+ y = 0
y(0) = 0
;
2.2 Linear piecewise equations 7
and thus y(x) = 0 for x 2(¡1; 1). In the interval x 2(1; 2), the equation reads
y
0
+ y = 1:
Here we need an appropriate initial condition. Note that we can not use the initial
condition y(0) = 0 since the equation is defined for 1 < x < 2 and not at x = 0. We can
assume that the solution y(x) is continuous at x = 1. According with that assumption,
we can write the initial value problem as
y
0
+ y = 1
y(1) = 0
;
and thus y(x) = 1 ¡e
1¡x
. For x > 0, the problem reads
(
y
0
+ y = 0
y(2) = 1 ¡e
¡1
;
which is solved for y(x) = (e
2
¡e) e
¡x
, and fin a lly
y(x) =
8
>
>
<
>
>
:
0 x 1
1 ¡e
1¡x
1 x 2
(e
2
¡e) e
¡x
x 2
2 2 4 6
0
.
3
0
.
6
Method II. The general solution is
y(x) = ce
¡x
+ e
¡x
Z
0
x
r(t) e
x
dx;
and by substituting y(0) = 0, c is determined 0, and thus
y(x) = e
¡x
Z
0
x
r(t) e
t
dt
For x < 1, r(x) = 0 and thus y(x) = 0 for x < 1. For x < 2, we have
y(x) = e
¡x
Z
0
1
r(t) e
t
dt +
Z
1
x
r(t) e
t
dt
= e
¡x
Z
1
x
e
t
dt = 1 ¡e
1¡x
:
8 First Order Equations
For x > 2, the solut ion is
y(x) = e
¡x
Z
0
1
r(t) e
t
dt +
Z
1
2
r(t) e
t
dt +
Z
2
x
r(t) e
t
dt
= e
¡x
Z
1
2
e
t
dt = (e
2
¡e) e
¡x
Finally
y(x) =
8
>
>
<
>
>
:
0 x 1
1 ¡e
1¡x
1 < x < 2
(e
2
¡e) e
¡x
x 2
:
Remark. Re member that the solution to a differential equation is a smooth or continuously
differentiable function. Therefore, the solution of piecewise eq uation s is n o t classical in
technical terms.
2.2.2 Switching circuits
As a simple example, consider the switching circuit shown below
S1
R1
C1R2
V1
Vc
Assume that the switch S
1
connects the circuit at time t
0
. For t > t
0
, let i
1
denote the
electrical current in the re sistor R
1
. According to the Kirchhoff's nodal law, we can
write i
1
= i
2
+ i
c
, where i
2
; i
c
are electrical currents in the resistor R
2
and the capacitor C
respectively. For t < t
0
, there is no current in R
1
and thus i
2
+ i
c
= 0. On the other hand,
the Kirchhoff's mesh law states V
R
2
= V
c
, where V
R
2
; V
c
are the voltages across R
2
and C
respectively. Now, we can obtain the equation for t < t
0
where the switch S
1
is off. Due to
relations i
c
= C
dV
c
dt
and V
R
2
= i
2
R
2
, we get i
2
=
V
c
R
2
, and hence
V
c
R
2
+ C
dV
c
dt
= 0:
Therefore, we derive the following equation for t < t
0
:
dV
c
dt
+
1
R
2
C
V
c
= 0: (2.7)
For t > t
0
, we have
V
c
R
2
+ C
dV
c
dt
= i
1
; (2.8)
2.2 Linear piecewise equations 9
and by the Kirchhoff's mesh law V
R
1
+ V
c
= V
1
, we obtain i
1
=
V
1
¡V
c
R
1
. Substituting i
1
int o
Eq.2.8 yields
V
c
R
2
+ C
dV
c
dt
=
V
1
¡V
c
R
1
;
and finally
dV
c
dt
+
1
RC
V
c
=
1
R
1
C
V
1
; (2.9)
where
1
R
=
1
R
1
+
1
R
2
. Two e quations (2.7) and (2.9) can be rewritten in the compact form as
follows
dV
c
dt
+ p(t)V
c
= r(t); (2.10)
where
p(t) =
8
<
:
1
R
2
C
t < t
0
1
RC
t > t
0
; r(t) =
(
0 t < t
0
1
R
1
C
t > t
0
:
Notice that in the above equation, functions p; r are piecewise functions. Let us solve t he
equation if the initial condition V
c
(0) = V
0
is given. For t < t
0
, the solution is
V
c
(t) = V
0
e
¡
t
R
2
C
:
For t > t
0
, the appropriate initial condition is the va lue o f V
c
(t
0
). This value is provided by
the solution for t < t
0
, that is, V
c
(t
0
) = V
0
e
¡
t
0
R
2
C
. To solve Eq.(2.9) with V
c
(t
0
), we apply the
formula for linear differential equations and obtain
V
c
(t) = V
0
e
¡
t
0
R
2
C
e
¡
(t¡ t
0
)
RC
+ e
¡
(t¡ t
0
)
RC
Z
t
0
t
e
(x¡ t
0
)
RC
V
1
R
1
C
dx:
If V
1
is a constant value, then V
c
is after some straightforward simplifications
V
c
(t) = V
0
e
t
0
R
1
C
e
¡
t
RC
+
RV
1
R
1
1 ¡e
¡
(t¡ t
0
)
RC
:
Note that V
c
(t) i s continuous at t
0
but not differentiab le at this point. Observe also the
property
lim
t!1
V
c
(t) =
R
R
1
V
1
=
R
2
R
1
+ R
2
V
1
;
that means capac itor C acts like an open c ircuit in long term.
2.3 Bernoulli and Riccati equ ations
These are two important nonlinear first-order equations that can be transformed to linear
one after an algebraic transformation.
10 First Order Equations
2.3.1 Bernoulli equations
The standard form of a Bernoulli's equation is
y
0
+ p(x) y = r(x) y
α
y(x
0
) = y
0
; (2.11)
where α =/ 0; 1. Note that the equation is linear for α = 0; 1. Furthermore, if y
0
= 0, then
y(x) = 0 is the solution to the equation. In fact, y = 0 is an equilibrium of the equation.
Therefore, we assume y
0
=/ 0 as well.
The general method to solve the equation suggested by G. Wilhelm Leibniz i s as
follows. we divide the equation by y
α
(remember th a t y
0
is non-zero and thus y(x) is nonze ro
in an open interval around x
0
) and obtain
y
¡α
y
0
+ p(x) y
1¡α
= r(x): (2.12)
Let u(x) be the f unction u = y
1¡α
, and thus u
0
= (1 ¡ α)y
¡α
y
0
. Therefore we obtain the
following equation for u
(
u
0
+ (1 ¡α)p(x) u = (1 ¡α)r(x)
u(x
0
) = y
0
1¡α
: (2.13)
This problem is linear in u and can be solved by the method presented above. Once u(x) is
determined, the true solution y(x) is derived by the relation y = u
1/1¡α
.
Example 2.7. Consider the equation
(
y
0
¡4xy = 4x y
p
y(0 ) = 4
:
Here y(0) = 4 > 0 and thus y(x) remain positive in an interval around x
0
= 0. By dividing
the equation by y
1/2
we obtain
y
¡1/2
y
0
¡4xy
1/2
= 4x;
and for u = y
1/2
we obtain u
0
=
1
2
y
¡1/ 2
y
0
. Substituting u a nd u
0
int o the equation leads
u
0
¡2xu = 2x
u(0) = 2
:
The obtained equation is solved for u = 3e
x
2
¡ 1. Since y = u
2
, we obtain the solution
y = (3e
x
2
¡1)
2
. Observe th a t the interval for the solu tion is I = (¡1; 1).
Example 2.8. We solve the following initial value problem
(
xy
0
¡y = ln(x) y
2
y(1) =
1
2
:
First we write the equation in the standard form
y
0
¡
1
x
y =
1
x
ln(x) y
2
:
2.3 Bernoulli and Riccati equations 11
Dividing the equation by y
2
leads to
y
¡2
y
0
¡
1
x
y
¡1
=
1
x
ln(x):
We take u = y
¡1
to write the equation as
(
u
0
+
1
x
u = ¡
1
x
ln(x)
u(1) = 2
;
which is a linear equation. The solution to the ab ove problem is u = x
¡1
¡ ln(x) + 1, and
thus y is
y(x) =
x
x + 1 ¡xln(x)
:
The solution goes unbounded at x
=
3.59 and thus the domain of the solution i s I = (0; 3.59).
Although, the solution y(x) is not defined a t x = 0, it has limit at this point. The graph of
the solution in the interval (0; 3.59) is shown below.
1 2 3
y
(
x
)
x
2.3.2 Riccati equation
The general form of a Riccati equation is
y
0
= a(x)y
2
+ b(x)y + c(x): (2.14)
The impo rtant point is that there is no standard method to solve the equation in gen eral.
However, if a s o lution to the equation is known, the general solution can be obtained by
a simple trick. Assume that y
1
is a particular solution of the equation. Let us write the
general solution as y = y
1
+ v(x) for an undetermined function v(x). By substituting y into
the equation, we reach the following equation which is a Bernoulli equation
v
0
¡(2a(x)y
1
+ b(x))v = a(x)v
2
: (2.15)
Example 2.9. It is simply verified that the function y
1
= x is a so lution to the equation
y
0
= y
2
¡2xy + x
2
+ 1:
Substitution y = x + v(x) leads to v
0
= v
2
with the solutio n v = ¡
1
x + c
and thus
y(x) = x ¡
1
x + c
:
12 First Order Equations
Problems
Problem 2.1. Find the solution to each of the following problems and determi ne the domain of the
definition for each solution:
i. y
0
+ y = 2xe
¡x
, y(0) = 1
ii. xy
0
+ 2 y = e
x
2
, y(1) = 0
iii. sin(x)y
0
+
1
2
sin(2x)y =
1
3
sin(3x), y(π /2) = 1
iv. y
0
+
1
x + 1
y = e
x
, y(0) = 0
Problem 2.2. Write the general solution to the following equations
i. y
0
+ tan(x)y = cos
2
(x).
ii. y
0
+ (tan(x) + cos(x))y = cos
2
(x).
iii. xy
0
¡2 y = xln(x).
iv. xy
0
+ 3y = 3 x
2
¡2x
v. xy
0
¡(x ¡3)y =
x + 1
x
2
Problem 2.3. Consider the initial value problem the following problem
(
(1 + t
2
)y
0
+ 2ty = r(t)
y(0) = 1
;
where r(t) =
0 t < 1
1 t > 1
. There is a jump in y
0
(t) at t = 1, however, the solution is continuous. Find a
continuous solution to the equation that is differentiable everywhere except at t = 1.
Problem 2.4. Solve the following initial value problem and draw the solution
y
0
+ y = r(x)
y(0) = 1
;
where r(x) is the following piecewise function.
1 1 < x < 2
0 otherwise
:
Problem 2.5. Solve the following piecewise problem and draw the solution:
y
0
+ p( x) y = ¡p(x)
y(0) = 1
;
where
p(x) =
0 x 1
1 x > 1
:
Problem 2.6. Solve the following initial value problem and draw the solution
y
0
+ p(x)y = r(x)
y(0) = 0
where p (x) is the function
p(x) =
1 x 3
¡1 x > 3
;
and r(x) is
r(x) =
1 x > 1
0 x 1
:
2.3 Bernoulli and Riccati equations 13
Problem 2.7. Find the solution to the following problems
i. y
0
+ y + y
2
= 0, y(0) = 2
ii. y
0
+ y = x y
p
, y(0) = 1
iii. y
0
¡2xy = xy
2
, y(0) = ¡1
iv. 2 sin(x) y
0
¡cos(x) y + sin
2
(x) y
3
= 0, y(π /2) = 1
v. 2 cos(x)yy
0
¡sin(x)y
2
= cos (x ), y(0) = ¡1
vi. x
2
y
0
+ 2xy ¡ y
3
= 0, y(1) = 1
Problem 2.8. Solve the following problem and draw the solution
(
y
0
+ y = r(x)y
2
y(0) = 1
;
where r(x) is
r(x) =
1 x < 1
0 x > 1
:
Problem 2.9. Solve the following problem and draw the solution
(
y
0
+ p(x)y = y
p
y(1) = 1
;
where p (x) is
p(x) =
1 x < 2
¡1 x > 2
:
Problem 2.10. (variation of parameter method) If r 0 in Eq2.2, then the solution of the equation
is
y(x) = ce
¡
R
p(x)
: (2.16)
Now assume that r is not identically zero. We solve the equation by the method of variation of parameter.
For this, assume that c is a fu nction of x, i.e.,
y(x) = c(x) e
¡
R
p(x)
:
Substitute y(x) into the equation and nd an expression for c(x).
Problem 2.11. Rewrite the following equation a s a linear equation with respect to x = x(y)
(p(y) x + q(y))y
0
= r(y);
Use this idea to solve the following equations
i. (x¡y
2
)y
0
= y
ii. (x
2
+e
y
)y
0
=x:
Problem 2.12. Consider the following problem
(
y
0
¡ay = e
bx
y(0) = y
0
:
i. Show that the problem has the following solution
y(x) = e
ax
y
0
+
8
<
:
e
bx
¡ e
ax
b ¡ a
b =/ a
xe
ax
b = a
: (2.17)
14 First Order Equations
ii. In the above solution, assume that b is a free parameter and let b !a. Fin d the limit and show
that the limit function is the solution when b =a, ( the result implies that the solution is continuous
with respect to b).
Problem 2.13. Consider the equation
y
0
+ ay = f (t)
y(0) = y
0
;
where a > 0 is a constant and f(t) is a continuous function and
lim
t! 1
f(t) = 0:
Show that regardless of y
0
, the s olution satisfies the relation
lim
t! 1
y(t) = 0
Problem 2.14. Suppose that a > 0, and f is a bounded function; that is, max
x
jf (x)jM. Prove: there
is a unique initial condition y(0) = y
0
such that the solution of the following IVP remain bounded
y
0
¡ay = f (t)
y(0) = y
0
:
hint: take the initial co ndition as follows and show the so lution of t he above IVP is bounded
y(0) = ¡
Z
0
1
e
¡at
f(t) dt;
Show also that if f is periodic then the bounded solution is periodic.
Problem 2.15. Let a > 0 and f(t)
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
t!1
b. Prove that there is a unique bo unded solution to the
equation ty
0
¡ay = f (t) f or t 2(0; 1).
2.4 General rst-order equat ions
We consider general rst-order equations of the following form
M(x; y) dx + N(x; y) dy = 0: (2.18)
Note that the above differential fo rm is equivalent to the derivative f o rm y
0
= f (x; y), where
f(x; y) = ¡
M(x; y)
N(x; y)
.
2.4.1 Exact equations
The Eq.2.18 is called exact in an open domain D R
2
if the left-hand side of the equation
is the total differential of some function φ(x; y) in D, i.e,
M(x; y) dx + N (x; y) dy = dφ(x; y);
for all (x; y)2D. Remember that the total differential of a scalar function φ(x; y) is defined as
=
@x
dx +
@y
dy;
2.4 General first-order equations 15
and therefore, the form Mdx + Ndy is exact in D if
M(x; y) =
@x
(x; y); N(x; y) =
@x
(x; y);
for all (x; y) 2D.
Remark. If we write the differential equation in the derivative form as
dy
dx
= ¡
M(x; y)
N(x; y)
;
then we should assume N(x; y) is non-zero in D, otherwise the differential equation does not
make sense.
2.4.2 Solution of an exact equation
If we know the potential φ of an exact equation Mdx + Ndy = 0, then the solution is simply
obtained by the integration of equation = 0 and thus
φ(x; y) = φ(x
0
; y
0
);
where y(x
0
) = y
0
is an initial condition f o r the equation.
Example 2.10. Consider the following problem
(
(2x + y
2
) dx + (2xy + 1) dy = 0
y(0 ) = 1
:
It is simply verified that φ = x
2
+ xy
2
+ y + c is a potential of the equation, and thus the
solution is φ = const:, and by applying the initial condition, we obtain the following solution
x
2
+ xy
2
+ y = 1:
Note tha t N(x; y) = 2xy + 1 is not zero at (0; 1) as well. The graph of the solution is a curve
in the (x; y)-plane that is called the integral curve of the differential equation because it is
obtained by the integration of the differential equation.
The solution of exact equations is usually in implicit f o rm and needs to be verified that
y(x) can be defined explicitly in an open interval containing x
0
. The following theorem gives
a sufficient condition for the existence of such a function.
Theorem 2.1. (Implicit function theorem) Consider the implicit function f(x; y) = 0,
and assume that f (x
0
; y
0
) = 0 for some (x
0
; y
0
). If f and its partial derivatives
@f
@x
;
@f
@y
are
continuous in an open set D around (x
0
; y
0
), and furthermore
@f
@y
(x
0
; y
0
) =/ 0, then there is
an open interval I = (x
0
¡δ; x
0
+ δ) and a continuous function y = y(x), such that y(x
0
) = y
0
,
and f(x; y(x)) = 0 for all x 2I.
Example 2.11. (Continue) For the above example, let us f be
f(x; y) := x
2
+ xy
2
+ y ¡1:
16 First Order Equations
Obviously, f is well-defined on any neighborhood of (0; 1) in the (x; y)-plane, f(0; 1) = 0,
and furthermore
@f
@y
(0; 1) = 1 =/ 0;
and thus the conditions of the implicit function theorem are satisfied. The g raph of the
solution is shown below. As it is seen, the acceptable domain for the solution is I = (¡0.27;
1.11) where the tangents at the e nd points go unbounded. The red points on the grap h a re
points at which the coefficient term N(x; y) become zero and thus y
0
= ¡
M
N
goes unbounded.
The black point is the initial value of the problem. Note that in this interval, y can be
expressed as an explicit function y = y(x). This explicit function is the solution to the initial
value problem.
0
.
5 0
.
0 0
.
5 1
.
0 1
.
5
1
0
1
2
x
=
0
.
27
x
= 1
.
11
Remark. Since
@f
@y
(x
0
; y
0
) = N (x
0
; y
0
), thus the c ondition of exactness and N (x
0
; y
0
) =/ 0
guarant ees the existence of an explicit solution in an open interval of x
0
.
2.4.3 Phys ical interpre tation
Remember that a force field f
~
is called conservative if there is a potential functions V such
that f
~
= ¡rV . Now, if we interpret f
~
= ¡
M(x; y)
N(x; y)
as a force field in th e (x; y)-plane, and if
Mdx + Ndy is the differential of φ(x; y), then f
~
= ¡rφ. What is conserved in a conservative
force fiel d? If a mass-body with mass m is moving under the influence of f
~
along path γ,
then the total energy of the mass
E(t) =
1
2
m jvj
2
+ φ(x; y);
is conserved along γ as shown simply by the calculation
dE
dt
= v:
m
dv
dt
+ rφ
= v:
m
dv
dt
¡f
~
= 0:
If a conservative force filed f
~
(x; y) is smooth in a simple domain D R
2
, then its line integral
is independent of the path of integration on all paths in D as t he following computations show
Z
t
0
T
fM(γ(t)) x
0
(t) +N(γ(t)) y
0
(t)gdt = ¡
Z
t
0
T
φ
0
(x(t); y(t)) dt =
=¡φ(x(T ); y(T )) + φ(x(t
0
); y(t
0
)):
2.4 General first-order equations 17
Remember that the line integral of a force field is called the work W done by that force, and
for conservative force fields, it is equal to the changes in the potential. Therefore, the solution
φ(x; y) = c o f an exact equ ation Mdx + Ndy = 0 defines eq uipotentia l curves of the equation.
2.4.4 A comment on the exactness
Theorem 2.2. Assume that there is an open rectangle D of (x
0
; y
0
) in the (x; y)-plane such
that functions M ; N are continuously differentiable in D and furthermore
@M
@y
(x; y) =
@N
@x
(x; y);
for all (x; y) 2D, then there is a potential φ(x; y) for the form Mdx + Ndy.
Proof. Let γ is any arbitrary closed curve in D and thus by Green's theorem, we have
I
γ
Mdx + Ndy =
ZZ
@N
@x
¡
@M
@y
dA = 0;
where is the doma in inside of γ. Therefore, the integration is independent of the path of
integration. Now, fix (x
0
; y
0
) 2D, and for arbitrary (x; y) 2D, we defined
φ(x; y) =
Z
x
0
x
M(t; y
0
)dt +
Z
y
0
y
N(x; t)dt:
Note that φ is the line integral of the fo rm on the path γ
1
: (t; y
0
) for t 2(x
0
; x), and γ
2
: (x; t)
for t 2(y
0
; y). Beca use of the independence of path, φ is uniquely defined for all (x; y) 2D.
γ
2
D
γ
1
y
(x; y
0
)
(x
0
; y
0
)
(x; y)
x
Note that
@y
= N(x; y), and
@x
= M(x; y
0
) +
Z
y
0
y
@N
@x
(x; t) dt:
By the relation
@N
@x
(x; t) =
@M
@t
(x; t);
we obtain
@x
= M(x; y
0
) +
Z
y
0
y
@N
@x
(x; t) dt = M(x; y
0
) +
Z
y
0
y
@M
@t
(x; t) dt = M (x; y);
and this completes the proof.
18 First Order Equations
2.4.5 Two methods of solutions
If the equation Mdx + Ndy = 0 is exact, then there are two equivalent methods to determine
the potential φ(x; y).
1. (Definite integration) We use the above theorem to find the potential
φ(x; y) =
Z
x
0
x
M(t; y
0
)dt +
Z
y
0
y
N(x; t)dt:
Example 2.12. Let us solve the following initial value problem
(
(2x + y
2
) dx + (2xy + 1) dy = 0
y(0 ) = 1
:
The above formula gives
φ =
Z
0
x
(2t + 1) dt +
Z
1
y
(2xt + 1) dt = x
2
+ xy
2
+ y ¡1;
and thus the solution to the equation is
x
2
+ xy
2
+ y ¡1 = 0:
Example 2.13. Let us solve the problem
ye
xy
+ 1 + (xe
xy
+ cos(y))y
0
= 0
y(0) = 0
The integral formula gives
Z
0
x
dt +
Z
0
y
(xe
xt
+ cos t) dt = x + e
xy
¡1 + sin(y) = 0:
The figure (2.2) shows the graph of the sol ution. The domain of the solution is shown
by the blue line where the implicit solution can be solved explicitly for y. Note that
at the b o undary point of the blue line, the slope of the solution, y
0
, goes unbounded.
4
2 2
4
2
2
acceptable solution
Figure 2.2.
2.4 General first-order equations 19
2. (Indefinite integral) Let us illustrate this method by solving the following example
(2x + y
2
) dx + (2xy + 1) dy = 0:
Let φ be the potential, therefore
@x
= 2x + y
2
, and thus
φ =
Z
(2x + y
2
) dx = x
2
+ xy
2
+ g(y);
where g(y) plays the role of the constant for the indefinite integral. Therefore,we need
to determine g(y) as well. By the relation
@y
= 2xy + 1, we reach
2xy + g
0
(y) = 2xy + 1;
and thus g
0
(y) = 1, or g(y) = y + c. Finally, the solution is
x
2
+ xy
2
+ y = c:
Example 2.14. Consider the following initial value problem
(ye
xy
+ 1) dx + (xe
xy
+ cos(y)) dy = 0 (2.19)
Here M is ye
xy
+ 1, and thus
φ =
Z
(ye
xy
+ 1) dx = e
xy
+ x + g(y):
To determine g(y), we use th e relation
@
@y
(e
xy
+ x + g(y)) = N(x; y) = xe
xy
+ cos(y);
and thus g = sin(y) + c. Finally, the solution is
e
xy
+ x + sin(y) = c:
The following figure show s few integral curves of th is problem.
3
1 1 3
4
2
0
2
2.4.6 Two i mportant types of ex act equations
1. (Separable equations) The general form of a s ep arable equation is a s follows
N(y)y
0
+ M(x) = 0;
20 First Order Equations
or equivalently in the differential form N (y)dy + M (x)dx = 0 where M ; N are are
continuous functions in an open domain in the (x; y) plane. Obviously, M ; N satisfies
the condition for exactness. Similarly, the initial value problem
N(y) y
0
+ M(x) = 0
y(x
0
) = y
0
; (2.20)
is exact if and only if M ; N are continuous in an open set D around (x
0
; y
0
), and
N(y) is nonzero in D. The solution to the above initial value is as follows
Z
x
0
x
M(t) dt +
Z
y
0
y
N(t)dt = 0:
Example 2.15. Consider the following initial value problem
(
y
0
= ¡
y tanx
1 + y
y(0 ) = 1
:
Notice that y(0 ) =/ 0 and then it can be w ritten in the separable form as follows
1 + y
y
y
0
= ¡tanx:
Now, the solution is
Z
1
y
1 + t
t
dt = ¡
Z
0
x
tan(t) dt;
that gives
lnjyj+ y ¡1 = lnjcos(x)j:
Since y
0
= 1 > 0 and cos(0) = 1 > 0, it is safe to remove the absolute value sign and
write the solution as y + ln(y sec(x)) = 1 in the domain I =
¡
¡π
2
;
π
2
. The graph of
the solution is shown in the figure (2.3). Observe that the curve passes through the
initial point (0 ; 1 ) and that y
0
(x) goes unbounded when x !±
π
2
.
1
2
π
1
4
π
1
4
π
1
2
π
(0
,
1)
Figure 2.3.
Example. Consider the e quation xy
0
= 1 + y
2
.
a. Find the general solution to the equation.
2.4 General first-order equations 21
b. Find the solution to the problem
(
xy
0
= 1 + y
2
y(1 ) = 1
:
To solve part a), we write the equation in the standard form
dy
1 + y
2
=
dx
x
:
Integrating both sides of the equation gives the general solution tan
¡1
(y) = lnjxj+ c.
To solve part b), we apply the initial cond ition that determines c =
π
4
. Since x
0
= 1 > 0,
we can safely remove the absolute value sign and write
y = tan
π
4
¡ln(x)
:
Example 2.16. Let us solve the following non-smooth problem
y
0
= y jyj+ 1
y(0) = 1
:
Since y
0
= 1 > 0, we expect that the solution remains positive in an interval around
x
0
= 0. Thus we assume first y > 0, and solve the following problem
(
y
0
= y
2
+ 1
y(0) = 1
:
This is a separable equation with the solution φ
1
(x)= tan
¡
π
4
+x
. Clearly, the solution
remains positive in the interval
¡
¡
π
4
;
π
4
, (notice that the solution g oes unbounded at
x=
π
4
). Now, le t us solve the problem for x <
¡π
4
. Note that y
¡
¡
π
4
=0 and y
0
¡
¡
π
4
=1.
This implies that y(x) is negative in an interva l on the left side of x =
¡π
4
. The e quation
in this interval reads
(
y
0
= ¡y
2
+ 1
y
¡
¡
π
4
= 0
:
The equation is solved for φ
2
(x) =
e
2(x+π/4)
¡1
e
2(x+π/4)
+ 1
= tanh
¡
x +
π
4
. Thus the solution to
the given problem is
y =
8
<
:
tan
¡
x +
π
4
x 2
¡
¡π
4
;
π
4
tanh
¡
x +
π
4
x <
¡π
4
:
2. (Homogeneous equations) The general form is
y
0
= f
y
x
;
22 First Order Equations
for some continuous function. The equation is not exact in its original form, however,
if we define a new variable u =
y
x
, then the equation reduces to the following one for
u(x)
xu
0
= f(u) ¡u; (2.21)
that is separable, and thus integrable.
Case 1. If u
0
is a root of f(u) ¡ u, then u = u
0
is a trivial solution to (2.21), and
therefore y = u
0
x is a solution to the original equation.
Case 2. If f(u) ¡ u =/ 0, the general solution is derived by the integrating of the
following equation
du
f(u) ¡u
=
dx
x
:
Example 2.17. Solve the initial value problem
(
y
0
=
y(y + 2x)
x
2
y(2 ) = 2
:
Observe that the equation is homo g en eous. Taking y = xu leads to
xu
0
= u(u + 1)
u(2) = 1
:
Since the right hand side of the above equation is nonzero around the initial value
u = 1, we can rewrite the equation in the separable fo rm
du
u(u + 1)
=
dx
x
;
and thus u(x) =
x
c ¡x
, that yields y =
x
2
c ¡x
. Applyi ng the initial condition determines
c = 4 and therefore y =
x
2
4 ¡x
: Observe that the solution has the vertical asymptote
x = 4 . Thus the interval o f the solution, regarding the initial point x
0
= 2, is I = (¡1;
4). The solution has the inclined asymptote y = ¡x ¡4 when x !¡1.
-8 -4 4
y
(
x
) =
x
2
4
x
Problems
Problem 2.16. For each of the f ollowing scalar functions, find the total differential at the given points
a) ' = sin(xy) + x
2
+ y
2
at (1; π)
2.4 General first-order equations 23
b) ' = e
x+y
+ xy at (0; 1)
Problem 2.17. For each of the following differential forms, determine whether it is exact or no t. If it
is exact find its general potential
a) y dx + (y + x) dy
b) (x ¡ y) dx + (y + x) dy
c) (2xy
2
+ y) dx + (2x
2
y + x) dy
Problem 2.18. D etermine the domain in which the following initial value problems are exact
a)
¡
1
2
y
2
+
1
2
x
2
¡1
dx + (xy ¡1) dy = 0, y(1) = 2
b) (2xy + x
2
+ 1) dx + (x
2
+ 4y
2
¡1) dy = 0, y
¡
1
2
= 0
Problem 2.19. Consider the implicit function y
2
+ y(x
2
¡1) + x
2
= 0.
a) Use the implicit differentiation and nd the slo pe of tangent line at t he point (0; 0) on the graph
of the cur ve.
b) By the implicit f unct ion theorem, determin e an interval around x
0
= 0 such that the implicit
function can be solved for y in that interval (hint: find the equation for which the slope become
infinity. Substitute the obtained equation into the implicit function and determine the interval
around x
0
= 0 for which the slope is not infinity).
Problem 2.20. Write the general solution to the following equations
i. (3y
3
e
3xy
¡1) dx+e
3xy
(2y +3xy
2
) dy = 0
ii. (y + x sin(x)) dx + (e
y
+ x)dy = 0
iii. (xe
2x
2
+y
2
+ 2
¡x
) dx +
¡
1
2
ye
2x
2
+y
2
+ sin
¡1
y
dy = 0
iv. (y sin(xy) + 3
¡x
) dx +
x sin(xy) ¡ 9 ¡4y
2
p
dy = 0
Problem 2.21. Solve the following problems
i. sin(y) cos(x) dx + sin(x) cos(y) dy = 0, y(π /2) = π /4
ii. ye
xy
dx + (1 + xe
xy
) dy = 0, y(0) = 1
iii. (1 + x)e
x
ydx + (xe
x
+ 2)dy = 0, y(0) = 1
Problem 2.22. Assume that the funct ion f (x; y) satisfies the relation f(λx; λy) = f (x; y). Show that
there is a function g such that f (x; y) = g(y /x).
Problem 2.23. Find the solution to the following problems and draw the solution curves in their domain
of definition.
i. cos(x)y
0
+ y
2
= 0, y(0) = 1
ii. y
0
¡(1 + y
2
)xe
x
= 0, y(0) = ¡1
iii. ln(cos(x)) y
0
¡tan(x) cot(y) = 0, y(π /4) = π /4
iv. (1 + x
2
)y
0
=2xy ln(y), y(0) = e
Problem 2.24. Write the general solution to the following equations
i. y
0
= (tan(x) + cos(x))cot(y)
ii. 3xyy
0
+ 4y
2
= 1
iii. (1 + x
2
) yy
0
= (1 + y
2
) x
24 First Order Equations
Problem 2.25. Solve the following problem
(
y
0
= 1 + jyj
p
y(0) = 1
:
Problem 2.26. Find a transformation to r educe the equation
y
0
= f (ax + by + c);
to a separable one and then solve the following problems
i. y
0
= (4x + y)
2
, y(1/2) = ¡2
ii. y
0
= ¡1 + 2(2x + y) + (2x + y)
2
, y(0) = 0
iii. y
0
= tan
2
(y ¡x), y(0) = 0
Problem 2.27. Find lim
x! 1
y(x) if y(x) is the s olution to the following problem
(
x
2
y
0
= (1 + y
2
)
y(1) = 0
:
Problem 2.28. Solve the following problems
i. xy
0
= x + y + xy
p
, y(1) = 1
ii. xy
0
= y + x cos
2
¡
y
x
; y(1) = 0.
iii. xy
0
¡y = x sec(y /x), y(1) =
π
2
iv. xyy
0
= (x
2
+ 2y
2
), y(1) = ¡1
Problem 2.29. Determine values of y
0
for which the solution to the following problem approaches zero
when x !1
xy
0
= y(ln(y) ¡ln(x) + 1)
y(1) = y
0
:
Problem 2.30. Solve the following equations by suggested substitutions:
i. y
0
= (y ¡x )
2
; v = y ¡x
ii. xy
0
= e
¡xy
¡y; v = xy
iii. y
0
= (x + y ¡1)
2
¡(x + y + 1)
2
; v = x + y
Problem 2.31. E qua tions of the form
y
0
= f
ax + by + e
1
cx + dy + e
2
;
for ad ¡ bc =/ 0 can be transformed to a separ ab le equation by a simple trick. Shift axes x, and y by
x = X + α and y = Y + β for some (unknown yet) constants α, β. Substitution into the equation gives
Y
0
= f
aX + bY + + + e
1
cX + dY + + + e
2
: (2.22)
Now determine α, β such that
+ + e
1
= 0
+ + e
2
= 0
:
Use this trick to solve the following problem
y
0
=
x + 2y
2x
2
; and y(1) = 1:
2.4 General first-order equations 25
2.4.7 Non-exact equations and inte grating factor
It frequently occurs that a given equation is not exact. In this case, we try to find an
integrating factor to male the equation exact while the solution of the original equation is
unchanged. For example, a first order linear equation
y
0
+ p(x)y = r(x);
that can be rewritten as the differential form
dy + (p(x)y ¡r(x)) dx = 0;
is not exact. Similarly, the B ernoulli's equation
dy + y(p(x) ¡r(x)y
α¡1
) dx = 0;
is not exact. We saw before that to solve a linear equation, we should multiply it with the
integrating factor µ(x) = e
Z
p(x)
. In fact, if we do that, we obtain th e equation
e
Z
p(x)
dy +
p(x) e
Z
p(x)
y ¡r(x)e
Z
p(x)
dx = 0;
which is evidently exact. For a second example, consider the following equation
xydx+(x
2
+ y) dy = 0:
Clearly the equation is not exact, but if we multiply it by I(x; y) = y, we reach the following
equation which is exact
xy
2
dx + (x
2
y + y
2
) dy = 0:
But, how in general can we solve the equation
M(x; y) dx + N(x; y) dy = 0;
if it is non-exact? In this section we answer that question. We start off by a definition.
Definition 2.1. The function µ(x; y) is called an integrating fa ctor for the problem
M(x; y)dx + N(x; y)dy = 0
y(x
0
) = y
0
; (2.23)
if there exists a domain D around (x
0
; y
0
) such that
i. µ(x; y) =/ 0 for (x; y) 2D
ii. and that the problem µ(x; y)M(x; y)dx + µ(x; y)N(x; y) dy = 0 is exact in D.
2.4.8 Derivat ion of the integrating factor
If the equation
µ(x; y)M (x; y) dx + µ(x; y)N (x; y)dy = 0;
26 First Order Equations
is exact, then the following relation holds
M
@y
+ µ
@M
@y
= N
@x
+ µ
@N
@x
: (2.24)
This is a partial differential equation for I which we study in great detail in the second
volume of this book. In order to solve it here, we consider spac ial cases w he re the solution
to the partial differential equation are significantly simplified.
Case 1. If µ = µ(y), then (2.24) reduces to the following ordinary equation
µ
=
1
M
@N
@x
¡
@M
@y
dy: (2.25)
Since the left hand side is a function of y, the assumption µ = µ(y) is valid if and
only if the right hand side of (2.25) is a function of y. For example, for the equation
xydx + (x
2
+ y) dy = 0 , we have
µ
=
dy
y
and thus µ = y is an integrating factor of the
equation.
Case 2. If µ = µ(x), then (2.24) reduces to
dµ
µ
=
1
N
@M
@y
¡
@N
@x
dx: (2.26)
Since the left hand side is a function of x, the assumption µ = µ(x) is valid if and
only if the right hand side of (2.26) is a function of x. For example, for the e quation
(xy + 1)dx + x(x+ y)dy =0, we have
µ
=¡
dx
x
and thus µ =
1
x
is the integrating factor.
The above two cases are only simplest instances of mo re general forms. For example, the
integrating factor may have type s µ = µ(xy), µ = µ
x
y
, µ = µ(ax + by), and so on. For
example, let us find a condition for the integrating factor of the form µ = µ(xy). If we take
z = xy, then
@x
= y
dz
;
@y
= x
dz
;
and this transforms the equation (2.24) to the following one
µ
=
1
xM ¡yN
@N
@x
¡
@M
@y
dz:
The assumption µ = µ(xy) is true if and only if the expression in the right hand side is a
function of z = xy.
Example 2.18. Let us solve the following equation by assuming µ = µ(xy):
(2x cos(y) ¡xy sin(y)) y
0
+ 2y cos(y) =0:
It is simply seen that
µ
=
1
z
dz;
2.4 General first-order equations 27
for z = xy. Therefore µ = xy makes the equation exact.
2.4.9 Lagrange equations
The general form of the equation is a follows
y = xf (y
0
) + g(y
0
): (2.27)
As it is observed, it can not be put in the usual differential form Mdx + Ndy = 0.
Example 2.19. We look for the shape of a mir ror with the following property. A ll light
rays coming from a distant source are reflected to a focal point; see the figure (2.4).
φ
x
φ
φ
x
y
Figure 2.4.
It is simply seen from the figure in the right that tan(2φ) = y / x. From the relation
y
0
= tanφ and the identity tan(2φ) =
2tanφ
1 ¡tan
2
φ
, we obtain the following differential equation
for the mirror:
y = x
2 y
0
1 ¡ y
0
2
: (2.28)
This is a Lagrange equation.
To solve (2.27), we look for a sol ution of the parametric form
x = x(p)
y = y(p)
; (2.29)
where p is a parameter. Remember that the solution to a differential equation is a family of
planar curves, and a curve s can be written as p a rametric as (2.29). If we take p = y
0
for the
parameter, we simply obtain
y(p) = x(p) f(p) + g(p): (2.30)
The remaining j o b is to find x = x(p). For this, we take derivative of (2.27) with respect to
p and use the identity
dy
dp
=
dy
dx
dx
dp
= p
dx
dp
: (2.31)
In this manner, we obtain
dy
dp
= f(p)
dx
dp
+ f
0
(p) x + g
0
(p); (2.32)
28 First Order Equations
that leads to the following linear first o rder equation for x
(p ¡f(p))
dx
dp
¡f
0
(p) x = g
0
(p): (2.33)
If x = '(p) is a solution to (2.33), then the parametric solution is
x = '(p)
y = '(p) f(p) + g(p)
(2.34)
Example 2.20. To so lve (2.28), let us take y
0
= p as a free parameter and write the equation
in the form y = x
2p
1 ¡ p
2
. The differential equation for x(p) is
¡p
dx
dp
=
2x
1 ¡ p
2
; (2.35)
that is solved for x =
1 ¡ p
2
p
2
. The parametric solution to the equation is
8
<
:
y(p) =
2
p
:
x(p) =
1
p
2
¡1
: (2.36)
Eliminating p f rom the above solution gives the algebraic shape of the mirror x =
1
4
y
2
¡1,
that is a parabola.
Problems
Problem 2.32. Integrate the following equations with the given integrating factor
i. (2xy ¡5 y
2
) +(1 ¡5xy) y
0
= 0, I = I(y)
ii. (x
2
y + 4) ¡x
2
(y ¡x) y
0
= 0, I = I(x)
iii. 2xylnjyj+(x
2
+ y
2
sin(y
2
)) y
0
= 0, I = I(y)
iv. y ln(y)(1 + x) + x(1 + ln(y)) y
0
= 0, I = I(x)
v. (xy + 1) + x(x + y)y
0
= 0, I = I(x)
vi. (xe
y
¡1) +(ye
¡x
+ 1) y
0
= 0, I = I(x ¡ y)
vii. (x
2
+ xy + 1) +(y
2
+ xy ¡1) y
0
= 0, I = I(x + y).
Problem 2.33. Consider the following equation
M(x + y
2
) +2 y y
0
= 0
where M(x + y
2
) is a smooth function with respect to x + y
2
. Prove or disprove: the above equation has
an integrating factor of the type I = I(x + y
2
).
Problem 2.34.
i. For the following equation, obtain conditions under which the equation is exact:
M(x; y; z) dx + N (x; y; z) dy + P (x; y; z) dz = 0:
ii. Obtain conditions such that the above equation ha s an integration factor I = I(x).
iii. Obtain conditions such that the above equation has an integration factor I = I(y).
2.4 General first-order equations 29
Problem 2.35. Integrate the following equations
i. y = 1 + y
0
2
, y(0) = 1
ii. y = e
yy
0
iii. y = xy
0
+
1
y
0
iv. y = xy
0
2
+ y
0
2
Problem 2.36. Show that the parametric solution to the equation x = f(y
0
) is
x = f(p); y =
Z
pf
0
(p) dp:
Solve the following equation
x = y
0
2
(1 + y
0
2
):
Problem 2.37. A fisherman catches a fish at the distance a = 10 in a river.
w
0
fisherman
x
v
0
y
(10; 0)
Figure 2.5.
If the sherman pull th e fish with the constant velo city v
0
= 1 toward himself, and the river velocity
is w
0
= 2 in y-direction; see the figure (2.5), find the equation of the path the fish travels in xy-plane
(the blue line in t he figure).
Problem 2.38. In the above problem, assume that the river velocity is given by the funct ion w(x) =
x(10 ¡x ). Find the equation of path of the fish if v
0
= 5.
2.5 Theory of rst order differential equations
In this section we briefly discuss the elements of the theory of first order differential equa-
tions. Our discussion is about the existence-uniqueness theorem and the Picard's iteration
formula. It is not trivial at all that a given initial value problem admits a solution. For
example, it is simply seen that the fo llowing problem
xy
0
= y
y(0 ) = 1
;
admits no solution, while the problem
xy
0
= y
y(0 ) = 0
;
admits infinitely many solutions y = cx for arbitrary c, and the problem
xy
0
= y
y(1 ) = 1
;
30 First Order Equations
admits only one solution (unique) y = x.
2.5.1 Existence problem
The conditions under which an initial value problem admits at least one solution, is called
the existence problem. We have the following theorem.
Theorem 2.3. (Existence) Consider the following initial value problem
y
0
= f(x; y)
y(x
0
) = y
0
; (2.37)
and assume that there is an open rectangle D centered at (x
0
; y
0
),
D = f(x; y); jx ¡x
0
ja; jy ¡ y
0
jbg; (2.38)
such that f (x; y) is continuous in D. Then there is at least one local solution to (2:37).
Recall that y(x) is a solution to (2.37) if there is an open interval I = (x
0
¡δ; x
0
+ δ) such
that y
0
= y(x
0
) and y
0
(x) = f(x; y(x)) for all x 2I. The rectangle D is called the continuity
rectangle of the problem; see the figure (2.6).
D
(x
0
; y
0
)
R
f: D !R
2a
2b
x
y
Figure 2.6.
The proof of the theorem is beyond the scope of this book and can be found in advanced
textbooks on the theory of ordinary differential equations.
Example 2.21. The existence condition is satisfied for the problem
(
y
0
= 2xy
2
y(0) = 1
: (2.39)
In fact, the function f(x; y) = 2xy
2
, is continuous everywhere in R
2
. It is simply seen that
the fu nc tion y =
1
1 ¡x
2
solves the problem. Note that the domain of the solution (regarding
the initial point x
0
= 0) is I = (¡1; 1). The existence condition is satisfied for the following
problem as well
(
y
0
= y
2
3
y(0) = 0
: (2.40)
2.5 Theory of first order differential equations 31
The function f(x; y) = y
2
3
is continuous everywhere and thus the existence of at least one
solution is guaranteed for the problem. We will see that this problem has infinitely many
solutions (see the problem set). The problem
xy
0
= y
y(0) = 1
; (2.41)
does not satisfy the existence condition and it does not have a solution. In fact the function
f(x; y) =
y
x
, is unbounded in any rectangle about the initial point (0; 1).
Remark 2.1. The theorem s tates only a sufficient condition for the existence of a solution.
The condition may fail for a problem and even it admits a solution. For example, the problem
xy
0
= y
y(0) = 0
; (2.42)
does not satisfy the condition of the existence theorem, however, it has infinitely many
solutions y = cx for all c 2R.
2.5.2 Euler explicit method
Let us show how the existence theorem is justified by the Euler numerical method . For
the sake of simplicity, we assume that x
0
= 0. Let x be a n arbitrary point in the domain of
definition of the solution. Divide the segment [0; x] (if x > 0) into n division with the length
h =
x
n
, and points x
1
; x
2
; ···; x
n
where x
k
= kh. Remember the linear approximat ion formula
for a differentiable function g(x) at x
0
g(t)
=
g(x
0
) + g
0
(x
0
) (t ¡x
0
):
Applying the formula for the soluti o n y(x) at x
1
, gives
y
0
(x
1
)
=
y(0) + y
0
(0)x
1
= y
0
+ f(0; y
0
)h:
Let call this value y
1
, that is, y
1
is an approximate value for true solution y(x) at x = x
1
.
Rep eating that process for x
2
, we get
y(x
2
)
=
y(x
1
) + y
0
(x
1
)(x
2
¡x
1
)
=
y
1
+ f(x
1
; y
1
)h;
and generally for x
k
we derive the general formula
y
k
= y
k¡1
+ f (x
k¡1
; y
k¡1
)h:
In particular for k = n we have
y
n
= y
n¡1
+ f (x
n¡1
; y
n¡1
)h:
Note that y
n
is the a pproximation of the true s o lution y(x). The error between these two
values depends of course to h
e(h) = jy(x) ¡ y
n
j:
Now, if n !1, that is h !0, we have the following result
lim
n!1
jy(x) ¡y
n
j= 0:
32 First Order Equations
Example 2.22. Consider the initial value problem y
0
= y a nd y(0) = y
0
. Obviously, the
problem has the solution y = y
0
e
x
. Let us so lve this problem by the Eul er's method . D ivide
the segment [0; x] into n sub-intervals with the length h =
x
n
. We have
y
1
= y
0
+ y
0
x
n
= y
0
1 +
x
n
: (2.43)
repeating for 2h we have
y
2
= y
0
1 +
x
n
+ y
0
1 +
x
n
x
n
= y
0
1 +
x
n
2
; (2.44)
and for nh, we have
y
n
= y
0
1 +
x
n
n
: (2.45)
Notice that nh = x and if we le t n !1 we obtain
lim
n!1
y
n
= y
0
lim
n!1
1 +
x
n
n
= y
0
e
x
= y(x): (2.46)
Example 2.23. Let us solve the following problem by the Euler's method
y
0
= sin(xy)
y(0 ) = 1
: (2.47)
For h = 0.2, we obtain
y
1
= y
0
+ f(0; y
0
)h = 1:
Likewise we have
y
2
= y
1
+ f(0.2; y
1
)h = 1.04:
The following gure shows the real solution y = φ(x) and the numerical one obtained by the
Euler's method in the range [0; 6].
0
.
0 2
.
0 4
.
0 6
.
0
0
.
5
1
.
0
1
.
5
y
=
φ
(
x
)
numeric
Figure 2.7.
2.5.3 Uniqueness problem
Theorem 2.4. (Uniqueness) If in addition to the existence condition of the problem (2:37),
the function
@f
@y
: D !R is continuous, then the problem has a unique solution.
2.5 Theory of first order differential equations 33
Proof. The proof is based on the integral representation of the initial value problem
y(x) = y
0
+
Z
x
0
x
f(t; y(t)) dt: (2.48)
It is straightforward to verify that the above inte g ral equation is equivalent to the gi ven
initial value problem. Consider a continuity rectangle for the function f as
D := f(x; y); jx ¡x
0
j< a; jy ¡ y
0
j< bg:
Fix x¯ for which a solution exists in the interval [x
0
; x¯]. Assume that there is two solutions
to the problem. Then for any arbitrary x 2[x
0
; x¯], we have
jy
1
(x) ¡ y
2
(x)j
Z
x
0
x¯
jf(t; y
1
(t)) ¡ f (t; y
2
(t))jdt: (2.49)
Since f is continuously differentiable with respect to y, we can write
jf(t; y
1
) ¡ f (t; y
2
)jM jy
1
¡y
2
j; (2.50)
for some M > 0 that is
M = max
y2D
¯
@f
@y
(t; y)
: (2.51)
This implies
jy
1
(x) ¡ y
2
(x)jM
Z
x
0
x¯
jy
1
(t) ¡ y
2
(t)jdt M ky
1
¡y
2
k(x¯ ¡x
0
); (2.52)
where ky
1
¡y
2
k= m a x
c2[x
0
;x¯]
jy
1
(c) ¡y
2
(c)j. Since the above inequality holds for all x 2[x
0
; x¯],
we obtain
max
c2[x
0
;x¯]
jy
1
(c) ¡y
2
(c)jM ky
1
¡y
2
k(x¯ ¡x
0
); (2. 53)
or equivalently
ky
1
¡y
2
kM (x¯ ¡x
0
)ky
1
¡y
2
k:
Now, we can choose x¯ ¡x
0
so small such that M(x¯ ¡x
0
) < 1, and thus if ky
1
¡y
2
k= 0, and
thus y
1
(x) = y
2
(x) for all x 2[x
0
; x¯].
Example 2.24. The uniqueness condition is satisfied for the problem (2.39). In fact, the
function f(x; y) = 2xy
2
and @
y
f = 4xy are both continuous in R
2
and thus the uniqueness
is guaranteed. The uniqueness condition is n o t satisfied for the problem (2.40). In fact, we
have @
y
f =
2
3
y
¡1/3
that is not c o ntinuous in a ny rectangle about the initial point (0; 0). It
is simply verified that functions y = 0 and y =
1
27
x
3
are both solutions to the problem.
34 First Order Equations
Example 2.25. Consider the initial value problem
y
0
= jyj+ 1
y(0 ) = 0
:
Clearly, th e function f (x; y) = jyj + 1 is Lipschitz (with L = 1) but not differentiable at
y = 0. This implies that the problem has a un ique solution. Let us solve the problem directly
and obtain the solution. If y > 0, the problem has the solution y(x) = ¡1 + e
x
. Clearly y > 0
if x > 0. At x = 0 , we have y(x) = 0 and since y
0
(0) = 1, we conclude that y is negati ve for x
in some interval (¡a; 0). But if y < 0, the equation reads y
0
= ¡y + 1 and thus y(x) = 1 ¡e
¡x
.
Observe that y(x) remain negative for all x < 0. This implies that the solution to the problem
is
φ(x) =
¡1 + e
x
x 0
1 ¡e
¡x
x 0
: (2.54)
Note that φ is C
1
(¡1; 1) and is a solution to the initial value problem; see the figure (2.8).
Notice that φ
00
(0) does not exist.
1 +
e
x
1
e
x
y
(0) = 1
Figure 2.8.
Definition 2.2. A function f (y) is called Lipschitz in an interval I if there is a constant
L > 0 such that the following inequality holds for all y
1
and y
2
in I
jf(y
1
) ¡ f(y
2
)jLjy
1
¡y
2
j: (2.55)
Example 2.26. Function f(y) = jyj is Lipschitz in R but not differentia ble a t y = 0. In
fact, we have
jf (y
1
) ¡ f (y
2
)j= jjy
1
j¡jy
2
jjjy
1
¡y
2
j: (2.56)
Here the Lipschitz constant L is 1. Function f(y) = e
y
is Lipschitz in any bounded
interval. In fact, if I = (¡a; a) then
jf(y
1
) ¡ f(y
2
)j= je
y
1
¡e
y
2
je
a
jy
1
¡y
2
j: (2.57)
Here L = e
a
. Function f (y) = jy j
p
is not Lipschitz in interval I = (¡a; a). In fa ct, for y
2
= 0
and y
1
> 0, we have
L
jf(y
1
) ¡ f(0)j
y
1
=
1
y
1
p
; (2.58)
2.5 Theory of first order differential equations 35
which is not bounded when y
1
#0.
Proposition 2.1. Let I be an open interval and assume that f 2C
1
(I), i.e., f
0
is continuous
in I, then f is Lipschitz in any interval [a; b] I.
For a multi-valued functions f(x; y), the Lipschitz condition is defined similarly. The
function f (x; y) is called Lipschitz in the domain D with respect to y if there exists L > 0
such that for all (x; y
1
) and (x; y
2
) in D, the fo llowing inequality holds
jf(x; y
1
) ¡ f(x; y
2
)jLjy
1
¡y
2
j: (2.59)
The condition in the uniqueness theorem (that @
y
f to be continuous is a neighborhood of
(x
0
; y
0
)) can be relaxed according to the following theorem.
Theorem 2.5. (uniqueness) Assume that there is a rectangle D centered at (x
0
; y
0
) such
that the function f: D !R is continuous in D and is Lipschitz with respect to y. Then the
initial value problem
y
0
= f(x; y)
y(x
0
) = y
0
; (2.60)
has a unique solution.
An immediate consequence of the uniqueness theorem is the uniqueness for linear prob-
lems. In fact, if p(x); r(x) are continuous functions, by the existence and uniqueness theorem,
the following problem
y
0
+ p(x)y = r(x)
y(x
0
) = y
0
;
has a unique solution. It also ca n be shown that the solution is extended in the whole of R.
The uniqueness part is immediately verified by the observation
@
@y
(r(x) ¡ p(x)y) = p(x):
That the solution is extended in R is justified by the exponential form of the solution
obtained in this chapter. By the aid of the uniqueness theorem, we can prove the fo llowing
important fact which is left as an exer cise.
Proposition 2.2. Let y
e
be an equilibrium for the equation y
0
= f (y). If f is continuously
differentiable in a neighborhood of y
0
, then the solution to t he problem
y
0
= f(y)
y(0 ) = y
0
=/ y
e
;
can not touch y
e
for a finite x.
Problem 2.39. P rove proposition (2.1).
Problem 2.40. P rove proposition (2.2).
36 First Order Equations
Problem 2.41. Verify the uniqueness theorem for the following problems
i.
y
0
= jsin(y)j
y(0) = 0
ii.
y
0
= (1 + x) f(y)
y(0) = 0
;
where
f(y) =
sin(y) y 0
0 y < 0
:
iii.
y
0
= x + jtan(y) j
y(0) = 0
Problem 2.42. Verify the uniqueness condition for the following problem and find its solution
y
0
+ 2jxjy = x
y(0) = 0
Problem 2.43. Verify the uniqueness theorem for the following problem and find its unique solution
y
0
= 1 + yjyj
y(0) = 0
:
Problem 2.44. Verify the uniqueness theorem for the following problem and find its unique solution
(
y
0
= 1 + jyj
p
y(0) = 0
:
Problem 2.45. Verify the uniqueness theorem for the following problem and find its unique solution
y
0
+ y = yjy ¡1j
y(0) = 1
:
Problem 2.46. P rove that the following pr oblem has a unique solution and then find its solution
y
0
= j2x ¡y j
y(0) = 0
:
Problem 2.47. Integrate the following i.v.p.s using suitable transformations. Determine the domain
of definition for each solution.
i. cos (y) y
0
+ sin (y)=1; y(0)=π /2
ii. y
0
= y(x+ ln (y)); y(0)=1
iii.
R
0
1
y(xt)dt=2y ¡x; y(1)=¡1/3
Problem 2.48. Verify that the function
φ(x) =
8
<
:
1
4
x
2
x 0
¡1
4
x
2
x < 0
;
is a solution to the problem
(
y
0
= jy j
p
y(0) = 0
:
In particular, you need to show that the given function is continuously differentiable at x = 0. The other
solution is simply y(x) = 0. Can you construct other solutions to the problem?
2.5 Theory of first order differential equations 37
2.5.4 Picard iteration method
Let us explain a method introduced by the French mathematician E. Picard to estimate
the true solution to an initial value problem. Consider again the problem (2.37). It is simply
sen that the problem is equivalent to the following integral equation
y(x) = y
0
+
Z
x
0
x
f(t; y(t)) dt: (2.61)
In fact, we have y(x
0
) = y
0
, and furthermore, by fundamental theorem of calculus, we have
y
0
(x) = f (x; y(x)):
Then, if we could find a function y(x) that satisfies Eq.(2.61), then y(x) is the solution to the
original problem (2.37). But how can we find y(x)? Picard suggested to make a sequence
of functions y
1
(x); y
2
(x); ···, defined through th e following recursive formula
y
n
(x) = y
0
+
Z
x
0
x
f(t; y
n¡1
(t)) dt;
where y
0
(x) = y
0
, the initial condition. It is shown that y
n
(x) !y(x) when n !1 if function
f is continu o usly differentiable with respect to y.
Example 2.27. Consider the initial value problem
y
0
= y
y(0) = y
0
: (2.62)
As it is know, the solution is y = y
0
e
x
. Starting from y
0
, we obtain
y
1
(x) = y
0
+
Z
0
x
y
0
ds = y
0
(1 + x):
y
2
(x) = y
0
+ y
0
Z
0
x
(1 + t) dt = y
0
1 + x +
1
2
x
2
;
and in the n
th
step,
y
n
(x) = y
0
1 +
1
2
x + ···+
1
n!
x
n
: (2.63)
Clearly, y
n
(x) is the first n terms of the series expansion of y = y
0
e
x
, i.e., y
n
(x) ! y
0
e
x
.
Example 2.28. Consider the following initial value problem
(
y
0
= y
2
;
y(0 ) =
1
2
: (2.64)
It is simply verified that the solution is y =
1
2 ¡x
. The Picard method gives the sequence
y
1
(x) =
1
2
+
1
4
x; y
2
(x) =
1
2
+
1
4
x +
1
8
x
2
+
1
48
x
3
; ···:
38 First Order Equations
In the figure (2.9) the solution y(x) and the sequence y
1
; y
2
; y
3
and y
4
are given
1 2
1
2
3
4
y
1
y
2
y
3
y
4
y
(
x
)
Figure 2.9.
2.5.5 Estimation o f the domain of solution
As we learned in this chapter, the solution to an initial value problem is usually local, that
is, a function y(x) with the domain of definition an open interval (x
0
¡ δ; x
0
+ δ). In this
subsection, we estimate the value δ for the do main of definition of the initial value problem
(2.37). In Fig.(2.10), the continuity rectangle and an integral curve are represented. As it
is seen, it is p o ssible that the integral curves goes unbounded when x approaches ±δ where
δ < a.
2δ
y
D
x
2b
(x
0
; y
0
)
y(x)
2a
Figure 2.10.
We observe that
jy(x) ¡y
0
jb; 8x 2I := (x
0
¡δ; x
0
+ δ): (2.65)
By the fundamental theorem of calculus, we have
y(x) ¡y
0
=
Z
x
0
x
f(t; y(t)) dt; (2.66)
and thus
jy(x) ¡y
0
j
Z
x
0
x
jf(t; y(t))jdt jx ¡x
0
jM ; (2.67)
2.5 Theory of first order differential equations 39
where
M = max
(x;y)2D
¯
jf(x; y)j : (2.68)
Note that the maximum exists because f is continuous in D. Since j x ¡x
0
j< δ, we obtain
the inequality δM b, and finally
δ = min
b
M
; a
:
Example 2.29. For the problem
(
y
0
= 2xy
2
y(0) = 1
;
the function f(x; y) = 2xy
2
is continuous everywhere. If we choose D as
D = f(x; y); jxja; jy ¡1jbg; (2.69)
then we have
M = max
(x;y)2D
¯
jf(x; y)j= 2a (1 + b)
2
: (2.70)
Thus
δ = min
b
2a(1 + b)
2
; a
:
Since
b
(1 + b)
2
1
4
, then δ = min
¡
1
8a
; a
. To maximize δ, we put a =
1
8a
, which gives δ = a =
1
2 2
p
.
Example 2.30. The solution to the problem
(
y
0
=
y
1 ¡x
y(0 ) = 1
(2.71)
is y =
1
1 ¡x
with the do main of definition (¡1; 1). Let us find δ without solving the problem.
The function f (x; y) =
y
1 ¡x
is c o ntinuous in the box D = f(x; y); jxja; jy ¡1jbg where
0 < a < 1 and b is arbitrary. Therefore M =
1 + b
1 ¡a
and δ =
(1 ¡a)b
1 + b
. Since
b
1 + b
1 we have
δ 1 ¡a. Since δ a, the condition a < 1 implies δ < 1. Thus the interval of the solution is
I
δ
= (¡1; 1).
Problems
Problem 2.49. For each of the following problem, solve the equation and find an interval on which the
solution can be extended. Then apply the method described in this section to estimate the interval of
solution.
i. y
0
=
1
2x
y; y(1) = 1
ii. y
0
= 2y
2
; y(0) = 1
iii. y
0
= sec(x +y) ¡1; y(0) = 0
iv. (1 + x
2
)y
0
¡2y = 0; y(1) = 1
v. yy
0
= 1 +
1
2
y
2
; y(0) = 0
40 First Order Equations
Problem 2.50. Verify the existence and uniqueness conditions for the following problems:
i. y
0
= (1 + sin(x)) y
5/3
, y(0) = 0.
ii. y
0
= e
x
j1 + yj, y(0) = 0 .
iii. y
0
= cos(x) sin(y), y(0) = 0
iv. y
0
= jyj
1/2
, y(0) = 1.
Problem 2.51. Consider the following initial value problem
yy
0
= cos(x)sin(y)
y(π /2) = 0
:
What can you say about the existence and uniqueness of the s olution to the problem?
Problem 2.52. Consider the initial value problem
(
y
0
=
y
sin(x)
y(0) = 0
:
i. Show that the problem does not satisfies the condition of the existence theorem.
ii. Solve the equation in the problem and obtain a solutio n.
iii. In what sense the obtained solution to the equation is a solution to the given initial value problem?
Problem 2.53. Consider the initial value problem
(
cos(y)y
0
= 2x
y(0) =
π
2
:
Verify that the implicit function sin(y) ¡x
2
= 1 satisfies the differential equation a nd the initial value.
Is φ an a cceptable solution to the problem?
Problem 2.54. Consider the following initial value problem
(
(cosy ¡siny)y
0
= e
x
y(0) =
π
4
:
Try to integrate the equation and find a solution. Is the obtained solution acceptable?
Problem 2.55. Consider the following problem
(
y
0
= jyj
1/2
y(0) = 0
:
a) State the existence and u niquen ess theorem for the given problem.
b) Integrate the equa tion and find a s olution.
c) Verify that the problem has infinitely many solutions for arbitrary c 0 given below
y(x) =
8
>
>
>
>
<
>
>
>
>
:
1
4
(x ¡c)
2
x > c
0 ¡c 6 x 6 c
¡1
4
(x + c)
2
x 6 ¡c
Problem 2.56. Consider the initial value problem
(
y
0
= y
2/3
y(0) = 0
:
2.5 Theory of first order differential equations 41
Integrate the equation and find a solution. Verify that for every c 0, the following is a solution
φ(x) =
8
>
>
>
>
<
>
>
>
>
:
1
27
(x ¡c)
3
x c
0 ¡c x c
1
27
(x + c)
3
x ¡c
Problem 2.57. Consider the initial value problem
(
y
0
= y
1/3
y(0) = 0
:
Show that the equation has infinitely many solutions.
Problem 2.58. The uniqueness of the solution to linear problems can be proved without appealing to
the uniqueness theorem as follows
i. Prove that the problem
y
0
+ p(x)y = 0
y(0) = 0
;
has the unique solution y 0. Hint: If y(x) is another solution show that the function z =
y(x) e
¡P (x)
, where P (x) =
R
p(x) is a constant.
ii. By the aid of the above result, prove that the problem
y
0
+ p(x)y = r(x)
y(0) = y
0
;
has a unique solution. (Hint: Assume y
1
; y
2
are two solutions and show y
1
= y
2
)
Problem 2.59. Consider the equation
y
0
= y jyj+ 1
y(0) = 0
:
a) State the result of the existence-uniqueness theorem for this problem.
b) So lve the equa tion and obtain the solution.
Problem 2.60. Consider the equation
y
0
= jy j+ 1
y(0) = 0
:
a) State the result of the existence-uniqueness theorem for this problem.
b) So lve the equation and obtain the solution. This solution is unique and this justify that the
uniqueness theorem stated in this section is a sufficient condition only.
Problem 2.61. P rove the propo sition (2.2)
Problem 2.62. Use the Euler's explicit method with h = 0.05 to obtain a numerical value for y(1) o f
the following problems:
i. y
0
= x + y
2
, y(0) = 0.
ii. y
0
= sin(y), y(0 ) = 1.
iii. y
0
= cos(x + y), y(0) = 0.5.
Problem 2.63. Apply the Picard method to a pproximate the solution to the following problems up
to order 3. Use a computer software to solve each equation numerically and plot both solutions in the
same coordinate to compare them.
i. y
0
+ 2xy = 1, y(0) = 1.
42 First Order Equations
ii. y
0
= x + y
2
, y(0) = 0.
iii. y
0
+ y = 1 + y
2
, y(0) = 0.
2.6 Applicat ions of rst-order equatio ns
2.6.1 Exponential law
The e xponential growth and decay is very popular in natural and man-made systems.
Roughly speaking, a quantity y(t) is subje ct to th e exponential law if its rate o f change
y
0
(t) is proportional to the present value of y, that is, y
0
(t) / y(t). Here we discuss three
applications, 1) Mortgage calculation, 2) carbon dating , and 3) electrical circuits.
1. Mortgage and interest.
A financial institute uses diffe rent m ethods to calculate the interest rates to loans and
mortgages. One of them is the daily compounded formula
C
d
= C
0
(1 + k /365)
d
;
where C
0
is the initial money or loan, k is the annual interest rate and d is the number of
days after the loan. An alternative method is the continuous compounded method
C(t) = C
0
e
k t
:
The formula is f o llowed directly by the differential equation
dC
dt
= kC:
Notice that the unit of t is year here because k is the annual interest rate. For example, for
C
0
= 10 0 0 $ and k = 0.04, the total loan that should be paid off at t = 2.5 (in two and half
year) is C(2.5) = 1000e
0.1
=
1105.17$.
Now let us calculate the monthly payment installments C
¯
for a mortgage C
0
that should
be paid off at the maturity date T (in terms of months for example). Since the installments
are in month, we divide k by 12. Now the problem reduces to find C
¯
in the following equation
(
C
0
(t) =
k
12
C ¡C
¯
C(0) = C
0
; C(T ) = 0
: (2.72)
Note that the unit of t here is month. In order to find C
¯
, we write the solution of the equation
as follows (assuming C
¯
is constant)
C(t) =
C
0
¡
12
k
C
¯
e
kt/12
+
12
k
C
¯
: (2.73)
Now, the condition C(T ) = 0, determines C
¯
as
C
¯
=
kC
0
e
kT /12
12(e
kT /12
¡1)
: (2.74)
2.6 Applications of first-order equations 43
For example, for a mortgage C
0
= 1000$ with the maturity date T = 60 months (5 years)
borrowed with the annual interest rate k = 0.04, the monthly payment is C
¯
=
18.39. In this
way, the total money paid in 5 tears is equal 1103$. Note that if the money is paid as lump
sum in the maturity date, the money would be 1000 ×1.04
5
=
1217$.
2. Radioactive decay and car bon dating.
Another example of exponential law is the decay of radioactive isotopes. As it is shown in
physics, the decay rate of these isotopes is proportional to the substance, that is, the following
equation holds for the quantity C at time t
C
0
(t) = ¡kC(t); (2.75)
where k >0 is some constant depends on the type of isotope. Usually radioactive isotopes are
classified based on their half-life, the time T when C
0
become half. For example, the half-life
of Radium-226 is 1600 years and of Uranium-238 is 4.5 billion years, (radioacti ve isotopes last
a long time in the nature and most of them are very hazardous for living species). It is simply
seen that the solution to (2.75) can be rewritten based on the half-life as C(t) = C
0
2
¡t/T
.
Of special interest is the half-life of carbon-14 (C
14
) because this radioisotope is used
for carbon dating. It is known that C
14
(consisting 6 protons and 8 neutrons) is unstable
and transforms to C
12
with half-life T
14
= 57 3 0 years. On the other hand, it is known that
the ratio C
14
/ C
12
is con stant in all living bodies (according to the carbo n exchange with
the atmosphere) and is equal to α
0
=
1.3 ×10
¡12
(equal to the same r a tio of C
14
/C
12
in the
atmosphere). After dea th, this ratio changes due to the transformation of C
14
to C
12
. One
can obtain an estimate of the ag e of death by measuring the quantity C
14
/ C
12
in a dead
body. The procedure is as follows. If the age death is τ, then
C
14
(τ) = C
14
(0) 2
¡τ /T
14
: (2.76)
According to the relation C
14
(0) = α
0
C
12
(0) and also to C
14
(τ) = α
1
C
12
(τ) f o r α
1
= C
14
/C
12
,
the equation (2.76) is rewritten a s
C
12
(τ)
C
12
(0)
=
α
0
α
1
2
¡τ /T
14
: (2.77)
On the other hand, the mass conservation of C
12
implies (C
14
transforms to C
12
)
C
12
(τ) = C
12
(0) + C
14
(0) ¡C
14
(τ); (2.78)
and thus dividing by C
12
(0), we obtain
C
12
(τ)
C
12
(0)
= 1 + α
0
¡α
1
C
12
(τ)
C
12
(0)
: (2. 79)
We can write the above relation as
C
12
(τ)
C
12
(0)
=
1 + α
0
1 + α
1
; (2.80)
and substituting this into (2.77) gives
α
1
(1 + α
0
)
α
0
(1 + α
1
)
= 2
¡τ /T
14
: (2.81)
44 First Order Equations
In order to find τ, we need to solve the above algebraic relation. The above calculations are
subject to several corrections for practical uses.
3. Electrical circuits.
Electrical circuit theory is another filed in which the exponential law comes into play. For
a simple example, consider the RC circuit shown in the figure (2.11).
Figure 2.11.
In the figure, R and C stands fo r the electrical resistance and the capacitance respectively.
Kirchhoff's mesh law. This law states that the algebraic sum of voltages across
elements in a closed mesh is zero. In the figure (2.12), if V
R
and V
C
denote respectively
the voltage across the resistance R and the capacitance L, we have
V
R
+ V
C
¡V
s
= 0; (2.82)
where the negative sign of the supply V
s
is due to its negative port encountered in
the mesh.
V
C
V
R
+
V
s
¡
+
+
¡
¡
Figure 2.12.
According to the Ohm's law, the voltage across the resistance is expressed by the formula
V
R
(t) = Ri(t); (2.83)
where i(t) is the electrical current in the resistor. The voltage-current relationship in the
capacitor is
i(t) = C
dV
c
dt
(t); (2.84)
and thus, the Kirchhoff's formula is expressed by the following differential equation
dV
c
dt
+
1
RC
V
c
=
1
RC
V
s
: (2.85)
2.6 Applications of first-order equations 45
The appropriate initial condition for the circuit has the form V
c
(0) = V
0
for some constant
V
0
. If V
s
is a constant supply, the voltage V
c
(t) is determined by the formula
V
c
(t) = (V
0
¡V
s
)e
¡t/RC
+ V
s
(2.86)
The figure (2.13) shows the graph of V
c
(t) with respect to time.
V
c
(t) = (V
0
¡V
s
)e
¡t/RC
+ V
s
V
c
(t)
t
V
0
V
s
Figure 2.13.
Observe that
lim
t!1
V
c
(t) = V
s
; (2.87)
which means that the electric current i(t) in the circuit goes zero in long term and the voltage
across C will be equal to the voltage supply V
s
.
Example 2.31. Consider the RC circuit shown in the figure (2.14) .
Figure 2.14.
Assume that the switch S connects to R3 at t = t
0
> 0. We would like to determine V
c
(t),
the voltage across the capacitor C at any time t > 0 provided that V
c
(0) = 0.
Kirchhoff's nodal law . This law states that the algebraic sum of electrical currents
in a node is zero. In the figure (2.15), this law states that i
1
+ i
2
¡i = 0.
i
i
1
i
2
n
Figure 2.15.
46 First Order Equations
In the figure (2.14), let us assume that i
1
; i
2
; i
3
are respectively the electric current in the
resistances R
1
; R
2
and R
3
. The Kirc hhoff's mesh law for the circuit is
R
1
i
1
(t) + V
c
= V
s
; (2.88)
If i
c
is the current passing through the capacitor C, then according to the Kirchhoff's
nodal law, we have
i
1
(t) = i
2
(t) + i
c
(t): (2.89)
According to the voltage-current relation in a capacitor i
c
(t) = C
dV
c
dt
(t), we can write
R
1
i
2
+ C
dV
c
dt
(t)
+ V
c
= V
s
: (2.90)
The Kirchhoff's mesh law for the resistor R
2
and the capacitor C is R
2
i
2
(t) = V
c
, and
substituting this into (2.90) yields the differential equation for t < t
0
dV
c
dt
+
R
12
C
V
c
=
1
R
1
C
V
s
; (2.91)
where R
12
=
R
1
+ R
2
R
1
R
2
. By V
c
(0) = 0, the solution to the this equation is
V
c
(t) =
R
2
R
1
+ R
2
V
s
( 1 ¡e
¡R
12
t/C
): (2.92)
Since the switch connects to R
3
at t = t
0
, the problem changes to the following for t t
0
(
dV
c
dt
+
R
13
C
V
c
=
1
R
1
C
V
s
V
c
(t
0
) = V
0
; (2.93)
where R
13
=
R
1
+ R3
R
1
R
3
and V
0
=
R
2
R
1
+ R
2
V
s
(1 ¡e
¡R
12
t
0
/C
). The solution for t t
0
is
V
c
(t) =
V
0
¡
R
3
R
1
+ R
3
V
s
e
R
13
t
0
/C
e
¡R
13
t/C
+
R
3
R
1
+ R
3
V
s
: (2.94)
The figure (2.16) shows the output function V
c
(t) with respect to time. Observe that the V
c
approaches to the limit
R
3
R
1
+ R
3
in long term. This means that the capacitor behaves like an
open circuit in long ter m.
switching
R
3
R
1
+
R
3
t
V
c
(t)
t
0
R
2
R
1
+ R
2
V
s
R
3
R
1
+ R
3
V
s
Figure 2.16.
2.6 Applications of first-order equations 47
Problem.
Problem 2.64. Find the maturity date T of a mortgage loan if C
0
= 300; 000$. Assume that the interest
rate is k = 0.035 annually and that the borrower pays 1402$ monthly to pay off the mortgage at T .
Problem 2.65. Find the annual interest rate of a mortgage loan if the initial loan is C
0
= 100; 000$ and
the borrowe r pays monthly C
¯
= 421$ to pay off the mortgage in 3 0 years. How much the borrower has
to pay monthly if he/ she wants to pay off the loan in 20 years?
Problem 2.66. Find the half life of a radio active substance with the decay rate k = 2.
Problem 2.67. Find the age date of a death body if the current C
14
to C
12
ratio is 10
¡12
.
Problem 2.68. By vir tue of the Newton's law, the cooling rate of a body with temperature T in the
air is proportional to T ¡T
¯
where T
¯
is the temperature of the air. If the initial temperature of the body
is T
0
and if it drops to (T
0
+ T
¯
)/2 in 1 hour, find the time wh en the temperature drops to (T
0
+ 3 T
¯
)/4.
Problem 2.69. Consider the RL circuit shown in the figure (2.17).
Figure 2.17.
Find the current function i(t) in the inductor if i(0) = 0 and the voltage source V is as shown in the
figure (2.18)
1
t
¡1
3
4
2
V (t)
Figure 2.18.
Problem 2.70. Consider the circuit shown in the gure (2.19)
Figure 2.19.
Write down a differential equation describing V
c
, the voltage across the capacitor C. Draw the solution
V
c
(t) if V
c
(0) = 0.
48 First Order Equations
Problem 2.71. In the circuit shown in the figure (2.20), assume that the switch connects at t = 0 and
then disconnects from the voltage supply at t = 5. Find the electric current function i(t) if i(0) = 0.
Figure 2.20.
Problem 2.72. Consider the circuit shown in figure (2.21). The switch connects the resistance 10
Ohm at t = 0 and then changes to the other port at t = 5. Find the electrical current function i(t) in the
inductor if i(0) = 0.
Figure 2.21.
2.6.2 Population dynamics
Logistic model.
In 1798, T. Malthus presented a mathematical formula of the form P
0
= rP for the
population growth and concluded that the popu lation increases exponentially according
to the solution P (t) = P
0
e
rt
. Regarding the linear growth of food production (according
to the agricultural de velopment), he led to a pessimistic view of the future of human kind
in starvation. In 1831, J. P. Verhulst published a paper and showed that the model
considered by Malthus i s unrealistic. Based on some data collected from different sources,
he considered the growth rate r as r(P ) = r
0
¡
1 ¡
P
K
where r
0
is a constant and K is called
the carrying capacity of the population. Finally, he suggested the following equation for the
population dynamics
(
P
0
= rP
¡
1 ¡
P
K
P (0) = P
0
: (2.95)
Note that the equation is separable and is solved by the function
P (t) =
P
0
K
P
0
+ (K ¡P
0
)e
¡r
0
t
: (2.96)
2.6 Applications of first-order equations 49
Verhulst called the solution (2.96) a logistic curve a nd thus the equation (2.95) the logistic
equation. Obviously, the equation has two equilibrium points P
¯
1
= 0 and P
¯
2
= K. Evidently
for f(P ) = rP
¡
1 ¡
P
K
, we have f
0
(0) > 0 and thus P
¯
1
is unstable. At P
¯
2
, we have f
0
(K) < 0
and thus P
¯
2
is stable equilibrium. For the concavity analysis, we have
P
00
= k
2
(K ¡2P )
1 ¡
P
K
P ; (2.97)
and thus, P
c
=
K
2
is the inflection point of the solution curves P (t; P
0
). The typical solution
curve is shown in the figure (2.22).
P (t)
P (t)
P = K
P
0
P
c
=
K
2
t
Figure 2.22.
Population growth with harvesting
There are different modifications of the logistic equation. Let us consider a harvesting term
(constant or variable rate) as a source term in the logistic model (this is the case for example
in a fish farm). If the harvesting rate is constant h
0
(daily, monthly or yearly), the harvesting
logistic model reads
P
0
= kP
1 ¡
P
K
+ h
0
: (2.98)
Note that, this is a type of Riccati equation if we rewrite it as follows
P
0
= ¡
k
K
P
2
¡
1
K
P ¡
h
0
K
k
: (2.99)
We can also rewrite the equation as P
0
= ¡
k
K
(P ¡ r
1
)(P ¡ r
2
) w here r
1
=
1
2K
1 ¡
1 +
4h
0
K
3
k
q
and r
2
=
1
2K
1 + 1 +
4h
0
K
3
k
q
. Therefore, the equation becomes a separable
one if we rewrite it as
dP
(P ¡r
1
)(P ¡r
2
)
= ¡
k
K
dt: (2.100)
The solution is
P (t) ¡r
2
P (t) ¡r
1
=
P
0
¡r
2
P
0
¡r
1
e
k(r
2
¡r
1
)t/K
: (2.101)
50 First Order Equations
Time varying logistic model.
To let the growth rate factor (or decay) to be a function of time, we write the logistic equation
in the following form (it is also called the Bernoulli's equation)
P
0
¡r(t)P = ¡k(t) P
2
: (2.102)
This equation is specially useful if the offspring rate of a living species varies with time. Of
particular interest is when r(t) or k(t) is a periodic reflecting the periodic reproductio n rate
of the species. For example, let us write r(t) as
r(t) = r
0
(1 + sin(πt/6)); (2.103)
which is periodic with period 12 and consider k(t) = k
0
. By the me thod we learned to solve
a Bernoulli's equation, we can rewrite the problem in the following linear one
(
U
0
+ r
0
(1 + sin(πt/6)) U = k
0
U(0) = P
0
¡1
; (2.104)
where U(t) =
1
P (t)
. The equation (2.104) can not be integrated in terms of elementary
functions. The figure (2.23) s hows the numeric solution to the equation for some initial values
P
0
and for r
0
= 1 and k
0
= 0.1. As it is observed from the figure, solution P (t; P
0
) converges to
a periodic function with period 12. This solution is stable as it is observed from the slop field.
0 6 12 18 24
0
10
20
Figure 2.23.
Bertalanffy's individual growth equation.
In his works o n the individual growth model, Austrian biologis t and general syste m theorist,
L. von Be rtalanffy suggested a mathematical equati o n de scribing the growth of the size
of fish as
dL
dt
= r (L
1
¡L); (2.105)
where L
1
is the ultimate size of the fish and r is a positive constant. The equation is solved
for the length function L(t) as
L(t) = L
1
¡(L
1
¡L
0
)e
¡rt
; (2.106)
where L
0
is the length at the start time t = 0 . Note that L
!
!
t!1
L
1
and this means that a
fish never stop increasing in length! Anyways, this equation presents a goal oriented behavior
(the goal is L
1
) and Be rtalanffy used this notion for his th eory of general systems.
2.6 Applications of first-order equations 51
Another model attributed to B ertalanffy, is the weight equation of a living body.
The change in the weight function W (t) is positively proportiona l to anabo lism (the building
up and s ynthesis of complex molecules) and negatively to catabolism (the breaking down of
complex molecules into simpler) which is written as
dW
dt
= rW
2/3
¡kW ; (2.107)
where r (the anabolism rate) and k (the catabolism rate) are positive constants. It is simply
seen that the equation has a non-trivial stable equilibrium W
1
=
¡
r
k
3
. It is seen as well that
the weight function pursuits the ultimate value W
1
and never reach this value in a finite time.
Problems.
Problem 2.73. Assume that the growth rate of a living species is r = 0.00 2. The harvesting rate k
0
is
equal 5 for the first six months and then k
0
= 0 for the second six months. Assuming this pattern for all
successive years, write down the differential equation for the population P (t) and draw the solution if
P
0
= 1000.
Problem 2.74. For the following models of population dynamics, do the stability analysis and draw
some typical trajectories:
i.
P
0
= 2
1 ¡
P
3
P :
ii.
P
0
=
1 ¡
P
p
2
P :
iii.
P
0
= 3(1 ¡P
2/3
)P :
Problem 2.75. Solve the following problem
P
0
= 2
1 ¡
P
3
P + 1
Problem 2.76. For each of the following time varying logistic equations, use a computer software and
draw the so lution curves
i.
P
0
= P (100 ¡0.1(1 + sin(πt)) P )
P (0) = 10
;
ii.
P
0
= 3P (10 ¡0.5(2 ¡cos(t)) P )
P (0) = 1
iii.
P
0
= P ((3 + sin(2πt)) ¡0.1P )
P (0) = 10
2.6.3 Water tank problems
Water level change in a tank.
Let us explain the method by solving an example.
52 First Order Equations
Example 2.32. Consider a water tank in the shape of a cube (length; width;height)=(L;W ;
H) and assume that a constant rate o f water Q
i
m
3
/s is running into the tank. Furthermore,
assume that a small outlet is placed at the bottom of the tank that let water runs out; see
the figure (2.24).
h
Q
i
Q
o
Figure 2.24.
If V (t) denotes the volume of water at time t, then we can write
dV
dt
(t) = Q
i
¡Q
o
; (2.108)
where Q
i
; Q
o
are the inflow and outflow rate of water at time t. According to the Torri-
celli's law, Q
o
is expressed by the formula
Q
o
= kA
o
2gh
p
; (2.109)
where k is a constant (depending on the liquid) and A
o
is the area of the hole, we can rewrite
Eq.(2.108) as
dh
dt
=
1
A
(Q
i
¡α h
p
); (2.110)
where α = kA
o
2g
p
and A = L W is the cross section area of the tank. Note that the
equilibrium level is h
¯
=
1
α
2
Q
i
2
and it is stable according to the relation
d
dh
(Q
i
¡α h
p
) = ¡
α
2 h
p
< 0: (2.111)
The equation (2.11 0) is separable and is solved by the formula
(Q
i
¡α h
p
) ¡ Q
i
lnjQ
i
¡α h
p
j=
α
2
2A
t: (2.112)
Example 2. 33. Consider the water tank in the shape of a cone shown in the gure (2.25).
2.6 Applications of first-order equations 53
Q
o
R
h
H
r
Figure 2.25. A cone water tank
Assume that R = H = 1 and the area of outlet is A
o
= 0.01m
2
. We would like to find
time T when the tank become empty if the tank is initially full. To find T , we find first a
differential equation describing h(t). Note that
V (t) =
1
3
πr
2
(t) h(t); (2.113)
and since r =
R
H
h = h, we obtain V (t) =
π
3
h
3
(t). According to (2.108), we have
πh
2
dh
dt
= ¡Q
o
= ¡α h
p
=
¡0.027 h
p
: (2.114)
Solving the above differential equation gives
2
5
h
5/2
= ¡
0.027
π
t + c; (2.115)
and since h(0) = 1 we obtain
h
5/2
(t)
=
¡0.02t + 1: (2.116)
It is seen that it takes about T
=
50 secthat the tank become empty .
Chemical solutions.
The mixture of chemicals in uids is another problem that bring differential equations into
play. Let us explain this by solving an example.
Example 2.34. Consider the water tank s hown in the figure (2.26). Assume that a c o nstant
rate of 10
¡3
m
3
/ s pure water runs into the container and that a hole of the area A
o
=
3 ×10
¡4
m
2
is placed at the bottom. If h
0
= 1m and the water is salty of the concentration
%5 (5 gram salt in 1m
3
) at time t = 0, we would like to obtain the salt concentration when
the water level is h
1
= 1.3.
54 First Order Equations
Q
o
Q
i
R = 1
h
H = 2
Figure 2.26.
Let c(t) denote the amount of salt in the tank at time t. We derive a differential equation
for c(t) as follows. For s mall δt we can write
c(t + δt)
=
c(t) ¡ ρ(t)Q
o
δt; (2.117)
where ρ(t) =
c(t)
V (t)
. This leads to the equation
dc
dt
= ¡ρQ
o
: (2.118)
If we replace Q
o
from (2.109) and V (t) = πR
2
h(t) into the above equation, we obtain
dc
dt
= ¡
αc
πR
2
h
p
: (2.119)
On the other hand, the equation for h(t) is
dh
dt
=
1
πR
2
(Q
i
¡α h
p
): (2.120)
Note that the water level equilibrium is
h
¯
=
1
α
2
Q
i
2
=
1.57m: (2.121)
From equations (2.119) and (2.120) we derive
dc
dh
=
¡αc
h
p
(Q
i
¡α h
p
)
: (2.122)
The equation (2.12 2) is solved by
c(h) = K (Q
i
¡α h
p
)
2
; (2.123)
where K is a constant determined by the initial condition. At time t = 0, the water level
is h = 1m and the s a lt is c
0
= 5πgr. Substituting these amounts into the obtained solution
determines K
=
3.8 ×10
8
. Hence we obtain c(h) as
c(h)
=
380 (1 ¡0.79 7 h
p
)
2
: (2.124)
2.6 Applications of first-order equations 55
When h = 1.3m, we derive c(1.3)
=
3.17 and thus ρ =
3.17
1.3π
=
%0.8.
Problems
Problem 2.77. Consider the water tank in the shape of cube shown in the figure (2.27) with the unit
dimensions width, length and height.
h
l = 1/2
φ
Figure 2.27.
Assume that the rate of inflow water into the tank is Q
i
= sin(2φ) and that h(0) = 0.
i. Find the time when h =
3
4
m.
ii. If there is a hole in the bottom of the tank with the area A
o
= 0.01, find the final water level.
Assume that k = 0.5.
Problem 2.78. For the water tank shown in the figure (2.27), let L = W = 1m and H = 2m and that
Q
i
= k sin(φ). Assume that an outlet with the area A
o
= 0.1m
2
is placed at the height h = 1m. For the
simplicity, let us assume α 2g
p
= 2.5.
i. Find k such that the water level function has an equilibrium at h
¯
= 3/2m
ii. With this value of k solve the equation and find h(t) if tan k is initially empty.
Problem 2.79. Consider a water tank in the shape of a cylinder with the height H = 5m and t he radius
R = 1m as shown in the gure (2.28)
5m
Q
o
1m
Q
i
Figure 2.28.
Let a current of Q
i
= 0.5m
3
/s water runs into the tank. Furthermore, assume that a ho le of the area
A
o
= 0.1m
2
is placed at the bottom of the tank. According to the Torricelli's law, we know a flow of
Q
o
= αA
o
h
p
m
3
/s runs out of the tank. For the simplicity, take α = 2.65.
i. Find the final water level in the tank.
ii. Find the time when the water level reaches half of the final level if the tank is initially empty.
56 First Order Equations
Problem 2.80. A 10 liter container is filled with the %5 salty water (5gr salt per litter). Calculate the
time when t he salt concentration decrease to %1 if a constant rate 0.1 litter/s of pure water runs into
the container and the same amount is simultaneously runs out the container.
Problem 2.81. In the above problem, assume that the inflow water is %1 s alty. How long does it take
that the total amount of salt reduces to the half of its initial value?
Problem 2.82. Consider a water tank in the shape of cube with sides L = W = 1m and H = 100m and
assume the tank contains initially a volume of 10m
3
salty water of %5 concentration. Let a %1 salty water
with the constant rate 1m
3
/h runs into t he container. If a s mall hole of radius r = 0.05m is placed at the
bo ttom of the container, draw c(t), the salt concentration of the water in the tank. Calculate the time
when the concentration reduces to c =%3. What is the concentration when the volume reaches V =15m
3
?
Problem 2.83. Repeat the problem for a cylinder tank with radius R = 2m and H = 8m.
Problem 2.84. Assume that V
0
m
3
of a certain liquid is saturated with P
0
gr of a solid substance. This
means that the saturation level of the liquid is c¯=
P
0
V
0
. For c(t), the concentration of the substance, the
dissolution rate is proportional to c¯¡c(t) with a positive proportionality factor k > 0. If you p ut P
0
gr
of the substance into the V
0
m
3
of the liquid, write down the differential equation describing P (t), the
amount of the substance dissolved into the liquid.
2.6.4 Geometric curves
Techniques of differential equations a re employed to derive equations of curves with some
required properties. Le t us solve a few examples.
Example 2.35. Find a curves passing through the point (0; 1) with the following property:
the projection of the tangent line segment on the x-axis has the fixed length k; see the figure
(2.29).
tangent
y = φ(x)
k = projection of tangenet
(ξ; φ(ξ))
x
1
Figure 2.29.
Let y = φ(x) be th e desired curve. The eq uation of tangent line at arbitrary point (ξ; φ(ξ))
is
y ¡ φ(ξ) = φ
0
(ξ)(x ¡ ξ): (2.125)
The x-intercept x
1
of the tangent line satisfies the equation
¡φ(ξ) = φ
0
(ξ)(x
1
¡ξ): (2.126)
Since jx
1
¡ ξ j= k, we derive the differe ntial e quation ¡φ(ξ) = ±kφ
0
(ξ) for φ. This in turn
gives φ(ξ) = ce
±ξ/k
. Since the cu rve passes through (0; 1), the c o nstant c is 1 and thus
φ(x) = e
±x/k
.
2.6 Applications of first-order equations 57
Example 2.36. Find the equation of a curve passing through the origin that satisfies the
following property: the area under the curve in the segment [0; x] is equal to
1
3
of the area
of the rectangle constructed on the points (0; 0 ), (x; 0 ), (x; y) and (0; y); see the figure (2. 3 0)
(x; y)
y = y(x)
Area
x
y
Figure 2.30.
For the desired curve y = φ(x), we have
Z
0
x
φ(s) ds =
1
3
xφ(x): (2.127)
Differentiating the above equation leads to the equation
3φ(x) = φ(x) + xφ
0
(x); (2.128)
and thus the solution is φ = cx
2
for arbitrary constant c. Notice that the obtained solution
is a family of parabola passing throug h the origin.
Differential equation of family of curves.
As we saw, the general solutions to a first order equation is a one parameter family of curves
like (x; y) = c. Conversely, if a one-parameter family of curves (x; y) = c is given, we can
derive a first order differential equation having = c as its solution. The procedure is as
follows. We eliminate the parameter c from the equations = c and its derivative, i.e.,
@
@x
+
@
@y
y
0
= 0: (2.129)
Note that the later equation is just the implicit derivative of = c. Let us show the method
by solving following examples.
Example 2.37. Let us construct a first order differential equation for the family of ellipses
x
2
+ c
2
y
2
= 1:
For this, we eliminate the parameter c from the equation and its implicit derivative
x + c
2
yy
0
= 0:
By this, we obtain the desire d differential equation
(1 ¡x
2
) y
0
+ xy = 0:
58 First Order Equations
Example 2.38. Let us find a differential equation de scribing the family of circles in the
first quadrant that are tangent t o both x and y axis, see th e figure (2.31)
r
y
x
Figure 2.31.
Clearly, the family of curves has the follow ing algebraic equation
(x ¡r)
2
+ (y ¡r)
2
= r
2
; (2.130)
for a param eter r. Implicit derivative of the equation is
(x ¡r) + (y ¡r)y
0
= 0; (2.131)
and thus eliminating r from above equation gives the desired differential equation as
(x + yy
0
)
2
= (1 + y
0
2
)(y ¡x)
2
: (2.132)
Orthogonal trajectories.
Assume φ(x; y) = c
1
is a given family of curves. We would like to determine a family of
curves (x; y) = c
2
such that φ = c
1
and = c
2
are orthogonal at all their intersection points.
Recall that the angel between two curves is defined by the angle between their tange nt lines
at the inte rsection point. If two curves f(x; y) = 0 and g(x; y) = 0 intersect at p
0
= (x
0
; y
0
),
their slopes at p
0
are respectively m
1
= ¡
@
x
f(x
0
; y
0
)
@
y
f(x
0
; y
0
)
and m
2
= ¡
@
x
g(x
0
; y
0
)
@
y
g(x
0
; y
0
)
, and thus the angle
' be tween these two curves is
' = tan
¡1
(m
1
) ¡tan
¡1
(m
2
) = tan
¡1
m
1
¡m
2
1 + m
1
m
2
: (2.133)
Note that if m
1
m
2
= ¡1 then ' =
π
2
which means f and g are orthogonal at the intersection
point p
0
.
The pro cedure for finding an orthogonal trajectories = c
2
for a given family of curves
φ = c
1
is as follows.
i. Find the differential equation y
0
= f (x; y) describing t he family φ(x; y) = c
1
.
ii. Since is orthogonal to φ, then the differential equation describing must have the
form y
0
= ¡
1
f(x; y)
.
iii. Solving the obtained differential equation determines the desired orthogonal trajec-
tories (x; y) = c
2
.
2.6 Applications of first-order equations 59
Example 2.39. Let us find the orthogonal trajectories of the parabola y = c
1
x
2
. The
describing differential equation of the given parab o la is y
0
=
2y
x
. The slope of the normal
trajectories is y
0
= ¡
x
2y
. The solution to the latter equation is
y
2
+
1
2
x
2
= c
2
2
: (2.134)
Observe that the o btained curves are ellipses. The figur e (2.32) shows two family of curves
in a same coordinate.
Figure 2.32.
Problems
Problem 2.85. Find the differential equation describing the following family of curves
i. y = sin(cx)
ii. y = (x ¡c)
2
iii. c
1
x
2
+ c
2
y
2
= 1. (Hint: you need second derivative in addition to the first derivative of the given
family of curves)
Problem 2.86. Find the differential equation describing the family of circle contained in the sector
0 y x which are tangent to both lines y = 0 and y = x .
Problem 2.87. Obtain the differential equation describing the family of curves y = cx
n
, n a positive
integer. Conclude that the initial value problem xy
0
¡ ny = 0 with y(0) =/ 0 has no solution and with
y
0
(0) = 0 has infinitely many solutions.
Problem 2.88. Find orthogonal trajectories of the family of curves y = ce
x
.
Problem 2.89. Find the orthogonal trajectories of the ellipses x
2
+ c
2
y
2
= 1.
Problem 2.90. Find orthogonal trajectories of the family of curves (x ¡c)
2
+ y
2
= c
2
.
Problem 2.91. Find the equation of curves that make angel φ = π /4 with the curves y = cx
4
.
Problem 2.92. Find the equation of a curve pos sessin g the property: all normal lines to the curve pass
through a common point.
Problem 2.93. Find a family of curves with the property tha t the y-axes bisects the tangent segment
between the x-axes and the point (x; y) on the curves.
60 First Order Equations