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

Unit 2 – First Order ODE

Linear Equations
First order equations that do not contain products, powers, or other non-
𝑑𝑑𝑑𝑑
linear combinations of the dependent variable 𝑦𝑦 and its derivative �𝑑𝑑𝑑𝑑 are
considered linear in the dependent variable 𝑦𝑦.

𝑑𝑑𝑑𝑑
A differential equation 𝑑𝑑𝑑𝑑
= 𝑓𝑓(𝑥𝑥, 𝑦𝑦) is considered linear in 𝑦𝑦 if and only if it
can be written in the form
𝑑𝑑𝑑𝑑
+ 𝑃𝑃 𝑥𝑥 𝑦𝑦 = 𝑄𝑄(𝑥𝑥)
𝑑𝑑𝑑𝑑
where 𝑃𝑃(𝑥𝑥) and 𝑄𝑄(𝑥𝑥) are either constants or functions of 𝑥𝑥 only.

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


2
Unit 2.4 - Linear
Linear Equations
𝑑𝑑𝑑𝑑
In the same way, a differential equation 𝑑𝑑𝑑𝑑
= 𝑓𝑓(𝑥𝑥, 𝑦𝑦) is considered linear in 𝑥𝑥
if and only if it can be written in the form
𝑑𝑑𝑑𝑑
+ 𝑆𝑆 𝑦𝑦 𝑥𝑥 = 𝑅𝑅(𝑦𝑦)
𝑑𝑑𝑑𝑑
where 𝑆𝑆(𝑦𝑦) and 𝑅𝑅(𝑦𝑦) are either constants or functions of 𝑦𝑦 only.

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


3
Unit 2.4 - Linear
Standard Forms
Equations linear in 𝑦𝑦:
𝑑𝑑𝑑𝑑
+ 𝑃𝑃 𝑥𝑥 𝑦𝑦 = 𝑄𝑄 𝑥𝑥
𝑑𝑑𝑑𝑑

𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑

Examples:
𝑑𝑑𝑑𝑑 + 5𝑥𝑥 2 𝑦𝑦 𝑑𝑑𝑑𝑑 = 2𝑥𝑥 𝑑𝑑𝑑𝑑

3
𝑑𝑑𝑑𝑑 + 4𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑑𝑑𝑑𝑑
𝑥𝑥
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
4
Unit 2.4 - Linear
Standard Forms
Equations linear in 𝑥𝑥:
𝑑𝑑𝑑𝑑
+ 𝑆𝑆(𝑦𝑦) 𝑥𝑥 = 𝑅𝑅 𝑦𝑦
𝑑𝑑𝑑𝑑

𝑑𝑑𝑑𝑑 + 𝑆𝑆 𝑦𝑦 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑅𝑅 𝑦𝑦 𝑑𝑑𝑑𝑑

Examples:
𝑑𝑑𝑑𝑑 + 2𝑦𝑦 3 𝑥𝑥 𝑑𝑑𝑑𝑑 = 3𝑦𝑦 4 𝑑𝑑𝑑𝑑

4𝑥𝑥
𝑑𝑑𝑑𝑑 + 𝑑𝑑𝑑𝑑 = 7 𝑑𝑑𝑑𝑑
𝑦𝑦
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
5
Unit 2.4 - Linear
Solution
For the linear differential equation

𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦𝑦𝑦𝑦𝑦 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑

there must be a exist a function of 𝑥𝑥, 𝐹𝐹(𝑥𝑥), such that when


multiplied to the whole equation, the left side of the equation is
transformed into a total differential of the product of 𝐹𝐹 𝑥𝑥 � 𝑦𝑦, that is

𝐹𝐹 𝑥𝑥 𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑

𝐹𝐹 𝑥𝑥 𝑑𝑑𝑑𝑑 + 𝐹𝐹 𝑥𝑥 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝐹𝐹 𝑥𝑥 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 1]


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
6
Unit 2.4 - Linear
Solution
𝐹𝐹 𝑥𝑥 𝑑𝑑𝑑𝑑 + 𝐹𝐹 𝑥𝑥 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝐹𝐹 𝑥𝑥 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 1]

