Finding General Solutions Using Separation of Variables
| English | Chinese | Pinyin |
|---|---|---|
| separable | 可分离 | kě fēn lí |
Get the $x$'s and $y$'s on opposite sides
- To actually solve a differential equation (not just sketch it), we integrate — but first we sort the variables.
- A differential equation is separable 可分离 if you can write it so one side has only $y$ and the other only $x$.
- $\dfrac{dy}{dx}=g(x)\,h(y)$ is the tell-tale form: a product of an $x$-part and a $y$-part.
- Then each side can be integrated on its own.
Which equation is separable?
$xy$ factors as ($x$-part)$\times$($y$-part); a sum does not.
$\dfrac{dy}{dx}=x+y$ is not separable because you cannot split a ____.
Separation needs a product, not a sum.
Separate the variables
- Treat $\dfrac{dy}{dx}$ as a ratio of differentials and move each variable to its own side.
- From $\dfrac{dy}{dx}=g(x)\,h(y)$: divide by $h(y)$ and multiply by $dx$:
-
$$\frac{1}{h(y)}\,dy = g(x)\,dx$$
- Now each side involves only one variable and its differential — ready to integrate.
Separating $\dfrac{dy}{dx}=xy$ gives...
Divide by $y$, multiply by $dx$: $\tfrac1y\,dy=x\,dx$.
Integrate both sides
- Integrate the left in $y$ and the right in $x$: $\displaystyle\int\frac{1}{h(y)}\,dy=\int g(x)\,dx$.
- Add a single constant $+C$ (one is enough — combine both sides' constants).
- Then solve for $y$ if you can, to get the general solution.
- The result is a family of functions with the constant $C$.
The general solution is a family
Solving $\tfrac{dy}{dx}=ay$ gives $y=Ce^{ax}$ — one curve per constant, all fitting the same field.
Integrating $\dfrac{1}{y}\,dy = x\,dx$ gives...
$\int\tfrac1y\,dy=\ln|y|$; $\int x\,dx=\tfrac{x^2}{2}$; add $+C$.
Keep the $+C$ (and solve for $y$)
- The constant of integration is what makes this a family — never drop it.
- Often you'll exponentiate or rearrange to isolate $y$; the $C$ transforms but stays.
- Leaving the answer as an implicit relation is fine if $y$ can't be cleanly isolated.
- A later initial condition (lesson 7.7) will nail down $C$.
You should include the constant $+C$ when solving a differential equation by separation.
The $+C$ gives the general (family of) solutions.
The general solution of $\dfrac{dy}{dx}=xy$ is...
Exponentiate $\ln|y|=\tfrac{x^2}{2}+C$ to get $y=A e^{x^2/2}$.
Separation works only if the equation factors as (function of $x$) $\times$ (function of $y$). Something like $\frac{dy}{dx}=x+y$ is not separable — you can't split a sum. And don't forget the $+C$ after integrating: without it you have one curve, not the general family.
Solve $\dfrac{dy}{dx}=xy$ (general solution).
- Separate: $\dfrac{1}{y}\,dy = x\,dx$.
- Integrate: $\ln|y| = \dfrac{x^2}{2}+C$.
- Exponentiate: $y = e^{x^2/2+C}=A\,e^{x^2/2}$ (writing $A=e^C$). General solution: $y=A\,e^{x^2/2}$.
Separation of variables solves a separable equation $\frac{dy}{dx}=g(x)h(y)$: rearrange to $\frac{1}{h(y)}\,dy=g(x)\,dx$, integrate both sides (one $+C$), and solve for $y$ to get the general solution. It only works when the equation factors into an $x$-part times a $y$-part.