Nonlinear First-Order ODEs

Separable Differential Equations

We now move beyond linear equations to a class of nonlinear equations that can still be solved explicitly. A differential equation is called separable if the function \( f(y,t) \) can be written as the product of two independent functions:

$$ f(y,t) = f(y)\,g(t) $$

In this case, the differential equation \( y' = f(y,t) \) becomes

$$ y' = f(y)\,g(t) $$ $$ \frac{dy}{dt} = f(y)\,g(t) $$

The key idea is that all dependence on \( y \) and \( t \) can be separated onto opposite sides of the equation. Rearranging,

$$ \frac{dy}{f(y)} = g(t)\,dt $$

Integrating both sides gives

$$ \int \frac{dy}{f(y)} = \int g(t)\,dt + c $$

If these integrals can be evaluated, this produces an implicit relation between \( y \) and \( t \). In some cases, this relation can then be solved explicitly for \( y(t) \).

eg. Find the solutions of \( \color{#00f0ff} \displaystyle y' = -\frac{t - 2}{4y} \)

Separate variables

$$ 4y\,dy = -(t - 2)\,dt $$

Integrating both sides

$$ \int 4y\,dy = -\int (t - 2)\,dt $$ $$ 2y^2 = -\frac{t^2}{2} + 2t + c $$

Solving for \( y(t) \), we obtain

$$ y(t) = \pm \sqrt{\,t - \frac{t^2}{4} + \frac{c}{2}} $$

This illustrates a typical feature of separable equations: the solution often appears implicitly at first, and may involve multiple branches when solving for \( y(t) \).

The direction field below illustrates the separable equation \( \displaystyle y'=-\frac{t-2}{4y} \). The slope depends on both \(t\) and \(y\), and the equation is undefined along \( y=0 \). The solution curves naturally split into upper and lower branches, corresponding to the \( + \) and \( - \) in \( \displaystyle y(t)=\pm\sqrt{t-\frac{t^2}{4}+\frac{c}{2}} \, \):


Direction Field See plot code

eg. Solve the initial value problem \( \color{#00f0ff} y' = y^2, \quad y(0) = y_0 \)

Separate variables

$$ \frac{dy}{y^2} = dt $$

Integrating both sides

$$ \int \frac{dy}{y^2} = \int dt $$ $$ -\frac{1}{y} = t + c $$

Solving for \( y(t) \),

$$ y(t) = -\frac{1}{c + t} $$

Using the initial condition \( y(0) = y_0 \),

$$ y_0 = -\frac{1}{c} \quad \Rightarrow \quad c = -\frac{1}{y_0} $$

Therefore,

$$ y(t) = -\frac{1}{t - 1/y_0} $$ $$ y(t) = \frac{1}{1/y_0 - t} $$ $$ y(t) = \frac{y_0}{1 - y_0 t} $$

This example shows that even simple nonlinear equations can exhibit very different behaviour depending on the initial condition.

The behaviour depends on the value of \( y_0 \):

If \( y_0 < 0 \), then \( y(t) \to 0^- \)

If \( y_0 = 0 \), then \( y(t) = 0 \)

If \( y_0 > 0 \), then \( y(t) \to \infty \) as \( t \to \displaystyle \frac{1}{y_0} \)

In particular, when \( y_0 > 0 \), the solution blows up in finite time, which is a behaviour that does not occur in the linear equations studied earlier.

The direction field below illustrates the nonlinear equation \( y' = y^2 \). Since the slope depends only on \(y\), the arrows form horizontal bands: points with the same \(y\)-value have the same slope. The equilibrium solution \( y = 0 \) is shown as a horizontal line. Solutions starting below the \(t\)-axis increase toward \(0\), while solutions starting above the axis increase more and more rapidly and blow up in finite time:


Direction Field See plot code