The left side of 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 1 is almost equivalent to the total differential of the
product 𝐹𝐹 𝑥𝑥 � 𝑦𝑦 or, expanded,

𝑑𝑑 𝐹𝐹 𝑥𝑥 � 𝑦𝑦 = 𝐹𝐹 𝑥𝑥 𝑑𝑑𝑑𝑑 + 𝑦𝑦 𝑑𝑑𝑑𝑑 𝑥𝑥

To meet this objective,


𝑑𝑑𝑑𝑑 𝑥𝑥 = 𝐹𝐹 𝑥𝑥 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑 must be true.
So, we need to find 𝐹𝐹(𝑥𝑥).

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


7
Unit 2.4 - Linear
Solution 𝑑𝑑𝑑𝑑 𝑥𝑥 = 𝐹𝐹 𝑥𝑥 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
Separating the variables,
𝑑𝑑𝑑𝑑 𝑥𝑥
= 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝐹𝐹 𝑥𝑥
Integrating both sides,
𝑑𝑑𝑑𝑑 𝑥𝑥
� = � 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝐹𝐹 𝑥𝑥

ln 𝐹𝐹(𝑥𝑥) = � 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑

𝑭𝑭 𝒙𝒙 = 𝒆𝒆∫ 𝑷𝑷 𝒙𝒙 𝒅𝒅𝒅𝒅

This is known as the integrating factor.


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
8
Unit 2.4 - Linear
Solution
𝐹𝐹 𝑥𝑥 𝑑𝑑𝑑𝑑 + 𝐹𝐹 𝑥𝑥 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝐹𝐹 𝑥𝑥 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 1]
Substituting the integrating factor to 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 1,

𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 + 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 2]

The left side of 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 2 is simply the total differential of the product 𝑦𝑦 �
𝑒𝑒 ∫ 𝑃𝑃(𝑥𝑥)𝑑𝑑𝑑𝑑 (Product Rule):
𝑑𝑑 𝑦𝑦 � 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 𝑃𝑃(𝑥𝑥)𝑑𝑑𝑑𝑑 � 𝑑𝑑𝑑𝑑 + 𝑦𝑦 � 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑 � 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
Note that the left side of 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 2 will always be the total differential of
the product of the dependent variable and the integrating factor.
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
9
Unit 2.4 - Linear
Solution
𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 + 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 2]
We can therefore rewrite 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 2 as

𝑑𝑑 𝑦𝑦 � 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
= 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑, [𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 3]
Integrating both sides,
� 𝑑𝑑 𝑦𝑦 � 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
= � 𝑒𝑒 ∫ 𝑃𝑃 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑

𝒚𝒚 � 𝒆𝒆∫ 𝑷𝑷 𝒙𝒙 𝒅𝒅𝒅𝒅
= � 𝒆𝒆∫ 𝑷𝑷 𝒙𝒙 𝒅𝒅𝒅𝒅
𝑸𝑸 𝒙𝒙 𝒅𝒅𝒅𝒅

This is now the general solution to the linear differential equation.


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
10
Unit 2.4 - Linear
Steps to the Solution
1. Determine if the equation is linear in 𝑦𝑦 or 𝑥𝑥.
2. Write the given equation into its equivalent standard form.

Linear in 𝒚𝒚 Linear in 𝒙𝒙
𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 + 𝑆𝑆 𝑦𝑦 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑅𝑅 𝑦𝑦 𝑑𝑑𝑑𝑑

Pick out 𝑃𝑃(𝑥𝑥) or 𝑆𝑆(𝑦𝑦) to prepare you for the next step.
3. Determine the integrating factor.
Linear in 𝒚𝒚 Linear in 𝒙𝒙
𝐹𝐹 𝑥𝑥 = 𝑒𝑒 ∫ 𝑃𝑃(𝑥𝑥)𝑑𝑑𝑑𝑑 𝐹𝐹 𝑦𝑦 = 𝑒𝑒 ∫ 𝑆𝑆(𝑦𝑦)𝑑𝑑𝑑𝑑
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
11
Unit 2.4 - Linear
Steps to the Solution
4. Multiply the standard equation by the integrating factor.

