Lec 1-2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

DIFFERENTIAL EQUATIONS (2302-MTL102)

ANANTA KUMAR MAJEE

1. Introduction: ODEs
A di↵erential equation is an equation involving an unknown function and its derivatives. In
general the unknown function may depend on several variables and the equation may include
various partial derivatives.
Definition 1.1. A di↵erential equation involving ordinary derivatives is called a ordinary dif-
ferential equation (ODE).
• A most general ODE has the form
F x, y, y 0 , . . . , y (n) = 0 , (1.1)
where F is a given function of (n + 2) variables and y = y(x) is an unknown function of
a real variable x.
• The maximum order n of the derivative y (n) in (1.1) is called the order of the ODE.
Applications: Di↵erential equations play a central role not only in mathematics but also in
almost all areas of science and engineering, economics, and social sciences:
• Flow of current in a conductor: Consider an RC circuit with resistance R and capacity
C with no external current. Let x(t) be the capacitor voltage and I(t) the current
circulating in the circuit. Then according to Kirkcho↵’s law, R I(t)+x(t) = 0. Moreover,
the constitutive law of capacitor yields I(t) = C dx(t)
dt . Hence, we get the first order
di↵erential equation
x(t)
x0 (t) + = 0.
RC
• Population dynamics: Let x(t) be the number of individuals of a population at time t,
b be the birth rate of the population and d be the death rate of the population. Then
according to the simple “Malthus model”, growth rate of the population is proportional
to the number of new born individuals minus the number of deaths. Hence we get the
first order ODE
x0 (t) = kx(t), where k = b d.
• An example of a second order equation is y 00 + y = 0, which arises naturally in the study
of electrical and mechanical oscillations.
• Motion of a missile; The behaviours of a mixture; The spread of disease etc.
Definition 1.2. A function y : I ! R, where I ⇢ R is an open interval, is said to be a solution
of n-th order ODE, if it is n-times di↵erentiable, and satisfies (1.1) for all x 2 I.
Example 1.1. Consider the ODE y 0 = y. Let us first find all positive solutions. Note that
y0 0 0
y = (ln y) and therefore we obtain (ln y) = 1. Thus, this implies that

ln y = x + C =) y = C1 ex where C1 = eC > 0, C 2 R.
1
2 A. K. MAJEE

0
If y(x) < 0 for all x, then use yy = (ln( y))0 , and obtain y = C1 ex where C1 > 0. Combining
these two cases together, we obtain any solution y(x) has the form
y(x) = Cex , C 2 R.

2. Certain classes of nonlinear first order ODE


An n-th order linear ODE is a relation of the form
an (t)u(n) (t) + an 1 (t)u
(n 1)
(t) + . . . a1 (t)u0 (t) + a0 (t)u(t) = b(t) 8t 2 I with an 6= 0.
Definition 2.1. We say that the linear ODE is homogeneous if b(t) = 0 for all t 2 I. Otherwise
we say that it is non-homogeneous.
Theorem 2.1. Consider the linear homogeneous ODEs
u(m) (t) + am (t) + . . . a1 (t)u0 (t) + a0 (t)u(t) = 0, t 2 I.
1 (t)u
(m 1)
(2.1)
n o
Let X = u : I ! R : u is a solution of (2.1) . Then X is a real vector space with usual
addition of functions and scalar multiplication by real number.
2.1. 1st order linear ODE. Let us first consider the linear ODE of 1st order of the form
y 0 + ↵(x)y = b(x) , (2.2)
where ↵ and b are given function defined on I. A linear ODE can be solved as follows:
Theorem 2.2 (The method of variation of parameter). For ↵, b 2 C(I), the general solution of
(2.2) has the form
h Z i
y(x) = e A(x) C + b(x)eA(x) dx ,

where A(x) is a primitive of ↵(x) on I, i.e., A0 (x) = ↵(x).


Proof. We want to find a di↵erential function µ(x) > 0 such that
0
µ(x)y 0 (x) + µ(x)↵(x)y(x) = µ(x)y(x) .
Note that µ(x) = eA(x) does this work (check !!!). This µ(x) is called an integrating factor. Let
us make the change of the unknown function
u(x) = y(x)eA(x) , y(x) = u(x)e A(x)
.
Substituting this in the given ODE, we obtain
A 0
(ue ) + ↵ue A
= b =) u0 e A
+ ue A
A0 + ↵ue A
= b.
Since A0 = ↵, we have
Z h Z i
u0 = beA =) u(x) = C + b(x)eA(x) dx =) y(x) = e A(x)
C+ b(x)eA(x) dx .


