Lesson Explainer: Separable Differential Equations | Nagwa Lesson Explainer: Separable Differential Equations | Nagwa

Lesson Explainer: Separable Differential Equations Mathematics

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 dd𝑦𝑥=2𝑥.

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 2𝑥. However, this is not the only solution to the equation. Indeed, any function of the form 𝑦=𝑥+𝐶, where 𝐶 is a constant, satisfies the differential equation dd𝑦𝑥=2𝑥. 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 dd𝑦𝑥=𝑔(𝑥)(𝑦), 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 dd𝑦𝑥=0), such that (𝑎)=0 (which makes the differential equation true). These solutions are called equilibrium solutions to the differential equation.

To find the nonequilibrium solutions, we suppose that (𝑦)0 and divide both sides by (𝑦), “separating the variables” to get the equation 1(𝑦)𝑦𝑥=𝑔(𝑥).dd

The next step in solving the differential equation is to integrate both sides of this equation with respect to 𝑥: 1(𝑦)𝑦𝑥𝑥=𝑔(𝑥)𝑥.dddd

Recall that the rules of integration by substitution tell us that 1(𝑦)𝑦𝑥𝑥=1(𝑦)𝑦.dddd

Therefore, we have arrived at 1(𝑦)𝑦=𝑔(𝑥)𝑥.dd

This procedure holds in general for any separable differential equation dd𝑦𝑥=𝑔(𝑥)(𝑦). Let us summarize the situation in the following fundamental fact.

Rule: General Solution of Separable Differential Equations

If the equation dd𝑦𝑥=𝑔(𝑥)(𝑦) is true and (𝑦)0, then the equation 1(𝑦)𝑦=𝑔(𝑥)𝑥dd is true.

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

Consider the equation dd𝑦𝑥=𝑥𝑦.

This is a separable first-order ordinary differential equation, with 𝑔(𝑥)=𝑥 and (𝑦)=𝑦. Observe that 𝑦=0 is a constant solution to the equation (𝑦)=0. We note this down as an equilibrium solution to dd𝑦𝑥=𝑥𝑦 and assume that (𝑦)0. Next, we divide both sides by (𝑦)=𝑦 to get 1𝑦𝑦𝑥=𝑥.dd

By our general rule above, this yields the integral equation 1𝑦𝑦=𝑥𝑥,dd which we can calculate. Not forgetting the constants of integration, since these are indefinite integrals, we have ln|𝑦|+𝐶=12𝑥+𝐶.

Because 𝐶 and 𝐶 are both constants, we are going to subtract 𝐶 from both sides to form a new constant 𝐶=𝐶𝐶: ln|𝑦|=12𝑥+𝐶.

This is a general solution to the differential equation dd𝑦𝑥=𝑥𝑦. 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, 𝑦=𝑒𝑒,𝑦0,𝑦=𝑒𝑒,𝑦<0.

We combine these two cases and eliminate the absolute value by defining a new constant 𝐴=𝑒𝑦0,𝑒𝑦<0,ifif giving us the general solution 𝑦=𝐴𝑒.

So, the differential equation dd𝑦𝑥=𝑥𝑦 has the particular equilibrium solution 𝑦=0 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 dd𝑦𝑥=5𝑥𝑦.

Answer

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

  1. We have a separable equation in the form dd𝑦𝑥=𝑔(𝑥)(𝑦), so we first check for any equilibrium solutions in the form of constant solutions to the equation (𝑦)=0.
  2. Next, we suppose (𝑦)0 and divide by (𝑦): 1(𝑦)𝑦𝑥=𝑔(𝑥).dd
  3. Next, we integrate this equation, which gives 1(𝑦)𝑦=𝑔(𝑥)𝑥.dd
  4. Now, we compute the integral on both sides, not forgetting the constants of integration.
  5. Finally, we rearrange the resulting equation into the form 𝑦=𝐹(𝑥), if possible.

We have an equation of the form dd𝑦𝑥=𝑔(𝑥)(𝑦), with 𝑔(𝑥)=5𝑥 and (𝑦)=𝑦. Before proceeding, we check for equilibrium solutions in the form of constant solutions to (𝑦)=0 and see that we have one in the form of 𝑦=0. We note this down for later and now we suppose 𝑦0. We can now divide both sides of the equation by (𝑦)=𝑦: 1𝑦𝑦𝑥=5𝑥.dd

Next, we form the integral equation 𝑦𝑦=5𝑥𝑥,dd making the change of notation 1𝑦=𝑦 for convenience. Now, we integrate 2𝑦+𝐶=52𝑥+𝐶, combine constants on the right-hand side to get 2𝑦=52𝑥+𝐶, and divide by 2 to get 𝑦=54𝑥+𝐶.

