2.
3 Linear First-Order ODE
If the first order de is not exact, it is natural to attempt to make it exact by multiplying it with an
appropriate factor, which is then called integrating factor. This idea can be applied to solve linear first-
order ode. If the linear first-order ode is not exact, integrating factor 𝑣(𝑥) can be multiplied to make the
equation exact.
Sec. 1.1 defined linear first-order ode with dependent variable y in the form
dy
A(x) dx + B(x) y = C(x). (1)
( )
By dividing both sides by A x , we obtain
𝒅𝒚
+ 𝑷(𝒙) 𝒚 = 𝑸(𝒙) , (𝟐)
𝒅𝒙
which we choose as the standard form for the linear equation of order one.
Determining Integrating Factor v(x)
Suppose that there exists for equation (2) a positive integrating factor 𝑣(𝑥) > 0, a function of x alone.
Multiplying the integrating factor in both sides of (2), then
𝑑𝑦
𝑣(𝑥) [ + 𝑃 (𝑥) 𝑦] = 𝑣 (𝑥) 𝑄 (𝑥) (3)
𝑑𝑥
must be an exact equation. Write (3) in the form
𝑀 𝑑𝑥 + 𝑁 𝑑𝑦 = 0 .
Then (3) becomes
𝑣(𝑥)𝑑𝑦 + [𝑣(𝑥) 𝑃 (𝑥) 𝑦 − 𝑣(𝑥) 𝑄(𝑥)] 𝑑𝑥 = 0.
Therefore,
𝑀 = 𝑣 𝑃 𝑦 − 𝑣 𝑄, (4)
and
𝑁 = 𝑣, (5)
In which v, P, and Q are functions of x alone.
If equation (3) is to be exact, it follows from the requirement
𝜕𝑀 𝜕𝑁
= (6)
𝜕𝑦 𝜕𝑥
Substituting (4) and (5) in (6).
𝜕(𝑣 𝑃 𝑦 − 𝑣 𝑄) 𝜕𝑣
=
𝜕𝑦 𝜕𝑥
𝑑𝑣
𝑣𝑃=
𝑑𝑥
𝜕𝑣 𝑑𝑣
𝜕𝑥
is equal to 𝑑𝑥
since 𝑣 is just a function of x. Separate variables to solve for 𝑣.
𝑑𝑣
𝑃 𝑑𝑥 =
𝑣
By integration
ln 𝑣 = ∫ 𝑃 𝑑𝑥
𝒗 = 𝒆∫ 𝑷 𝒅𝒙 , (𝟕)
This is the integrating factor of (2).
Determining the General Solution of a Linear First-Order ODE
Multiply (7) in (2).
𝑑𝑦
𝑒 ∫ 𝑃 𝑑𝑥 + 𝑃(𝑥) 𝑒 ∫ 𝑃 𝑑𝑥 𝑦 = 𝑄(𝑥) 𝑒 ∫ 𝑃 𝑑𝑥 , (8)
𝑑𝑥
The left member of (8) is the derivative of the product
𝑦𝑒 ∫ 𝑃 𝑑𝑥
Substitute this in (8)
d(y e∫ P dx )
= Q(x) 𝑒 ∫ 𝑃 𝑑𝑥 , (9)
dx
Integrate with respect to x and substitute e∫ P dx with 𝑣.
𝑦 𝑣 = ∫ v𝑄 dx + 𝑐
Since 𝑣 ≠ 0, we can write
𝒚 = 𝒗−𝟏 ∫ 𝒗𝑸 𝒅𝒙 + 𝒄𝒗−𝟏 (𝟏𝟎)
Since 𝑣 ≠ 0 and 𝑣 is continuous on 𝑎 < 𝑥 < 𝑏, (10) is a family of solutions of equation (2).
Example 1
Solve the equation.
(x 5 + 3y)dx − x dy = 0.
The equation is linear in y. When put in standard form it becomes
𝑑𝑦 3
− 𝑦 = 𝑥4 𝑤ℎ𝑒𝑛 𝑥 ≠ 0.
𝑑𝑥 𝑥
Then 𝑃(𝑥) = −3⁄𝑥 , and 𝑄(𝑥) = 𝑥 4
The integrating factor is
−3 −3
𝑑𝑥
𝑣 = 𝑒∫ 𝑥 = 𝑒 −3 𝑙𝑛|𝑥| = 𝑒 𝑙𝑛 𝑥 = 𝑥 −3
Apply this in (10).
𝑥5
𝑦 = 𝑥 3 ∫ 𝑥 𝑑𝑥 + 𝑐𝑥 3 = + 𝑐𝑥 3
2
This defines a set of solutions of the original equation.
Example 2
Solve the equation
𝑦 𝑑𝑥 + (3𝑥 − 𝑥𝑦 + 2)𝑑𝑦 = 0. (11)
Since the product 𝑦 𝑑𝑦 occurs here, the equation is not linear in y. It is however linear in x. Therefore,
P, Q, and v are functions of y. The formula for integrating factor (7) will become
v = e∫ P dy , (12)
The formula for general solution (10) will become
𝑥 = 𝑣 −1 ∫ 𝑣𝑄 𝑑𝑦 + 𝑐𝑣 −1 (13)
Convert (11) in standard form.
dx 3 −2
+ ( − 1) x = for y ≠ 0. (14)
dy y y
3 −2
Then P(y) = y − 1 , and Q(y) = y . The integrating factor for equation (14) is
3
∫( −1)dy 3
v=e y = e3 ln|y|−y = e3ln |y| e−y = eln |y| e−y = y 3 e−y
Substitute the value of v and Q in equation (13) to determine the family of solution of de (11).
−2
𝑥 = 𝑦 −3 𝑒 𝑦 ∫ 𝑦 3 𝑒 −𝑦 𝑑𝑦 + 𝑐𝑦 −3 𝑒 𝑦
𝑦
𝑥 = −2𝑦 −3 𝑒 𝑦 ∫ 𝑦 2 𝑒 −𝑦 𝑑𝑦 + 𝑐𝑦 −3 𝑒 𝑦 , (15)
2 −𝑦
Solve ∫ 𝑦 𝑒 𝑑𝑦 using integration by parts, ∫ 𝑣 𝑑𝑢 = 𝑢𝑣 − ∫ 𝑢 𝑑𝑣 , where
v = y2, du = e−y dy
dv = 2y dy, u = ∫ e−y dy = −e−y .
Therefore,
∫ 𝑦 2 𝑒 −𝑦 𝑑𝑦 = −𝑒 −𝑦 𝑦 2 + 2 ∫ 𝑒 −𝑦 𝑦 𝑑𝑦 . (16)
Again, we will use integration by parts to solve ∫ 𝑒 −𝑦 𝑦 𝑑𝑦, where
v = y, du = e−y dy
dv = dy, u = ∫ e−y dy = −e−y .
Therefore,
∫ 𝑒 −𝑦 𝑦 𝑑𝑦 = −𝑒 −𝑦 𝑦 + ∫ 𝑒 −𝑦 𝑑𝑦 = −𝑒 −𝑦 𝑦 − 𝑒 −𝑦 , (17)
Substitute (17) in (16).
∫ 𝑦 2 𝑒 −𝑦 𝑑𝑦 = −𝑒 −𝑦 𝑦 2 + 2(−𝑒 −𝑦 𝑦 − 𝑒 −𝑦 ) = −𝑒 −𝑦 𝑦 2 − 2𝑒 −𝑦 𝑦 − 2𝑒 −𝑦
Substitute this in (15)
𝑥 = −2𝑦 −3 𝑒 𝑦 (−𝑒 −𝑦 𝑦 2 − 2𝑒 −𝑦 𝑦 − 2𝑒 −𝑦 ) + 𝑐𝑦 −3 𝑒 𝑦
𝑥 = 2𝑦 −1 + 4𝑦 −2 + 4𝑦 −3 + 𝑐𝑦 −3 𝑒 𝑦
This is the family of solution of equation (11).