Lecture 3
Lecture 3
Lecture 3
Emad Al-Hemiary
Second Year, First Semester ODE
Basic Concepts
A differential equation is an equation involving an unknown function and its derivatives
Ordinary Differential Equation (ODE)
A differential equation where the unknown function depends on one independent variable.
Partial Differential Equation (PDE)
A differential equation where the unknown function depends on two or more independent
variables.
Example 3.1: The following are differential equations involving unknown function 𝑦
𝑑𝑦
= 5𝑥 + 4
𝑑𝑥
𝑦
𝑑2𝑦 𝑑𝑦 2
𝑒 + 2( ) = 1 𝑂𝐷𝐸
𝑑𝑥 2 𝑑𝑥
𝑑3𝑦 𝑑2𝑦
4 3 + sin 𝑥 2 + 3𝑥𝑦 = 0}
𝑑𝑥 𝑑𝑥
𝜕 2𝑦 𝜕 2𝑦
− 4 = 0} 𝑃𝐷𝐸
𝜕𝑡 2 𝜕𝑥 2
The order of a differential equation is the order of the highest derivative appearing in the
equation.
In example 3.1, equation 1 is first-order, equation 2 is second order, while equation 3 is third
order.
Notation:
The following notations are used interchangeable:
𝑑𝑦 𝑑2 𝑦 𝑑4 𝑦 𝑑𝑛 𝑦
𝑦 ′ → 𝑑𝑥 , 𝑦 ′′ → 𝑑𝑥 2 , 𝑦 (4) → 𝑑𝑥 4 , …, 𝑦 (𝑛) → 𝑑𝑥 𝑛
1
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Solution:
Differentiating 𝑦(𝑥):
𝑦 ′ = 2𝑐1 cos 2𝑥 − 2𝑐2 sin 2𝑥
𝑦 ′′ = −4𝑐1 sin 2𝑥 − 4𝑐2 cos 2𝑥
Hence:
𝑦 ′′ + 4𝑦 = (−4𝑐1 sin 2𝑥 − 4𝑐2 cos 2𝑥) + 4(𝑐1 sin 2𝑥 + 𝑐2 cos 2𝑥)
= −4𝑐1 sin 2𝑥 − 4𝑐2 cos 2𝑥 + 4𝑐1 sin 2𝑥 + 4𝑐2 cos 2𝑥 = 0
Thus, 𝑦(𝑥) = 𝑐1 sin 2𝑥 + 𝑐2 cos 2𝑥 satisfies the differential equation for all values of 𝑥 and is a
solution on the interval (−∞, ∞).
2
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Example 3.4:
• The problem 𝑦 ′′ + 2𝑦 ′ = 𝑒 𝑥 ; 𝑦(𝜋) = 1, 𝑦 ′ (𝜋) = 2 is an initial value problem because the
two subsidiary conditions are both given at 𝑥 = 𝜋.
• The problem 𝑦 ′′ + 2𝑦 ′ = 𝑒 𝑥 ; 𝑦(0) = 1, 𝑦(1) = 1 is a boundary value problem because the
two subsidiary conditions are both given at different values 𝑥 = 0 𝑎𝑛𝑑 𝑥 = 1.
A solution to an initial-value or boundary-value problem is a function 𝑦(𝑥) that both solves the
differential equation and satisfies all given subsidiary conditions.
Example 3.5
Determine the order, unknown function, and the independent variable in each of the
following differential equations:
3
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Example 3.8
1
Show that 𝑦 = (𝑥 2−1) is a solution of 𝑦 ′ + 2𝑥𝑦 2 = 0 on ℐ = (−1,1) but not on any larger interval
containing ℐ.
Solution:
1 −2𝑥
On the interval ℐ = (−1,1), 𝑦 = (𝑥 2−1) and its derivative 𝑦 ′ = (𝑥 2 −1)2 are well-defined functions.
Substituting these values into the differential equation, we have:
−2𝑥 1
𝑦 ′ + 2𝑥𝑦 2 = + 2𝑥 [ ]=0
(𝑥 2 − 1)2 (𝑥 2 − 1)
1
Thus 𝑦 = (𝑥 2−1) is a solution in ℐ = (−1,1).
1
Note: however, that (𝑥 2 −1) is not defined at 𝑥 = ±1 and therefore could not be a solution on
any interval containing either of these two points.
Example 3.9
Find the solution to the initial-value problem 𝑦 ′ + 𝑦 = 0; 𝑦(3) = 2, if the general solution to
the differential equation is known to be 𝑦(𝑥) = 𝑐1 𝑒 −𝑥 , where 𝑐1 is an arbitrary constant.
Solution:
Since 𝑦(𝑥) = 𝑐1 𝑒 −𝑥 is a solution to the general initial-value problem 𝑦 ′ + 𝑦 = 0; 𝑦(3) = 2, then:
2
𝑦(3) = 2 = 𝑐1 𝑒 −3 → 𝑐1 = 𝑒 −3 = 2𝑒 3 .
4
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Solution:
We proceed the same way:
𝑦(𝑥) = 𝑐1 sin 2𝑥 + 𝑐2 cos 2𝑥 → 𝑦(0) = 0 = 𝑐1 sin(0) + 𝑐2 cos(0) → 𝑐2 = 0
1
𝑦 ′ = 2𝑐1 cos 2𝑥 − 2𝑐2 sin 2𝑥 → 𝑦 ′ (0) = 2𝑐1 cos(0) − 2𝑐2 sin(0) → 1 = 2𝑐1 → 𝑐1 =
2
Thus:
1
𝑦(𝑥) = 2 sin 2𝑥 is a solution of the initial-value problem 𝑦 ′′ + 4𝑦 = 0
5
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Separable Equations:
Consider a differential equation in differential form. If 𝑀 is a function of 𝑥 only and 𝑁 is a
function of 𝑦 only then the ODE is separable.
Exact Equations:
A differential equation in differential form is exact if:
𝜕𝑀(𝑥, 𝑦) 𝜕𝑁(𝑥, 𝑦)
=
𝜕𝑦 𝜕𝑥
Mathematical Modeling
Mathematical models can be thought of as equations.
Example 3.11:
𝑉 = 𝐼𝑅 models the voltage drop (measured in volts) across a resistor (measured in ohms),
where 𝐼 is the current (measured in amperes).
Modeling Cycle:
Mathematical
Model
Real Mathematical
World Interpretation/ Solution
Communication
Example 3.12
Write the differential equation 𝑥𝑦′ — 𝑦 2 = 0 in standard form.
Solution:
Solving for 𝑦′, we get 𝑥𝑦 ′ = 𝑦 2 → 𝑦 ′ = 𝑦 2 /𝑥
Example 3.13
Write the differential equation 𝑒 𝑥 𝑦 ′ + 𝑒 2𝑥 𝑦 = sin 𝑥 in standard form
6
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Solution
Solving for 𝑦′, we get
𝑒 𝑥 𝑦 ′ = −𝑒 2𝑥 𝑦 + sin 𝑥
Or
𝑦 ′ = −𝑒 𝑥 𝑦 + 𝑒 −𝑥 sin 𝑥
Example 3.14
Write the differential equation 𝑦(𝑦𝑦′ − 1) = 𝑥 in differential form
Solution
Solving for 𝑦′, we have
𝑥
𝑥 +1 𝑥+𝑦
𝑦
𝑦𝑦 ′ − 1 = → 𝑦 ′ = → 𝑦′ = (𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑓𝑜𝑟𝑚)
𝑦 𝑦 𝑦2
There are infinitely many different differential forms associated with this standard form.
Three such forms are:
A) 𝑀(𝑥, 𝑦) = 𝑥 + 𝑦, 𝑎𝑛𝑑 𝑁(𝑥, 𝑦) = −𝑦 2 then:
𝑀(𝑥, 𝑦) 𝑥+𝑦 𝑥+𝑦
= 2
=
−𝑁(𝑥, 𝑦) −(−𝑦 ) 𝑦2
and it is equivalent to the differential form:
(𝑥 + 𝑦) 𝑑𝑥 + (−𝑦 2 ) 𝑑𝑦 = 0
𝑦2
B) Take 𝑀(𝑥, 𝑦) = −1, 𝑁(𝑥, 𝑦) = 𝑥+𝑦, then:
𝑀(𝑥, 𝑦) −1 𝑥+𝑦
= 2 =
−𝑁(𝑥, 𝑦) −𝑦 𝑦2
𝑥+𝑦
and it is equivalent to the differential form:
𝑦2
(−1) 𝑑𝑥 + ( ) 𝑑𝑦 = 0
𝑥+𝑦
𝑥+𝑦 −𝑦 2
C) Take 𝑀(𝑥, 𝑦) = 2 , 𝑁(𝑥, 𝑦) = 2 , then:
𝑥+𝑦
𝑀(𝑥, 𝑦) 2 𝑥+𝑦
= 2 =
−𝑁(𝑥, 𝑦) −𝑦 𝑦2
−( 2 )
and it is equivalent to the differential form:
𝑥+𝑦 −𝑦 2
( ) 𝑑𝑥 + ( ) 𝑑𝑦 = 0
2 2
7
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
Example 3.15
Determine if the following differential equations are linear:
(a) 𝑦 ′ = (sin 𝑥)𝑦 + 𝑒 𝑥
The equation is linear; here 𝑝(𝑥) = −sin 𝑥 and 𝑞(𝑥) = 𝑒 𝑥 .
(b) 𝑦 ′ = 𝑥 sin 𝑦 + 𝑒 𝑥
The equation is not linear because of the term sin 𝑦.
(c) 𝑦 ′ = 5
This equation is linear, here 𝑝(𝑥) = 0 and 𝑞(𝑥) = 5.
(d) 𝑦 ′ = 𝑦 2 + 𝑥
The equation is not linear because of the term 𝑦 2
Example 3.16
Determine if the following differential equations are homogeneous
𝑦+𝑥
(a) 𝑦 ′ = 𝑥
The equation is homogeneous, since
𝑡𝑦 + 𝑡𝑥 𝑡(𝑦 + 𝑥) 𝑦 + 𝑥
𝑓(𝑡𝑥, 𝑡𝑦) = = = = 𝑓(𝑥, 𝑦)
𝑡𝑥 𝑡𝑥 𝑥
𝑦2
(b) 𝑦 ′ = 𝑥
The equation is not homogeneous, since
(𝑡𝑦)2 𝑡 2 𝑦 2 𝑡𝑦
𝑓(𝑡𝑥, 𝑡𝑦) = = = ≠ 𝑓(𝑥, 𝑦)
𝑡𝑥 𝑡𝑥 𝑥
2𝑥𝑦𝑒 𝑥/𝑦
(c) 𝑦 ′ = 𝑥 2 +𝑦 2 sin 𝑥/𝑦
The equation is homogeneous, since
2(𝑡𝑥)(𝑡𝑦)𝑒 𝑡𝑥/𝑡𝑦 𝑡 2 (2𝑥𝑦𝑒 𝑥/𝑦 ) 2𝑥𝑦𝑒 𝑥/𝑦
𝑓(𝑡𝑥, 𝑡𝑦) = = = = 𝑓(𝑥, 𝑦)
(𝑡𝑥)2 + (𝑡𝑦)2 sin 𝑡𝑥/𝑡𝑦 𝑡 2 (𝑥 2 + 𝑦 2 sin 𝑥/𝑦) 𝑥 2 + 𝑦 2 sin 𝑥/𝑦
𝑥 2 +𝑦
(d) 𝑦 ′ = 𝑥3
The equation is not homogeneous, since
(𝑡𝑥)2 + 𝑡𝑦 𝑡𝑥 2 + 𝑦
𝑓(𝑡𝑥, 𝑡𝑦) = = 2 3 ≠ 𝑓(𝑥, 𝑦)
(𝑡𝑥)3 𝑡 𝑥
Example 3.17
Determine if the following differential equations are separable:
(a) sin 𝑥 𝑑𝑥 + 𝑦 2 𝑑𝑦 = 0
The differential equation is separable; here 𝑀(𝑥, 𝑦) = 𝐴(𝑥) = sin 𝑥 𝑎𝑛𝑑 𝑁(𝑥, 𝑦) =
𝐵(𝑦) = 𝑦2
(b) 𝑥𝑦 2 𝑑𝑥 − 𝑥 2 𝑦 2 𝑑𝑦 = 0
8
Engineering Mathematics I Lecture 3: Prof. Dr. Emad Al-Hemiary
Second Year, First Semester ODE
The equation is not separable in its present form, since 𝑀(𝑥, 𝑦) = 𝑥𝑦 2 is not a function
of 𝑥 alone. But if we divide both sides of the equation by 𝑥 2 𝑦 2 , we obtain the equation
1
(𝑥) 𝑑𝑥 + (−1)𝑑𝑦 = 0, which is separable. Here, 𝐴(𝑥) = 1/𝑥 𝑎𝑛𝑑 𝐵(𝑦) = −1.
(c) (1 + 𝑥𝑦)𝑑𝑥 + 𝑦𝑑𝑦 = 0
The equation is not separable, since 𝑀(𝑥, 𝑦) = 1 + 𝑥𝑦, which is not a function of 𝑥 alone.
Example 3.18
Determine whether the following differential equations are exact:
(a) 3𝑥 2 𝑦𝑑𝑥 + (𝑦 + 𝑥 3 )𝑑𝑦 = 0
𝜕𝑀 𝜕𝑁
The equation is exact; here 𝑀(𝑥, 𝑦) = 3𝑥 2 𝑦, 𝑁(𝑥, 𝑦) = 𝑦 + 𝑥 3 , and = = 3𝑥 2
𝜕𝑦 𝜕𝑥
(b) 𝑥𝑦𝑑𝑥 + 𝑦 2 𝑑𝑦 = 0
𝜕𝑀 𝜕𝑁 𝜕𝑀
The equation is not exact; here 𝑀(𝑥, 𝑦) = 𝑥𝑦, 𝑁(𝑥, 𝑦) = 𝑦 2 , and = 𝑥, 𝜕𝑥 = 0 and ≠
𝜕𝑦 𝜕𝑦
𝜕𝑁
𝜕𝑥