0% found this document useful (0 votes)
168 views14 pages

Separation of Variables

The document discusses the method of separation of variables for solving first order differential equations. It can be used when the differential equation can be written in the form A(x)dx + B(y)dy = 0, where A(x) is a function of x only and B(y) is a function of y only. Several examples are provided to demonstrate how to use separation of variables to solve differential equations by integrating both sides. The method allows expressing the solution as an explicit function of one of the variables.
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)
168 views14 pages

Separation of Variables

The document discusses the method of separation of variables for solving first order differential equations. It can be used when the differential equation can be written in the form A(x)dx + B(y)dy = 0, where A(x) is a function of x only and B(y) is a function of y only. Several examples are provided to demonstrate how to use separation of variables to solve differential equations by integrating both sides. The method allows expressing the solution as an explicit function of one of the variables.
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/ 14

23.10.22, 19:29 2.

Separation of Variables

2. Separation of Variables
Some differential equations can be solved by the method of separation of variables (or "variables separable") . This
method is only possible if we can write the differential equation in the form

A(x) dx + B(y) dy = 0,

where A(x) is a function of x only and B(y) is a function of y only.

Once we can write it in the above form, all we do is integrate throughout, to obtain our general solution.

NOTE: In this variables separable section we only deal with first order, first degree differential equations.

Example 1 - Separation of Variables form

a) The differential equation (which we saw earlier in Solutions of Differential Equations):

dy y
ln  x − = 0
dx x
​ ​

can be expressed in the required form, A(x) dx + B(y) dy = 0, after some algebraic juggling:

dy y
ln  x − = 0
dx x
​ ​

y  dx
dy  ln  x − =0
x

y  dx
dy − =0
x  ln  x

dy dx
− =0
y x  ln  x
​ ​

1 1
dy − dx = 0
y x  ln  x
​ ​

1 1
Here, A(x) = −  and B (y ) = .
x  ln  x y
​ ​

[To solve the equation, we would then integrate throughout].

b) The following differential equation cannot be expressed in the required form, so it cannot be solved using
separation of variables:

dy 3(x + y )
=
dx x(y − 2)
​ ​

Example 2
Solve the differential equation:

y 2 dy + x 3 dx = 0

Answer

This is already in the required form (since the x-terms are together with dx terms, and y-terms are together
with dy terms), so we simply integrate:

∫ y 2 dy + ∫ x3 dx = 0

https://www.intmath.com/differential-equations/2-separation-variables.php 1/14
23.10.22, 19:29 2. Separation of Variables

Giving:

y 3 x4
+ =K
3 4
​ ​

This is the general solution for the differential equation.

We can continue on to solve this as an explicit function in x, as follows:

3 x4
y = 3(K − )
4

3 x4
y= 3(K − )
4
​ ​

Taking a typical constant value K = 5, we have this solution graph:

y
4
3
2
1 x

-10 -5 -1 5 10
-2
-3
-4
-5
-6
-7
-8
-9
-10

3 x4
Typical solution graph y = 3(5 − ) .
4
​ ​

Example 3

dy y (x + 1)
Solve the differential equation: 2 =
dx x
​ ​

Answer

First we must separate the variables:

2  dy (x + 1) dx
=
y x

2  dy 1
This gives us:  = (1 + ) dx
y x
​ ​

We now integrate:

2 dy 1
∫ = ∫ (1 + ) dx
y x
​ ​

2 ln y = x + ln x + K
Go back to Integration: Basic Logarithm Form if you are rusty on this integration.

We could continue with our solution and express y  as an explicit function of x, as follows:

https://www.intmath.com/differential-equations/2-separation-variables.php 2/14
23.10.22, 19:29 2. Separation of Variables
x + ln x + K
ln y =
2

y = e(x+ln x+K )/2

Taking a typical constant value K = 1, we have this solution graph:

y
10
9
8
7
6
5
4
3
2
1 x

-1 1 2 3 4
-1
(x+ln x+1)/2
Typical solution graph y = e .

Example 4
dx
Solve t −x=3
dt

Answer

dx
t −x=3
dt

We want all x's on one side, all the terms in t on the other.

dx
t =x+3
dt

Divide both sides by (x + 3) and multiply both sides by  dt :

dx
t = dt
x+3

Next, divide both sides by t.

dx dt
=
x+3 t

Integrate both sides.

dx dt
∫ =∫
x+3 t
​ ​

Important: dx and dt must be on top of the fraction (i.e. in the numerator).

ln∣x + 3∣ = ln∣t∣ + C

Take "e to power of both sides":

x + 3 = eln∣t∣+C = eln∣t∣ eC = Kt

(We let eC = K , constant)


