You are on page 1of 8

Solution of First Order Linear Differential Equations

A Differential Equation is an equation with a function and one or more of its derivatives:

Example: an equation with the function y and its derivative dy/dx


Here we will look at solving a special class of Differential Equations called First Order
Linear Differential Equations

First Order
They are "First Order" when there is only dy/dx , not d2y/dx2 or d3y/dx3 , etc

Linear
A first order differential equation is linear when it can be made to look like this:
dy
dx

+ P(x)y = Q(x)

Where P(x) and Q(x) are functions of x.


To solve it there is a special method:

We invent two new functions of x, call them u and v, and say that y=uv.

We then solve to find u, and then find v, and tidy up and we are done!

And we also use the derivative of y=uv:

dy
dx

= u

dv
dx

+ v

du
dx

Steps
Here is a step-by-step method for solving them:

1. Substitute y = uv, and


dy
dx

= u

dv
dx

+ v

du
dx

into
Dy
Dx

+ P(x)y = Q(x)

2. Factor the parts involving v

3. Put the v term equal to zero (this gives a differential equation in u and x which can be
solved in the next step)

4. Solve using separation of variables to find u

5. Substitute u back into the equation we got at step 2

6. Solve that to find v

7. Finally, substitute u and v into y = uv to get our solution!

Let's try an example to see:

Example: Solve this:


dy/dx y/x = 1

First, is this linear? Yes, as it is in the form


dy/dx + P(x)y = Q(x)

where P(x) = 1/x and Q(x) = 1

So let's follow the steps:


Step 1: Substitute y = uv, and dy/dx = u dv/dx + v du/dx
dy/dx y/x = 1

So this:

u dv/dx + v du/dx uv/x = 1

Becomes this:
Step 2: Factor the parts involving v

u dv/dx + v( du/dx u/x ) = 1

Factor v:
Step 3: Put the v term equal to zero

v term = zero:
So:

du/dx u/x = 0
du/dx = u/x

Step 4: Solve using separation of variables to find u


Separate variables:
Put integral sign:
Integrate:
Make C = ln(k):
And so:

du/u = dx/x

du/u = dx/x
ln(u) = ln(x) + C
ln(u) = ln(x) + ln(k)
u = kx

Step 5: Substitute u back into the equation at Step 2


(Remember v term equals 0 so can be ignored):

kx dv/dx = 1

Step 6: Solve this to find v


Separate variables:
Put integral sign:
Integrate:
Make C = ln(c):
And so:
And so:

k dv = dx/x

k dv = dx/x
kv = ln(x) + C
kv = ln(x) + ln(c)
kv = ln(cx)
v = 1/k ln(cx)

Step 7: Substitute into y = uv to find the solution to the original equation.


y = uv:

y = kx 1/k ln(cx)

Simplify:

y = x ln(cx)

And it produces this nice family of curves:

y = x ln(cx) for various values of c


What is the meaning of those curves? They are the solution to the equation dy/dx y/x = 1
In other words:
Anywhere on any of those curves
the slope minus y/x equals 1
Let's check a few points on the c=0.6 curve:

Estmating off the graph (to 1 decimal place):

Point x
y
Slope (dy/dx)
dy/dx y/x
A
0 0.6/0.6 = 0 + 1 = 1
0.6 0.6
0
B
1 0/1.6 = 1 0 = 1
1.6
0
1
C
1.4 1/2.5 = 1.4 0.4 = 1
2.5
1
1.4

Example: Solve this:


Dy/dx 3y/x = x

First, is this linear? Yes, as it is in the form


dy/dx + P(x)y = Q(x)

where P(x) = 3/x and Q(x) = x


So let's follow the steps:
Step 1: Substitute y = uv, and dy/dx = u dv/dx + v du/dx
dy/dx 3y/x = x

So this:
Becomes this:

u dv/dx + v du/dx 3uv/x = x

Step 2: Factor the parts involving v

u dv/dx + v( du/dx 3u/x ) = x

Factor v:
Step 3: Put the v term equal to zero

v term = zero:
So:

du/dx 3u/x = 0
du/dx = 3u/x

Step 4: Solve using separation of variables to find u


Separate variables:
Put integral sign:
Integrate:
Make C = ln(k):
Then:
And so:

du/u = 3 dx/x

du/u = 3 dx/x
ln(u) = 3 ln(x) + C
ln(u) + ln(k) = 3ln(x)
uk = x3
u = x3/k

Step 5: Substitute u back into the equation at Step 2


(Remember v term equals 0 so can be ignored):

( x3/k ) dv/dx = x

Step 6: Solve this to find v


Separate variables:

dv = k x2 dx

Put integral sign:


Integrate:

dv = k x2 dx
v = k x1 + D

Step 7: Substitute into y = uv to find the solution to the original equation.


y = uv:
Simplify:
Replace D/k with a single constant c:

y = x3/k ( k x1 + D )
y = x2 + D/k x3
y = c x3 x2

And it produces this nice family of curves:

y = c x3 x2 for various values of c


And one more example, this time even harder:

Example: Solve this:


3

dy/dx + 2xy= 2x
First, is this linear? Yes, as it is in the form

dy/dx + P(x)y = Q(x)

where P(x) = 2x and Q(x) = 2x3


So let's follow the steps:
Step 1: Substitute y = uv, and dy/dx = u dv/dx + v du/dx

dy/dx + 2xy= 2x

So this:

u dv/dx + v du/dx + 2xuv = 2x3

Becomes this:
Step 2: Factor the parts involving v
Factor v:

u dv/dx + v( du/dx + 2xu ) = 2x3

Step 3: Put the v term equal to zero


v term = zero:

du/dx + 2xu = 0

Step 4: Solve using separation of variables to find u


Separate variables:
Put integral sign:
Integrate:
Make C = ln(k):
Then:
And so:

du/u = 2x dx

du/u = 2 x dx
ln(u) = x2 + C
ln(u) + ln(k) = x2
uk = ex2
u = ex2/k

Step 5: Substitute u back into the equation at Step 2


(Remember v term equals 0 so can be ignored):

( ex2/k ) dv/dx = 2x3

Step 6: Solve this to find v


Separate variables:
Put integral sign:
Integrate:

dv = 2k x3 ex2 dx

dv = 2k x3 ex2 dx
v = oh no! this is hard!

Let's see ... we can integrate by parts... which says:

RS dx = R S dx R' ( S dx) dx
(Side Note: we use R and S here, using u and v could be confusing as they already mean
something else here.)
Choosing R and S is very important, this is the best choice we found:

R = x2 and
S = 2x ex2

So let's go:

v = k 2x3 ex2 dx

First pull out k:


R = x2 and S = 2x ex2:

v = k (x2)(2xex2) dx

Now integrate by parts:

v = kR S dx k R' ( S dx) dx
2

Put in R = x and S = 2x e
And also R' = 2x and

x2

S dx = ex2

So it becomes:

v = kx2 2x ex2 dx k 2x (ex2) dx

Now Integrate:

v = kx2 ex2 + k ex2 + D


v = kex2 (1x2) + D

Simplify:

Step 7: Substitute into y = uv to find the solution to the original equation.


y = uv:
Simplify:
Replace D/k with a single constant c:

y = ex2/k ( kex2 (1x2) + D )


y =1 x2 + ( D/k)ex2
y = 1 x2 + c ex2

You might also like