Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

1.3 Separable Equations

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

y = f ( x , y ) d x + C y = \int f(x, y) dx + C \nonumber

Notice the dependence on yy in the integral.

Separable equations

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

y = f ( x ) g ( y ) , y' = f(x)g(y), \nonumber

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

d y d x = f ( x ) g ( y ) \frac{dy}{dx} = f(x)g(y) \nonumber

Then we rewrite the equation as

d y g ( y ) = f ( x ) d x \frac{dy}{g(y)} = f(x) dx \nonumber

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

d y g ( y ) = f ( x ) d x + C \int \frac{dy}{g(y)} = \int f(x) dx + C \nonumber

If we can find closed form expressions for these two integrals, we can, perhaps, solve for y.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 y' = \frac{xy}{y^2 + 1} \nonumber

We separate variables,

y 2 + 1 y d y = ( y + 1 y ) d y = x d x \frac{y^2 + 1}{y} dy = \left ( y + \frac{1}{y} \right ) dy = x dx \nonumber

We integrate to get

y 2 2 + l n | y | = x 2 2 + C \frac{y^2}{2} + ln \left \vert y \right \vert = \frac{x^2}{2} + C \nonumber

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

y 2 + 2 l n | y | = x 2 + D y^2 + 2ln \left \vert y \right \vert = x^2 + D \nonumber

It is not easy to find the solution explicitly as it is hard to solve for yy. 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 xx, and remember that yy is a function of xx, to get

y ( 2 y + 2 y ) = 2 x y' \left ( 2y + \frac{2}{y} \right ) = 2x \nonumber

Multiply both sides by yy and divide by 2(y2+1)2(y^2+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 yy, you might have to be tricky. You might get multiple solutions yy for each xx, so you have to pick one. Sometimes you can graph xx as a function of yy, 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=0C=0 if you plot all the points (x,y)(x,y) that are solutions to y2+2ln|y|=x2y^2+2\ln|y|=x^2, you find the two curves in Figure 1\PageIndex{1}. This is not quite a graph of a function. For each xx there are two choices of yy. 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)=1y(1)=1. So for each CC 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\PageIndex{1}: The implicit solution y2+2ln|y|=x2y^{2}+2\ln |y|=x^{2} to y=xyy2+1y'=\frac{xy}{y^{2}+1}.

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

y2+2ln|y|=x2+C,andy=0.y^2 + 2 \ln \, \lvert y \rvert = x^2 + C, \qquad \text{and} \qquad y=0. \nonumber

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

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.