In this explainer, we will learn how to identify and solve separable differential equations.

A differential equation is an equation that relates functions to their derivativesβthat is, an equation expressing a
relationship between functions and their rates of change. As such, differential equations are extremely prevalent in engineering
and physicsβmany of the fundamental laws of physics are expressed in terms of differential equations. A differential equation
may involve multiple functions, their derivatives, their second and higher derivatives, and even their *partial* derivatives. In this explainer, we will be looking at only the simplest case of differential equations, which is that of a single function in a
single variable and its first derivative. Such equations are called **first-order ordinary differential equations**.

Consider the equation

This is an example of a first-order ordinary differential equation. It has a particular solution, which is the function
, because the first derivative of is indeed . However, this is
not the only solution to the equation. Indeed, any function of the form , where is a
constant, satisfies the differential equation . The equation
is called the *general solution* to the differential equation. It represents a family of solutions,
parameterized by .

Since solving a differential equation involves βgetting ridβ of a derivative, it should come as no surprise that the
basic tool for solving differential equations is integration. We will be looking at a class of differential equations for which the
application of integration is relatively straightforward. A **separable** first-order ordinary differential equation is an equation
of the form
in which is an expression purely in and is
an expression purely in . First, note that there is an obvious family of solutions to this equation in the form of
any constant function (implying that ), such that
(which makes the differential equation true). These solutions are called **equilibrium
solutions** to the differential equation.

To find the nonequilibrium solutions, we suppose that and divide both sides by , βseparating the variablesβ to get the equation

The next step in solving the differential equation is to integrate both sides of this equation with respect to :

Recall that the rules of integration by substitution tell us that

Therefore, we have arrived at

This procedure holds in general for any separable differential equation . Let us summarize the situation in the following fundamental fact.

### Rule: General Solution of Separable Differential Equations

If the equation is true and , then the equation is true.

We can now solve the equation by calculating the integrals. Let us look at an example.

Consider the equation

This is a separable first-order ordinary differential equation, with and . Observe that is a constant solution to the equation . We note this down as an equilibrium solution to and assume that . Next, we divide both sides by to get

By our general rule above, this yields the integral equation which we can calculate. Not forgetting the constants of integration, since these are indefinite integrals, we have

Because and are both constants, we are going to subtract from both sides to form a new constant :

This is a general solution to the differential equation . However, it is good to rearrange our solution into the form , where is some function of , if we can. So, we apply the exponential map to both sides:

Notice that the absolute value around indicates that we have two cases; namely,

We combine these two cases and eliminate the absolute value by defining a new constant giving us the general solution

So, the differential equation has the particular equilibrium solution and the general solution family parameterized by .

Let us look now at a slightly more complicated example.

### Example 1: Finding the General Solution to a Separable Differential Equation

Solve the differential equation .

### Answer

We have a general procedure for solving such separable differential equations, which is as follows:

- We have a separable equation in the form so we first check for any equilibrium solutions in the form of constant solutions to the equation .
- Next, we suppose and divide by :
- Next, we integrate this equation, which gives
- Now, we compute the integral on both sides, not forgetting the constants of integration.
- Finally, we rearrange the resulting equation into the form , if possible.

We have an equation of the form with and . Before proceeding, we check for equilibrium solutions in the form of constant solutions to and see that we have one in the form of . We note this down for later and now we suppose . We can now divide both sides of the equation by :

Next, we form the integral equation making the change of notation for convenience. Now, we integrate combine constants on the right-hand side to get and divide by 2 to get

Since the question did not specify in what form to give our solution, we can write as the general solution to the differential equation and as the equilibrium solution. We can also write as an acceptable form for the general solution.

In the previous example, we were given a separable differential equation in the form . Not every separable differential looks like this; some rearrangement may first be required, as in the next example.

### Example 2: Finding the General Solution to a Separable Differential Equation

Solve the differential equation .

### Answer

Here, we have a separable first-order ordinary differential equation that is not presented to us in standard separable form . The procedure for solving such equations is as follows:

- First, we rearrange the equation into the form and check for any equilibrium solutions in the form of constant solutions to the equation .
- Now, we suppose and divide by :
- Next, we integrate this equation, which gives
- Now, we compute the integral on both sides, not forgetting the constants of integration.
- Finally, we rearrange the resulting equation into the form , if possible.

Our first step, then, is to rearrange into the form . So, let us subtract from both sides of the equation to get

Here, we have and . We can see that solves and is an equilibrium solution to .

The next step is to suppose and divide by :

Now, we form the integral equation and compute the indefinite integrals, not forgetting the constants of integration:

We want to rearrange this into the form , where is some function of . First, we multiply everything by and define a new constant :

Now, we apply the exponential to both sides to get
define a *new* new constant to get
subtract 1 to get
and finally, multiply by again, observing that , being some unspecified number, may as well
βabsorbβ this , remaining an unspecified number:

Thus, is our general solution to the differential equation and is the equilibrium solution.