https://www.intmath.com/differential-equations/2-separation-variables.php 3/14
23.10.22, 19:29 2. Separation of Variables

So x = Kt − 3.

Typical solution and graph

We let K = 7, for illustration):

x
30

25

20

15

10

5
t

1 2 3 4 5
-5
Typical solution graph x = 7t − 3.

Example 5

Solve  1 + 4x2   dy = y 3 x  dx ​

Answer

Separating variables gives us:

dy x  dx
=
y3 1 + 4x2

Integrating gives us:

dy x  dx
∫ =∫
y3 1 + 4x2
​ ​

We now proceed to integrate the 2 sides separately. That is, we integrate the left side in y only (since after
separating the variables we have terms in y and a dy on the left) and we work on the right side in x only (since we
have terms in x and a dx only on the right).

For the right hand side involving x, let u = (1 + 4x 2), so du = 8x dx and du/8 = x dx.

dy 1 du
∫ 3 = ∫
y 8 u
​ ​ ​

−1
=
2y 2

1
= (2)u1/2 + K
8

1
= 1 + 4x2 + K
4
​ ​

So the solution is given by:


−1 1
= 1 + 4x2 + K
2y 2 4
​ ​

https://www.intmath.com/differential-equations/2-separation-variables.php 4/14
23.10.22, 19:29 2. Separation of Variables

We could go on to solve this in y, as follows:

Multiply both sides by −2:

1 1
2
=− 1 + 4x2 − 2K
y 2
​ ​ ​

K1
For convenience, introduce a new variable K 1 = −4K , so that we'll have −2K = . Our solution becomes:

2
​ ​

1 1 K1 K 1 − 1 + 4x2
=− 1 + 4x2 + = 
​ ​ ​

y2 2 2 2
​ ​ ​ ​ ​

Take the reciprocal of both sides:


2
y2 =
K1 − 1 + 4x2

​ ​

Then solve for y:

± 2
y=

K1 − ​ 1 + 4x2 ​ ​

(The constant K1 can be chosen so that the expression in the denominator is real.)

Here is the graph of a typical solution for Example 5 where we have taken K = 50:

-30 -20 -10 10 20 30

-1
± 2
Typical solution graph y = .

50 − 1 + 4x2 ​ ​

Particular Solutions
Our examples so far in this section have involved some constant of integration, K.

We now move on to see particular solutions, where we know some boundary conditions and we substitute those into
our general solution to give a particular solution.

Example 6
Find the particular solution for

dy
+ 2y = 6
dx

given that x = 0 when y = 1.

Answer

https://www.intmath.com/differential-equations/2-separation-variables.php 5/14
23.10.22, 19:29 2. Separation of Variables

We solve as before, and then use the given information to find the value of the unknown K.

Separating variables:

dy
+ 2y = 6
dx

dy
= 6 − 2y
dx

dy = (6 − 2y ) dx
dy
= dx
6 − 2y

Integrating gives:

dy
∫ = ∫ dx
6 − 2y

−1
ln∣6 − 2y ∣ = x + K
2

1
[For the integral involving y , we put u = 6 − 2y  giving du = −2  dy . This means we'll replace  dy  with (− )du and
2

1
integrate ( )du giving ln  u.]
u

Now, when x = 0, y = 1; so we have:

−1
ln∣6 − 2(1)∣ = 0 + K
2

−1
K= ln∣4∣
2

So, on substituting this back into our previous equation and doing some algebra, we obtain:
−1 −1
ln∣6 − 2y ∣ = x + ln∣4∣
2 2
​ ​

−1
[ln∣6 − 2y ∣ − ln 4] = x
2

ln (6 − 2y )
= −2x
4

Taking "e to both sides":

6 − 2y
= e−2x
4

6 − 2y = 4e−2x

y = 3 − 2e−2x
dy
Checking our solution:  = 4e−2x and so
dx

dy
LHS = + 2y
dx

= 4e−2x + 2(3 − 2e−2x )

=6

= RHS
https://www.intmath.com/differential-equations/2-separation-variables.php 6/14
23.10.22, 19:29 2. Separation of Variables
0
Also, when x = 0, y = 3 − 2e = 1.
−2x
So the particular solution is given by: y = 3 − 2e

Here is the graph of our solution for Example 6:

x
5
4
3
2
1
t

-3 -2 -1 1 2 3 4 5
-1
-2
-3
-4
-5
Solution graph y = 3 − 2e−2x , showing the curve passing through (0, 1).

Example 7
Solve

x  dy = y  ln  y  dx ,
given

x = 2 when y = e.

Answer

Separating variables:

x  dy = y  ln  y  dx
dy dx
=
y  ln  y x