Example 2.1. Find the general solution of x0 (t) + 4tx(t) = 8t.

Here ↵(t) = 4t, and hence we have A(t) = 2t2 . Therefore, using the method of variation of
parameter, the general solution of the given ODE is given by
Z Z
2t2
⇥ 2t2
⇤ 2t2
⇥ d 2t2 ⇤ 2
x(t) = e C + 8te dt = e C +2 e = 2 + Ce 2t .
dt
ODES AND PDES 3

1st order linear IVP: Suppose, we are interested in solving the initial value problem
y 0 + ↵(x)y = b(x), y(x0 ) = y0 , where x0 2 I.
From the previous 0 A 0
R x calculation, we see that u = be with A = ↵. Integrating from x0 to x and
taking A(x) = x0 ↵(s) ds, we have
Z x Rs
↵(r) dr
u(x) u(x0 ) = b(s)e x0 ds.
x0

Note that u(x0 ) = y(x0 )eA(x0 )


= y(x0 )e0
= y0 . Thus,
Z x Rs
↵(r) dr
u(x) = y0 + b(s)e x0 ds
x0
Rx h Z x Rs i
↵(s) ds ↵(r) dr
=) y(x) = e 0 x y0 + b(s)e x0 ds . (2.3)
x0

Example 2.2. Find the solution of x0 (t) + kx(t) = h, x(0) = x0 , where h and k are constant.
This equation arises in the RC circuit when there is a generator of constant voltage h.
Solution: Using (2.3), we get
Z t
⇥ ⇤ ⇥ ekt 1 ⇤ ⇣ k ⌘ kt h
x(t) = e kt x0 + heks ds = e kt x0 + h = x0 e + .
0 k h k
Notice that x(t) ! hk as t ! 1 from below if x0 < hk , and from above if x0 > hk . Moreover, the
capacitor voltage x(t) does not decay to 0 but tends to the constant voltage hk .
2.2. General 1st order ODEs. We consider the general first order ODE of the form
y 0 = f¯(x, y) ,
where f¯ is some continuous function. We have seen that if f¯(x, y) = ↵(x)y + b(x) for some
↵, 2 C(I), then the above ODE has solution in explicit form (cf. the method of variation of
parameter).
2.2.1. Equations with variables separated: Let us consider a separable ODE
y 0 = f (x)g(y) , (2.4)
where f and g are given continuous functions with f (x) 6= 0. If y = k is any zero of g, then
y(x) = k is a constant solution of (2.4). On the other hand, if y(x) = k is a constant solution,
then g(k) = 0. Therefore y(x) = k is a constant solution if and only if g(k) = 0.
• y(x) = k is called an equilibrium solution if and only if g(k) = 0.
Hence if y(x) is a non-constant solution, then g(y(x)) 6= 0 for any x. Any separable equation
can be solved by means of the following theorem.
Theorem 2.3 (The method of separation of variables). Let f and g be continuous functions
on some intervals I and J respectively such that g 6= 0 on J. Let F resp. G be a primitive
function of f resp. g1 on I resp. J. Then a function y defined on some subinterval of I, solves
the equation (2.4) if and only if
G(y(x)) = F (x) + C , (2.5)
for all x in the domain of y, where C is a real constant.
Proof. Let y(x) solves (2.4). Since F 0 = f and G0 = g1 , the equation (2.4) is equivalent to
0
y 0 G0 (y) = F 0 (x) =) G(y(x)) = F 0 (x) =) G(y(x)) = F (x) + C .
4 A. K. MAJEE

