First Order Linear Differential Equations
We will solve linear first order differential equations of the form:
𝑑𝑦
+ 𝑃(𝑥)𝑦 = 𝑄(𝑥)
𝑑𝑥
where 𝑃(𝑥) and 𝑄(𝑥) are continuous.
Notice that we can’t separate variables in this case. However, if we multiply the
entire equation by 𝜌(𝑥 ) = 𝑒 ∫ 𝑃(𝑥)𝑑𝑥 , called an integrating factor, something
interesting happens:
𝑑𝑦
𝑒 ∫ 𝑃(𝑥)𝑑𝑥 + 𝑃(𝑥 )𝑒 ∫ 𝑃(𝑥)𝑑𝑥 (𝑦) = 𝑄(𝑥)𝑒 ∫ 𝑃(𝑥)𝑑𝑥
𝑑𝑥
𝑑
Notice that since (∫ 𝑃(𝑥 )𝑑𝑥) = 𝑃(𝑥) the LHS becomes:
𝑑𝑥
𝑑 𝑑𝑦
[𝑦𝑒 ∫ 𝑃(𝑥)𝑑𝑥 ] = 𝑒 ∫ 𝑃(𝑥)𝑑𝑥 ∙ + 𝑃(𝑥)𝑒 ∫ 𝑃(𝑥)𝑑𝑥 𝑦
𝑑𝑥 𝑑𝑥
𝑑
So, [𝑦𝑒 ∫ 𝑃(𝑥)𝑑𝑥 ] = 𝑄(𝑥)𝑒 ∫ 𝑃(𝑥)𝑑𝑥
𝑑𝑥
and 𝑦𝑒 ∫ 𝑃(𝑥)𝑑𝑥 = ∫(𝑄(𝑥)𝑒 ∫ 𝑃(𝑥)𝑑𝑥 )𝑑𝑥 + 𝐶
𝑦 = 𝑒 − ∫ 𝑃(𝑥)𝑑𝑥 [∫(𝑄(𝑥)𝑒 ∫ 𝑃(𝑥)𝑑𝑥 )𝑑𝑥 + 𝐶].
𝑑𝑦
Steps to solving + 𝑃(𝑥)𝑦 = 𝑄(𝑥):
𝑑𝑥
1. Calculate 𝜌(𝑥 ) = 𝑒 ∫ 𝑃(𝑥)𝑑𝑥
2. Multiply the differential equation by 𝜌(𝑥 )
𝑑
3. Notice that [𝜌(𝑥 )𝑦] = 𝜌(𝑥 )𝑄(𝑥)
𝑑𝑥
4. Integrate both sides: 𝜌(𝑥 )𝑦 = ∫ 𝜌(𝑥 )𝑄(𝑥)𝑑𝑥 + 𝐶
1
5. 𝑦 = [∫ 𝜌(𝑥 )𝑄 (𝑥 )𝑑𝑥 + 𝐶]
𝜌(𝑥)
, 2
Ex. Solve 2𝑥𝑦 ′ + 𝑦 = 10√𝑥 , for 𝑥 > 0.
𝑑𝑦
Start by putting the equation in the form + 𝑃(𝑥)𝑦 = 𝑄(𝑥):
𝑑𝑥
1 5
𝑦 ′ + 2𝑥 𝑦 =
√𝑥
1 5
So 𝑃 (𝑥 ) = , 𝑄 (𝑥 ) =
2𝑥 √𝑥
1 1 1 1
∫2𝑥𝑑𝑥 ln 𝑥
𝜌(𝑥 ) = 𝑒 ∫ 𝑃(𝑥)𝑑𝑥 =𝑒 =𝑒 2 = (𝑒 ln 𝑥 )2 =𝑥 2
1
Note: Any antiderivative of will work and |𝑥 | = 𝑥 > 0.
2𝑥
1 5
Multiply 𝑦 ′ + 2𝑥 𝑦 = by √𝑥
√𝑥
1
√𝑥𝑦 ′ + 2√𝑥 𝑦 = 5
𝑑 1
Now notice (√𝑥𝑦) = √𝑥𝑦 ′ + 𝑦 so,
𝑑𝑥 2√𝑥
𝑑
(√𝑥𝑦) = 5
𝑑𝑥
Now integrate both sides:
√𝑥𝑦 = ∫ 5𝑑𝑥 = 5𝑥 + 𝐶
1 𝐶
𝑦= (5𝑥 + 𝑐 ) = 5√𝑥 + general solution.
√ 𝑥 √𝑥