Since the question did not specify in what form to give our solution, we can write 𝑦=54𝑥+𝐶 as the general solution to the differential equation dd𝑦𝑥=5𝑥𝑦 and 𝑦=0 as the equilibrium solution. We can also write 𝑦=54𝑥+𝐶=2516𝑥52𝐶𝑥+𝐶 as an acceptable form for the general solution.

In the previous example, we were given a separable differential equation in the form dd𝑦𝑥=𝑔(𝑥)(𝑦). 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 dd𝑦𝑥+𝑦=1.

Answer

Here, we have a separable first-order ordinary differential equation dd𝑦𝑥+𝑦=1 that is not presented to us in standard separable form dd𝑦𝑥=𝑔(𝑥)(𝑦). The procedure for solving such equations is as follows:

  1. First, we rearrange the equation into the form dd𝑦𝑥=𝑔(𝑥)(𝑦) and check for any equilibrium solutions in the form of constant solutions to the equation (𝑦)=0.
  2. Now, we suppose (𝑦)0 and divide by (𝑦): 1(𝑦)𝑦𝑥=𝑔(𝑥).dd
  3. Next, we integrate this equation, which gives 1(𝑦)𝑦=𝑔(𝑥)𝑥.dd
  4. Now, we compute the integral on both sides, not forgetting the constants of integration.
  5. Finally, we rearrange the resulting equation into the form 𝑦=𝐹(𝑥), if possible.

Our first step, then, is to rearrange dd𝑦𝑥+𝑦=1 into the form dd𝑦𝑥=𝑔(𝑥)(𝑦). So, let us subtract 𝑦 from both sides of the equation to get dd𝑦𝑥=1𝑦.

Here, we have (𝑦)=(1𝑦) and 𝑔(𝑥)=1. We can see that 𝑦=1 solves (𝑦)=0 and is an equilibrium solution to dd𝑦𝑥+𝑦=1.

The next step is to suppose 𝑦1 and divide by (𝑦)=(1𝑦): 11𝑦𝑦𝑥=1.dd

Now, we form the integral equation 11𝑦𝑦=1𝑥dd and compute the indefinite integrals, not forgetting the constants of integration: |1𝑦|+𝐶=𝑥+𝐶.ln

We want to rearrange this into the form 𝑦=𝐹(𝑥), where 𝐹(𝑥) is some function of 𝑥. First, we multiply everything by 1 and define a new constant 𝐶=𝐶𝐶: ln|1𝑦|=𝑥+𝐶.

Now, we apply the exponential to both sides to get 1𝑦=𝑒, define a new new constant 𝐴=𝑒 to get 1𝑦=𝐴𝑒, subtract 1 to get 𝑦=𝐴𝑒1, and finally, multiply by 1 again, observing that 𝐴, being some unspecified number, may as well “absorb” this 1, remaining an unspecified number: 𝑦=𝐴𝑒+1.

Thus, 𝑦=𝐴𝑒+1 is our general solution to the differential equation dd𝑦𝑥+𝑦=1 and 𝑦=1 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 𝐻(𝑦)𝑦𝑥=𝐺(𝑥)dd rather than first into the form dd𝑦𝑥=𝑔(𝑥)(𝑦). The next examples demonstrate this.

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

Solve the following differential equation: (𝑒5)𝑦=2+(𝑥)cos.

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 𝐻(𝑦)=(𝑒5) and 𝐺(𝑥)=2+(𝑥)cos. The notation 𝑦 is simply the Lagrangian notation for the derivative 𝑦=𝑦𝑥dd. We proceed straight to integrating: (𝑒5)𝑦=(2+(𝑥))𝑥𝑒𝑦51𝑦=2𝑥+(𝑥)𝑥𝑒5𝑦+𝐶=2𝑥+(𝑥)+𝐶.dcosddddcosdsin

Combining constants on the right-hand side, we have 𝑒5𝑦=2𝑥+(𝑥)+𝐶sin as the general solution to the differential equation (𝑒5)𝑦=2+(𝑥)cos.

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 dd𝑦𝑥=𝑥𝑦 with the general solution 𝑦=𝐴𝑒, where 𝐴 is a constant. Suppose now we are given the boundary conditions that 𝑦=5 when 𝑥=0. We simply substitute these values into our general solution to find the value of the constant 𝐴: 5=𝐴𝑒5=𝐴𝑒𝐴=5.

