Math 240 Home, Textbook Contents, Online Homework Home

Warning: MathJax requires JavaScript to process the mathematics on this page.
If your browser supports JavaScript, be sure it is enabled.

Separable Equations


A first order differential equation is separable if the two variables can be separated, that is all the $x$'s on one side of the equation and all the $y$'s on the other side of the equation. We then solve the problem by integrating both sides of the equation. (This is our first case where it will be convenient to forget that $y$ is a function and treat it as a variable.) Consider the following example. $$ \frac{dy}{dx}=xy^2+x.$$ We separate the variables by factoring the right hand side and then dividing through by $y^2+1$ to get $$ \frac{dy}{y^2+1}=x\,dx $$ We then integrate both sides to get an implicit solution $\arctan(y)=\displaystyle{\frac{x^2}{2}}+C$. Finally we solve for $y$ to get $$ y(x)=\tan(\frac{x^2}{2}+C). $$ You can check that this is a solution to the differential equation. This process should be a little disturbing. $dy/dx$ is a notation for the derivative of $y$ with respect to $x$, but the terms $dy$ and $dx$ are just part of the notation and have no independent meaning. Yet we just manipulated them like any other algebraic quantity. It is possible to prove that the technique given will always work, but I won't bother to go through the details (if you're curious, stop by my office sometime). $dy$ and $dx$ are called differentials. We will often find it convenient to manipulate differentials rather than whole derivatives; this is why the subject is called differential equations rather than derivative equations. This manipulation of differentials can be thought of as a useful mnemonic to remember how to solve these equations. The fact that the "obvious'' manipulations produce correct answers is a large part of the reason why the $dy/dx$ notation was adopted. Another point is that we included the constant of integration $C$ for the $x$ integral but not for the $y$ integral. We did that because if we included both constants of integration, the next step would have been to subtract the $y$-constant of integration from both sides of the equation and we would have had the same expression, except with $x$-constant minus $y$-constant instead of C. But the difference of two arbitrary constants is just another arbitrary constant so why bother. Finally, there is a common algebraic error waiting to mug unwary students in these equations. Consider the following example. $$\frac{dy}{dx}=y^2-1$$ We solve this in the same manner as earlier by dividing through by $y^2-1$ to get the separated equation $$\frac{dy}{y^2-1}=dx$$ and then integrate both sides to get the implicit solution $\frac12\ln\left|\displaystyle\frac{y-1}{y+1}\right|=x+C$. We solve this for the general solution. First we multiply by 2 and exponentiate both sides to get $\left|\displaystyle\frac{y-1}{y+1}\right|=e^{2C}e^{2x}$. We then remove the $|$ $|$ signs by taking $\pm$ the right hand side and solve for $y$ to get the explicit solution $$ y(x)=\frac{1+ke^{2x}}{1-ke^{2x}} $$ (where $k=\pm e^{2C}$). This is the general solution; it is a solution with one arbitrary constant, k, to a first order equation. But it doesn't give all the solutions! You can quickly check that $y = -1$ is a solution, but there is no choice of $k$ that gives this solution. A solution not part of the general solution is called a singular solution. So where did we lose this solution? In the first step when we divided by $y^2-1$. If $y = -1$, then we divided by 0 which is always trouble. A general rule of algebra, which students often miss, is that whenever you divide by an expression involving a variable, you must check separately to see if the $\text{expression}=0$ is a solution. You might also note that $y=1$, corresponding to $k=0$ is also a solution. Since $k=\pm e^C$, it should not be the case that $k=0$. This is an example of a singular solution for the implicit solution reappearing in the explicit solution. Basically we lost a solution via careless algebraic manipulations in finding the implicit solution but we got it back by making careless algebraic manipulations (letting $k=0$) in finding the explicit solution. This happy accident is not uncommon and I won't comment on it in the future. You should note that singular solutions are real solutions and are just as natural as the general solution. The distinction between the singular and the general solution is just an algebraic distinction.

We are now ready to give the paradigm for solving separable equations.


Find all the solutions to $\displaystyle\frac{dy}{dx}=xy+\frac yx$

STEP 1: Separate the variables $$ \begin{align} \frac{dy}{dx}&=(x+1/x)y \\ \frac{dy}{y}&=(x+1/x)\,dx \end{align} $$ STEP 2: Integrate both sides $$\begin{align} \int\frac{dy}{y}&=\int x+1/x\,dx \\ \ln|y|&=\frac{x^2}{2}+\ln|x|+C\qquad\qquad\text{(Implicit Solution)} \end{align} $$ STEP 3: Solve for the explicit solution (if possible) $$\begin{align} |y|&=e^C|x|e^{x^2/2} \\ y&=\pm e^Cxe^{x^2/2}=kxe^{x^2/2}\qquad\qquad(k=\pm e^C) \end{align} $$ STEP 4: Check for singular solutions.

We divided by $y$ and $y=0$ is clearly a solution. But it is already part of the general solution with $k=0$, so there are no singular solutions.


Find all the solutions of $\displaystyle\frac{dy}{dx}=\cos(x)\cos(y)+\cos(y)$

Step 1: $\displaystyle\frac{dy}{\cos(y)}=(\cos(x)+1)\,dx$

Step 2: $\ln|\sec(y)+\tan(y)|=\sin(x)+x+C$

Step 3: I can't begin to solve this for $y$, so I will just leave it with the implicit solution.

Step 4: We divided by $\cos(y)$ and $\cos(y)=0$ when $y=(2n+1)\pi/2$ with $n$ any integer. These are all solutions, as you should check and none of these are examples of the general solution so they are all singular solutions.

If you have any problems with this page, please contact
©2010, 2014 Andrew G. Bennett