# Differential equations/Separable differential equations

 Educational level: this is a tertiary (university) resource.
 Type classification: this is a lesson resource.
 Subject classification: this is a mathematics resource.
 Completion status: this resource is ~50% complete.

First Order Differential Equations

The order of a differential equation is the largest derivative involved. For example, in the equation ${\displaystyle {\frac {d^{2}y}{dx^{2}}}+{\frac {dy}{dx}}+y=0}$, the largest derivative is the second, so the order is 2.

## Separable Equations

One of the easiest class of ODEs to solve is separable equations.

### Definition

A differential equation is called separable when it can be manipulated into an equation with the dependent variable and its differentials on one side of the equality, and the independent variable and its differentials on the other side. Thus, each side is in terms of a single variable.

### Example

The equation ${\displaystyle {\frac {dy}{dx}}=y}$ has a fairly obvious solution if you know your differentiation rules well. Recall that ${\displaystyle {\frac {d}{dx}}e^{x}=e^{x}}$ and hence ${\displaystyle y=e^{x}}$ is a solution. But how could we have found this if we did not remember that ${\displaystyle e^{x}}$ happened to be its own derivative? Additionally, is it possible to find any more solutions? Observe that the equation above is separable, and can be written as ${\displaystyle {\frac {1}{y}}dy=dx}$. Now that both sides are in terms of their own variable, we can integrate:

${\displaystyle \int {\frac {1}{y}}dy=\log {|y|}+C_{1}=x+C_{2}=\int dx}$

And thus, ${\displaystyle |y|=e^{x+C_{2}-C_{1}}=e^{x}e^{C_{2}-C_{1}}=Ae^{x}}$. Since ${\displaystyle C_{1}}$ and ${\displaystyle C_{2}}$ are arbitrary constants of integration, ${\displaystyle A=e^{C_{2}-C_{1}}}$ is another arbitrary constant, so that the final solution is ${\displaystyle y=Ae^{x}}$ for any ${\displaystyle A}$.

### General Solution

Suppose we have some separable equation:

${\displaystyle f(y)dy=g(x)dx}$

Then we can integrate both sides:

${\displaystyle F(y)+C_{1}=G(x)+C_{2}}$

Since the constants are arbitrary, we really only need one. However, do not forget the constant of integration, or you will lose a large number of solutions. Additionally, do not wait until the last step to add the constant of integration. Many times when learning calculus, students add a ${\displaystyle +C}$ to the end of a problem without really thinking, but remember that the ${\displaystyle C}$ comes from the integration, so you need to add it at that step. In the above example, adding the ${\displaystyle C}$ at the last step would give ${\displaystyle y=e^{x}+C}$ as a solution. But we can see that, for example, ${\displaystyle {\frac {d}{dx}}(e^{x}+1)=e^{x}\neq e^{x}+1}$, so that ${\displaystyle e^{x}+C}$ is not a solution (whenever ${\displaystyle C\neq 0}$)!

At any rate, the equation is now of the form ${\displaystyle F(y)=G(x)+C}$, which can be solved for ${\displaystyle y}$ using any available algebra tools.

In short:

1. If possible, manipulate the equation using algebra to get each variable on its own side of the equation. The form should be ${\displaystyle f(y)dy=g(x)dx}$.
2. Integrate both sides of the equation. Include a constant of integration.
3. Solve for the function in terms of the independent variable.

It can be misleading, however, to think that a constant of integration necessarily must appear in the solution of a differential equation. This is true for linear equations, but for nonlinear ones, all bets are off.

Consider for example the equation

${\displaystyle |y'|+|y|=0}$.

The only solution to this equation is ${\displaystyle y=0}$, and no arbitrary constant of integration can be imposed anywhere.