3.2: Separable Equations
( \newcommand{\kernel}{\mathrm{null}\,}\)
A first-order ode is separable if it can be written in the form g(y)dydx=f(x),y(x0)=y0, where the function g(y) is independent of x and f(x) is independent of y. Integration from x0 to x results in ∫xx0g(y(x))y′(x)dx=∫xx0f(x)dx.
The integral on the left can be transformed by substituting u=y(x),du=y′(x)dx, and changing the lower and upper limits of integration to y(x0)=y0 and y(x)=y. Therefore, ∫yy0g(u)du=∫xx0f(x)dx, and since u is a dummy variable of integration, we can write this in the equivalent form ∫yy0g(y)dy=∫xx0f(x)dx.
A simpler procedure that also yields (???) is to treat dy/dx in (???) like a fraction. Multiplying (???) by dx results in g(y)dy=f(x)dx, which is a separated equation with all the dependent variables on the left-side, and all the independent variables on the right-side. Equation (???) then results directly upon integration.
Solve dydx+12y=32, with y(0)=2.
Solution
We first manipulate the differential equation to the form dydx=12(3−y), and then treat dy/dx as if it was a fraction to separate variables:
dy3−y=12dx.
We integrate the right-side from the initial condition x=0 to x and the left-side from the initial condition y(0)=2 to y. Accordingly, ∫y2dy3−y=12∫x0dx.
The integrals in (???) need to be done. Note that y(x)<3 for finite x or the integral on the left-side diverges. Therefore, 3−y>0 and integration yields −ln(3−y)]y2=12x]x0,ln(3−y)=−12x,3−y=e−12x,y=3−e−12x.
Since this is our first nontrivial analytical solution, it is prudent to check our result. We do this by differentiating our solution:
dydx=12e−12x=12(3−y); and checking the initial conditions, y(0)=3−e0=2. Therefore, our solution satisfies both the original ode and the initial condition.
Solve dydx+12y=32, with y(0)=4.
Solution
This is the identical differential equation as before, but with different initial conditions. We will jump directly to the integration step:
∫y4dy3−y=12∫x0dx.
Now y(x)>3, so that y−3>0 and integration yields −ln(y−3)]y4=12x]x0,ln(y−3)=−12x,y−3=e−12x,y=3+e−12x.

The solution curves for a range of initial conditions is presented in Fig. 3.2.1. All solutions have a horizontal asymptote at y=3 at which dy/dx=0. For y(0)=y0, the general solution can be shown to be y(x)=3+(y0−3)exp(−x/2).
Solve dydx=2cos2x3+2y, with y(0)=−1.
- For what values of x>0 does the solution exist?
- For what value of x>0 is y(x) maximum?
Solution
Notice that the derivative of y diverges when y=−3/2, and that this may cause some problems with a solution.
We solve the ode by separating variables and integrating from initial conditions:
(3+2y)dy=2cos2xdx∫y−1(3+2y)dy=2∫x0cos2xdx3y+y2]y−1=sin2x]x0y2+3y+2−sin2x=0y±=12[−3±√1+4sin2x].
Solving the quadratic equation for y has introduced a spurious solution that does not satisfy the initial conditions. We test:
y±(0)=12[−3±1]={−1;−2.
Only the + root satisfies the initial condition, so that the unique solution to the ode and initial condition is y=12[−3+√1+4sin2x].
To determine (i) the values of x>0 for which the solution exists, we require 1+4sin2x≥0, or sin2x≥−14.
Notice that at x=0, we have sin2x=0; at x=π/4, we have sin2x=1; at x=π/2, we have sin2x=0; and at x=3π/4, we have sin2x=−1. We therefore need to determine the value of x such that sin2x=−1/4, with x in the range π/2<x<3π/4. The solution to the ode will then exist for all x between zero and this value.
To solve sin2x=−1/4 for x in the interval π/2<x<3π/4, one needs to recall the definition of arcsin, or sin−1, as found on a typical scientific calculator. The inverse of the function f(x)=sinx,−π/2≤x≤π/2 is denoted by arcsin. The first solution with x>0 of the equation sin2x=−1/4 places 2x in the interval (π,3π/2), so to invert this equation using the arcsine we need to apply the identity sin(π−x)=sinx, and rewrite sin2x=−1/4 as sin(π−2x)=−1/4. The solution of this equation may then be found by taking the arcsine, and is π−2x=arcsin(−1/4), or x=12(π+arcsin14).
Therefore the solution exists for 0≤x≤(π+arcsin(1/4))/2=1.6971…, where we have used a calculator value (computing in radians) to find arcsin(0.25)=0.2527…. At the value (x,y)=(1.6971…,−3/2), the solution curve ends and dy/dx becomes infinite.
To determine (ii) the value of x at which y=y(x) is maximum, we examine (???) directly. The value of y will be maximum when sin2x takes its maximum value over the interval where the solution exists. This will be when 2x=π/2, or x=π/4=0.7854….
The graph of y=y(x) is shown in Fig. 3.3.1.