Why Separation Requires Care
Separation of variables is a direct way to solve many first-order differential equations. Its steps can look routine: rearrange, integrate both sides, and solve for the dependent variable if possible. Yet each step has conditions. Dividing by an expression that can equal zero may discard solutions, and an incorrect antiderivative or a missing constant changes the result.
The safest approach is to keep track of what is being divided by, integrate with the correct rules, and check the final answer in the original equation. These habits are especially important when a differential equation has equilibrium solutions or when a logarithm appears.
What a Valid Separation Step Requires
Suppose \(y'=g(x)h(y)\). Wherever \(h(y)\ne 0\), division by \(h(y)\) gives
Writing the separated differential form and integrating gives
The division is valid only where \(h(y)\ne 0\). Any value \(r\) with \(h(r)=0\) must be checked in the original equation: the constant function \(y(x)=r\) has \(y'=0\), while \(g(x)h(r)=0\), so it is an equilibrium solution. Dividing by \(h(y)\) removes that possibility from the separated calculation.
Indefinite integration also introduces constants. When two indefinite integrals are equated, their constants can be combined into one arbitrary constant, but they cannot simply be discarded. Finally, any proposed solution should be checked by differentiating it and substituting into the original differential equation.
Why the Separation Method Works
The method is justified by the chain rule. Suppose \(F\) is an antiderivative of \(1/h\) on an interval where \(h\ne 0\), and \(G\) is an antiderivative of \(g\). Thus \(F'(y)=1/h(y)\) and \(G'(x)=g(x)\). If \(y\) solves the differential equation and stays in that interval, then
Therefore \(F(y(x))-G(x)\) has derivative zero on the interval and is constant there. This yields \(F(y)=G(x)+C\). Conversely, differentiating this relation gives \(y'/h(y)=g(x)\); multiplying by \(h(y)\) recovers the original equation on the region where \(h(y)\ne 0\). The argument explains both why separation works and why it does not cover the points where division by \(h(y)\) is invalid.
Worked Example: Keeping the Integration Constant
Worked Example: Keeping the Integration Constant
Solve the initial-value problem \(y'=2xy\), \(y(0)=3\), and identify what goes wrong if the integration constant is omitted.
First, separate where \(y\ne 0\):
Integrate each side:
Use \(y(0)=3\):
Since the initial value is positive, the solution on its interval is positive. Exponentiating gives \(y=e^{x^2+\ln 3}=3e^{x^2}\). Check the initial condition and the equation:
If the constant is omitted, the calculation gives \(\ln|y|=x^2\), hence \(y=e^{x^2}\) or \(y=-e^{x^2}\). Neither satisfies \(y(0)=3\): their initial values are \(1\) and \(-1\). The arbitrary constant is what allows the family to fit the specified initial value.
Worked Example: Division Can Lose Equilibria
Worked Example: Division Can Lose Equilibria
Consider \(y'=y(1-y)\). Find its equilibrium solutions and solve the initial-value problem \(y(0)=\frac12\).
For a constant solution \(y(x)=r\), the derivative is zero, so the equation requires \(r(1-r)=0\). Therefore \(r=0\) or \(r=1\), giving the equilibrium solutions \(y=0\) and \(y=1\). Dividing by \(y(1-y)\) would exclude both and cannot be used to find them.
For the specified initial value, \(y\) is initially neither zero nor one, so separate on an interval where \(y(1-y)\ne 0\):
Use the partial-fraction identity \(1/[y(1-y)]=1/y+1/(1-y)\). Then
At \(x=0\), \(y=1/2\), so \(\ln|y|-\ln|1-y|=\ln(1/2)-\ln(1/2)=0\), and \(C=0\). The solution remains between zero and one, so the absolute values can be removed there. Exponentiating and solving for \(y\) gives
To check, differentiate and substitute:
Also \(y(0)=1/(1+1)=1/2\), as required. The equilibria \(y=0\) and \(y=1\) are additional solutions of the original equation, not solutions to be recovered by dividing through by \(y(1-y)\).
Worked Example: Test an Antiderivative by Differentiating
Worked Example: Test an Antiderivative by Differentiating
Separate and solve implicitly \(y'=x/(1+y^2)\), with \(y(0)=0\).
Multiply by \(1+y^2\) and use \(dy=y'\,dx\):
Integrate term by term:
The initial condition gives \(0+0=0+C\), so \(C=0\). The implicit solution is \(y+y^3/3=x^2/2\). Check it by differentiating both sides with respect to \(x\):
This is the original equation, and the relation gives \(y(0)=0\). A common incorrect integration is \(\int y^2\,dy=y^2/2\). That would produce \(y+y^2/2=x^2/2\). Differentiating that relation gives \((1+y)y'=x\), or \(y'=x/(1+y)\), which is not the stated equation. Differentiation exposes the error.
Worked Example: Absolute Values and Negative Solutions
Worked Example: Absolute Values and Negative Solutions
Solve \(y'=y\) with \(y(0)=-2\), taking care with the logarithm.
For \(y\ne 0\), separation and integration give
Substitute the initial value: \(\ln|-2|=C\), so \(C=\ln 2\). Exponentiating yields \(|y|=2e^x\). Because \(y(0)=-2\), choose the negative branch: \(y=-2e^x\). Check the initial condition and equation:
Writing \(\ln y=x+C\) instead would be invalid for this solution: the real logarithm \(\ln y\) is not defined when \(y<0\). The absolute value in \(\ln|y|\) preserves both positive and negative nonzero branches. The constant solution \(y=0\), excluded when dividing by \(y\), must also be checked in the original equation; it satisfies \(y'=y\).
A Practical Error-Checking Routine
When reviewing a separated solution, inspect each transition rather than trusting a familiar-looking formula. The following checks catch the most frequent mistakes:
Before dividing by a function of \(y\), identify where that function is zero. Substitute those values into the original equation to test for equilibrium solutions.
Keep the constant of integration, combine constants only after integrating, and verify unfamiliar antiderivatives by differentiating them.
Use \(\ln|u|\) when integrating \(1/u\) on an interval where \(u\ne 0\). If solving for a variable requires choosing a branch, use the initial condition to choose it.
Differentiate the proposed solution, substitute the derivative and the solution into the original equation, and check any initial condition.
These checks matter because separation is a sequence of equivalent steps only under its stated conditions. A lost equilibrium, an omitted constant, or an incorrect antiderivative can produce an answer that looks plausible but does not solve the problem that was posed.
Check Your Understanding
For each question, identify the condition or check that prevents the stated error.
- For \(y'=y(y-3)\), which constant solutions need to be tested before dividing by \(y(y-3)\)?
- Why does \(\ln|y|=x+C\) generally describe more than the relation \(\ln y=x+C\)?
- When two indefinite integrals are equated, why may their constants be combined, but not omitted?
- How can differentiating an antiderivative check reveal an incorrect integration step?
- What two checks should be made after obtaining a solution to an initial-value problem?