5. Solve the resulting equation. Note that the integral of the left side of the
equation is always the product of the dependent variable and the
integrating factor.

Let’s try an example!

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


12
Unit 2.4 - Linear
Linear: Example 1
Find the general solution for
𝑦𝑦 ′ = 𝑥𝑥 − 2𝑦𝑦 cot 2𝑥𝑥
Note: Always check which type of differential equation the given falls under.
For linear ODEs, they are easily recognizable since the dependent variable
appears only in one term, and of the first degree.

1. Linear in 𝑦𝑦 or 𝑥𝑥?
The equation cannot be linear in 𝑥𝑥 since cot 2𝑥𝑥 is non-linear term.
The variable 𝑦𝑦 appears only in one term and in the first degree.
The equation must be linear in 𝑦𝑦.
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
13
Unit 2.4 - Linear
Linear: Example 1
Find the general solution for
𝑦𝑦 ′ = 𝑥𝑥 − 2𝑦𝑦 cot 2𝑥𝑥

2. Write in standard form 𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑.


𝑑𝑑𝑑𝑑
+ 2 cot 2𝑥𝑥 � 𝑦𝑦 = 𝑥𝑥
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 + 2 cot 2𝑥𝑥 � 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑥𝑥 𝑑𝑑𝑑𝑑
3. Based on this equation, 𝑃𝑃 𝑥𝑥 = 2 cot 2𝑥𝑥, giving us an integrating factor

𝐹𝐹 𝑥𝑥 = 𝑒𝑒 ∫ 𝑃𝑃(𝑥𝑥)𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 2 cot 2𝑥𝑥𝑑𝑑𝑑𝑑


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
14
Unit 2.4 - Linear
Linear: Example 1
𝐹𝐹 𝑥𝑥 = 𝑒𝑒 ∫ 𝑃𝑃(𝑥𝑥)𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 2 cot 2𝑥𝑥𝑑𝑑𝑑𝑑
To simplify the integrating factor, we solve for the integral
� 2 cot 2𝑥𝑥 𝑑𝑑𝑑𝑑

2 cos 2𝑥𝑥
=� 𝑑𝑑𝑑𝑑
sin 2𝑥𝑥
Let 𝑢𝑢 = sin 2𝑥𝑥 , 𝑑𝑑𝑑𝑑 = 2 cos 2𝑥𝑥 𝑑𝑑𝑑𝑑. The integral becomes
1
= � 𝑑𝑑𝑑𝑑 = ln 𝑢𝑢 = ln sin 2𝑥𝑥
𝑢𝑢
Note that we didn’t add an integration constant at this point.
We then plug this value in to the integrating factor 𝐹𝐹(𝑥𝑥).
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
15
Unit 2.4 - Linear
Linear: Example 1
𝐹𝐹 𝑥𝑥 = 𝑒𝑒 ∫ 2 cot 2𝑥𝑥𝑑𝑑𝑑𝑑 = 𝑒𝑒 ln sin 2𝑥𝑥

𝐹𝐹 𝑥𝑥 = sin 2𝑥𝑥
4. Multiplying the integrating factor to the entire equation,

sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 + 2 cot 2𝑥𝑥 � 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑥𝑥 𝑑𝑑𝑑𝑑

sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 + sin 2𝑥𝑥 � 2 cot 2𝑥𝑥 � 𝑦𝑦 𝑑𝑑𝑑𝑑 = sin 2𝑥𝑥 � 𝑥𝑥 𝑑𝑑𝑑𝑑
The entire left side can be written as the total differential of the product of
the dependent variable and the integrating factor.

𝑑𝑑 𝑦𝑦 � sin 2𝑥𝑥 = sin 2𝑥𝑥 � 𝑥𝑥 𝑑𝑑𝑑𝑑


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
16
Unit 2.4 - Linear
Linear: Example 1
𝑑𝑑 𝑦𝑦 � sin 2𝑥𝑥 = sin 2𝑥𝑥 � 𝑥𝑥 𝑑𝑑𝑑𝑑
5. Integrating both sides,
� 𝑑𝑑 𝑦𝑦 � sin 2𝑥𝑥 = � 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑

𝑦𝑦 sin 2𝑥𝑥 = � 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑

To integrate the right side, we use integration by parts.


𝑢𝑢 = 𝑥𝑥, 𝑑𝑑𝑑𝑑 = sin 2𝑥𝑥 𝑑𝑑𝑑𝑑
1
𝑑𝑑𝑑𝑑 = 𝑑𝑑𝑑𝑑, 𝑣𝑣 = − cos 2𝑥𝑥
2
1 1
� 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑥𝑥 − cos 2𝑥𝑥 − � − cos 2𝑥𝑥 𝑑𝑑𝑑𝑑
2 2
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
17
Unit 2.4 - Linear
Linear: Example 1
𝑦𝑦 sin 2𝑥𝑥 = � 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑

1 1
� 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑥𝑥 − cos 2𝑥𝑥 − � − cos 2𝑥𝑥 𝑑𝑑𝑑𝑑
2 2
1 1
� 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 = − 𝑥𝑥 cos 2𝑥𝑥 + � cos 2𝑥𝑥 𝑑𝑑𝑑𝑑
2 2
1 1 1
� 𝑥𝑥 sin 2𝑥𝑥 𝑑𝑑𝑑𝑑 = − 𝑥𝑥 cos 2𝑥𝑥 + sin 2𝑥𝑥 + 𝑐𝑐
2 2 2
The general solution is now
1 1
𝑦𝑦 sin 2𝑥𝑥 = − 𝑥𝑥 cos 2𝑥𝑥 + sin 2𝑥𝑥 + 𝑐𝑐
2 4
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
18
Unit 2.4 - Linear
Linear: Example 1
1 1
𝑦𝑦 sin 2𝑥𝑥 = − 𝑥𝑥 cos 2𝑥𝑥 + sin 2𝑥𝑥 + 𝑐𝑐
2 4

Dividing the equation by sin 2𝑥𝑥 to isolate 𝑦𝑦,

𝟏𝟏 𝟏𝟏
𝒚𝒚 = − 𝒙𝒙 𝐜𝐜𝐜𝐜𝐜𝐜 𝟐𝟐𝟐𝟐 + + 𝒄𝒄 𝐜𝐜𝐜𝐜𝐜𝐜 𝟐𝟐𝟐𝟐
𝟐𝟐 𝟒𝟒

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


19
Unit 2.4 - Linear
Linear: Example 2
Find the general solution for

2𝑦𝑦 𝑦𝑦 2 − 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑑𝑑𝑑𝑑

1. Linear in 𝑦𝑦 or 𝑥𝑥?
To check this, we expand the equation.

2𝑦𝑦 3 𝑑𝑑𝑑𝑑 − 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦 = 𝑑𝑑𝑑𝑑


The equation cannot be linear in 𝑦𝑦 since 𝑦𝑦 3 is a non−linear term.
The variable 𝑥𝑥 appears only in one term and in the first degree.
The equation must be linear in 𝑥𝑥.
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
20
Unit 2.4 - Linear
Linear: Example 2
Find the general solution for
2𝑦𝑦 𝑦𝑦 2 − 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑑𝑑𝑑𝑑
2. Rewrite in standard form 𝑑𝑑𝑑𝑑 + 𝑆𝑆 𝑦𝑦 𝑥𝑥 𝑑𝑑𝑑𝑑 = 𝑅𝑅 𝑦𝑦 𝑑𝑑𝑑𝑑.
𝑑𝑑𝑑𝑑 = 2𝑦𝑦 3 𝑑𝑑𝑑𝑑 − 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦

𝑑𝑑𝑑𝑑 + 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦 = 2𝑦𝑦 3 𝑑𝑑𝑑𝑑


3. Here, 𝑆𝑆 𝑦𝑦 = 2𝑦𝑦, giving us an integrating factor of

𝐹𝐹 𝑦𝑦 = 𝑒𝑒 ∫ 𝑆𝑆(𝑦𝑦)𝑑𝑑𝑑𝑑 = 𝑒𝑒 ∫ 2𝑦𝑦𝑑𝑑𝑑𝑑
To simplify the integrating factor, we solve for the integral
� 2𝑦𝑦 𝑑𝑑𝑑𝑑

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


