0% found this document useful (0 votes)
120 views

Lecture 07 - 2

1. Identify if the given 1st order linear differential equation is in standard form dy/dx + p(x)y = q(x) and rewrite it if needed. 2. Find the integrating factor u(x) = e^∫p(x)dx. 3. Write the general solution as y = ∫u(x)q(x)dx + C/u(x). 4. Use the initial condition to evaluate the constant C and write the particular solution.

Uploaded by

khani g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views

Lecture 07 - 2

1. Identify if the given 1st order linear differential equation is in standard form dy/dx + p(x)y = q(x) and rewrite it if needed. 2. Find the integrating factor u(x) = e^∫p(x)dx. 3. Write the general solution as y = ∫u(x)q(x)dx + C/u(x). 4. Use the initial condition to evaluate the constant C and write the particular solution.

Uploaded by

khani g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Differential Equations (MTH401)

Lecture 7

First Order Linear Equations


The differential equation of the form:
dy
a( x) + b( x ) y = c ( x )
dx
is a linear differential equation of first order. The equation can be rewritten in the
following famous form.
dy
+ p( x) y = q( x)
dx
where p (x ) and q (x ) are continuous functions.

Method of solution:
The general solution of the first order linear differential equation is given by
u ( x) q ( x ) dx + C
y=∫
u ( x)
Where u ( x) = exp(∫ p ( x)dx )
The function u (x ) is called the integrating factor. If it is an IVP then use it to find the
constant C.

Summary:

1. Identify that the equation is 1st order linear equation. Rewrite it in the form
dy
+ p ( x) y = q( x)
dx
if the equation is not already in this form.
2. Find the integrating factor

u ( x) = e ∫
p ( x ) dx

3. Write down the general solution

y=
∫ u ( x ) q ( x ) dx + C
u ( x)
4. If you are given an IVP, use the initial condition to find the constant C.

5. Plug in the calculated value to write the particular solution of the problem.

Page 1 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

Example 1:

Solve the initial value problem


y ′ + tan( x) y = cos 2 ( x), y (0) = 2
Solution:

1.The equation is already in the standard form


dy
+ p( x) y = q( x)
dx
with
 p ( x) = tan x

 q(x) = cos x
2

2. Since
∫ tan x dx = − ln cos x = ln sec x

Therefore, the integrating factor is given by

u ( x) = e ∫ tan x dx = sec x

3. Further, because

∫ sec x cos x dx = ∫ cos x dx = sin x


2

So that the general solution is given by


sin x + C
y= = (sin x + C ) cos x
sec x

4. We use the initial condition y (0) = 2 to find the value of the constant C
y ( 0) = C = 2

5. Therefore the solution of the initial value problem is

y = (sin x + 2 ) cos x

Page 2 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

dy 2t 2
Example 2: Solve the IVP − y = , y (0) = 0.4
dt 1 + t 2 1+ t 2
Solution:
1.The given equation is a 1st order linear and is already in the requisite form
dy
+ p( x) y = q( x)
dx
 2t
 p (t ) = − 1 + t 2
with  2
q(t ) =
 1+ t2
⌠ 2t 
2. Since   − 2 
dt = − ln | 1 + t 2 |
⌡  1+ t 
Therefore, the integrating factor is given by
⌠ 2t
− dt
⌡ 1+ t 2
u (t ) = e = (1 + t 2 ) −1
3. Hence, the general solution is given by

∫ u (t )q(t )dt + C , ⌠ 2
y=
u (t ) ∫ u(t )q(t )dt = ⌡ (1 + t 2 2
)
dt

⌠ 2 ⌠ 1+ t 2 − t 2 ⌠ 1 t2 
Now  dt = 2 (1 + t 2 ) 2 dt = 2  1 + t 2 (1 + t 2 ) 2 dt
 −
⌡ (1 + t )
2 2
⌡ ⌡ 
The first integral is clearly tan −1 t . For the 2nd we will use integration by parts
with t as first function and 2t
(1 + t 2 ) 2
as 2nd function.

⌠ 2t 2  1  ⌠ 1 t
 (1 + t 2 ) 2 dt = t  − 1 + t 2  +  dt = − + tan −1 (t )
 ⌡ 1+ t 1+ t
