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.
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:
Keep all constants on the right hand side of the equation.
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}
\begin{align*}
\dfrac{dy}{y^2} \amp = \;dx\\
\int y^{-2} \, dy \amp = \int dx\\
-y^{-1} \amp = x + C\\
-\frac{1}{y} \amp = x + C\\
\frac{1}{y} \amp = -x + C\\
y \amp = \frac{1}{C-x}
\end{align*}
Notice, that we absorbed a factor of -1 into the constant of integration, \(C\text{.}\)
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.