21
Unit 2.4 - Linear
Linear: Example 2
� 2𝑦𝑦 𝑑𝑑𝑑𝑑

Integrating, we get
� 2𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑦𝑦 2

Plugging this in to the integrating factor,


2
𝐹𝐹 𝑦𝑦 = 𝑒𝑒 ∫ 2𝑦𝑦𝑑𝑑𝑑𝑑 = 𝑒𝑒 𝑦𝑦
4. Multiplying the integrating factor to the entire equation,
𝑦𝑦 2
𝑒𝑒 𝑑𝑑𝑑𝑑 + 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦 = 2𝑦𝑦 3 𝑑𝑑𝑑𝑑
𝑦𝑦 2 𝑦𝑦 2 𝑦𝑦 2
𝑒𝑒 𝑑𝑑𝑑𝑑 + 𝑒𝑒 � 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦 = 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
22
Unit 2.4 - Linear
Linear: Example 2
𝑦𝑦 2 𝑦𝑦 2 𝑦𝑦 2
𝑒𝑒 𝑑𝑑𝑑𝑑 + 𝑒𝑒 � 2𝑦𝑦𝑦𝑦𝑦𝑦𝑦𝑦 = 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑
Automatically, the entire left side can be written as the total differential of the
product of the dependent variable and the integrating factor.

𝑦𝑦 2 𝑦𝑦 2
𝑑𝑑 𝑥𝑥 � 𝑒𝑒 = 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑
5. Integrating both sides,
𝑦𝑦 2 𝑦𝑦 2
� 𝑑𝑑 𝑥𝑥 � 𝑒𝑒 = � 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑

𝑦𝑦 2 𝑦𝑦 2
𝑥𝑥 � 𝑒𝑒 = � 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑

To integrate the right side, we use substitution, and then integration by parts.
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
23
Unit 2.4 - Linear
Linear: Example 2
𝑦𝑦 2 𝑦𝑦 2
𝑥𝑥 � 𝑒𝑒 = � 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑

𝑤𝑤 = 𝑦𝑦 2 , 𝑑𝑑𝑑𝑑 = 2𝑦𝑦 𝑑𝑑𝑑𝑑


𝑦𝑦 2
� 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑 = � 𝑒𝑒 𝑤𝑤 � 𝑤𝑤 𝑑𝑑𝑑𝑑

Setting up the integral for integration by parts,


𝑢𝑢 = 𝑤𝑤, 𝑑𝑑𝑑𝑑 = 𝑒𝑒 𝑤𝑤 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 = 𝑑𝑑𝑑𝑑, 𝑣𝑣 = 𝑒𝑒 𝑤𝑤
� 𝑒𝑒 𝑤𝑤 � 𝑤𝑤 𝑑𝑑𝑑𝑑 = 𝑤𝑤 𝑒𝑒 𝑤𝑤 − � 𝑒𝑒 𝑤𝑤 𝑑𝑑𝑑𝑑

= 𝑤𝑤 𝑒𝑒 𝑤𝑤 − 𝑒𝑒 𝑤𝑤 + 𝑐𝑐
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
24
Unit 2.4 - Linear
Linear: Example 2
𝑦𝑦 2 𝑦𝑦2
𝑥𝑥 � 𝑒𝑒 = � 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑

� 𝑒𝑒 𝑤𝑤 � 𝑤𝑤 𝑑𝑑𝑑𝑑 = 𝑤𝑤 𝑒𝑒 𝑤𝑤 − 𝑒𝑒 𝑤𝑤 + 𝑐𝑐

Reverting to the original value of 𝑤𝑤,


𝑦𝑦 2 2 2
� 𝑒𝑒 � 2𝑦𝑦 3 𝑑𝑑𝑑𝑑 = 2
𝑦𝑦 𝑒𝑒 𝑦𝑦
− 𝑒𝑒 𝑦𝑦
+ 𝑐𝑐

The general solution is now


