First-Order Ordinary Differential Equations (ODEs)
Classifying Differential Equations
Differential equations can be broadly classified into several types, and these distinctions are important because different classes require fundamentally different solution methods.
- Constant coefficient differential equations
- Linear differential equations
- Nonlinear differential equations
As a starting point, consider the simplest possible situation: suppose we are given \( y'(t) = f(t) \), and we want to find \( y(t) \).
In this case, the derivative is given explicitly as a function of \( t \), so we can recover \( y(t) \) directly by integration.
If we are given an initial condition \( y(t_0) = y_0 \), then integrating both sides gives
$$ y(t) - y(t_0) = \int_{t_0}^{t} y'(s)\,ds = \int_{t_0}^{t} f(s)\,ds $$So the solution is
$$ y(t) = y_0 + \int_{t_0}^{t} f(s)\,ds $$If no initial condition is provided, then integrating yields the general solution:
$$ y(t) = \int f(t)\,dt + c $$e.g. \( \quad \color{#00f0ff} y' = t^3 \)
$$ \frac{dy}{dt} = t^3 $$ $$ dy = t^3\,dt $$ $$ \int dy = \int t^3\,dt $$ $$ y(t) = \frac{1}{4}t^4 + c $$e.g. \( \quad \color{#00f0ff} y' = e^{-3t} \), \( \, \color{#00f0ff} y(0) = 2 \)
$$ dy = e^{-3t}\,dt $$ $$ y(t) = \int_{0}^{t} e^{-3s}\,ds + y(0) $$Evaluating the integral
$$ y(t) = \left[-\frac{1}{3} \, e^{-3s}\right]_{0}^{t} + 2 $$This gives
$$ y(t) = -\frac{1}{3} \, e^{-3t} + \frac{1}{3} + 2 $$Simplifying
$$ y(t) = \frac{7}{3} - \frac{1}{3} \, e^{-3t} $$What changes when the right-hand side depends on \( y \) as well as \( t \)? We have a first-order differential equation of the form \( y' = f(y,t) \), with an initial condition \( y(t_0) = y_0 \), we can write it in integral form
$$ \int_{t_0}^{t} dy = y(t) - y(t_0) = \int_{t_0}^{t} y'(s)\,ds $$which gives
$$ y(t) = y(t_0) + \int_{t_0}^{t} f\big(y(s), s\big)\,ds $$In this case, the function depends on \( y \) itself inside the integral, so the solution is implicit: the value of \( y(t) \) depends on the entire behaviour of the function over the interval. This is one of the main reasons why most such equations cannot be solved in closed form and instead require numerical methods.
Linear vs Nonlinear Differential Equations
Linear
A first-order linear differential equation has the form \( y' + p(t)y = g(t), \) with initial condition \( y(t_0) = y_0. \)
Linearity means that \( y \) and its derivative appear only to the first power and are not multiplied together. Linearity is important because it allows superposition and systematic solution methods.
- Constant coefficient: \( p(t) = a \)
- Homogeneous: \( g(t) = 0 \)
- Inhomogeneous: \( g(t) \neq 0 \)
- Typically admits unique solutions under standard conditions
Nonlinear
Nonlinear differential equations involve powers or functions of \( y \) beyond the first degree, and in general are much harder to solve analytically.
- Autonomous \( y' = f(y) \)
- Separable e.g. \( y' = f(x)g(y) \)
- Other specialized techniques depending on structure
This distinction is central, because linear equations can be handled systematically, while nonlinear equations often require more specialized or numerical approaches.
Linear vs nonlinear examples:
- \( y' = y \) → linear
- \( y' = t^2 y \) → linear
- \( y' = t y^2 \) → nonlinear
- \( y' = y \cos t \) → linear
- \( y' = t \cos y \) → nonlinear
- \( (y')^2 = y \) → nonlinear
Direction Fields
Even when an analytical solution cannot be found, a differential equation still contains valuable information about how solutions behave. A direction field (or slope field) is a graphical tool that visualizes this behaviour directly from the differential equation without first solving it.
Consider a first-order differential equation of the form
$$ \frac{dy}{dx} = f(x,y) $$At every point \( (x,y) \), the equation assigns a value for the derivative \( \displaystyle \frac{dy}{dx} \), which represents the slope of the solution curve passing through that point. A direction field is constructed by drawing many small line segments throughout the plane, each with slope
$$ f(x,y) $$at its corresponding point. Together, these segments provide a geometric picture of the entire family of solutions.
By following the local directions indicated by the field, we can sketch approximate solution curves and gain insight into the behaviour of the system. Direction fields help reveal equilibrium solutions, regions of growth or decay, stability, oscillatory behaviour, and long-term trends, particularly for nonlinear equations where exact solutions may be difficult to obtain.
In a direction field, the length of the arrows is usually not physically meaningful. The arrows are often normalized so that they indicate direction and slope rather than magnitude.
Shown below is the direction field for the equation \( \displaystyle \frac{dy}{dx} = x - y \, \):
A solution curve (we will see an example below) represents a particular solution corresponding to a specific initial condition. While the direction field shows the local slopes prescribed by the differential equation throughout the plane, a solution curve traces the actual path followed by the solution. The solution curves therefore always follow the directions indicated by the field.
Homogeneous Constant Coefficient Equations
Consider the differential equation
$$ y' + ay = 0 $$Rewriting this in derivative form gives
$$ \frac{dy}{dt} = -ay $$Separating variables gives
$$ \frac{1}{y}\,dy = -a\,dt $$Integrating both sides
$$ \int \frac{1}{y}\,dy = \int -a\,dt $$This yields
$$ \ln y = -at + k $$so
$$ y = e^{k - at} = e^k e^{-at} $$Letting \( c = e^k \), we obtain the general solution
$$ y(t) = c e^{-at} $$This is the simplest example of exponential behaviour, showing that even a very basic differential equation can produce either growth or decay depending on the sign of \( a \).
The direction field below illustrates the homogeneous constant coefficient equation \( y' + ay = 0 \), or equivalently \( \displaystyle \frac{dy}{dt} = -ay \). In this example we take \(a = 1\), so solutions decay exponentially toward the equilibrium solution \( y = 0 \). The arrows show the local slope of the solution at each point: above the \(t\)-axis the slopes point downward, below the axis they point upward, and along \(y=0\) the slope is zero.
Initial Value Problem (IVP)
An initial value problem consists of a differential equation together with an initial condition.
Given \( y(t_0) = y_0, \) we substitute into the general solution:
$$ y(t) = c e^{-at} $$Solving for \( c \)
$$ y(t_0) = y_0 = c e^{- a t_0} $$ $$ c = y_0 \, e^{a t_0} $$Thus the solution becomes
$$ y(t) = y_0 \, e^{-a(t - t_0)} $$From this expression, we can see that the solution \( y(t) \) does not change sign:
- If \( y_0 > 0 \), then \( y(t) > 0 \)
- If \( y_0 < 0 \), then \( y(t) < 0 \)
The parameter \( a \) determines whether the solution grows or decays:
- If \( a < 0 \), the solution exhibits exponential growth
- If \( a > 0 \), the solution exhibits exponential decay
An equilibrium solution is a solution that does not vary with time, i.e. a constant solution satisfying the differential equation. In this case, if \( y_0 = 0 \), then \( y(t) = 0 \).