You are on page 1of 10

5 Linear First Order Equations

Definition 5.1. The differential equation in the form:


dy
+ P (x)y = Q(x) (5.1)
dx
is called linear first order differential equation. We assume that
functions P (x) and Q(x) are continuous on some interval.

Definition 5.2. An integrating factor for a differential equation


is a function µ(x, y) such that the multiplication of each side of the
differential equation by µ(x, y) yields an equation in which each side
is recognizable as a derivative.

Example 5.1. Consider the linear first order differential equation


equation:
dy
+ y = 2.
dx
If we multiply both sides of given equation by ex then we get
dy d x d
ex + ex y = 2ex =⇒ (e y) = (2ex ) .
dx dx dx
We see that each side of resulting equation is a derivative. So, function
µ(x) = ex is an integrating factor for given equation.

Theorem 5.1. An integrating factor for the linear first order differen-
tial equation (5.1) has the form:
R
P (x)dx
µ(x) = e . (5.2)

Proof. Multiplying both sides of equation (5.1) by µ(x) gives


dy
µ(x) + µ(x)P (x)y = µ(x)Q(x). (5.3)
dx
25
Lecture Notes - Differential Equations M.Ashyraliyev

If function µ(x) is an integration factor for equation (5.1) then by


definition each side of (5.3) should be a derivative. To make a left-hand
side of (5.3) a derivative of some function it is sufficient to choose µ(x)
such that µ(x)P (x) = µ0 (x) is satisfied. Indeed, if µ(x)P (x) = µ0 (x)
then the left-hand side of (5.3) becomes
dy  0
0 0
µ(x) + µ(x)P (x)y = µ(x)y (x) + µ (x)y(x) = µ(x)y(x) .
dx
Now, let us find µ(x). We have

µ(x)P (x) = µ0 (x) =⇒ = P (x)dx =⇒
µ
Z R
P (x)dx
=⇒ ln µ = P (x)dx =⇒ µ(x) = e

which completes the proof.

Remark 5.1. Using the result of Theorem 5.1, we can now describe
the method to solve the linear first order differential equation (5.1). It
consists of following steps:
R
P (x)dx
1. Calculate the integrating factor µ(x) = e

2. Multiply both sides of the equation (5.1) by µ(x)

3. Recognize the left-hand side of the resulting equation as the


derivative:  0
µ(x)y(x) = µ(x)Q(x)

4. Integrate both sides to get


Z
µ(x)y(x) = µ(x)Q(x)dx + C

5. Divide both sides by µ(x) to express y(x)

26
Lecture Notes - Differential Equations M.Ashyraliyev

Example 5.2. Find a general solution of the differential equation:


dy 2y
+ = 4x.
dx x
Solution: It is easy to see that given equation is a linear first order
2
differential equation with P (x) = and Q(x) = 4x. We first find the
x
integrating factor:
2 2
R R
P (x)dx x dx
µ(x) = e =e = e2 ln x = eln (x ) = x2 .
Multiplying both sides of given equation by µ(x) = x2 yields
dy
x2 + 2xy = 4x3
dx
which we recognize as  0
2
xy = 4x3 .
Then, integration of both sides gives
Z
x y = 4x3 dx = x4 + C.
2

Finally, dividing both sides by x2 allows us to obtain the general solu-


tion of given equation
C
y(x) = x2 + 2 .
x

Example 5.3. Find a general solution of the differential equation:


dy y
− = x cos x.
dx x
Solution: It is easy to see that given equation is a linear first order
1
differential equation with P (x) = − and Q(x) = x cos x. We first
x
find the integrating factor:
R

R 1 1 1
µ(x) = e P (x)dx
=e x dx = e− ln x = eln ( x ) = .
x
27
Lecture Notes - Differential Equations M.Ashyraliyev

1
Multiplying both sides of given equation by µ(x) = yields
x
1 dy y
· − 2 = cos x
x dx x
which we recognize as 1 0
· y = cos x.
x
Then, integration of both sides gives
Z
y
= cos xdx = sin x + C.
x
Finally, multiplying both sides by x allows us to obtain the general
solution of given equation
y(x) = x(sin x + C).

Example 5.4. Find a general solution of the differential equation:


 dy
x2 + 1 + 3xy = 6x.
dx
Solution: We first divide both sides of given equation by x2 + 1 to
bring it to the form (5.1). We get
dy 3xy 6x
+ 2 = 2 . (5.4)
dx x + 1 x + 1
We now see that this equation is a linear first order differential equation
3x 6x
with P (x) = 2 and Q(x) = 2 . We find the integrating factor:
x +1 x +1
R 3x 3/2
3 2
R
µ(x) = e P (x)dx
= e x2 +1 dx = e 2 ln (x +1) = x2 + 1 .
3/2
Multiplying both sides of (5.4) by µ(x) = x2 + 1 yields
3/2 dy 1/2 1/2
x2 + 1 + 3x x2 + 1 y = 6x x2 + 1
dx
28
Lecture Notes - Differential Equations M.Ashyraliyev

which we recognize as

2
3/2 0 1/2
x +1 y = 6x x2 + 1 .

Then, integration of both sides gives


Z
3/2 1/2 3/2
x2 + 1 y = 6x x2 + 1 dx = 2 x2 + 1

+ C.

3/2
Finally, dividing both sides by x2 + 1 allows us to obtain the gen-
eral solution of given equation
−3/2
y(x) = 2 + C x2 + 1 .

Example 5.5. Solve the following initial value problem:

 dy − y = 11 e−x/3 ,