2 2
⌡ 
⌠ 2 t t
 dt = 2 tan −1 (t ) + − tan −1 (t ) = tan −1 (t ) +
⌡ (1 + t ) 1+ t 1+ t2
2 2 2

 -1 t 
The general solution is: y = (1 + t )  tan (t ) + +
2
C 
 1+ t2 
4. The condition y (0) = 0.4 gives C = 0.4
5. Therefore, solution to the initial value problem can be written as:
y = t + (1 + t 2 ) tan −1 (t ) + 0.4(1 + t 2 )

Page 3 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

Example 3:

Find the solution to the problem

cos 2 t sin t . y ′ = − cos 3 t . y + 1 , y π  = 0


4
Solution:
1. The equation is 1st order linear and is not in the standard form
dy
+ p( x) y = q( x)
dx
Therefore we rewrite the equation as
cos t 1
y′ + y= 2
sin t cos t sin t
2. Hence, the integrating factor is given by
cos t

 dt

sin t ln | sin t |
u (t ) = e ⌡
=e = sin t

3. Therefore, the general solution is given by


⌠ sin t 1
 dt + C
y= ⌡ cos 2
t sin t
sin t
Since
⌠ sin t 1 1
 dt = ⌠
 dt = tan t
⌡ 2
cos t sin t ⌡ cos 2 t

Therefore
tan t + C 1 C
y= = + = sec t + C csc t
sin t cos t sin t

(1) The initial condition y (π / 4) = 0 implies


2 +C 2 = 0
which gives C = −1 .
(2) Therefore, the particular solution to the initial value problem is
y = sec t − csc t

Page 4 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

Example 4
Solve ( x + 2 y ) dy
3

dx
=y

Solution:
We have
dy y
=
dx x + 2 y 3
This equation is not linear in y . Let us regard x as dependent variable and y as
independent variable. The equation may be written as
dx x + 2 y 3
=
dy y
dx 1
or − x = 2y2
dy y
Which is linear in x
⌠  1    1 1
IF = exp   − dy  = exp ln  =
⌡  y    y y
1
Multiplying with the IF = , we get
y
1 dx 1
− x = 2y
y dy y 2
d x
  = 2y
dy  y 
Integrating, we have
x
= y2 + c
y
(
x = y y2 + c )
is the required solution.

Page 5 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

Example 5

Solve
(x − 1)3 dy + 4(x − 1)2 y = x + 1
dx

Solution:

The equation can be rewritten as

dy 4 x +1
+ y=
dx x − 1 (x − 1)3
4
Here P(x ) = .
x −1

Therefore, an integrating factor of the given equation is

 4dx 
IF = exp ⌠
 
⌡ x − 1 
[ 4
]
= exp ln( x − 1) = ( x − 1)
4

Multiplying the given equation by the IF, we get

(x − 1)4 dy + 4(x − 1)3 y = x 2 − 1


dx

or
d
dx
[ ]
y ( x − 1)4 = x 2 − 1

Integrating both sides, we obtain

x3
y ( x − 1) = − x + c
4

3
which is the required solution.

Page 6 of 7
© Copyright Virtual University of Pakistan
Differential Equations (MTH401)

Exercise

Solve the following differential equations

dy  2 x + 1  −2 x
1. + y = e
dx  x 

dy
2. + 3 y = 3 x 2 e −3 x
dx

dy
3. x + (1 + x cot x ) y = x
dx

4. (x + 1) dy − ny = e x (x + 1)n+1
dx

5. (1 + x ) dy
2
+ 4 xy =
1
dx (1 + x ) 2 2

dr
6. + r secθ = cosθ

dy 1 − e −2 x
7. +y= x
dx e + e −x

(
8. dx = 3e y − 2 x dy )
Solve the initial value problems

9.
dy
dx
(
= 2 y + x e 3x − e 2 x , ) y (0) = 2

dy
10. x(2 + x ) + 2(1 + x ) y = 1 + 3x 2 , y (− 1) = 1
dx

Page 7 of 7
© Copyright Virtual University of Pakistan

You might also like