Lecture 1 First Order Differential Equations
Lecture 1 First Order Differential Equations
Mathematics
First Order Differential Equations
Dr. Rovick P. Tarife
Department of Electrical Engineering & Technology
College of Engineering
𝒅𝒏 𝒚 𝒅𝒏−𝟏 𝒚 𝒅𝒚
𝒂𝒏 𝒙 𝒏
+ 𝒂𝒏−𝟏 𝒙 𝒏−𝟏
+ ⋯ + 𝒂𝟏 𝒙 + 𝒂𝟎 𝒙 𝒚 = 𝒈(𝒙)
𝒅𝒙 𝒅𝒙 𝒅𝒙
or in standard form
𝒚′ + 𝒑 𝒙 𝒚 = 𝒒(𝒙)
𝒅𝒚
= 𝑭 𝒙 𝑮(𝒚)
𝒅𝒙
𝒅𝒚
= 𝒙𝟐 𝒚𝟒 𝒆𝟓𝒙−𝟑𝒚
𝒅𝒙
𝒅𝒚
= 𝒚 + 𝐜𝐨𝐬 𝒙
𝒅𝒙
Step 4: Following this, go back and check the differential equation for any
values of y such that G(y) = 0.
𝟏 𝟏
Eliminate the absolute 𝟏+𝒚= ±𝒂𝒆 −𝒙
= 𝒃𝒆 −𝒙
𝟏
−𝒙
Thus, 𝒚 𝒙 = −𝟏 + 𝒃𝒆
where 𝒃 ≠ 𝟎
𝒚+𝟑 𝟑
In differential form, 𝒅𝒚 = 𝒙 − 𝟏 𝟐 𝒅𝒙 or 𝟏 + 𝒅𝒚 = 𝒙 − 𝟏 𝟐 𝒅𝒙
𝒚 𝒚
𝟏
Integrate to obtain 𝒚 + 𝟑𝒍𝒏 𝒚 = 𝒙−𝟏 𝟑
+𝒌
𝟑
𝟏 −𝟏𝟏
Solve for k, −𝟏 = 𝟐𝟑 + 𝒌 Then 𝒌 =
𝟑 𝟑
𝒅𝑻
= 𝒌[𝑻 𝒕 − 𝟔𝟖]
𝒅𝒕
Integrate to obtain
𝒍𝒏 𝑻 − 𝟔𝟖 = 𝒌𝒕 + 𝒄
𝑻 𝒕 = 𝟔𝟖 + 𝟐𝟔. 𝟒𝒆𝒌𝒕
𝟐𝟏.𝟐
𝒍𝒏 𝟐𝟔.𝟒 𝒕
𝑻 𝒕 = 𝟔𝟖 + 𝟐𝟔. 𝟒𝒆 𝟖𝟎
The time of death was the last time at which the body temperature
was 98.6°F (just before it began to cool. Solve for the time t at
which
𝟐𝟏.𝟐
𝒍𝒏 𝟐𝟔.𝟒 𝒕
𝑻 𝒕 = 𝟗𝟖. 𝟔 = 𝟔𝟖 + 𝟐𝟔. 𝟒𝒆 𝟖𝟎
Engineering Mathematics Tarife, 2023 | Page 20
Example # 5 – Newton’s Law of Cooling
Take the logarithm of this equation to obtain
𝟑𝟎. 𝟔 𝒕 𝟐𝟏. 𝟐
𝒍𝒏 = 𝒍𝒏
𝟐𝟔. 𝟒 𝟖𝟎 𝟐𝟔. 𝟒
𝟑𝟎. 𝟔
𝟖𝟎𝒍𝒏
𝒕= 𝟐𝟔. 𝟒 = −𝟓𝟑. 𝟖 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
𝟐𝟏. 𝟐
𝒍𝒏
𝟐𝟔. 𝟒
𝟑𝟎. 𝟔 𝒕 𝟐𝟏. 𝟐
𝒍𝒏 = 𝒍𝒏
𝟐𝟔. 𝟒 𝟖𝟎 𝟐𝟔. 𝟒
𝟑𝟎. 𝟔
𝟖𝟎𝒍𝒏
𝒕= 𝟐𝟔. 𝟒 = −𝟓𝟑. 𝟖 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
𝟐𝟏. 𝟐
𝒍𝒏
𝟐𝟔. 𝟒
Next, we use the half-life, H = 5715 years, to determine the value of k. When t = H,
half of the original substance is still present. Thus,
𝒍𝒏 𝟎. 𝟓 −𝟎. 𝟔𝟗𝟑
𝒚𝟎 𝒆𝒌𝑯 = 𝟎. 𝟓𝒚𝟎 𝒆𝒌𝑯 = 𝟎. 𝟓 𝒌= = = −𝟎. 𝟎𝟎𝟎𝟏𝟐𝟏𝟑
𝑯 𝟓𝟕𝟏𝟓
Finally, we use the ratio of 52.5% for determine the time t when Oetzi died.
𝒍𝒏 𝟎. 𝟓𝟐𝟓
𝒆𝒌𝒕 = 𝒆−𝟎.𝟎𝟎𝟎𝟏𝟐𝟏𝟑𝒕 = 𝟎. 𝟓𝟐𝟓 𝒕= = 𝟓𝟑𝟏𝟐
−𝟎. 𝟎𝟎𝟎𝟏𝟐𝟏𝟑
Solution:
Step 1: Set up the model. Let y(t) denote the amount of salt in the tank at
time t. Thus, its rate of change is:
𝒅𝒚
= −𝟎. 𝟎𝟏𝒅𝒕 𝒍𝒏 𝒚 − 𝟓𝟎𝟎𝟎 = −𝟎. 𝟎𝟏𝒕 + 𝑪′ 𝒚 − 𝟓𝟎𝟎𝟎 = 𝑪𝒆𝟎.𝟎𝟏𝒕
𝒚 − 𝟓𝟎𝟎𝟎
Determine the value of the constant C. Initially, y(0) = 100
𝒚 = 𝟓𝟎𝟎𝟎 − 𝟒𝟗𝟎𝟎𝒆𝟎.𝟎𝟏𝒕
𝒚′ + 𝒑 𝒙 𝒚 = 𝒒(𝒙)
or
𝒅𝒚
𝒂𝟏 𝒙 + 𝒂𝟎 𝒙 𝒚 = 𝒒(𝒙)
𝒅𝒙
𝒈 𝒙 = 𝒆𝒑 𝒙 𝒅𝒙
𝒈 𝒙 𝒚′ + 𝒑 𝒙 𝒈 𝒙 𝒚 = 𝒒 𝒙 𝒈(𝒙)
𝒈 𝒙 𝒚′ + 𝒈′ 𝒙 𝒚 = 𝒒 𝒙 𝒈(𝒙)
The left side of the new equation is the derivative of 𝑔 𝑥 𝑦). The
differential equation has now become
𝒅
𝒈 𝒙 𝒚 = 𝒒 𝒙 𝒈(𝒙)
𝒅𝒙
𝒈 𝒙 𝒚 = න 𝒒 𝒙 𝒈 𝒙 𝒅𝒙 + 𝒄
𝟏 𝒄
𝒚 𝒙 = න 𝒒 𝒙 𝒈 𝒙 𝒅𝒙 +
𝒈(𝒙) 𝒈(𝒙)
Step 3: Write the left side of the resulting equation as the derivative of the
product of y and the integrating factor. The integrating factor is designed to
make this possible. The right side is a function of just the variable x.
Step 4: Integrate both sides of this equation and solve the resulting
equation for y, obtaining the general solution. The resulting general solution
may involve integrals which cannot be evaluated in elementary form.
Engineering Mathematics Tarife, 2023 | Page 29
Example # 8 – Linear DE
Solve 𝒚′ + 𝒚 = 𝒙
Solution:
The equation is linear with p(x) = 1 and q(x) = x. Thus, the integrating factor is
𝒆 𝒙𝒆 = 𝒙𝒅 𝒆 = 𝒙𝒅 𝒙 𝒑 .
𝒚 = 𝒙 − 𝟏 + 𝑪𝒆−𝒙
𝟑 𝟑 𝑪
Integrate to obtain 𝒙𝒚 = 𝒙𝟒 + 𝑪. Simplifying this, we have 𝒚 = 𝒙𝟑 +
𝟒 𝟒 𝒙
𝟑 𝟏𝟕
For the initial condition, we need 𝒚 𝟏 = + 𝑪 = 𝟓, 𝑪=
𝟒 𝟒
𝟑 𝟑 𝟏𝟕
Thus, the solution of the initial value problem is 𝒚= 𝒙 +
𝟒 𝟒𝒙
Engineering Mathematics Tarife, 2023 | Page 31
Example # 9 – Linear DE (IVP)
Suppose a tank contains 200 gallons of brine (salt mixed with water) in which
100 pounds of salt are dissolved. A mixture consisting of 1/8 pound of salt per
gallon is pumped into the tank at a rate of 3 gallons per minute, and the
mixture is continuously stirred. Brine also is allowed to empty out of the tank
at the same rate of 3 gallons per minute How much salt is in the tank at any
time?
′
𝟑 𝟑
𝑸 𝒕 + 𝑸=
𝟐𝟎𝟎 𝟖
𝟑 𝟑𝒕
An integrating factor is equal to . Multiply the differential equation to
𝒅𝒕
𝒆𝟎𝟎𝟐 =𝒆 𝟐𝟎𝟎
obtain
𝟑𝒕 ′ 𝟑 𝟑𝒕
𝑸𝒆𝟐𝟎𝟎 = 𝒆𝟐𝟎𝟎
𝟖
Engineering Mathematics Tarife, 2023 | Page 33
Example # 9 – Linear DE (IVP)
Solution:
Integrate to obtain
𝟑𝒕 𝟑 𝟐𝟎𝟎 𝟑𝒕
𝑸𝒆𝟐𝟎𝟎 = 𝒆𝟐𝟎𝟎 + 𝑪
𝟖 𝟑
Then,
𝟑𝒕
−
𝑸 𝒕 = 𝟐𝟓 + 𝑪𝒆 𝟐𝟎𝟎
Finally, we have
−𝟑𝒕
𝑸 𝒕 = 𝟐𝟓 + 𝟕𝟓𝒆𝟐𝟎𝟎
- Polynomials in which all terms are of the same degree, such as:
𝒇 𝒙, 𝒚 = 𝒇 𝒙, 𝒗𝒙 = 𝒙𝟎 𝒇 𝟏, 𝒗 = 𝒇(𝟏, 𝒗)
𝑴 𝒙, 𝒚 𝒅𝒙 + 𝑵 𝒙, 𝒚 𝒅𝒚 = 𝟎
are both homogeneous functions and are of the same degree in x and
y. By Theorems 1 and 2,
𝒅𝒚 𝒚
+𝒈 =𝟎
𝒅𝒙 𝒙
𝒅𝒗
𝒙 +𝒗+𝒈 𝒗 =𝟎
𝒅𝒙
Engineering Mathematics Tarife, 2023 | Page 38
Example # 10 – Homogeneous DE
Solve 𝒙𝟐 − 𝒙𝒚 + 𝒚𝟐 𝒅𝒙 − 𝒙𝒚𝒅𝒚 = 𝟎.
Solution:
Let y = vx,
𝒙𝟐 − 𝒙𝟐 𝒗 + 𝒙𝟐 𝒗𝟐 𝒅𝒙 − 𝒙𝟐 𝒗 𝒗𝒅𝒙 + 𝒙𝒅𝒗 = 𝟎
𝒅𝒙 𝒗𝒅𝒗
+ =𝟎
𝒙 𝒗−𝟏
Engineering Mathematics Tarife, 2023 | Page 39
Example # 10 – Homogeneous DE
Then,
𝒅𝒙 𝟏
+ 𝟏+ 𝒅𝒗 = 𝟎
𝒙 𝒗−𝟏
𝒍𝒏 𝒙 + 𝒗 + 𝒍𝒏 𝒗 − 𝟏 = 𝒍𝒏 𝒄 𝒙 𝒗 − 𝟏 𝒆𝒗 = 𝑪
Thus,
𝒚 𝒚
𝒙 − 𝟏 𝒆𝒙 = 𝑪
𝒙
𝒚
𝒚−𝒙 𝒆𝒙 =𝑪
Engineering Mathematics Tarife, 2023 | Page 40
Example # 11 – Homogeneous DE
Solve 𝒙𝒚𝒅𝒙 + 𝒙𝟐 + 𝒚𝟐 𝒅𝒚 = 𝟎
Solution:
Let x=vy,
𝒗𝒚𝟐 𝒗𝒅𝒚 + 𝒚𝒅𝒗 + 𝒗𝟐 𝒚𝟐 + 𝒚𝟐 𝒅𝒚 = 𝟎
𝒗 𝒗𝒅𝒚 + 𝒚𝒅𝒗 + 𝒗𝟐 + 𝟏 𝒅𝒚 = 𝟎
𝑴 𝒙, 𝒚 𝒅𝒙 + 𝑵 𝒙, 𝒚 𝒅𝒚 = 𝟎
𝑴 𝒙, 𝒚 𝒅𝒙 + 𝑵 𝒙, 𝒚 𝒅𝒚 = 𝒅𝝋 = 𝟎
Engineering Mathematics Tarife, 2023 | Page 42
Exact Differential Equations
But if 𝒅𝝋 = 𝟎, then 𝝋 𝒙, 𝒚 = constant. The equation becomes
𝝋 𝒙, 𝒚 = 𝑪
With C as an arbitrary constant which implicitly defines the
general solution of Mdx + Ndy = 0.
Test of Exactness:
Theorem 3: Let M(x,y) and N(x,y) be continuous and have
continuous first partial derivatives in a rectangular region R by
a<x<b, c<y<d. Then, a necessary and sufficient condition that
M(x,y)dx + N(x,y)dy be an exact differential is
𝝏𝑴 𝝏𝑵
=
𝝏𝒚 𝝏𝒙
𝒇 𝒙, 𝒚 = න 𝑴 𝒙, 𝒚 𝒅𝒙 + 𝒈(𝒚)
𝝏𝒇 ð
= න 𝑴 𝒙, 𝒚 𝒅𝒙 + 𝒈′ 𝒚 = 𝑵(𝒙, 𝒚)
𝝏𝒚 ð𝒚
Thus,
𝝏
𝒈′ 𝒚 = 𝑵 𝒙, 𝒚 − න 𝑴 𝒙, 𝒚 𝒅𝒙
𝝏𝒚
Integrate the equation above with respect to y and substitute back
to f(x,y). The implicit solution of the equation is f(x,y) = C.
𝝏𝑭 𝝏𝑭
= 𝑴 = 𝟑𝒙𝟐 𝒚 − 𝟔𝒙, = 𝑵 = 𝒙𝟑 + 𝟐𝒚
𝝏𝒙 𝝏𝒚
𝑭 = 𝒙𝟑 𝒚 − 𝟑𝒙𝟐 + 𝑻(𝒚)
Engineering Mathematics Tarife, 2023 | Page 46
Example # 12 – Exact DE
Differentiating F with respect to y and equating it to N(x,y),
𝒙𝟑 + 𝑻′ 𝒚 = 𝒙𝟑 + 𝟐𝒚
𝑻′ 𝒚 = 𝟐𝒚
Then,
𝑻 𝒚 = 𝒚𝟐 ,
Substituting this to F,
𝑭 = 𝒙𝟑 𝒚 − 𝟑𝒙𝟐 + 𝒚𝟐
Finally,
𝒙𝟑 𝒚 − 𝟑𝒙𝟐 + 𝒚𝟐 = 𝑪
𝝏𝑭 𝝏𝑭
= 𝟐𝒙𝟑 − 𝒙𝒚𝟐 − 𝟐𝒚 + 𝟑, = −𝒙𝟐 𝒚 − 𝟐𝒙
𝝏𝒙 𝝏𝒚
𝟏
𝑭 = − 𝒙𝟐 𝒚𝟐 − 𝟐𝒙𝒚 + 𝑸(𝒙)
𝟐
Therefore,
𝟏 𝟒
𝑸 𝒙 = 𝒙 + 𝟑𝒙,
𝟐
𝟏 𝟐 𝟐 𝟏 𝟒 𝟏
− 𝒙 𝒚 − 𝟐𝒙𝒚 + 𝒙 + 𝟑𝒙 = 𝑪
𝟐 𝟐 𝟐
𝒙𝟒 − 𝒙𝟐 𝒚𝟐 − 𝟒𝒙𝒚 + 𝟔𝒙 = 𝑪
Engineering Mathematics Tarife, 2023 | Page 49
Homework # 1 – First Order Differential Equations