What the formula says
g(y)·y′ = h(x)
A differential equation is separable if it can be written like this: a function of y times y′ on one side, a function of x on the other. It is a definition. The method is to integrate each side in its own variable:
∫ g(y) dy = ∫ h(x) dx
Many textbooks write the equation as dy/dx = f(x)·k(y) instead; dividing by k(y) gives the form above, with g(y) = 1/k(y).
With y′ = dy/dx it looks like “multiplying by dx”, and that is how the working is usually written. The reason it works is the chain rule: if G is an antiderivative of g, the derivative of G(y(x)) is g(y)·y′. So the equation says that G(y) has derivative h(x), and then G(y) = H(x) + C.
Worked example
Solve y′ = 2xy with y(0) = 3.
- Separate: divide by y (y ≠ 0), so that (1/y)·y′ = 2x.
- Integrate both sides: ∫ (1/y) dy = ∫ 2x dx, so ln |y| = x² + C.
- Solve for y: |y| = eᶜ · e^(x²), so y = A·e^(x²), where A is a new constant.
- The condition: y(0) = A = 3, so y = 3e^(x²).
Check: y′ = 6x·e^(x²) = 2x · 3e^(x²) = 2xy. Right.
The constant goes in before y is solved for
The mistake is in step 3. The constant arrived in step 2, before the exponential was taken, and it goes into the exponential with everything else:
| Working | Result | |
|---|---|---|
| Wrong | ln y = x², then “+ C” afterwards | y = e^(x²) + C |
| Right | ln y = x² + C | y = eᶜ · e^(x²) = A·e^(x²) |
With the condition y(0) = 3, the wrong form gives y = e^(x²) + 2. It starts at the right value but does not solve the equation: y′ = 2x·e^(x²), while 2xy = 2x·e^(x²) + 4x.
A second example: a root and a sign
Solve y′ = x/y with y(0) = 4.
- Separate: y·y′ = x.
- Integrate: y²/2 = x²/2 + C, so y² = x² + K.
- The condition: 16 = 0 + K, so y² = x² + 16.
- Two roots, y = ±√(x² + 16). The starting value is positive, so y = √(x² + 16).
Here the integration gives y², not y. The condition decides which root is the solution.
Solutions that disappear
The first example divided by y. The function y = 0 solves y′ = 2xy, but it was lost in the division. In that case it comes back with A = 0. Check whether the expression you divide by can be zero for a solution.
| Equation | Separated | Solution |
|---|---|---|
| y′ = ky | (1/y)·y′ = k | y = C·eᵏˣ |
| y′ = 2xy | (1/y)·y′ = 2x | y = A·e^(x²) |
| y′ = x/y | y·y′ = x | y² = x² + K |
| y′ = y² | (1/y²)·y′ = 1 | y = −1/(x + C) |
The first is y′ = ky, which is separable too.
Where to go next
An equation such as y′ + 2y = 4x cannot be separated, because x and y stand in a sum. It is solved with an integrating factor, on the page on first-order linear differential equations.
Common mistakes
- The constant too late. C is added at the integration, before anything else.
- Separating a sum. y′ = x + y is not separable. The right-hand side has to be a product f(x)·k(y).
- Dropping the absolute value. ∫ (1/y) dy = ln |y|. The sign is then settled by the condition.
- Losing the solution y = 0 when dividing by y.
Common questions
Is it really allowed to multiply by dx?
As notation, yes. What actually happens is the chain rule backwards: g(y)·y′ is the derivative of
G(y), and integrating with respect to x gives G(y) = H(x) + C. The working with dx gives the same
result.
How do I tell whether an equation is separable?
Write it as y′ = something. If that something splits into a factor with only x and a factor with only
y, the equation is separable. 2xy is x times y; x + y does not split that way.
Do I have to solve for y?
Not always. Sometimes it cannot be done, and then G(y) = H(x) + C is the solution in implicit form.
When it can, as in the examples here, y in terms of x is the answer asked for.