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):
can be expressed in the required form, A(x) dx + B(y) dy = 0, after some algebraic juggling:
` (dy)/(dx)ln\ x-y/x=0`
`dy\ ln\ x-(y\ dx)/x=0`
`dy-(y\ dx)/(x\ ln\ x)=0`
`(dy)/y-(dx)/(x\ ln\ x)=0`
`1/ydy-1/(x\ ln\ x)dx=0`
Here, `A(x) = -1/(x\ ln\ x)` and `B(y) = 1/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:
Solve the differential equation:
y2 dy + x3 dx = 0
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:
This is the general solution for the differential equation.
We can continue on to solve this as an explicit function in x, as follows:
Taking a typical constant value `K=5`, we have this solution graph:
Typical solution graph `y=root(3)(3(5-x^4/4))`.
Solve the differential equation: `2(dy)/(dx)=(y(x+1))/x`
First we must separate the variables:
This gives us: `(2\ dy)/y=(1+1/x)dx`
We now integrate:
`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:
`ln y=(x+ln x+K)/2`
Taking a typical constant value `K=1`, we have this solution graph:
Typical solution graph `y=e^((x+ln x+1)//2)`.
We want all x's on one side, all the terms in t on the other.
Divide both sides by `(x + 3)` and multiply both sides by `dt`:
Next, divide both sides by t.
Integrate both sides.
Important: dx and dt must be on top of the fraction (i.e. in the numerator).
Take "e to power of both sides":
(We let `e^C=K`, constant)
So `x = Kt - 3`.
Typical solution and graph
We let `K = 7`, for illustration):
Typical solution graph `x=7t-3`.
Solve `sqrt(1+4x^2)\ dy=y^3x\ dx`
Separating variables gives us:
Integrating gives us:
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 + 4x2), so du = 8x dx and du/8 = x dx.
So the solution is given by:
We could go on to solve this in y, as follows:
Multiply both sides by `−2`:
For convenience, introduce a new variable `K_1 = -4K`, so that we'll have `-2K=K_1/2`. Our solution becomes:
`1/y^2=-1/2sqrt(1+4x^2)+K_1/2 =` ` (K_1 - sqrt(1+4x^2))/2`
Take the reciprocal of both sides:
Then solve for y:
(The constant K1 can be chosen so that the expression in the denominator is real.)
Please support IntMath!
Here is the graph of a typical solution for Example 5 where we have taken `K=50`:
Typical solution graph `y=(+-sqrt2)/sqrt(50-sqrt(1+4x^2))`.
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.
Find the particular solution for
given that x = 0 when y = 1.
We solve as before, and then use the given information to find the value of the unknown K.
[For the integral involving `y`, we put `u = 6 - 2y` giving `du = - 2\ dy`. This means we'll replace `dy` with `(-1/2)du` and integrate `(1/u)du` giving `ln\ u`.]
Now, when `x = 0`, `y = 1`; so we have:
So, on substituting this back into our previous equation and doing some algebra, we obtain:
Taking "`e` to both sides":
Checking our solution: `(dy)/(dx)=4e^(-2x)`and so
Also, when `x = 0`, `y = 3 - 2e^0= 1`.
So the particular solution is given by: `y = 3 - 2e^(-2x)`
Here is the graph of our solution for Example 6:
Solution graph `y=3-2e^(-2x)`, showing the curve passing through `(0, 1)`.
`x\ dy = y\ ln\ y\ dx`,
`x = 2` when `y = e`.
`x\ dy=y\ ln\ y\ dx`
`(dy)/(y\ ln\ y)=(dx)/x`
Integrating: [For the y part, let u = ln y, then du = dy/y].
`int(dy)/(y\ ln\ y)=int(dx)/x`
`ln(ln\ y)=ln\ x+K`
Substituting x = 2 when y = e gives:
`ln(ln\ e)=ln\ 2+K`
Substituting this in our general solution:
`ln(ln\ y)=ln\ x-ln\ 2` `=ln\ x/2`
This gives us:
So the particular solution is given by:
Here is the graph of our solution for Example 7:
Solution graph `y=e^(x//2)`, 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
Solve this DE, using separation of variables, given that
R = 10 Ω, L = 3 H and V = 50 volts, and i(0) = 0.
Substituting R = 10, L = 3 and V = 50 gives:
First, we separate the variables.
Since i(0) = 0,
So, substituting for K:
Put log parts together.
Multiply both sides by 10
The graph shows that the current builds up and levels out at a maximum value of 5 A.
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.
Raising both sides as a power of e:
`5-i=e^(-10t"/"3 + ln\ 5)` `=e^(-10t"/"3)e^(ln\ 5)` `=5e^(-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 = kv2.
Now the force on the object due to gravity is:
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:
We can write this as
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.
a. General Formula for Velocity of an Object Falling in Air
We rewrite our differential equation:
in a more convenient form :
Also for convenience, let c be defined as:
We can rewrite our differential equation as:
This is the same as:
Separating the variables:
Integrating both sides:
We multiply the fraction by `-1`, thus reversing the order of `(v^2-c^2)`, 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`.)
`-c^2int(dv)/(c^2-v^2)=int g dt`
To perform this integration, we could either:
- Factor the denominator, use partial fractions and then integrate (it needs the logarithm form), or
- Use a table of integrals (integral #13), (easier); or
- Use a computer algebra system, like Scientific Notebook. (easiest)
We integrate and obtain:
`(-c^2)1/(2c)ln((c+v)/(c-v))= g t +K`
"K" is the constant of integration.
At `t = 0`, `v = 0` and after substituting, we conclude `K = 0`. Therefore:
Now we solve for v.
Multiply both sides by `-2` and divide by c:
Take e to both sides to remove the logarithm:
Multiply out and solve for v:
`c+v=ce^(-2g t"/"c)-ve^(-2g t"/"c)`
`ve^(-2g t"/"c)+v=ce^(-2g t"/"c)-c`
`v=c(e^(-2g t"/"c)-1)/(e^(-2g t"/"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:
We use the given mass and the coefficient of drag for the skydiver.
mass = m = 80 kg
coefficient of drag = k = 0.2
Next, we substitute the given time value (t = 5) and c = 62.6 to find the required velocity:
`v=c(e^(-2g t"/"c)-1)/(e^(-2g t"/"c)+1)`
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:
`v=c(e^(-2g t"/"c)-1)/(e^(-2g t"/"c)+1)`
As t → ∞, the value of the fraction approaches −1, since e-2gt/c → 0, giving us the terminal velocity `v=-c`.
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:
This gives terminal velocity
d. Terminal Velocity for Skydiver Example
We already found the expression for c (which is the terminal velocity) in Part (b)
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:
Velocity graph `v=225(e^(-2(9.8) t"/"62.6)-1)/(e^(-2(9.8) t"/"62.6)+1)`, showing the point `(5, -147)`.
- The graph shows that the terminal velocity is never actually reached - the skydiver's velocity just gets closer and closer to that velocity.
- The graph includes the point representing the velocity at time t = 5, found earlier.
- 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.
- 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)