Skip to main content
\(\require{cancel}\newcommand{\domain}[1]{\operatorname{Dom}(#1)} \newcommand{\range}[1]{\operatorname{Range}(#1)} \newcommand{\linearspan}{\operatorname{span}} \newcommand{\abs}[1]{\lvert #1 \rvert} \newcommand{\set}[2]{\left\{ #1 \: \middle\vert \: #2 \right\}} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \DeclareMathOperator{\Lapl}{\mathcal{L}} \newcommand{\La}[1]{\Lapl \left\{ #1 \right\}} \newcommand{\invLa}[1]{\Lapl^{-1}\left\{ #1 \right\}} \newcommand{\intbyparts}[4]{\begin{tabular}{|rl|rl|}\hline $u$ \amp $#1$ \amp $dv$ \amp $#2$ \\ \hline $du$ \amp $#3$ \amp $v$ \amp $#4$ \\ \hline \end{tabular}} \newcommand{\identity}{\mathrm{id}} \newcommand{\notdivide}{{\not{\mid}}} \newcommand{\notsubset}{\not\subset} \newcommand{\swap}{\mathrm{swap}} \newcommand{\Null}{\operatorname{Null}} \newcommand{\half}{\text{ \nicefrac{1}{2}}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section2.1Separable Equations

Now we want to focus on first order DEs. Often we can use algebra to explicity solve for \(y'\) when presented with a first order DE, thus a common way to write a first order DE is \begin{equation} \quad \frac{dy}{dx} = f(x,y). \label{eqn-general-first-order}\tag{2.1.1} \end{equation} Perhaps it will surprise you that no algorithm exists which always allows us to find an exact solution to any given first order DE. We can always approximate a solution using either graphical or numerical techniques which are discussed later in this chapter.

When we can find a solution it will either be explicit or implicit. An explicit solution is one where we can solve for \(y\) as a function of \(x\text{,}\) i.e. \(y = y(x)\text{.}\) In other words, the function can be written such that \(y\) shows up on the left hand side alone, not raised to any power nor within any function. For example, \(y' = 2y\) has the explicit solution \(y = e^{2x}\text{.}\) Whereas the DE, \begin{equation*} y' = \frac{x}{y} \end{equation*} has implicit solution: \(y^2 = x^2 + C\) where \(C \in \R\text{,}\) because performing implicit differentiation of this solution yields \begin{equation*} 2y\cdot y'=2x \quad \text{ and thus } \quad y'=\frac{x}{y}. \end{equation*} Notice that we can solve the solution for \(y\) and we get \(y = \pm \sqrt{x^2 + C}\text{,}\) which is not a function because of the \(\pm\) symbol which means that each input gets mapped to two outputs.

However, often the right hand side of equation (2.1.1), \(f(x,y)\text{,}\) will have one of the following special forms. If this is the case, we will often be able to find an explicit solution. However, sometimes we will only be able to find an implicit solution. In other words, if a first order DE can be written in one of the forms below, then we can find a solution, but it may be defined via an integral.

separable \(\dfrac{dy}{dx} = f(x)g(y)\)
directly integrable \(\dfrac{dy}{dx} = f(x)\)
autonomous \(\dfrac{dy}{dx} = g(y)\)

Notice that directly integrable and autonomous are both special cases of separable because we can assume the missing functions both just map their inputs to unity, i.e. 1.

directly integrable \(\dfrac{dy}{dx} = f(x)\cdot 1\) \(g(y)=1\)
autonomous \(\dfrac{dy}{dx} = 1 \cdot g(y)\) \(f(x)=1\)
Example2.1.1Classification Examples

Determine whether the following DEs are separable or not. If the DE is separable further determine if it is directly integrable and or autonomous.

  1. \(y' = 3x^2y - 5xy\)

  2. \(y' = \dfrac{x-4}{y^2+y+1}\)

  3. \(y' = \sqrt{xy}\)

  4. \(y' = y^2\)

  5. \(y' = 3y - x\)

  6. \(y' = \sin(x+y)+\sin(x-y)\)

  7. \(y' = e^{xy}\)

  8. \(y' = e^{x+y}\)

  9. \(y' = 5\)

Solution

SubsectionSeparation of Variables

The solution method known as: “separation of variables” is rather simple. If you have a separable DE, then treat \(dy/dx\) as if it is a fraction and then use algebra to separate the variables. That is, rewrite the equation so that the only variables that appear on the left are \(y\) and \(dy\text{.}\) Similarly, we make sure that the only variables that appear on the right side of the equation are \(x\) and \(dx\text{.}\) \begin{equation} \frac{dy}{dx} = f(x)g(y) \longrightarrow \int \frac{dy}{g(y)} = \int f(x)\, dx \label{eqn-separable}\tag{2.1.2} \end{equation} Next, integrate both sides of the equation. It simplifies the solution process if you combine the constants of integration into one single constant that is added to the right side of the equation.

Also there are two general rules of thumb which make the method easier:

  1. Keep all constants on the right hand side of the equation.

  2. Make sure the left side is positive by multiplying both sides of the equation by \(-1\text{,}\) if necessary.

There are several things in the above solution which should raise an eyebrow. First, why can you treat the derivative \(dy/dx\) as a fraction when it is a symbol which represents a function? Second, why are we able to integrate with respect to \(y\) on the left side, but with respect to \(x\) on the right side? When solving an equation you must always perform the same operation to both sides, but clearly integration with respect to different variables is not the same.

The answer to both questions above is that what we did is simply a shortcut that allows us to skip a \(u\)–substitution. \begin{align*} \dfrac{dy}{dx} \amp = f(x)g(y)\\ \dfrac{1}{g(y)}\dfrac{dy}{dx} \amp = f(x) \end{align*} So far, so good, all we have to watch out for is when \(g(y)=0\text{.}\) The values of \(y\) which make \(g(y)=0\) must be handled separately. Next, let's integrate both sides of the equation with respect to \(x\text{,}\) and we'll rewrite \(y\) as \(y(x)\) to remind us that it is a function of \(x\text{.}\)

\begin{equation*} \int \left( \dfrac{1}{g(y(x))}\dfrac{dy}{dx} \right) \; dx = \int f(x) \; dx \end{equation*} In order to integrate the left side, we will make the \(u\)–substitution. \begin{equation*} u = y(x) \quad du = \dfrac{dy}{dx} \; dx \end{equation*}

\begin{equation*} \int \dfrac{1}{g(u)} \; du = \int f(x) \; dx \end{equation*} This equation matches up with the original solution in equation (2.1.2) above because \(u=y\text{.}\) Thus integrating the left hand side with respect to \(y\) is acceptable. It is just a shortcut that allows us to skip a \(u\)–substitution.

If we can integrate both sides, then on the left hand side we will have some function of \(u=y(x)\text{,}\) which we can hopefully solve for \(y(x)\text{.}\) However, even if we cannot solve for \(y(x)\) explicitly, we will still have an implicit solution which can be useful.

Example2.1.2

Find a general solution to the following separable DE: \begin{equation} \frac{dy}{dx} = y^2. \label{eqn-separable-1}\tag{2.1.3} \end{equation}

Solution
Example2.1.3

Find a general solution to the following separable DE: \begin{equation} \frac{dy}{dx} = -kxy, \label{eqn-separable-2}\tag{2.1.4} \end{equation} assuming \(k\) is a positive constant.

Solution

SubsectionInitial Value Problems

SubsectionExercises

1

Determine whether the given equations are separable.

  1. \(y' - \tan(x + y) = 0\)

  2. \(\dfrac{dy}{dt} = t\ln y + 2t^3\)

  3. \(\dfrac{dy}{dx} = \dfrac{e^{x+y}}{xy}\)

  4. \(\dfrac{dy}{dx} = \dfrac{y+1}{xy} + y\)

2

Solve the equation: \begin{equation*} x\dfrac{dy}{dx} = \dfrac{1}{y^3} \end{equation*}

3

Solve the equation: \begin{equation*} \dfrac{dy}{dx} = x^2 e^{2x} \end{equation*}

Hint
4

Solve the equation: \begin{equation*} \dfrac{dx}{dt} = 5xt^2 \end{equation*}

5

Solve the equation: \begin{equation*} \dfrac{dy}{dx} = \frac{x-5}{y^2} \end{equation*}

6

Solve the equation: \begin{equation*} \dfrac{dy}{dx} + y^2e^{\sin x}\cos x = 0 \end{equation*}

7

Solve the IVP: \begin{equation*} \dfrac{dy}{dt} = y(y-5) \quad y(0)=1 \end{equation*}

Hint
8

Solve the IVP: \begin{equation*} \dfrac{1}{\theta} \dfrac{dy}{d\theta} = \dfrac{y\sin \theta}{y^2 + 1} \quad y(\pi) = 1 \end{equation*}

9

Solve the IVP: \begin{equation*} \dfrac{dy}{dt} = 2t\cos^2 y \quad y(0) = \dfrac{\pi}{4} \end{equation*}

10

Solve the IVP: \begin{equation*} \dfrac{dy}{dx} = x^2(1+y) \quad y(0) = 3 \end{equation*}