dx 8
y(0) = −1.

Solution: The equation in a given IVP is a linear first order differential


11 −x/3
equation with P (x) = −1 and Q(x) = e . We first find the
8
integrating factor:
R R
µ(x) = e P (x)dx
=e (−1)dx
= e−x .

Multiplying both sides of equation by µ(x) = e−x yields


dy 11
e−x − e−x y = e−4x/3
dx 8
which we recognize as
 0 11 −4x/3
−x
e y = e .
8

29
Lecture Notes - Differential Equations M.Ashyraliyev

Then, integration of both sides gives


Z
y 11 −4x/3 33 −4x/3
= e dx = − e + C.
ex 8 32
Now, multiplying both sides by ex allows us to obtain the general
solution
33
y(x) = − e−x/3 + Cex .
32
Finally, by using initial condition y(0) = −1 we can find the value of
1
constant C. If we substitute x = 0 and y = −1, we obtain C = .
32
So, the solution of given IVP is
33 −x/3 1
y(x) = − e + ex .
32 32

Example 5.6. Find a general solution of the differential equation:


dy
x + (x + 2)y = ex .
dx
Solution: We first divide both sides of given equation by x to bring
it to the form (5.1). We get
dy x + 2 ex
+ y= . (5.5)
dx x x
We now see that this equation is a linear first order differential equation
x+2 ex
with P (x) = and Q(x) = . We find the integrating factor:
x x

= e (1+ x )dx = ex+2 ln x = x2 ex .


x+2 2
R R R
P (x)dx x dx
µ(x) = e =e

Multiplying both sides of (5.5) by µ(x) = x2 ex yields


dy
x2 ex + x(x + 2)ex y = xe2x
dx
30
Lecture Notes - Differential Equations M.Ashyraliyev

which we recognize as  0
2 x
xe y = xe2x .
Then, integration of both sides gives
xe2x e2x
Z
2 x 2x
x e y = xe dx = − + C.
2 4
Finally, dividing both sides by x2 ex allows us to obtain the general
solution of given equation
xe2x 2x

2 − e4 + C
y(x) = .
x2 ex

Remark 5.2. In some cases it becomes easier to solve the differential


equation if we consider y as the independent variable rather than x.
The following example illustrates this point.

Example 5.7. Solve the following differential equation


 dy
1 − 4xy 2 = y3
dx
by regarding y as the independent variable rather than x.
Solution: We first rewrite given equation in the form:
dx 4 1
+ x = 3. (5.6)
dy y y
We can see that this equation is a linear first order differential equation
with respect to x = x(y). We find the integrating factor:
4
R
µ(y) = e y dy = e4 ln y = y 4 .

Multiplying both sides of (5.6) by µ(y) = y 4 yields


dx
y4 + 4y 3 x = y
dy
31
Lecture Notes - Differential Equations M.Ashyraliyev

which we recognize as
d 4 
y · x(y) = y.
dy
Then, integration of both sides with respect to y gives

y2
Z
4
y x(y) = ydy = + C.
2

Finally, by dividing both sides by y 4 , we get


1 C
x(y) = + .
2y 2 y 4

5.1 Self-study Problems


Problem 5.1. Find general solutions of the following differential equa-
tions:
2
a) y 0 + 3y = 2xe−3x b) y 0 − 2xy = ex

c) 2xy 0 + y = 10 x d) 3xy 0 + y = 12x

e) 2xy 0 − 3y = 9x3 f) xy 0 = 2y + x3 cos x

g) y 0 + y cot x = cos x h) xy 0 + (2x − 3)y = 4x4

y
i) y 0 + 2xy = x k) y 0 − = (x2 − 1)ex
x+1
y 1
l) xy 0 + (2x + 1)y = xe−2x m) y 0 + =
x2 x2

32
Lecture Notes - Differential Equations M.Ashyraliyev

Problem 5.2. Find solutions of the following initial value problems:


( 0 ( 0
y + y = 2, y − 2y = 3e2x ,
a) b)
y(0) = 0. y(0) = 0.

xy 0 + 2y = 3x, xy 0 + 5y = 7x2 ,
( (
c) d)
y(1) = 5. y(2) = 5.

xy 0 − y = x, xy 0 + y = 3xy,
( (
e) f)
y(1) = 7. y(1) = 0.

xy 0 + 3y = 2x5 , y 0 + y = ex ,
( (
g) h)
y(2) = 1. y(0) = 1.

xy 0 − 3y = x3 , y 0 + 2xy = x,
( (
i) k)
y(1) = 10. y(0) = −2.

y 0 = (1 − y) cos x, (1 + x)y 0 + y = cos x,


( (
l) m)
y(π) = 2. y(0) = 1.

y 0 = 1 + x + y + xy, xy 0 = 3y + x4 cos x,
( (
n) o)
y(0) = 0. y(2π) = 0.

x2 + 4 y 0 + 3xy = x,

2 x2
( 0
(
y = 2xy + 3x e ,
p) q)
y(0) = 5. y(0) = 1.

33
Lecture Notes - Differential Equations M.Ashyraliyev

− 23 x2 x2 + 1 y 0 + 4xy = x,
( ( 
2 0 3

x + 1 y + 3x y = 6xe ,
r) s)
y(0) = 1. y(2) = 1.

Problem 5.3. Solve the following differential equations by regarding


y as the independent variable rather than x.
dy dy
a) (x + yey ) =1 b) (1 + 2xy) = 1 + y2
dx dx

34

You might also like