From the free course AP Calculus AB on Lykke
7.6 Finding General Solutions Using Separation of Variables
Key concepts: Solving differential equations to determine functions and develop models · Separation of variables for finding general solutions · Topic 7.6 involves finding general solutions
How to find the general solution of a separable differential equation by separating the variables and integrating both sides, without losing constant solutions.
7.6 Finding General Solutions Using Separation of Variables
Euler’s method (Topic 7.5) only approximates a solution, one step at a time. When the right-hand side of a differential equation factors into an $x$-part times a $y$-part, antidifferentiation gives the whole family of solutions at once. This topic is assessed on both AP Calculus AB and BC. The diagram below sets the numerical and symbolic approaches side by side.
Separation of variables: finding a general solution
Separation of variables solves a differential equation by placing all expressions involving $y$ with $dy$ and all expressions involving $x$ with $dx$. For a separable equation
$$ \frac{dy}{dx}=g(x)h(y), $$
rewrite it as
$$ \frac{1}{h(y)},dy=g(x),dx, $$
then integrate both sides.
Consider
$$ \frac{dy}{dx}=3xy. $$
For $y\neq 0$, separate:
$$ \frac{1}{y},dy=3x,dx. $$
Integrating gives
$$ \ln|y|=\frac{3}{2}x^2+C. $$
Exponentiating and absorbing the sign into the arbitrary constant produces the general solution
$$ y=Ce^{\frac{3}{2}x^2}. $$
The constant solution $y=0$ must also be recognized; it was lost temporarily when dividing by $y$. This is the division-by-a-variable misconception: algebraic division can remove an equilibrium solution, so check for it separately.
Not every equation separates. The right side of $\frac{dy}{dx}=x+y$ cannot be written as a product $g(x)h(y)$, so the method does not apply, while $\frac{dy}{dx}=\frac{x}{y}$ separates at once as $y,dy=x,dx$. Add the constant $C$ when you integrate, before solving for $y$; one constant is enough, because the constants from the two sides combine into one.
Retrieval check: Find the general solution of $\frac{dy}{dx}=\frac{x}{y}$. Separating gives $y,dy=x,dx$, and integrating gives $\frac{y^2}{2}=\frac{x^2}{2}+C$, so $y^2=x^2+C$ after renaming the constant. As a check, differentiating implicitly gives $2y\frac{dy}{dx}=2x$, which is the original equation.