Toggle Main Menu Toggle Search

Separable First Order Differential Equations

Definition

A first order differential equation is separable if it can be written in one of the following forms:

\[\begin{align} \frac{\mathrm{d} y}{\mathrm{d} x} &= f(x,y) = \frac{g(x)}{h(y)}, \\ \frac{\mathrm{d} y}{\mathrm{d} x} &= f(x,y) = \frac{h(y)}{g(x)}. \end{align}\]

Solving Separable Equations

A separable equation is solved by separating the variables, that is, rearranging the equation so that everything involving $y$ appears on one side of the equation, and everything involving $x$ appears on the other. The equation can then be integrated directly.

For an equation in the form:

\[\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{g(x)}{h(y)},\]

multiplying both sides by $h(y)\mathrm{d} x$ gives:

\[h(y)\mathrm{d} y = g(x) \mathrm{d} x,\]

which can be integrated directly:

\[\int h(y) \mathrm{d} y = \int g(x) \mathrm{d} x.\]

This will yield a solution for $y(x)$.

Similarly, an equation in the form:

\[\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{h(y)}{g(x)}\]

can be multiplied by $\dfrac{\mathrm{d} x}{h(y)}$ and then integrated:

\[\int \frac{\mathrm{d} y}{h(y)} = \int \frac{\mathrm{d} x}{g(x)},\]

thus yielding a solution for $y(x)$.

Note: The solution obtained for $y$ by computing these integrals may be implicitly defined. Rearranging the solution may be necessary to obtain an explicit solution for $y$, although in some cases it may not be possible to express $y$ explicitly.

Worked Examples

Example 1

Solve the differential equation

\[\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{3x^2}{y}\]

subject to the condition $y(0)=2$.

Solution

The equation can be rearranged so that everything involving $y$ appears on the left-hand side of the equation, and everything involving $x$ appears on the right.

First multiply both sides by $y$:

\[y\frac{\mathrm{d} y}{\mathrm{d} x} = 3x^2,\]

then multiply both sides by $\mathrm{d} x$ to obtain

\[y \; \mathrm{d} y = 3x^2 \; \mathrm{d} x.\]

This can be integrated directly using standard integrals:

\begin{align} \int y \; \mathrm{d} y &= \int 3x^2 \; \mathrm{d} x, \\ \frac{y^2}{2} &= x^3 + C. \end{align}

Note: A constant of integration arises for both the integral on the left-hand side and the integral on the right-hand side. Since these constants are both arbitrary, then can be absorbed into one constant, denoted here by $C$, which is conventionally included on the side involving the independent variable $x$.

Rearranging the above equation gives an explicit solution for $y$:

\[\begin{align} \frac{y^2}{2} &= x^3 + C \\ y^2 &= 2x^3 + C' & (C' &= 2C)\\ y &= \pm\sqrt{2x^3 + C'}. \end{align}\]

Note: Since multiplying an arbitrary constant by a number gives an arbitrary constant, the quantity $2C$ can be relabelled $C'$, another arbitrary constant.

To find the solution that satisfies $y(0)=2$, substitute $x=0$ and $y=2$ into the solution and solve for $C'$:

\[\begin{align} 2 &= \pm\sqrt{0+C'} \\ 2 &= \pm\sqrt{C'} \end{align}.\]

Clearly this can only be satisfied by taking the positive square root. Then:

\[2 = \sqrt{C'} \Rightarrow C'=4,\]

and the solution satisfying the condition $y(0)=2$ is:

\[y=\sqrt{2x^3+4}.\]

Note: Since the condition $y(0)=2$ is only satisfied by taking the positive square root, the solution is only valid when the positive square root is taken, so the $\pm$ sign is no longer included.

Example 2

Solve the differential equation

\[\frac{\mathrm{d} y}{\mathrm{d} x} = \frac{1}{x+3}\]

subject to the condition $y(0)=1$.

Solution

Multiplying both sides of the equation by $\mathrm{d} x$ gives

\[\frac{\mathrm{d} y}{y} = \frac{\mathrm{d} x}{x+3}.\]

Every term involving $x$ now appears on the right-hand side, and every term involving $y$ now appears on the left-hand side. Each side of the equation can therefore be integrated directly:

\[\begin{align} \int \frac{\mathrm{d} y}{y} &= \int\frac{\mathrm{d} x}{x+3}, \\ \ln\lvert y\rvert &= \ln\lvert x+3 \rvert + C. \end{align}\]

To find a solution which gives $y$ explicitly, exponentiate both sides to obtain:

\[y=A(x+3),\]

where $A$ is an arbitrary constant.

Note: The constant $A$ comes from applying the laws of logarithms and powers:

\[e^{\large{\ln\mid x+3\mid+C} } = e^C e^{\large{\ln\mid x+3\mid} } = e^C(x+3) = A(x+3),\]

where $A= e^C$. Since $ e$ is a number, $ e$ raised to a constant power is also a constant, and it is permissible to denote that constant by a single letter $A$.

Hence, the general solution to the differential equation is

\[y=A(x+3).\]

To find the solution that satisfies $y(0)=1$, substitute $x=0$ and $y=1$ into the solution and solve for $A$:

\[1=A(0+3) \Rightarrow 3A=1 \Rightarrow A=\frac{1}{3}.\]

Hence the solution to the given differential equation that satisfies the condition $y(0)=1$ is

\[y=\frac{1}{3}(x+3).\]

Video Examples

Example 1

Prof. Robin Johnson solves $\dfrac{\mathrm{d}y}{\mathrm{d}x}=-2y^3$, subject to the condition $y(0)=1$.

Example 2

Prof. Robin Johnson solves $\dfrac{\mathrm{d}y}{\mathrm{d}x}=\dfrac{1+y^2}{2+3x}$, subject to the condition $y\left(-\dfrac{1}{3}\right)=0$.

Workbook

This workbook produced by HELM is a good revision aid, containing key points for revision and many worked examples.

See Also

External Resources

Whiteboard maths

More Support

You can get one-to-one support from Maths-Aid.