NARROW DISPLAY WARNING
You are most likely using a tablet or mobile device in portrait orientation. This website is best viewed using a typical computer screen with the browser window maximized.
Viewing this website in portrait orientation can cause problems with equations being longer than the screen width (you can scroll to the right), images being poorly sized, and the font size of maths text being much smaller than regular text. If your only option is a tablet or mobile device, your viewing experience will be better if you view this website in landscape orientation. You might need to refresh the page to fix any problems after rotating.
This method can be used to solve some first order linear ODEs. If the differential equation is for the function $y(x)$, the goal is to separate the independent variable $x$ to one side of the equation and the dependent variable $y(x)$ to the other side of the equation. As a notational convenience, the $\displaystyle y'=\frac{\text{d}y}{\text{d}x}$ can be treated like a fraction.
Find the general solution to the following differential equation.
\begin{equation} \frac{1+x^2}{y} = \frac{\text{d}y}{\text{d}x} \end{equation}Multiple both sides by $y$ and $\text{d}x$ to separate the differential equation.
\begin{equation} (1+x^2)\text{ d}x = y\text{ d}y \end{equation}Now integrate the LHS with respect to $x$ and the RHS with respect to $y$.
\begin{equation} \int (1+x^2)\text{ d}x = \int y\text{ d}y \end{equation} \begin{equation} x + \frac{x^{3}}{3} + C = \frac{y^{2}}{2} \end{equation}We can solve for $y(x)$ by multiplying by $2$ and taking the square root. (The constant of integration absorbs the $2$ along the way.)
\begin{equation} \frac{y^{2}}{2} = x + \frac{x^{3}}{3} + C \end{equation} \begin{equation} y^{2} = 2x + \frac{2x^{3}}{3} + 2C = 2x + \frac{2x^{3}}{3} + C \end{equation} \begin{equation} y(x) = \pm \sqrt{2x + \frac{2x^{3}}{3} + C} \end{equation}The above differential equation is called a separable equation because we were able to separate the $x$ and $y$ variables on different sides of the equation, including the $\text{d}y$ and $\text{d}x$.
Not all differential equation are separable equation. The below differential equation is not separable.
Determine if this ODE is a separable differential equation and why.
\begin{equation} x+y = \frac{\text{d}y}{\text{d}x} \end{equation}First try multiplying both sides of the equation by $\text{d}x$.
\begin{equation} x \text{ d}x + y \text{ d}x = \text{d}y \end{equation}The differential equation is not separable because the $y \text{ d}x$ term has both $x$ and $y$ in it. Dividing the entire equation by $y$ or $\text{d}x$ would just make one of the other terms mixed.
This method only works with first order differential equations. Sometimes the differential equation doesn't look separable but there's a trick to separate the variable, like a trig identity or factoring a polynomial into two parts with $x$ $y$ separate.
Try the following examples on your own.
Determine if this ODE is a separable differential equation. If yes, find the general solution.
\begin{equation} xy = \frac{\text{d}y}{\text{d}x} \end{equation}Determine if this ODE is a separable differential equation. If yes, find the general solution.
\begin{equation} \frac{x}{y} = \frac{\text{d}y}{\text{d}x} \end{equation}Determine if this ODE is a separable differential equation. If yes, find the general solution. (Warning: This will be an implicit solution.)
\begin{equation} \frac{\cos(x)}{9y^{8}+1} = \frac{\text{d}y}{\text{d}x} \end{equation}Determine if this ODE is a separable differential equation. If yes, find the general solution. (Hint: Factor the LHS.)
\begin{equation} xy+y-x-1 = \frac{\text{d}y}{\text{d}x} \end{equation}Determine if this ODE is a separable differential equation. If yes, find the general solution. (Warning: You will have to use partial fraction decomposition to integrate and there are five distinct solutions.)
\begin{equation} y(3-y) = \frac{\text{d}y}{\text{d}t} \end{equation}You might remember that $\displaystyle \frac{\text{d}y}{\text{d}x}$ isn't a fraction, but treating $y'$ like a fraction in this case does work. What's really going on goes back to implicit differentiation.
A first order differential equation is separable if it can be rewritten into the below form.
\begin{equation} h(y)y' = g(x) \end{equation}Taking the integral with respect to $x$ on the LHS and RHS absorbs the $y'$ into $H(y)$, where $H(y)$ and $G(x)$ are the antiderivatives of $h(y)$ and $g(x)$.
\begin{equation} \int h(y)y' \text{ d}x = \int g(x) \text{ d}x \qquad\qquad H(y) = G(x) \end{equation}This is easier to see if $y$ is explicitly written as a function $y(x)$ and taking the derivative of the previous equation with respect to $x$.
\begin{equation} H\big(y(x)\big) = G(x) \end{equation} \begin{equation} \frac{\text{d}}{\text{d}x} H\big(y(x)\big) = \frac{\text{d}}{\text{d}x} G(x) \end{equation} \begin{equation} H'\big(y(x)\big)y'(x) = G'(x) \end{equation} \begin{equation} h\big(y(x)\big)y'(x) = g(x) \end{equation}The $y'(x)$ appears from the chain rule applied to $H\big(y(x)\big)$. So really the integration is with respect to $x$ on both sides of the equation, but treating the $\displaystyle y'=\frac{\text{d}y}{\text{d}x}$ as a fraction for separating $x$ and $y$ to opposites sides of the equation works and is notationally convenient.