Lesson 12 of 30 · Differential Equations
First-Order Differential Equations
Equations That Describe Change
Most quantities worth tracking in engineering and science do not stand still: a capacitor charges, a hot component cools, a tank’s salt concentration drifts toward a new value. What you often know about such a quantity is not its value at every instant but the rule that governs how fast it changes. A differential equation is exactly that kind of rule: an equation relating an unknown function to one or more of its derivatives 1.
Because a derivative measures an instantaneous rate, a differential equation is a statement about rates. Solving it means finding the function whose rate of change obeys the rule. This reverses the usual direction of calculus: instead of starting with a function and differentiating, you start with information about the derivative and reconstruct the function.
The order of a differential equation is the order of the highest derivative that appears. An equation involving only the first derivative, like \(\frac{dy}{dt} = f(t, y)\), is first order; one involving a second derivative is second order, and so on. This module concerns first-order equations, where the unknown function \(y(t)\) appears alongside its first derivative.
A Rate Model: Exponential Growth and Decay
The simplest meaningful model says that a quantity changes at a rate proportional to its current size:
Here \(k\) is a constant. If \(k > 0\) the quantity grows; if \(k < 0\) it decays. This single equation describes radioactive decay, the early stage of population growth, and the discharge of a capacitor. Its solutions are exponentials, \(y(t) = C e^{kt}\), where \(C\) is an as-yet-undetermined constant 1.
That undetermined constant is the key to understanding what a differential equation does and does not tell you. The equation fixes the shape of the family of solutions, but not which member of the family you are looking at.
Initial Value Problems
To single out one solution you need one more piece of information: the value of \(y\) at a particular time. Pairing a first-order equation with a condition such as \(y(t_0) = y_0\) creates an initial value problem. The initial condition pins down the arbitrary constant.
For exponential growth with \(y(0) = y_0\), substitute \(t = 0\) into \(y = Ce^{kt}\) to get \(C = y_0\), so \(y(t) = y_0 e^{kt}\). A first-order equation needs exactly one such condition because its general solution carries exactly one arbitrary constant 1.
Separable Equations
A first-order equation is separable when its right-hand side factors into a part depending only on the independent variable and a part depending only on the unknown:
The solution method is to collect all \(y\) terms on one side and all \(x\) terms on the other, then integrate both sides 1:
As a worked example, solve \(\frac{dy}{dx} = x y\) with \(y(0) = 2\). Separating gives \(\frac{dy}{y} = x\,dx\). Integrating both sides yields \(\ln|y| = \frac{x^2}{2} + C\), so \(y = A e^{x^2/2}\) where \(A = e^{C}\). Applying \(y(0) = 2\) gives \(A = 2\), hence \(y = 2 e^{x^2/2}\). Newton’s law of cooling, which says an object’s temperature changes at a rate proportional to its difference from the ambient temperature \(T_a\), is also separable: \(\frac{dT}{dt} = -k(T - T_a)\) separates into \(\frac{dT}{T - T_a} = -k\,dt\), giving \(T(t) = T_a + (T_0 - T_a)e^{-kt}\).
First-Order Linear Equations
A broader and extremely common class is the first-order linear equation, written in standard form as
These are not generally separable, but they can be solved by a uniform technique: multiply through by an integrating factor \(\mu(x) = e^{\int p(x)\,dx}\) 1. The factor is chosen so the left side becomes the derivative of a product. After multiplying, the equation reads
which you integrate directly and then divide by \(\mu(x)\).
As a worked example, solve \(\frac{dy}{dx} + 2y = 6\). Here \(p(x) = 2\), so \(\mu(x) = e^{\int 2\,dx} = e^{2x}\). Multiplying gives \(\frac{d}{dx}(e^{2x} y) = 6 e^{2x}\). Integrating, \(e^{2x} y = 3 e^{2x} + C\), so \(y = 3 + C e^{-2x}\). The term \(C e^{-2x}\) fades as \(x\) grows, leaving the steady value \(3\).
This pattern models an RC circuit charging through a resistor toward a source voltage \(V_s\): the capacitor voltage obeys \(\frac{dV}{dt} + \frac{1}{RC}V = \frac{V_s}{RC}\), a linear equation whose solution rises from its initial value toward \(V_s\) with time constant \(RC\). It also models a mixing tank, where brine flows in and a well-stirred mixture flows out: if \(S(t)\) is the dissolved salt, the balance “rate in minus rate out” produces a linear equation \(\frac{dS}{dt} + \frac{r}{V}S = r\,c_{\text{in}}\), with \(r\) the flow rate, \(V\) the tank volume, and \(c_{\text{in}}\) the inflow concentration.
Direction Fields and Qualitative Behavior
You can understand a first-order equation without solving it. Because \(\frac{dy}{dx} = f(x, y)\) gives the slope of the solution through any point \((x, y)\), you can draw a short slope segment at a grid of points. The result is a direction field (or slope field), and any solution curve must flow tangent to those segments 1. Sketching it reveals the qualitative behavior of solutions even when no formula is available.
Equilibria and Stability
Of special interest are constant solutions. An equilibrium of \(\frac{dy}{dt} = f(y)\) is a value \(y^\*\) where \(f(y^\*) = 0\), so the rate of change is zero and the solution stays put. An equilibrium is stable if nearby solutions move toward it and unstable if they move away. For Newton’s law of cooling, \(T = T_a\) is a stable equilibrium: any starting temperature relaxes toward the ambient value. For exponential growth \(\frac{dy}{dt} = ky\) with \(k > 0\), the equilibrium \(y = 0\) is unstable, since any nonzero start grows without bound. Reading off equilibria and their stability is often the first thing an engineer wants from a model, before any exact solution is computed.
References
- MIT 18.03 Differential Equations. MIT OpenCourseWare. verified Cited at: 18.03.