Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ Download ▾

1.3 Separable Equations

When a differential equation is of the form y=f(x), we can just integrate: y=f(x)dx+C. Unfortunately this method no longer works for the general form of the equation y=f(x,y). Integrating both sides yields

y = f ( x , y ) d x + C

Notice the dependence on y in the integral.

Separable equations

Let us suppose that the equation is separable. That is, let us consider

y = f ( x ) g ( y ) ,

for some functions f(x) and g(y). Let us write the equation in the Leibniz notation

d y d x = f ( x ) g ( y )

Then we rewrite the equation as

d y g ( y ) = f ( x ) d x

Now both sides look like something we can integrate. We obtain

d y g ( y ) = f ( x ) d x + C

If we can find closed form expressions for these two integrals, we can, perhaps, solve for y.

Implicit solutions

It is clear that we might sometimes get stuck even if we can do the integration. For example, take the separable equation

y = x y y 2 + 1

We separate variables,

y 2 + 1 y d y = ( y + 1 y ) d y = x d x

We integrate to get

y 2 2 + l n | y | = x 2 2 + C

or perhaps the easier looking expression (where D=2C)

y 2 + 2 l n | y | = x 2 + D

It is not easy to find the solution explicitly as it is hard to solve for y. We, therefore, leave the solution in this form and call it an implicit solution. It is still easy to check that an implicit solution satisfies the differential equation. In this case, we differentiate with respect to x, and remember that y is a function of x, to get

y ( 2 y + 2 y ) = 2 x

Multiply both sides by y and divide by 2(y2+1) and you will get exactly the differential equation. We leave this computation to the reader.

If you have an implicit solution, and you want to compute values for y, you might have to be tricky. You might get multiple solutions y for each x, so you have to pick one. Sometimes you can graph x as a function of y, and then flip your paper. Sometimes you have to do more.

Computers are also good at some of these tricks. More advanced mathematical software usually has some way of plotting solutions to implicit equations. For example, for C=0 if you plot all the points (x,y) that are solutions to y2+2ln|y|=x2, you find the two curves in Figure 1. This is not quite a graph of a function. For each x there are two choices of y. To find a function you would have to pick one of these two curves. You pick the one that satisfies your initial condition if you have one. For example, the top curve satisfies the condition y(1)=1. So for each C we really got two solutions. As you can see, computing values from an implicit solution can be somewhat tricky. But sometimes, an implicit solution is the best we can do.

Plot of two mirror-image branches on axes from -5 to 5, a blue one above the horizontal axis bottoming at about 0.7 and a green one below peaking at about -0.7, opening outward like a hyperbola.
Figure 1: The implicit solution y2+2ln|y|=x2 to y=xyy2+1.

The equation above also has the solution y=0. So the general solution is

y2+2ln|y|=x2+C,andy=0.

These outlying solutions such as y=0 are sometimes called singular solutions.

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.