Separable First-Order ODE

Given a first-order Ordinary Differential Equation

if F(x, y) can be expressed using separation of variables as F(x,y) = X(x)Y(y), then the equation can be expressed as

and the equation can be solved by integrating both sides to obtain

If the integrals can be done in closed form and the resulting equation can be solved for y (which are two pretty big 'if's), then a complete solution to the problem has been obtained. The most important equation for which this technique applies is y' = ay, the equation for exponential growth and decay (Stewart 2001).

Given a first-order Ordinary Differential Equation

f1(x)g1(y)dx+f2(x)g2(y)dy = 0

can be expressed such a way:

,

and integrated:

,

where g1(y) ≠ 0, f2(x) ≠ 0 and C is an arbitrary constant to be determined.

Example 1

Consider the differential equation y'(x) = y(x)·x,

First write the equation as dy/y = x dx. Then integrate both sides, to obtain ln y = x2/2 + C. (I have consolidated the constants of integration in C on the right-hand side.)

Finally, isolate y to obtain y(x) = Cex2/2 for all x. The C in this equation is equal to eC from the previous equation. I follow standard practice in using the same letter C to denote the new constant.

This argument is valid only if y(x) ≠ 0 for all x; thus in all the solutions it generates we need C ≠ 0. However, looking at the original differential equation we see that the function y defined by y(x) = 0 for all x is also a solution.

If we have an initial condition y(x0) = y0 then the value of C is determined by the equation

x0 = Ce(t0)2/2

Example 2

Consider the differential equation y'(x) = -2(y(x))2x.

We may write this equation as -dy/y2 = 2x dx, which may be integrated to yield 1/y = x2 + C, yielding the set of solutions y(x) = 1/(x2 + C) for all x.

In addition, y(x) = 0 for all x is a solution.

As before, an initial condition determines the exact solution. If y(0) = 1, for example, we need 1 = 1/C so C = 1. Thus for this initial condition the solution is y(x) = 1/(x2 + 1).

To take another example, if y(0) = 0, then the solution is y(x) = 0 for all x.