Chapter 1first - Order
Chapter 1first - Order
� Example 1.1
dy d2y dy ∂z ∂z dy
a) = 2x + 5 b) x + 6 = −2y c) − x − z = 0 d) x + y = 3
dx dx2 dx ∂x ∂y dx
� 2 �2 � 2 �2 � �4
d3y d y dy d y dy 3 ∂ 2z ∂ 2z
e) + 2 + = cos x f ) + + 9y = x g) + = x2 + y
dx3 dx2 dx dx2 dx ∂ x 2 ∂ y2
�
If there are two or more independent variables, the derivatives are partial derivatives and the
equations are called a PDE.
� Example 1.4 Examples a, c, d are of order one where as b, f, g are of order two and e is
of order three �
6 Ordinary Differential Equations of the first order
Definition 1.1.3 The degree of a differential equation is the highest power of the highest
derivative in the equation, after the differential equation is expressed as a polynomial of the
dependent variable and its derivatives.
� Example 1.5
(a) y�� − 2xy� + y = ex order 2, degree 1
(b) (y��� )4 + 5(y�� )5 − 2y� + y = x2 + 2 order 3, degree 4
3
(c) (y� ) 2 = y�� + 1.
First let us write the given differential equation as a polynomial of the dependent
variable and its derivatives, that is,
3
(y� ) 2 = y�� + 1 =⇒ (y� )3 = (y�� + 1)2 = (y�� )2 + 2y�� + 1.
Therefore, the degree of the given differential equation is 2.
�
Definition 1.1.4 A solution of ODE is free from derivatives and which satisfies the given
differential equation.
� Example 1.6 Show that e2x and e3x are solution of y�� − 5y� + 6y = 0 �
d2y
� Example 1.8 Consider the differential equation = x + 1 subject to the condition
dx2
�
y(0) = 1, y (0) = 0. So the given problem is an IVP �
� Example 1.9 Consider the differential equation y�� + y = 0 subject to the condition
y(0) = 0, y� ( π2 ) = 1. So the given problem is BVP �
dy x2 dy
1. = 3. = y − y2
dx y dx
dy
dy x2 4. = 1 + y2 − 2x − 2xy2 , y(0) = 0
2. = dx
dx y(1 + x3 )
Solution:
dy x2
1. The ODE = becomes ydy = x2 dx
dx � y �
⇒ ydy = x2 dx
y2 x 3
⇒ = +c
2 �3
2x3
⇒ y= +c
3
is said to be homogeneous iff M(x, y) and N(x, y) are homogeneous functions of the same
degree.
Solution: Both terms (M(x, y) = y2 + 2xy, & N(x, y) = −x2 ) in the differential equation are
homogeneous of degree 2, so the equation itself is homogeneous. Differentiating the substitution
y = zx gives
dy dz
= z+x ⇒ dy = zdx + xdz
dx dx
dy y2 + 2xy y2 2y
The given differential equation (y2 + 2xy)dx − x2 dy = 0 becomes = = +
dx x2 x2 x
dy
Substituting y = zx and in the differential equation we obtain the variables separable equation,
dx
� �
dz dz dx dz dx
z+x = z2 + 2z ⇒ 2
= ⇒ 2
=
dx z +z x z +z x
�
dz
⇒ = ln x + ln c ⇒ ln z − ln(z + 1) = ln cx
z(z + 1)
y
z z x y
⇒ ln = ln cx ⇒ = cx ⇒ y ⇒ = cx
z+1 z+1 x +1 x+y
y−x
Solution: Let f (x, y) =
y+x
λy−λx y−x
f (λ x, λ y) = = = λ 0 f (x, y)
λy+λx y+x
Thus, f (x, y) is homogeneous function of degree 0, so the given differential equation itself is
homogeneous. Differentiating the substitution y = zx gives
dy dz
= z+x ⇒ dy = zdx + xdz
dx dx
dy
Substituting y = zx and in the differential equation we obtain ,
dx
dz zx − x dz z − 1 dz z − 1
z+x = =⇒ z+x = =⇒ x = −z
dx zx + x dx z + 1 dx 1 + z
dz −z2 − 1
=⇒ x =
dx z+1
� �
z+1 1 z+1 dx
=⇒ 2
dz = dx =⇒ 2
dz =
−z − 1 x −z − 1 x
� � � �
z 1 dx
=⇒ − 2 − dz =
(z + 1) z2 + 1 x
1
=⇒ − ln(z2 + 1) − tan−1 (z) = ln x + c
2
=⇒ ln(z2 + 1) + 2 tan−1 (z) = −2 ln x +C
�� � � �y�
y 2
=⇒ ln + 1 + 2 tan−1 = −2 ln x +C
x x
� 2 � � �
x + y2 −1 y
=⇒ ln + 2 tan = − ln x2 +C
x2 x
�y�
=⇒ ln(x2 + y2 ) − ln x2 + 2 tan−1 = − ln x2 +C
�y� x
=⇒ ln(x2 + y2 ) + 2 tan−1 =C (implicit solution)
x
∂f ∂f
⇒ Mdx + Ndy = dx + dy = 0
∂x ∂y
∂ f ∂ f dy d
⇒ + =0 ⇒ f (x, y) = 0
∂x ∂ dx dx
∴ f (x, y) = c is the general solution.
Proof. ( =⇒ ) Assume the given differential equation is exact. By definition, there exist a a
differentiable function f (x, y) such that
∂f ∂f
M(x, y) = and N(x, y) =
∂x ∂y
Therefore,
∂M ∂2 f ∂N
= =
∂y ∂ x∂ y ∂x
The equality of the mixed partials is a consequence of the continuity of the first partial derivatives
ofM(x, y) and N(x, y).
∂N ∂M
( ⇐= ) To prove the converse of the theorem, we assume that = . We need to show that
∂x ∂y
there is a function f such that
∂f
M(x, y) = and (1.2)
∂x
∂f
N(x, y) = (1.3)
∂y
Integrating equation (1.2) with respect to x, holding y fixed (this is a partial integration) to obtain
�
f (x, y) = M(x, y)dx + h(y) (1.4)
where h(y) is an arbitrary function of y (this is the integration "constant" that we must allow to
depend on y, since we held y fixed in performing the integration).
Differentiating (1.4) partially with respect to y yields
�
∂f ∂ dh
N= = M(x, y)dx +
∂y ∂y dy
�
dh ∂
= N(x, y) − M(x, y)dx (1.5)
dy ∂y
= 3x3 + xy + h(y)
where h(y) is constant with respect to x. Differentiate w.r.t y, we obtain
∂ f (x, y)
= x + h� (y)
∂y
compainge this with equation (1.8), we have
x + h� (y) = x − 4y ⇒ h� (y) = −4y ⇒ h(y) = −2y2
∴ f (x, y) = 3x2 + yx − x − 2y2 = c is the general solution of the given ODE.
b) Ans. f (x, y) = xey + y2 = c
� �
x+y
� Example 1.15 Solve (x + tan−1 y)dx + dy = 0 �
1 + y2
x+y
Solution: Here we have, M(x, y) = x + tan−1 y, N(x, y) =
1 + y2
∂N 1 ∂M
⇒ = =
∂x 1 + y2 ∂y
Hence the given differential equation is exact.
By definition there exist a function f of two variables such that
∂f
= x + tan−1 y (1.9)
∂x
∂f x+y
= (1.10)
∂y 1 + y2
Integrating equation (1.9) with respect to x we get,
�
1
f (x, y) = (x + tan−1 y)dx + h(y) = x2 + x tan−1 y + h(y)
2
where h(y) is constant with respect to x. Differentiate w.r.t y, we obtain
∂ f (x, y) x
= + h� (y)
∂y 1 + y2
comparing this with equation (1.10), we get
x x+y y
2
+ h� (y) = 2
=⇒ h� (y) =
1+y 1+y 1 + y2
�
y 1
=⇒ h(y) = 2
dy = ln(1 + y2 )
1+y 2
1 1
∴ f (x, y) = x2 + x tan−1 y + ln(1 + y2 )
2 2
The general solution of the given ODE is
1 2 1
x + x tan−1 y + ln(1 + y2 ) = c
2 2
Exercise 1.3 Determine which of the following equations are exact and solve it, if it is exact
(a) (ex sin y − 2y sin x)dx + (ex cos y + 2 cos x)dy = 0
(b) (y − x3 )dx + (x + y3 )dy = 0
(c) (sin x sin y − xey )dy = (ey + cos x cos y)dx
y x
(d) dx = 2 2
dx + dy
1−x y 1 − x 2 y2
−1 x x x
(e) sin dx + 2 sin dy = 0
y y y y
(f) (3x2 + y2 )dx + 2xydy = 0
(g) 3x2 ydx + x3 dy = 0
(h) 2x sin ydx + x2 cos ydy = 0
(i) (6xy − y3 )dx + (4y + 3x2 − 3xy2 )dy = 0
�
Answer: x 4 4 y
� a) e�sin y + 2y cos x = c b) 4xy − x + y = c c) xe + sin x sin y = c
1 + xy x x
d) ln − 2x = c e) cos = c or = c
1 − xy y y
� Example 1.16 Show that µ = yex is an integrating factor for the differential equation
� � � �
sin y −x cos y + 2e−x cos x
− 2e sin x dx + dy = 0
y y
and use this fact to find a solution to the differential equation. �
Theorem 1.5.1 A differential equation of the form M(x, y)dx + N(x, y)dy = 0 has an integrat-
ing factor if it has a general solution
∂f
df ∂ f ∂ f dy dy
= + =0 ⇒ = − ∂x
dx ∂ x ∂ y dx dx ∂f
∂y
∂f
dy M
⇒ = − = − ∂x
dx N ∂f
∂y
∂f ∂f
∂y
⇒ = ∂ x = µ (let)
N M
∂f ∂f
⇒ = µM and = µN
∂x ∂y
Multipling the given equation by µ
which is exact. �
� Example 1.18 Solve the initial value problem ydx + (2x − yey )dy = 0, y(0) = 1 �
∂M ∂N ∂M ∂N
Solution: M(x, y) = y, N(x, y) = 2x − yey ⇒ = 1, =2 ⇒ �=
∂y ∂x ∂y ∂x
The given differential equation is not exact.
∂M ∂N
− = 1 − 2 = −1
∂y ∂x
∂M ∂N
−
∂y ∂x −1 1
h(y) = = =
−M y y
� � 1
∴ µ =e h(y)dy
=e y dy = eln y = y
Thus the differential equation is reduced in to
y2 dx + y(2x − yey )dy = 0
which is exact.
By definition there exist a function f such that
∂f ∂f
= y2 and = y(2x − ye2 )
∂x ∂y
Integrating the first w.r.t. x, we get
�
∂f
f (x, y) = y2 dx = y2 x + g(y) =⇒ = 2xy + g� (y)
∂y
Comparing with the second equation, we have
g� (y) = −y2 ey =⇒ g(y) = ey (2 + 2y − y2 )
=⇒ f (x, y) = xy2 + ey (2 + 2y − y2 )
The general solution is xy2 + ey (2 + 2y − y2 ) = c
From the initial conditions, we get c = 3e and
xy2 + ey (2 + 2y − y2 ) = 3e
is the solution of the IVP.
∂M ∂N
Solution: M(x, y) = y, N(x, y) = 3x =⇒ = 1, =3
∂y ∂y
The differential equation is not exact
∂M ∂N
− = 1 − 3 = −2
∂y ∂x
∂M ∂N
−
∂y ∂x −2
=⇒ g(x) = =
N � 3x
−2
� dx −2 1
µ = e g(x)dx = e 3x = e 3 ln x =
(x)2/3
OR
∂M ∂N
−
∂y ∂x −2 2
h(y) = = =
−M −y y
�
2
� dy
µ =e h(y)dy
= e y = e2 ln y = y2
Hence, for the given differential equation we have two integrating factor. This implies that,
integrating factor is not unique.
Thus the ODE is reduced in to
y
(x)2/3
dx + 3(x)1/3 dy = 0 Or y3 dx + 3xy2 dy = 0
which is exact.
By definition there exist a function f such that
∂f y
= (1.12)
∂x (x)2/3
∂f
= 3(x)1/3 (1.13)
∂y
By comparing the above equation with (1.12), we have h� (x) = 0 ⇒ h(x) = c. Hence
1
f (x, y) = 3yx 3
Hence, the general solution is given by
1
3yx 3 = c =⇒ xy3 = C
OR y3 dx + 3xy2 dy = 0
By definition there exist a function f such that
∂f
= y3 (1.14)
∂x
∂f
= 3xy2 (1.15)
∂y
By comparing the above equation with (1.15), we have g� (y) = 0 ⇒ g(y) = c. Hence
f (x, y) = xy3
Hence, the general solution is given by
xy3 = C
Exercise 1.4 Solve the following differential equation by finding an integrating factor
(a) (3xy + y2 ) + (x2 + xy)y� = 0
(b) (xy − 1)dx + (x2 − xy)dy = 0
2
(c) y� + 2xy = ex−x , y(0) = −1
�
Solution:
a y� + y cot x = sin x is a linear
� first order differential
� equation with p(x) = cot x&q(x) = sin x
� � �
p(x)dx p(x)dx
y = e− e q(x)dx + c
�
�� �
�
− cot xdx cot xdx
= e e sin xdx + c
�� �
− ln sin x ln sin x
= e e sin xdx + c
�� �
1 2
= sin xdx + c
sin x
�� �
1 1 − cos 2x
= dx + c
sin x 2
� � � �
1 1 sin 2x 1 1 2 sin x cos x
= − +c = − +c
sin x 2x 4 sin x 2x 4
x cos x c
= − +
2 sin x 2 sin x
= x[−e−x + c] = −xe−x + cx
dy
� Example 1.21 Solve x + y = x 2 y2 �
dx
=⇒ y−1 = −x2 + cx
1
=⇒ y = 2
−x + cx
dy dy 2
(c) y� + xy = xe−x y−3
(a) x + y = x 4 y3 (b) 3y2 + xy3 = x
dx dx
�
1 4 2
� Example 1.22 Solve y� + y − y2 = − 2 with u = a given solution. �
x x x
1.10 Application
1.10.1 Newton’s law of cooling
According to Newton’s empirical law of cooling, the rate at which the temperature of a body
changes is proportional to the difference between the temperature of the body and the temperature
of the surrounding medium. If T (t) represents the temperature of a body at time t, Tm the
dT
temperature of the surrounding medium, and the rate at which the temperature of the body
dt
changes, then
dT dT
∝ T − Tm or = k(T − Tm )
dt dt
where k is a constant of proportionality.
� Example 1.26 A pot of liquid is put on the stove to boil. The temperature of the liquid
reaches 1700 F and then the pot is taken off the burner and placed on a counter in the kitchen.
The temperature of the air in the kitchen is 760 F. After two minutes the temperature of the
liquid in the pot is 1230 F. How long before the temperature of the liquid in the pot will be
840 F? �
dT
Solution: Tm = 76, = k(T − 76), T (0) = 170.
dt
Solving this separable differential equation, we get
� �
dT dT
= kdt ⇒ = kdt ⇒ ln(T − 76) = kt + c1
T − 76 T − 76
⇒ T − 76 = Cekt ⇒ T (t) = Cekt + 76 ⇒ T (0) = 170 ⇒ C = 170 − 76 = 94
1 1
T (2) = 123 ⇒ 123 = 94e2k + 76 ⇒ 47 = 942k ⇒ k = ln = −0.3466
2 2
∴ T (t) = 94e−0.3466t + 76
⇒ 84 = 94e−0.3466t + 76 ⇒ 8 = 94e−0.3466t ⇒ −0.3466t = −2.4639 ⇒ t = 7.1088
When t = 7.1088 minutes the temperature of the liquid in the pot is 840 F
Exercise 1.7
1. An object with temperature 1500 c is placed in a freezer whose temperature is 300 c
assume that newtons law of cooling applies and that the temperature of the freezer
remains essentially constant. If this object is cooled to 1200 c after 8 minutes, what will
its temperature be after 16 minutes? When will its temperature be 600 c?
2. A thermometer is removed from a room where the temperature is 70o F and is taken
outside, where the air temperature is 10o F. After one-half minute the thermometer
reads 50o F. What is the reading of the thermometer at t = 1 min? How long will it take
for the thermometer to reach 15o F?
3. The rate at which a body loses temperature at any instant is proportional to the amount
by which the temperature of the body exceeds room temperature at the instant. A
container of hot liquid is placed in a room of temperature 190 c and in 8 minutes the
liquid cools from 830 c to 510 c. How long does it takes for the liquid to cool from
270 c to 250 c?
�
� Example 1.27 A large tank holds 300 gallons of brine solution. Salt was entering and
leaving the tank;A concentration of 2 lbs/gal is pumped into the tank at a rate of 3 gal/min;
it mixed with the solution there, and then the mixture was pumped out at the rate of 3 gal/min.
If 50 pounds of salt were dissolved initially in the 300 gallons, how much salt is in the tank
after a long time? �
dA
Solution: = Rin − Rout
dt
� �� �
lbs gal lbs
Rin = 2 3 =6
gal min min
Now, since the solution is being pumped out of the tank at the same rate that it is pumped in, the
number of gallons of brine in the tank at time t is a constant 300 gallons. Hence the concentration
A(t)
of the salt in the tank as well as in the outflow is c(t) =
300 lb/gal
� �� �
A lbs gal A lbs
Rout = 3 =
300 gal min 100 min
dA A
= 6− , A(0) = 50
dt 100
dA A 1
+ = 6, p(t) = , q(t) = 6
dt 100 100
� Example 1.28 A large tank holds 300 gallons of brine solution with 40 lbs of salt. A
concentration of 2 lbs/gal is pumped in at a rate of 4 gal/min. The concentration leaving the
tank is pumped out at a rate of 3 gal/min. How much salt is in the tank after 12 min? �
dA
Solution: = Rin − Rout
dt
� �� �
lbs gal lbs
Rin = 2 4 =8
gal min min
� �� �
A lbs gal 3A lbs
Rout = 3 =
300 + t gal min 300 + t min
dA 3A
= 8− , A(0) = 40
dt 300 + t
dA 3 3
+ A = 8, p(t) = , q(t) = 8
dt 300 + t 300 + t
c
A(t) = 600 + 2t + , A(0) = 40,
(300 + t)3
c
⇒ 600 + = 40 ⇒ c = −1512 × 107
3003
How much salt is in the tank after 12 min?
1512 × 107
A(12) = 600 + 2(10) − ≈ 126.12 lbs of salt
(300 + 12)3
� Example 1.29 In an oil refinery, a storage tank contains 2000 gal of gasoline that initially
has 100 lb of an additive dissolved in it. In preparation for winter weather, gasoline containing
2 lb of additive per gallon is pumped into the tank at a rate of 40 gal/min. The well-mixed
solution is pumped out at a rate of 45 gal/min. How much of the additive is in the tank 20
min after the pumping process begins? �
Solution: Let A be the amount (in pounds) of additive in the tank at time t. We know that
A = 100 when t = 0. The number of gallons of gasoline and additive in solution in the tank at
any time t is
V (t) = 200 + (40 gal/min
� − 45 �gal/min)(t min) = (2000 − 5t) gal
A(t) A(t)
Therefore, Rout = × (Rate out f low) = 45,
� � � V (t) � 2000 − 5t
lb gal lb
Rin = 2 40 = 80
gal min min
The differential equation modeling the mixture process is
dA 45A
= Rin − Rout = 80 −
dt 2000 − 5t
in pounds per minute.
Thus the general solution is
3900
A = 2(2000 − 5t) +C(2000 − 5t)9 , A(0) = 100 ⇒ C = −
(2000)9
⇒ A(20) = 1342 lb
Exercise 1.8 1. Consider a large tank holding 1000 L of pure water into which a brine
solution of salt begins to flow at a constant rate of 6 L/min. The solution inside the
tank is kept well stirred, and is flowing out of the tank at a rate of 6 L/min. If the
concentration of salt in the brine solution entering the tank is 0.1 Kg/L, determine
when the concentration of salt will reach 0.05 Kg/L.
2. Consider a tank in which 1 g of chlorine is initially present in 100m3 of a solution of
water and chlorine. A chlorine solution concentrated at 0.03g/m3 flows into the tank at
a rate of 1m3 /min, while the uniformly mixed solution exits the tank at 2m3 /min. At
what time is the maximum amount of chlorine present in the tank, and how much is
present?
�
dI
Solution: V (t) = RI + L , V = 5, R = 50, L = 1
dt
dI 1 1
50I + = 5 ⇒ I(t) = − e−50t
dt 10 10
� Example 1.31 A 100-volt electromotive force is applied to an RC series circuit in which the
resistance is 200 ohms and the capacitance is 10−4 farad. Find the charge q(t) on the capacitor
if q(0) = 0. Find the current i(t). �
1 dq 1
Solution: V (t) = RI + q =⇒ V (t) = R + q ,
c dt c
V = 100, R = 200, C = 10−4
dq 1 dq 1
=⇒ 200 + −4 q = 100 =⇒ + 50q =
dt 10� � dt 2 � �
� �
�
− 50dt 1 �
50dt −50t 1 50t
=⇒ q = e e dt + c =⇒ q = e e dt + c
2 2
� �
1 50t 1
=⇒ q = e−50t e +c =⇒ q = ce−50t +
100 100
1
From the initial condition, q(0) = 0, we obtain c = − . Thus,
100
1 1 −50t dq 1 −50t
q= − e and I = = e
100 100 dt 2