[Figure: FiveStudy logo]
FiveStudy
Calculus BC · Unit 7 · 7.6
AP Calculus · Differential Equations
General Solutions Using Separation of Variables
All the y's on one side, all the x's on the other, then integrate both at once.
key idea$\frac{dy}{dx}=g(x)h(y)\ \Rightarrow\ \int\frac{dy}{h(y)}=\int g(x)\,dx$
The procedure
Separation of variables works on one shape only: a right-hand side that factors into something in $x$ times something in $y$. When it does, you can herd every $y$ to one side, every $x$ to the other, and integrate both sides at once.
1
Check that it separates
The right-hand side must factor as $g(x)\cdot h(y)$. A sum such as $x+y$ does not separate and this method simply does not apply.
in $\dfrac{dy}{dx}=f(x,y)$ out go / no-go
2
Separate
Multiply and divide until the equation reads $\dfrac{dy}{h(y)}=g(x)\,dx$ — all $y$ with $dy$, all $x$ with $dx$, nothing mixed.
out a separated equation
3
Integrate both sides
Antidifferentiate each side in its own variable. Add a single constant $C$ on the $x$-side; a second one would be redundant.
out an implicit relation
4
Solve for $y$ if you can
Exponentiate to undo a logarithm, square to undo a root. Absorb the resulting constant into a new one and rename it $C$.
out the explicit general solution
5
Recover anything division discarded
Dividing by $h(y)$ silently assumed $h(y)\neq0$. Every root of $h$ gives a constant solution that must be checked separately.
out the complete solution set
The general solution of $\dfrac{dy}{dx}=\dfrac{y}{2}$ is $y=Ce^{x/2}$ — not one curve but a family, one member through every point. Three are drawn here. The amber line $y=0$ is the member with $C=0$, and it is exactly the solution that dividing by $y$ would have thrown away.| Equation | Separates? | Separated form |
|---|
| $\dfrac{dy}{dx}=xy$ | yes | $\dfrac{dy}{y}=x\,dx$ |
| $\dfrac{dy}{dx}=\dfrac{x^{2}}{y}$ | yes | $y\,dy=x^{2}dx$ |
| $\dfrac{dy}{dx}=y+2$ | yes | $\dfrac{dy}{y+2}=dx$ |
| $\dfrac{dy}{dx}=e^{x+y}$ | yes | $e^{-y}dy=e^{x}dx$, since $e^{x+y}=e^{x}e^{y}$ |
| $\dfrac{dy}{dx}=x+y$ | no | a sum — cannot be factored apart |
Row 4 is the one worth memorising: an exponential of a sum is a product, so it separates after all. Row 5 genuinely does not, and no amount of algebra will make it.
Worked examples
EX 1
The standard separation
$\dfrac{dy}{dx}=xy$Find the general solution of $\dfrac{dy}{dx}=xy$.
1
Separate
$\dfrac{dy}{y}=x\,dx$, valid where $y\neq0$.
2
Integrate both sides
$\ln\lvert y\rvert=\dfrac{x^{2}}{2}+C$.
3
Exponentiate
$\lvert y\rvert=e^{C}e^{x^{2}/2}$.
4
Absorb the constant
$e^{C}$ is an arbitrary positive number; allowing the sign from the absolute value makes it any non-zero constant. Write $y=Ke^{x^{2}/2}$.
5
Restore the lost solution
$y=0$ satisfies the original equation and corresponds to $K=0$. So $y=Ke^{x^{2}/2}$ for any constant $K$.
EX 2
An implicit general solution
leave it implicitFind the general solution of $\dfrac{dy}{dx}=\dfrac{x^{2}}{y}$.
2
Integrate
$\dfrac{y^{2}}{2}=\dfrac{x^{3}}{3}+C$.
3
Clear the fractions
$y^{2}=\dfrac{2x^{3}}{3}+C$, having absorbed the $2$ into $C$.
4
Consider solving for $y$
$y=\pm\sqrt{\dfrac{2x^{3}}{3}+C}$ — the $\pm$ means this is two families, not one function.
5
Decide what to report
With no initial condition, leaving the answer implicit as $y^{2}=\dfrac{2x^{3}}{3}+C$ is cleaner and complete.
EX 3
A shifted exponential
$\dfrac{dy}{dx}=3-y$Find the general solution of $\dfrac{dy}{dx}=3-y$.
1
Separate
$\dfrac{dy}{3-y}=dx$, valid where $y\neq3$.
2
Integrate carefully
$-\ln\lvert3-y\rvert=x+C$ — the inner derivative of $3-y$ is $-1$, which supplies the leading minus.
3
Isolate the logarithm
$\ln\lvert3-y\rvert=-x-C$, so $\lvert3-y\rvert=e^{-C}e^{-x}$.
4
Solve for $y$
$3-y=Ke^{-x}$, giving $y=3-Ke^{-x}$.
5
Check the discarded case
$y=3$ is a constant solution and is recovered by $K=0$. The formula covers everything.
EX 4
Separating a disguised product
$\dfrac{dy}{dx}=e^{x+y}$Find the general solution of $\dfrac{dy}{dx}=e^{x+y}$.
1
Split the exponential
$e^{x+y}=e^{x}e^{y}$ — a product, so it does separate.
2
Separate
$e^{-y}dy=e^{x}dx$.
3
Integrate
$-e^{-y}=e^{x}+C$.
4
Solve for $y$
$e^{-y}=-e^{x}-C$, so $-y=\ln\left(-e^{x}-C\right)$ and $y=-\ln\left(-e^{x}-C\right)$.
5
Note the constraint
The logarithm needs $-e^{x}-C\gt 0$, so $C$ must be negative and the solution lives only on part of the line — worth stating.
Where it goes wrong
One constant, on one side
Two constants collapse into their difference. Write $+C$ once, on the $x$-side, and keep it there.
Dividing by $h(y)$ hides solutions
Every root of $h$ is a constant solution. Check whether the final formula recovers it, and say so if it does not.
$e^{C}$ becomes a new constant — rename it
Carrying $e^{C}$ through the algebra invites sign errors. Replace it by a single letter as soon as it appears.
A sum does not separate
$\dfrac{dy}{dx}=x+y$ cannot be split. Recognising this quickly is worth more than any amount of forcing.