Integrating: [For the y part, let u = ln y, then du = dy/y].

dy dx
∫ =∫
y  ln  y x
​ ​

ln (ln  y ) = ln  x + K

Substituting x = 2 when y = e gives:

ln (ln  e) = ln  2 + K

ln (1) = ln  2 + K

0 = ln  2 + K

K = − ln  2
Substituting this in our general solution:
x
ln (ln  y ) = ln  x − ln  2 = ln  
2

https://www.intmath.com/differential-equations/2-separation-variables.php 7/14
23.10.22, 19:29 2. Separation of Variables

This gives us:


x
ln  y =
2

So the particular solution is given by:

y = ex/2

Here is the graph of our solution for Example 7:

x
5

1
t

-5 5
-1

-2
x/2
Solution graph y = e , showing the curve passes through (2, e).

Example 8 - RL Circuit Application

In an RL circuit, the differential equation formed using Kirchhoff's law, is

di
Ri + L =V
dt

Solve this DE, using separation of variables, given that

R = 10 Ω, L = 3 H and V = 50 volts, and i(0) = 0.

Answer

Substituting R = 10, L = 3 and V = 50 gives:

di
10i + 3 = 50
dt

di
3 = 50 − 10i
dt

First, we separate the variables.

https://www.intmath.com/differential-equations/2-separation-variables.php 8/14
23.10.22, 19:29 2. Separation of Variables
di dt
=
(50 − 10i) 3

Integrate.

1 di 1
∫ = ∫ dt
10 5 − i 3
​ ​ ​

1 t
− ln (5 − i) = + K
10 3
​ ​

Since i(0) = 0,

1
− ln (5 − 0) = 0 + K
10

− ln  5
K=
10

So, substituting for K:

1 t ln  5
− ln (5 − i) = −
10 3 10
​ ​ ​

Put log parts together.

t 1 ln  5
− = ln (5 − i) −
3 10 10
​ ​ ​

Multiply both sides by 10


10t
− = ln (5 − i) − ln  5
3

10t 5−i
− = ln  
3 5
​ ​

5−i
e−10t/3 =
5

5e−10t/3 = 5 − i

i = 5 − 5e−10t/3 = 5(1 − e−10t/3 )

The graph shows that the current builds up and levels out at a maximum value of 5 A.

i
6

1
t

1 2 3 4
-1

Solution graph i = 5(1 − e−10t/3 ).

NOTE: We could have solved this for i another way. Here it is - you may find it easier.

https://www.intmath.com/differential-equations/2-separation-variables.php 9/14
23.10.22, 19:29 2. Separation of Variables
1 t ln  5
− ln (5 − i) = −
10 3 10
​ ​ ​

10t
ln (5 − i) = − + ln  5
3

Raising both sides as a power of e:

5 − i = e−10t/3+ln  5  = e−10t/3 eln  5  = 5e−10t/3

i = 5 − 5e−10t/3  = 5(1 − e−10t/3 )

Example 9 - Skydiver's Terminal Velocity


When a skydiver jumps out of a (perfectly good) aeroplane, apart from experiencing sheer
terror (and exhilaration), she experiences two forces:

Gravity, acting downwards

Air resistance, acting upwards

Gravity is written g and on earth its acceleration has value 9.8 ms -2.

Air resistance depends on the size and shape of the item that is dropping through the air.
We use the constant k to represent the amount of air resistance. It is called the coefficient
of drag.

The air resistance is proportional to the square of the velocity, so the upwards resistance
force due to air resistance can be represented by

Fair = kv 2.

Now the force on the object due to gravity is: Image source.

Fgravity = mg, where g is the acceleration due to gravity.

The total force acting on the body is

F total = F air − F gravity = kv 2 − mg


​ ​ ​

Dividing throughout by m gives us a good model for the velocity v of an object falling through the air:

k 2
a= v −g
m

We can write this as

dv k
= v2 − g
dt m
​ ​

Image source.

Questions

https://www.intmath.com/differential-equations/2-separation-variables.php 10/14
23.10.22, 19:29 2. Separation of Variables

a. Find an expression for the velocity of a sky diver at time t.

b. Find the velocity after 5 seconds for a sky diver of mass m = 80 kg and k = 0.2

c. Find the terminal velocity for any object for general values of g and k.

d. Find the terminal velocity our skydiver with mass m = 80 kg and k = 0.2.

Answer

a. General Formula for Velocity of an Object Falling in Air

We rewrite our differential equation:

dv k
= v2 − g
dt m

in a more convenient form :

dv k 2
= g( v − 1)
dt mg
​ ​

Also for convenience, let c be defined as:

mg
c=
k
​ ​

So:

1 k
=
c2 mg

We can rewrite our differential equation as:

dv v2
= g ( 2 − 1)
dt c
​ ​

This is the same as:

dv v 2 − c2
= g( )
dt c2
​ ​

Separating the variables:

c2 dv
= g  dt
v 2 − c2

Integrating both sides:

dv
c2 ∫ = ∫ g dt
v2 − c2

We multiply the fraction by −1, thus reversing the order of (v 2 − c2 ), and also at the front to compensate, so the
substitution step coming up later is possible. (Otherwise, we would be trying to find the log of a negative number
when finding K .)

dv
−c2 ∫ = ∫ g dt
c2 − v2

To perform this integration, we could either:

1. Factor the denominator, use partial fractions and then integrate (it needs the logarithm form), or
2. Use a table of integrals (integral #13), (easier); or
3. Use a computer algebra system, like Scientific Notebook. (easiest)

https://www.intmath.com/differential-equations/2-separation-variables.php 11/14
23.10.22, 19:29 2. Separation of Variables

We integrate and obtain:

1 c+v
(−c2 ) ln ( ) = gt + K
2c c−v
​ ​

"K" is the constant of integration.

At t = 0, v = 0 and after substituting, we conclude K = 0. Therefore:

c c+v
− ln ( ) = gt
2 c−v
​ ​

Now we solve for v.

Multiply both sides by −2 and divide by c:

c+v 2gt
ln ( )=−
c−v c
​ ​

Take e to both sides to remove the logarithm:


c+v
= e−2gt/c
c−v

Multiply out and solve for v:

c + v = (c − v )e−2gt/c

c + v = ce−2gt/c − ve−2gt/c

ve−2gt/c + v = ce−2gt/c − c

e−2gt/c − 1
v=c
e−2gt/c + 1

This is the velocity of our object at time t.

b. Velocity for Particular Sky Diver at Specific Time

First, we find c for our given situation. This was the expression for c:

mg
c=
k

We use the given mass and the coefficient of drag for the skydiver.

mass = m = 80 kg

coefficient of drag = k = 0.2

So

mg
c=
k
​ ​

80 × 9.8
=
0.2
​ ​

= 62.6

Next, we substitute the given time value (t = 5) and c = 62.6 to find the required velocity:

e−2gt/c − 1
v=c
e−2gt/c + 1

https://www.intmath.com/differential-equations/2-separation-variables.php 12/14
23.10.22, 19:29 2. Separation of Variables
−2(9.8)(5)/62.6
e −1
= 62.6 −2(9.8)(5)/62.6
e +1

= −40.9580

The units are ms -1, so the velocity at time t = 5 s is approximately 147 km/h (1 ms -1 = 3.6 km/h), in the downward
direction.

c. Terminal velocity

The expression for velocity at time t we found earlier:

e−2gt/c − 1
v=c
e−2gt/c + 1

As t → ∞, the value of the fraction approaches −1, since e -2gt/c → 0, giving us the terminal velocity v = −c.

So

mg
c=
k
​ ​

is the terminal velocity for the falling object (in the downward direction).

Note: We could have obtained the above expression without knowing the expression for velocity at time t, by simply
noting the velocity of the object reaches terminal velocity when the acceleration is 0.

That is, solving the following acceleration expression to find the velocity:

k 2
a= v −g =0
m

This gives terminal velocity

mg
v=
k

d. Terminal Velocity for Skydiver Example

We already found the expression for c (which is the terminal velocity) in Part (b)

mg
c=
k
​ ​

80 × 9.8
=
0.2
​ ​

= 62.6

So the terminal velocity is approximately 225 km/h, since 1 ms -1 = 3.6 km/h.

The graph of the velocity against time shows that it takes around 15 seconds to reach (or "get very close to") the
terminal velocity:

https://www.intmath.com/differential-equations/2-separation-variables.php 13/14
23.10.22, 19:29 2. Separation of Variables
v t

-20 5 10 15 20 25
-40
-60
-80
-100
-120
-140
-160
-180
-200
-220
-240
e−2(9.8)t/62.6 − 1
Velocity graph v = 225 , showing the point (5, −147).
e−2(9.8)t/62.6 + 1

Note:

1. The graph shows that the terminal velocity is never actually reached - the skydiver's velocity just gets closer
and closer to that velocity.
2. The graph includes the point representing the velocity at time t = 5, found earlier.
3. Actually, the air resistance increases as the air gets more dense nearer the Earth's surface. We have
assumed it remains constant for this problem.
4. The human sky diver can change k easily by either spreading their arms and legs (which will slow them
down), or diving down with arms and legs tightly together (which will increase their speed)

https://www.intmath.com/differential-equations/2-separation-variables.php 14/14

You might also like