Conversely, if function y satisfies (2.5) and is known to be di↵erentiable in its domain, then
di↵erentiating (2.5) in x, we obtain y 0 G0 (y) = F 0 (x). Arguing backwards, we arrive at (2.4).
Let us show that y is di↵erentiable. Since g(y) 6= 0, either g(y) > 0 or g(y) < 0 in the whole
domain. Then G is either strictly increasing or strictly decreasing in the whole domain. In both
cases, the inverse function G 1 is well-defined and di↵erentiable. It follows from (2.5) that
1
y(x) = G F (x) + C .
Since both F and G 1 are di↵erentiable, we conclude that y is di↵erentiable. ⇤
Example 2.3. Consider the ODE
y 0 (x) = y(x) , x 2 R , y(x) > 0 .
Then f (x) ⌘ 1 and g(y) = y 6= 0. Note that F (x) = x and G(y) = log(y). The equation (2.5)
becomes
log(y) = x + C =) y(x) = Cex ,
where C is any positive constant.
Example 2.4. Consider the equation
p
y0 = |y|
which is defined for all y 2 R. Note that y = 0 is a trivial solution. In the domains y > 0 and
y < 0, the equation can be solved using separation of variables. In the domain y > 0, we obtain
Z Z
dy p 1 2
p = dx =) 2 y = x + C =) y = x + C .
y 4
Since y > 0, we must have x > C which follows from the second expression. Similarly in the
domain y < 0, we have
1
y= (x + C)2 , x < C .
4
We see that the integral curves in the domain y > 0 touch the curve y = 0 and so do the integral
curves in the domain y < 0.
Example 2.5. The logistic equation
y 0 (x) = y(x) ↵ y(x) , ↵, > 0.
In this model, y(x) represents the population of some species and therefore y(x) 0. Note that
y(x) = 0 and y(x) = ↵ are two equilibrium solutions. Such solutions play an important role
in analyzing the trajectories of solutions in general. In order to solve the logistic equation, we
separate the variables and obtain (assuming that y 6= 0 and y 6= ↵ )
dy 1 dy dy 1 1
= dx =) + = dx =) log(|y|) log(|↵ y|) = x + c
y(↵ y) ↵ y ↵↵ y ↵ ↵
1 y y
=) log | | = x + c =) | | = ke↵x ,
↵ ↵ y ↵ y
where k = ec↵ . This is a general solution in implicit form. To solve for y, consider the case
↵ke↵x
0 < y(x) < ↵ . Then, y(x) = 1+ ke↵x . For the case y >

, the solution takes the form
↵ke↵x ↵
y(x) = 1 ke↵x . In any case, limx!1 y(x) = . This shows that all non-constant solutions
approach the equilibrium solution y(x) = ↵ as x ! 1, some from above the line y = ↵ and
others from below.
ODES AND PDES 5

2.2.2. Exact equations: Suppose that the first order equation y 0 = f¯(x, y) is written in the
form
M (x, y) + N (x, y)y 0 = 0 , (2.6)
where M , N are real-valued functions defined for real x, y on some domain ⌦.
Definition 2.2. We say that the equation (2.6) is exact in ⌦ if there exists a function F having
continuous first partial derivatives such that
@F @F
=M, =N. (2.7)
@x @y
Theorem 2.4. Suppose the equation (2.6) is exact in a domain ⌦ ⇢ R2 i.e., there exists F
such that @F @F
@x = M , @y = N in ⌦. Then every continuously di↵erentiable function defined
implicitly by a relation
F (x, (x)) = c (c = constant) ,
is a solution of (2.6), and every solution of (2.6) whose graph lies in ⌦ arises in this way.
Proof. Under the assumptions of the theorem, equation (2.6) becomes
@F @F
(x, y) + (x, y)y 0 = 0 .
@x @y
If is any solution on some interval I, then
@F @F
(x, (x)) + (x, (x)) 0 (x) = 0 , 8x 2 I . (2.8)
@x @y
If (x) = F (x, (x)), then from the above equation, we see that 0 (x) = 0, and hence
F (x, (x)) = c, where c is some constant. Thus the solution must be a function which is
given implicitly by the relation F (x, (x)) = c. Conversely, if is a di↵erentiable function on
some interval I defined implicitly by the relation F (x, y) = c, then
F (x, (x)) = c , 8x 2 I .
@F
Di↵erentiation along with the property @x = M, @F
@y = N yields that is a solution of (2.6).
This completes the proof. ⇤
We will say that F (x, y) = c is the general solution of (2.6).
Example 2.6. Consider the equation
x (y 4 1)y 0 (x) = 0 .
Here M = x and N = 1 y 4 . Define F (x, y) = 12 x2 + y 1 5
5y . Then above equation is exact.
Hence the solution is given by
F (x, y) = c =) 2y 5 10y = 5x2 + c .
Example 2.7. Find the general solution of the ODE 2ye2x + 2x cos(y) + e2x x2 sin(y) y 0 = 0.
Solution: The equation is of the form M (x, y) + N (x, y)y 0 = 0 with M (x, y) = 2ye2x + 2x cos(y)
and N (x, y) = e2x x2 sin(y). Define F (x, y) = ye2x + x2 cos(y). Then F has continuous first
partial derivatives on R2 and @F @F
@x (x, y) = M (x, y), @y (x, y) = N (x, y). Hence the given ODE is
exact. Thus, the general solution is given by the formula
ye2x + x2 cos(y) = c, c 2 R.
How do we recognize when an equation is exact? The following theorem gives a necessary
and sufficient conditions.
6 A. K. MAJEE