𝑦𝑦 2 2 𝑦𝑦 2 𝑦𝑦 2
𝑥𝑥 � 𝑒𝑒 = 𝑦𝑦 𝑒𝑒 − 𝑒𝑒 + 𝑐𝑐
𝑦𝑦 2
Dividing both sides by 𝑒𝑒 to isolate 𝑥𝑥,
𝟐𝟐
𝒄𝒄
𝒙𝒙 = 𝒚𝒚 − 𝟏𝟏 + 𝒚𝒚𝟐𝟐
𝒆𝒆
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
25
Unit 2.4 - Linear
Linear: Example 3
Find the particular solution for
1 + 𝑡𝑡 2 𝑑𝑑𝑑𝑑 + 2𝑡𝑡 𝑠𝑠𝑡𝑡 2 − 3 1 + 𝑡𝑡 2 2
𝑑𝑑𝑑𝑑 = 0
when 𝑡𝑡 = 0, 𝑠𝑠 = 2.

1. Linear in 𝑦𝑦 or 𝑥𝑥?
To check this, we expand the equation.
𝑑𝑑𝑑𝑑 + 𝑡𝑡 2 𝑑𝑑𝑑𝑑 + 2𝑠𝑠𝑡𝑡 3 𝑑𝑑𝑑𝑑 − 6𝑡𝑡 1 + 𝑡𝑡 2 2 𝑑𝑑𝑑𝑑 = 0
The equation cannot be linear in 𝑡𝑡 since 𝑡𝑡 2 and 𝑡𝑡 3 are a non-linear term.
The variable 𝑠𝑠 appears only in one term and in the first degree.
The equation must be linear in 𝑠𝑠.

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


26
Unit 2.4 - Linear
Linear: Example 3
Find the particular solution for
1 + 𝑡𝑡 2 𝑑𝑑𝑑𝑑 + 2𝑡𝑡 𝑠𝑠𝑡𝑡 2 − 3 1 + 𝑡𝑡 2 2
𝑑𝑑𝑑𝑑 = 0
when 𝑡𝑡 = 0, 𝑠𝑠 = 2.

2. Write in standard form 𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑥𝑥 𝑦𝑦 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑥𝑥 𝑑𝑑𝑑𝑑.


𝑑𝑑𝑑𝑑 + 𝑃𝑃 𝑡𝑡 𝑠𝑠 𝑑𝑑𝑑𝑑 = 𝑄𝑄 𝑡𝑡 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 + 𝑡𝑡 2 𝑑𝑑𝑑𝑑 + 2𝑠𝑠𝑡𝑡 3 𝑑𝑑𝑑𝑑 − 6𝑡𝑡 1 + 𝑡𝑡 2 2 𝑑𝑑𝑑𝑑 = 0
1 + 𝑡𝑡 2 𝑑𝑑𝑑𝑑 + 2𝑡𝑡 3 𝑠𝑠 𝑑𝑑𝑑𝑑 = 6𝑡𝑡 1 + 𝑡𝑡 2 2 𝑑𝑑𝑑𝑑
2𝑡𝑡 3 2
𝑑𝑑𝑑𝑑 + 2
𝑠𝑠 𝑑𝑑𝑑𝑑 = 6𝑡𝑡 1 + 𝑡𝑡 𝑑𝑑𝑑𝑑
1 + 𝑡𝑡

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


27
Unit 2.4 - Linear
Linear: Example 3
3. Here,
2𝑡𝑡 3
𝑃𝑃 𝑡𝑡 =
1 + 𝑡𝑡 2
This means our integrating factor is
2𝑡𝑡 3
∫ 2 𝑑𝑑𝑑𝑑
𝐹𝐹 𝑡𝑡 = 𝑒𝑒 1+𝑡𝑡