So, the particular solution to the differential equation dd𝑦𝑥=𝑥𝑦, given that 𝑦=5 when 𝑥=0, is 𝑦=5𝑒.

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: cossecddcscsec(𝑥)(𝑦)𝑦𝑥=(𝑦)(𝑥),𝑥=0,𝑦=𝜋4.

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:

  1. First, we rearrange the equation directly into the form 𝐻(𝑦)𝑦𝑥=𝐺(𝑥).dd
  2. Next, we integrate this equation, which gives 𝐻(𝑦)𝑦=𝐺(𝑥)𝑥.dd
  3. Now, we compute both integrals, not forgetting the constants of integration.
  4. 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 cossecddcscsec(𝑥)(𝑦)𝑦𝑥=(𝑦)(𝑥) into the form 𝐻(𝑦)𝑦𝑥=𝐺(𝑥)dd—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 sec(𝑥) on the right-hand side means that this equation is not defined when cos(𝑥)=0—that is, when 𝑥=(2𝑛+1)𝜋2 and 𝑛, so we exclude these cases and divide both sides by coscsc(𝑥)(𝑦) to get seccscddseccos(𝑦)(𝑦)𝑦𝑥=(𝑥)(𝑥) and rewrite things a little, using the identities seccos=1 and cscsin=1 to get tanddsec(𝑦)𝑦𝑥=(𝑥).

We are now ready to integrate (combining constants of integration on the right-hand side): (𝑦)𝑦=(𝑥)𝑥.tandsecd

To compute the left-hand integral, we use the identity tansec(𝑦)(𝑦)1, so (𝑦)𝑦=(𝑦)1𝑦=(𝑦)𝑦1𝑦,tandsecdsecdd and we recall that ddtansec𝑦(𝑦)=(𝑦), giving us tantan(𝑦)𝑦=(𝑥)+𝐶 as a general solution to our differential equation.

Finally, we substitute the boundary conditions 𝑥=0 and 𝑦=𝜋4 into the general solution tantan(𝑦)𝑦=(𝑥)+𝐶 to find a value for 𝐶, tantan𝜋4𝜋4=(0)+𝐶1𝜋4=𝐶, and the particular solution, tantan(𝑦)𝑦=(𝑥)+1𝜋4.

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 9𝑥17(4𝑥7)(𝑥3) in partial fractions, write down the particular solution to the differential equation (4𝑥7)(𝑥3)𝑦𝑥=(9𝑥17)𝑦,dd satisfying the condition 𝑦=5 when 𝑥=2. Give your solution in the form 𝑦=𝑓(𝑥).

Answer

We solve this problem in the following steps:

  1. First, we rearrange the equation into the form dd𝑦𝑥=𝑔(𝑥)(𝑦) and check for any equilibrium solutions in the form of constant solutions to the equation (𝑦)=0.
  2. Now, we suppose (𝑦)0 and divide by (𝑦): 1(𝑦)𝑦𝑥=𝑔(𝑥).dd
  3. Next, we integrate this equation, which gives 1(𝑦)𝑦=𝑔(𝑥)𝑥.dd
  4. Now, we compute both integrals, not forgetting the constants of integration.
  5. We rearrange the resulting equation into the form 𝑦=𝐹(𝑥), where 𝐹(𝑥) is an expression in 𝑥 containing some unknown constant to be determined.
  6. 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 (4𝑥7)(𝑥3)𝑦𝑥=(9𝑥17)𝑦dd at 𝑦=0. The particular values 𝑥=3 and 𝑥=74 that make the left-hand side 0 also force 𝑦=0. Thus, excluding 𝑦=0 also excludes these values of 𝑥, and so we can rearrange the equation (4𝑥7)(𝑥3)𝑦𝑥=(9𝑥17)𝑦dd into the form dd𝑦𝑥=𝑔(𝑥)(𝑦) by dividing by (4𝑥7)(𝑥3): dd𝑦𝑥=(9𝑥17)(4𝑥7)(𝑥3)𝑦.

Here, 𝑔(𝑥)=(9𝑥17)(4𝑥7)(𝑥3) and (𝑦)=𝑦. Since we have excluded the equilibrium solution 𝑦=0, we can divide by (𝑦)=𝑦 for 1𝑦𝑦𝑥=(9𝑥17)(4𝑥7)(𝑥3).dd

The next step is to integrate: 1𝑦𝑦=(9𝑥17)(4𝑥7)(𝑥3)𝑥.dd

The left-hand side is straightforward enough, 1𝑦𝑦=|𝑦|+𝐶dln. In order to tackle the right-hand side, we need to express (9𝑥17)(4𝑥7)(𝑥3) in partial fractions. So, we put (9𝑥17)(4𝑥7)(𝑥3)=𝐴4𝑥7+𝐵𝑥3.