Theorem 2.5. Let M, N be two real-valued functions which have continuous first partial deriva-
tives on some rectangle
n o
R := (x, y) 2 R2 : |x x0 |  a , |y y0 |  b .
Then the equation (2.6) is exact in R if and only if
@M @N
= (2.9)
@y @x
in R.
Proof. It is easy to see that if the equation (2.6) is exact, then (2.9) holds. Now suppose that
(2.9) holds in the rectangle R. We wand to find a function F having continuous first partial
derivatives such that @F @F
@x = M and @y = N . If we had a such function, then
Z x Z y Z x Z y
@F (s, y) @F (x0 , t)
F (x, y) F (x0 , y0 ) = ds + dt = M (s, y) ds + N (x0 , t) dt
x0 @x y0 @y x0 y0

Similarly by writing F (x, y) F (x0 , y0 ) = F (x, y) F (x, y0 ) + F (x, y0 ) F (x0 , y0 ), we could


have
Z x Z y
F (x, y) F (x0 , y0 ) = M (s, y0 ) ds + N (x, t) dt . (2.10)
x0 y0
We now define F by the formula
Z x Z y
F (x, y) = M (s, y) ds + N (x0 , t) dt . (2.11)
x0 y0
@F
Then, F (x0 , y0 ) = 0 and @x (x, y) = M (x, y) for all (x, y) in R. From (2.10), we can also
define F by the formula
Z x Z y
F (x, y) = M (s, y0 ) ds + N (x, t) dt . (2.12)
x0 y0

It is clear from (2.12) that @F @y (x, y) = N (x, y) for all (x, y) in R. Therefore, we need to show
that (2.12) is valid, where F is defined by (2.11). Now, by using the condition (2.9), we have
hZ x Z y i
F (x, y) M (s, y0 ) ds + N (x, t) dt
x0 y0
Z x Z y
⇥ ⇤ ⇥ ⇤
= M (s, y) M (s, y0 ) ds N (x, t) N (x0 , t) dt
x y0
Z 0x Z y h i
@M @N
= (s, t) (s, t) ds dt = 0 .
x0 y 0 @y @x
This completes the proof. ⇤
Example 2.8. Find the general solution of the ODE
2xydx + (x2 + y 2 ) dy = 0 .
Here, M (x, y) = 2xy and N (x, y) = x2 + y 2 . Note that @M @N
@y = @x = 2x. Thus, the equation is
exact. Define the function F by (taking (x0 , y0 ) = (0, 0))
Z x Z y Z x Z y
y3
F (x, y) = M (s, y) ds + N (x0 , t) dt = 2sy ds + t2 dt = yx2 + .
0 0 0 0 3
y3
Therefore, the general solution is given by the formula yx2 + 3 = c, where c is arbitrary real
constant.
ODES AND PDES 7

Example 2.9. Solve the ODE (x2 2y)y 0 = 3x2 2xy.


solution: Given ODE can be written as
(3x2 2xy)dx + (2y x2 )dy = 0 i.e., M (x, y)dx + N (x, y) dy = 0.
A simple calculation shows that @M
@y (x, y) =
@N
@x (x, y) = 2x. Hence the ODE is exact for all
x, y 2 R. To find F , we know that @F
@x = M,
@F
@y = N . Thus, F satisfies

F (x, y) = x3 x2 y + f (y), where f is independent of x.