Let us first simplify this before multiplying it to the entire equation by first solving for
the integral
2𝑡𝑡 3 2𝑡𝑡 � 𝑡𝑡 2 𝑢𝑢 − 1
� 2
𝑑𝑑𝑑𝑑 = � 2
𝑑𝑑𝑑𝑑 = � 𝑑𝑑𝑑𝑑
1 + 𝑡𝑡 1 + 𝑡𝑡 𝑢𝑢
Let’s try substituting 𝑢𝑢 = 1 + 𝑡𝑡 2 , giving us 𝑑𝑑𝑑𝑑 = 2𝑡𝑡 𝑑𝑑𝑑𝑑.
This also gives us 𝑡𝑡 2 = 𝑢𝑢 − 1.
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
28
Unit 2.4 - Linear
Linear: Example 3
𝑢𝑢 − 1
� 𝑑𝑑𝑑𝑑
𝑢𝑢
We can rewrite this integral as
𝑢𝑢 1 1
= � 𝑑𝑑𝑑𝑑 − � 𝑑𝑑𝑑𝑑 = � 1 𝑑𝑑𝑑𝑑 − � 𝑑𝑑𝑑𝑑
𝑢𝑢 𝑢𝑢 𝑢𝑢
= 𝑢𝑢 − ln 𝑢𝑢
Reverting to the original value of 𝑢𝑢 which is 𝑢𝑢 = 1 + 𝑡𝑡 2 ,
2𝑡𝑡 3 2 2
� 2
𝑑𝑑𝑑𝑑 = 1 + 𝑡𝑡 − ln(1 + 𝑡𝑡 )
1 + 𝑡𝑡
Substituting this to the integrating factor,
1+𝑡𝑡 2 −ln(1+𝑡𝑡 2 )
𝐹𝐹 𝑡𝑡 = 𝑒𝑒
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
29
Unit 2.4 - Linear
Linear: Example 3
1+𝑡𝑡 2 −ln(1+𝑡𝑡 2 )
𝐹𝐹 𝑡𝑡 = 𝑒𝑒
By the property of exponentials, we can rewrite this as

𝑡𝑡 2 − ln(1+𝑡𝑡 2)
𝐹𝐹 𝑡𝑡 = 𝑒𝑒 � 𝑒𝑒 � 𝑒𝑒
𝑡𝑡 2 ln 1+𝑡𝑡 2 −1
= 𝑒𝑒 � 𝑒𝑒 � 𝑒𝑒
𝑡𝑡 2
= 𝑒𝑒 � 𝑒𝑒 � 1 + 𝑡𝑡 2 −1
𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒
𝐹𝐹(𝑡𝑡) =
1 + 𝑡𝑡 2
We now move on to Step 4.

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


30
Unit 2.4 - Linear
Linear: Example 3
𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒
𝐹𝐹(𝑡𝑡) =
1 + 𝑡𝑡 2
4. Multiplying the integrating factor to the entire equation,
2𝑡𝑡 3 2 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 + 𝑠𝑠 𝑑𝑑𝑑𝑑 = 6𝑡𝑡 1 + 𝑡𝑡
2 1 + 𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒 𝑡𝑡 2𝑡𝑡 3 2 𝑑𝑑𝑑𝑑
� 𝑑𝑑𝑑𝑑 + 𝑠𝑠 𝑑𝑑𝑑𝑑 = 6𝑡𝑡 1 + 𝑡𝑡
1 + 𝑡𝑡 2 1 + 𝑡𝑡 2
𝑡𝑡 2 𝑡𝑡 2 2
𝑒𝑒 � 𝑒𝑒 𝑒𝑒 � 𝑒𝑒 2𝑡𝑡 3 𝑒𝑒 � 𝑒𝑒 𝑡𝑡
2 𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑 + � 𝑠𝑠 𝑑𝑑𝑑𝑑 = � 6𝑡𝑡 1 + 𝑡𝑡
1 + 𝑡𝑡 2 1 + 𝑡𝑡 2 1 + 𝑡𝑡 2 1 + 𝑡𝑡 2
𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒 𝑡𝑡 2
𝑑𝑑 𝑠𝑠 � 2
= 𝑒𝑒 � 6𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑
1 + 𝑡𝑡
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
31
Unit 2.4 - Linear
Linear: Example 3
𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒 𝑡𝑡 2
𝑑𝑑 𝑠𝑠 � 2
= 𝑒𝑒 � 6𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑
1 + 𝑡𝑡
5. Integrating both sides,
𝑡𝑡 2
𝑒𝑒 � 𝑒𝑒 𝑡𝑡 2
𝑠𝑠 � 2
= 6𝑒𝑒 � 𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑
1 + 𝑡𝑡
From here, we can cancel 𝑒𝑒, since it is a constant present on both sides of the equation.
To solve for this integral, we let 𝑢𝑢 = 𝑡𝑡 2 , giving us 𝑑𝑑𝑑𝑑 = 2𝑡𝑡 𝑑𝑑𝑑𝑑.
𝑡𝑡 2 𝑡𝑡 2
6 � 𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑 = 3 � 2𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑

= 3 � 𝑒𝑒 𝑢𝑢 𝑑𝑑𝑑𝑑 = 3𝑒𝑒 𝑢𝑢 + 𝑐𝑐

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


32
Unit 2.4 - Linear
Linear: Example 3 2
𝑒𝑒 𝑡𝑡
𝑡𝑡 2
𝑠𝑠 � = 6 � 𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑
1+ 𝑡𝑡 2
𝑡𝑡 2 𝑡𝑡 2
6 � 𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑 = 3 � 2𝑡𝑡 𝑒𝑒 𝑑𝑑𝑑𝑑 = 3 � 𝑒𝑒 𝑢𝑢 𝑑𝑑𝑑𝑑 = 3𝑒𝑒 𝑢𝑢 + 𝑐𝑐

Reverting to the original value of 𝑢𝑢 which is 𝑢𝑢 = 𝑡𝑡 2 ,


𝑡𝑡 2
𝑒𝑒 𝑡𝑡 2 + 𝑐𝑐
𝑠𝑠 � = 3𝑒𝑒
1 + 𝑡𝑡 2
Isolating 𝑠𝑠,
2 2
2 1 + 𝑡𝑡 1 + 𝑡𝑡
𝑠𝑠 = 3𝑒𝑒 𝑡𝑡 � 𝑡𝑡 2 + 𝑐𝑐 � 𝑡𝑡 2
𝑒𝑒 𝑒𝑒 2
2
1 + 𝑡𝑡
𝑠𝑠 = 3 1 + 𝑡𝑡 + 𝑐𝑐 � 𝑡𝑡 2
𝑒𝑒
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
33
Unit 2.4 - Linear
Linear: Example 3
1 + 𝑡𝑡 2
𝑠𝑠 = 3 1 + 𝑡𝑡 2 + 𝑐𝑐 � 2
𝑒𝑒 𝑡𝑡
6. Since we are given initial conditions (we are asked for the particular solution), we
substitute them to get the value of 𝑐𝑐.
At 𝑡𝑡 = 0, 𝑠𝑠 = 2:
1+0
2 = 3 1 + 0 + 𝑐𝑐 � 0
𝑒𝑒
2 = 3 + 𝑐𝑐

𝑐𝑐 = −1
This gives us a particular solution of
(𝟏𝟏 + 𝒕𝒕𝟐𝟐 )
𝒔𝒔 = 𝟑𝟑 𝟏𝟏 + 𝒕𝒕𝟐𝟐 − 𝟐𝟐
𝒆𝒆 𝒕𝒕
ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
34
Unit 2.4 - Linear
Exercise
Find the general solution for
𝑑𝑑𝑑𝑑
1 + cos 𝑥𝑥 = sin 𝑥𝑥 (sin 𝑥𝑥 + sin 𝑥𝑥 cos 𝑥𝑥 − 𝑦𝑦)
𝑑𝑑𝑑𝑑

In Step 3 of the solution, we don’t add the integration constant


(+ 𝑐𝑐) after integrating the integral in the exponent of the
integration factor (recall Slide 17). Would things change if we
added the integration constant?

*not for submission


ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay
35
Unit 2.4 - Linear
Answer to Exercise

𝑦𝑦 = (1 + cos 𝑥𝑥)(𝑥𝑥 − sin 𝑥𝑥 + 𝑐𝑐)

ES 21: Differential Equations for Engineers | Engr. Zephaniah G. Silabay


36
Unit 2.4 - Linear

You might also like