Sometimes, we encounter a separable differential equation presented in such a way that it is more convenient to rearrange directly into the form rather than first into the form . The next examples demonstrate this.

### Example 3: Finding the General Solution to a Separable Differential Equation

Solve the following differential equation: .

### Answer

In this question, we have a separable differential equation given to us in a form in which the variables are already separated; that is, where and . The notation is simply the Lagrangian notation for the derivative . We proceed straight to integrating:

Combining constants on the right-hand side, we have as the general solution to the differential equation .

So far, we have dealt only with *general* solutions to differential equationsβthat is, with families of solutions
parameterized by a constant . However, it is possible to deduce the value of if we are given a
pair of values that the solution must satisfy. These given values are called **boundary** or **initial** conditions, and the
resulting unique solution satisfying these conditions is called a **specific** solution to the differential equation.

Consider again our example with the general solution where is a constant. Suppose now we are given the boundary conditions that when . We simply substitute these values into our general solution to find the value of the constant :

So, the particular solution to the differential equation , given that when , is .

### Example 4: Finding the Particular Solution to a Separable Differential Equation

Solve the following differential equation, using the given boundary conditions to find a particular solution:

### Answer

To find the particular solution to a separable differential equation, such as the one given in the question, we proceed just as we would to find its general solution and then substitute in the given boundary conditions at the end, following these steps:

- First, we rearrange the equation directly into the form
- Next, we integrate this equation, which gives
- Now, we compute both integrals, not forgetting the constants of integration.
- After rearranging, this will yield a general solution to the differential equation in the form where is an expression in and is an expression in containing some constant whose value is to be determined. We substitute the given boundary conditions into this equation to find the value of the constant.

First, we want to rearrange the equation into the form βthat is, with all expressions in on the left-hand side and all expressions in on the right-hand side. Observe first that the presence of on the right-hand side means that this equation is not defined when βthat is, when and , so we exclude these cases and divide both sides by to get and rewrite things a little, using the identities and to get

We are now ready to integrate (combining constants of integration on the right-hand side):

To compute the left-hand integral, we use the identity , so and we recall that , giving us as a general solution to our differential equation.

Finally, we substitute the boundary conditions and into the general solution to find a value for , and the particular solution,

Finally, we look at an example that requires a little more work to solve.

### Example 5: Finding the Particular Solution to a Separable Differential Equation

By expressing in partial fractions, write down the particular solution to the differential equation satisfying the condition when . Give your solution in the form .

### Answer

We solve this problem in the following steps:

- First, we rearrange the equation into the form and check for any equilibrium solutions in the form of constant solutions to the equation .
- Now, we suppose and divide by :
- Next, we integrate this equation, which gives
- Now, we compute both integrals, not forgetting the constants of integration.
- We rearrange the resulting equation into the form , where is an expression in containing some unknown constant to be determined.
- Finally, we substitute in the given boundary conditions to find the value of the unknown constant and write down a particular solution to the equation.

Observe first that we have an equilibrium solution to at . The particular values and that make the left-hand side 0 also force . Thus, excluding also excludes these values of , and so we can rearrange the equation into the form by dividing by :

Here, and . Since we have excluded the equilibrium solution , we can divide by for

The next step is to integrate:

The left-hand side is straightforward enough, . In order to tackle the right-hand side, we need to express in partial fractions. So, we put

We multiply by and by so that we have a common denominator:

Looking at the numerators, we have the equation

Equating -coefficients gives and equating constant terms gives

We can solve this pair of simultaneous equations by elimination. First, we multiply by 3 for and then add this to :

Now, we substitute back into so that and . Thus, we have

We are now ready to integrate:

Consolidating constants on the right, we have which is a general solution to the differential equation . In order to find a particular solution, we need to calculate the value of the constant. Before doing this, we rearrange our general solution into the form by applying the exponential:

Observe that , so . The remaining pair of expressions inside modulus bars gives us four cases to consider:

We define a new constant leaving us with the general solution

The picture shows an example of the two βbranchesβ of the general solution, here, taken with the parameter . Observe that the function can be defined at to be , but it is certainly not differentiable there. Thus, is not part of the domain of the general solution.

The last step in finding a particular solution is to use the boundary conditions and . Since , we are dealing now with the function . Substituting the boundary conditions into this general solution, we have

We finally substitute the value into the general solution for the particular solution . Thus, we have 2 solutions: this one and the equilibrium .

In this picture, the green curve is the solution and the red line is the equilibrium solution . Observe that the solution is not defined for and is not differentiable at the point . It is therefore valid on the open interval . The domain of the equilibrium solution is all of .

Let us finish by recapping a few important concepts from this explainer.

### Key Points

- We recognize separable differential equations as differential equations that can be rearranged into the form
- We understand that constant solutions to the equation represent equilibrium solutions to the differential equation.
- In order to find the general solution to a separable differential equation , we suppose and divide by to get and integrate both sides of
- The general solution to such a differential equation represents an infinite family of solutions, parameterized by a constant .
- In order to find a particular solution given boundary conditions and , we substitute these values into the general solution to find the value of the constant .