We multiply 𝐴4𝑥7 by 𝑥3𝑥3 and 𝐵𝑥3 by 4𝑥74𝑥7 so that we have a common denominator: (9𝑥17)(4𝑥7)(𝑥3)=𝐴4𝑥7+𝐵𝑥3=𝐴(𝑥3)(4𝑥7)(𝑥3)+𝐵(4𝑥7)(𝑥3)(4𝑥7)=𝐴(𝑥3)+𝐵(4𝑥7)(4𝑥7)(𝑥3)=𝐴𝑥3𝐴+4𝐵𝑥7𝐵(4𝑥7)(𝑥3).

Looking at the numerators, we have the equation 9𝑥17=𝐴𝑥3𝐴+4𝐵𝑥7𝐵.

Equating 𝑥-coefficients gives 9=𝐴+4𝐵, and equating constant terms gives 17=3𝐴7𝐵.

We can solve this pair of simultaneous equations by elimination. First, we multiply 9=𝐴+4𝐵 by 3 for 27=3𝐴+12𝐵 and then add this to 17=3𝐴7𝐵: 17+27=3𝐴7𝐵+(3𝐴+12𝐵)10=5𝐵𝐵=2.

Now, we substitute 𝐵=2 back into 9=𝐴+4𝐵 so that 9=𝐴+8 and 𝐴=1. Thus, we have (9𝑥17)(4𝑥7)(𝑥3)=14𝑥7+2𝑥3.

We are now ready to integrate: 1𝑦𝑦=(9𝑥17)(4𝑥7)(𝑥3)𝑥|𝑦|+𝐶=14𝑥7+2𝑥3𝑥=14𝑥7𝑥+2𝑥3𝑥=14|4𝑥7|+2|𝑥3|+𝐶.ddlndddlnln

Consolidating constants on the right, we have lnlnln|𝑦|=14|4𝑥7|+2|𝑥3|+𝐶, which is a general solution to the differential equation (4𝑥7)(𝑥3)𝑦𝑥=(9𝑥17)𝑦dd. 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: |𝑦|=(|4𝑥7|)(|𝑥3|)𝑒.

Observe that (𝑥3)=(3𝑥), so (|𝑥3|)=(𝑥3). The remaining pair of expressions inside modulus bars gives us four cases to consider: 𝑦=(4𝑥7)(𝑥3)𝑒𝑦0,𝑥>74,(74𝑥)(𝑥3)𝑒𝑦0,𝑥<74,(4𝑥7)(𝑥3)𝑒𝑦<0,𝑥>74,(74𝑥)(𝑥3)𝑒𝑦<0,𝑥<74.ifififif

We define a new constant 𝐴=𝑒𝑦0,𝑒𝑦<0,ifif leaving us with the general solution 𝑦=𝐴(4𝑥7)(𝑥3)𝑥>74,𝐴(74𝑥)(𝑥3)𝑥<74.ifif

The picture shows an example of the two “branches” of the general solution, here, taken with the parameter 𝐴=1. Observe that the function 𝑦 can be defined at 𝑥=74 to be 𝑦=0, but it is certainly not differentiable there. Thus, 𝑥=74 is not part of the domain of the general solution.

The last step in finding a particular solution is to use the boundary conditions 𝑦=5 and 𝑥=2. Since 2>74, we are dealing now with the function 𝑦=𝐴(4𝑥7)(𝑥3). Substituting the boundary conditions into this general solution, we have 5=𝐴(4×27)(23)=𝐴(87)(1)=𝐴×1×1=𝐴.

We finally substitute the value 𝐴=5 into the general solution for the particular solution 𝑦=5(4𝑥7)(𝑥3). Thus, we have 2 solutions: this one and the equilibrium 𝑦=0.

In this picture, the green curve is the solution 𝑦=5(4𝑥7)(𝑥3) and the red line is the equilibrium solution 𝑦=0. Observe that the solution 𝑦=5(4𝑥7)(𝑥3) is not defined for 𝑥<74 and is not differentiable at the point 𝑥=74. It is therefore valid on the open interval 74,. 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 dd𝑦𝑥=𝑔(𝑥)(𝑦).
  • We understand that constant solutions to the equation (𝑦)=0 represent equilibrium solutions to the differential equation.
  • In order to find the general solution to a separable differential equation dd𝑦𝑥=𝑔(𝑥)(𝑦), we suppose (𝑦)0 and divide by (𝑦) to get 1(𝑦)𝑦𝑥=𝑔(𝑥)dd and integrate both sides of 1(𝑦)𝑦=𝑔(𝑥)𝑥.dd
  • 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 𝐶.

Download the Nagwa Classes App

Attend sessions, chat with your teacher and class, and access class-specific questions. Download Nagwa Classes app today!

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.