@F
Now, @y = N gives
f 0 (y) x2 = 2y x2 =) f 0 (y) = 2y.
Taking f (y) = y 2 , we obtain F (x, y) = x2 (1 y) + y 2 . Thus, general solution is
x2 (1 y) + y 2 = c, c 2 R.
2.2.3. The integrating factor: Sometimes, if the equation (2.6) is NOT exact, one can find a
function u, nowhere zero, such that the equation
u(x, y)M (x, y)dx + u(x, y)N (x, y) dy = 0
is exact. Such a function is called an integrating factor. For example ydx xdy = 0 (x >
0, y > 0) is not exact, by multiplying the equation by u(x, y) = y12 makes it exact. Note that all
the three function
1 1 1
, 2
,
xy x y2
are integrating factors of the above ODE. Thus, integrating factors need not be unique.
Remark 2.1. In view of Theorem 2.5, we see that a function u on a rectangle R, having
continuously partial derivatives, is an integrating factor of the equation (2.6) if and only if
⇣ @M @N ⌘ @u @u
u =N M . (2.13)
@y @x @x @y
i) If u is an integrating factor which is function of x only, then
1 ⇣ @M @N ⌘
p=
N @y @x
is a continuous function of x alone, provided N (x, y) 6= 0 in R.
ii) If u is an integrating factor which is function of y only, then
1 ⇣ @N @M ⌘
q=
M @x @y
is a continuous function of y alone, provided M (x, y) 6= 0 in R.
Example 2.10. Find an integrating factor of
(2y 3 + 2) dx + 3xy 2 dy = 0 , x 6= 0 , y 6= 0
and solve the ODE.
Here M (x, y) = 2y 3 + 2 and⇣ N (x, y) =⌘ 3xy 2 . Note that the equation is not exact. Now
@M @N 1 @M @N
@y
2
@x = 3y and hence N @y @x = x1 is a continuous function of x alone. Thus
integrating factor should be only function of x. Note that u(x) = x satisfies the relation (2.13).
After multiplication by integrating factor, equation becomes
M̃ (x, y) dx + Ñ (x, y) dy = 0 , where M̃ (x, y) = 2xy 3 + 2x , Ñ (x, y) = 3x2 y 2 .
8 A. K. MAJEE

@ F̃
To find F̃ , we know that @x = 2xy 2 + 2x, and hence
F̃ (x, y) = x2 y 3 + x2 + f (y) ,
@ F̃
where f is independent of x. Again @y = Ñ gives
0
f (y) + 3x y = 3x2 y 2 =) f (y) = c.
2 2

Thus, the general solution is given implicitly by


x2 (y 3 + 1) = c , c 2 R.
2.2.4. Bernoulli Equations: We are interested in the ODE of the form
y 0 + p(x)y = q(x)y n ,
where p and q are continuous functions. Note that for n = 0 or n = 1, the equation is linear,
and we already know how to solve it. For n 6= 0, 1, we first divide the ODE by y n to get
y n y 0 + p(x)y 1 n = q(x). Take v = y 1 n . Then v 0 = (1 n)y n y 0 , and plugging this, we have
1
v 0 + p(x)v = q(x) .
1 n
Since this a linear ODE, we can use method of variation of parameter to find its solution and
hence able to find the solution of given Bernoulli equation.
Example 2.11. We wish to find all solutions of the ODE 3y 2 y 0 + y 3 = e x . We first write
x x
down the given ODE in the Bernoulli form: y 0 + 13 y = e 3 y 2 . Here p(x) = 13 , q(x) = e 3 and
n = 2. Thus, taking v = y 3 , we have the following linear ODE
v0 + v = e x
.
General solution is given by v(x) = e x (c + x), where c is an arbitrary constant. Thus, the
general solution of the given ODE is given by
1 x
y(x) = (c + x) 3 e 3 , 8 x 2 R.
Example 2.12. Find the general solution of the ODE y 0 2xy = xy 2 .
Solution: Note that given ODE is the Bernoulii equation with p(x) = 2x and q(x) = x.
Taking v = y 1 , we have the following linear ODE
v 0 + 2xv = x.
The general solution is given by v(x) = 1 x2
+ ce . Hence the general solution of the given
2
ODE is ⇣ 1 ⌘ 1
2
y(x) = + ce x , x 2 R.
2

You might also like