Separation of Variables
Neil Trivedi
Teacher
Contents
Separation of Variables
A differential equation is an equation that relates a quantity (a function) to its rate of change (its derivative), so it describes how that quantity changes rather than just what it is. In A-Level Mathematics, we will solve specific equations using a method known as “the separation of variables”.
The separation of variables is a method used to solve first-order differential equations that can be rearranged so that all the terms are on one side, and all the terms are on the other using multiplication and division only. It applies to differential equations that can be written in the form
In the process of separating variables, we can treat as a fraction which means we can multiply both sides by to collect all ’s to the right side, and then all ’s to the left side.
Multiply both sides by .
Divide both sides by .
Now, all the terms are on the left while all the terms are on the right.
Once we have isolated the ’s and ’s, we integrate both sides with respect to their own variables.
We include the constant of integration on one side of the equation, not both. Technically, when integrating both sides, each side has a constant of integration added.
Subtracting from both sides,
Since is an unknown constant, we can rename it .
This shows that it’s not necessary to include a constant of integration on both sides because they’d absorb into a single unknown constant on one side when we rearrange the equation.
If a question specifies initial conditions for and , we substitute to find the value of the constant of integration. This gives us a particular solution of the differential equation.
Let’s take a simple differential equation such as
We already know that integrating gives
However, let’s look at what is really happening when we solve the differential equation and how this links to the method of separation of variables.
We have
We first multiply both sides by to bring all the ’s to the right side.
We now have all the ’s on the LHS and the ’s on the RHS. We can now integrate each side independently. Keep in mind, actually means .
In reality, we would not solve such a differential equation using the separation of variables, but this is technically what is happening behind the scenes.
Separation of Variables
We want to solve a differential equation that’s in the form
1) Separate the variables by bringing all the terms to the RHS and the terms on the LHS. We’d normally get an equation of this form
2) Integrate both sides with respect to their own variable, adding a constant of integration once on either side depending on the type of function we are integrating. This will give us our general solution of the differential equation.
3) If we are given initial conditions, we substitute them into our integrated function to find the constant of integration and hence, a particular solution of the differential equation.
Example 1:
Solve
when and . Leave you answer in the form .
Step 1: Rewrite the RHS so that we can separate the variables.
Using our index rules to rewrite the RHS since the ’s and ’s are trapped together within the power, when we subtract terms within the power, we divide the two numbers, we can rewrite the function as . Hence,
Step 2: Rearrange so that all the terms are on one side and the terms on the other.
To separate the variables, we multiply both sides by to move all terms to the right and multiply both sides by to move all terms to the left,
Step 3: Integrate both sides.
For all exponentials, they generally differentiate to the same function (with a constant that we adjust for later) and so, when integrating, we always guess the same function.
We can recognise straight away that, for the left side, integrates to .
On the right side, for , we will guess . The angle is , which differentiates to , then the function of stays the same as well as its power.
Angle stays the same
Differentiated angle
Our guess differentiates to give , but we wanted . So, we multiply both sides by the constant we want over the constant we have, which will be . So, on the RHS, we have
Therefore, after integrating both sides, we are left with,
Step 4: Substitute the initial conditions given in the question into the general solution to find a particular solution of the differential equation.
Our general solution is
We substitute initial conditions and into the general solution and solve for .
On the LHS, the functions of and cancel out. On the RHS, we can use logarithmic rules to rewrite as .
Therefore, the particular solution of the differential equation, given the initial conditions, is
The Constant of Integration and Natural Logarithms
Usually, when we add our constant of integration, we put on the end. However, when we’re integrating functions that involve , we may prefer to add the constant of integration, , within the function of rather than a . Let’s explore why that may be preferable.
Suppose we have
Separating the variables, we multiply both sides by dx to move the terms to the right side and divide both sides by to move the terms to the left side.
Integrating the left side with respect to and the right side with respect to ,
We know that will integrate to , while will integrate to . Now, let’s compare what happens if we put the constant of integration inside the function versus adding on the right side.
Constant inside the function:
Applying on both sides to cancel out the ,
Dividing both sides by to isolate , we get , but is also an unknown constant so it absorbs into a new constant .
added on the right:
Applying on both sides to cancel out the ,
We can rewrite the right side as using the index laws which state that if we multiply two numbers with the same base, which is e in this case, we add the powers.
With being an unknown constant, it absorbs into a new constant .
In both methods, we arrive at the same general solution, which is . However, placing the constant of integration inside the function requires less working since we will be working with one term on each side. If we instead add on the right side, we will have more than one term and will therefore need further manipulation to bring the constant down. We must split the exponential function later to bring the constant down, which introduces an extra step or two.
Example 2:
Find the general solution of
Step 1: Rearrange so that all the terms are on one side and the terms on the other.
To separate the variables, we multiply both sides by to move the terms to the right.
Now that we have multiplied by , we must include a bracket around to ensure is being multiplied by the whole RHS which means we then have to divide by to get all the ’s to the LHS.
Step 2: Integrate both sides.
For the RHS, we know this integrates to .
For the LHS, we will make a guess as to what function may differentiate to . We will guess .
We now differentiate our guess with respect to . This is a function of so the angle is the argument (what we’re taking of), which in this case is . The angle differentiates to and when we differentiate the function of , the angle is reciprocated.
When is differentiated, the angle is reciprocated
Differentiated angle
Our guess differentiates to give , but we wanted . So, we multiply both sides by the constant we want over the constant we have which will be . So, on the LHS, we have
Therefore, after integrating both sides, we are left with
Step 3: Rearrange the equation to obtain a function in the form .
Multiplying both sides by ,
Applying on both sides to cancel out the ,
Dividing both sides by , we get on the RHS which will be absorbed into an unknown constant called .
Adding to both sides,
Finally, we divide both sides by to get
Challenging Questions