Skip to content
Feb 9

Differential Equations: First-Order Methods

MT
Mindli Team

AI-Generated Content

Differential Equations: First-Order Methods

First-order ordinary differential equations (ODEs) describe how a quantity changes with respect to a single independent variable, often time. Despite their simple form, they power a large share of practical models in science and engineering: population growth and radioactive decay, salt mixing in tanks, and Newton’s law of cooling, among others. The key skill is recognizing the structure of an equation and matching it to a reliable solution method.

This article focuses on four foundational categories and techniques: separable equations, linear equations and integrating factors, and exact equations. Along the way, we connect each method to common real-world applications.

What makes an ODE “first-order”?

A first-order ODE involves the first derivative of an unknown function $y(x)$ and no higher derivatives. In general form:

$$\frac{dy}{dx} = f(x,y)$$

Solving a first-order ODE means finding a function $y(x)$ that satisfies the equation on some interval, usually with an initial condition such as $y(x_0)=y_0$. That initial value problem is where the equation becomes predictive.

Separable differential equations

Recognizing a separable equation

An equation is separable if it can be rearranged so that all terms involving $y$ are on one side and all terms involving $x$ are on the other:

$$\frac{dy}{dx} = g(x)\,h(y)$$

Then we separate variables:

$$\frac{1}{h(y)}\,dy = g(x)\,dx$$

Solving by integration

Integrate both sides:

$$\int \frac{1}{h(y)}\,dy = \int g(x)\,dx + C$$

Often the result is an implicit solution. If possible, you then solve algebraically for $y$.

Application: growth and decay

Many growth and decay laws are separable. The simplest is exponential change:

$$\frac{dP}{dt} = kP$$

Separate and integrate:

$$\frac{1}{P}\,dP = k\,dt \quad \Rightarrow \quad \ln|P| = kt + C$$

Exponentiating gives:

$$P(t) = P_0 e^{kt}$$

With $k>0$ this models unconstrained growth; with $k<0$ it models decay (radioactive decay, depletion of a chemical reactant under certain assumptions). The model’s usefulness depends on whether proportional-to-current-amount is realistic over the time window.

Practical note: equilibrium solutions

When separating, pay attention to values where $h(y)=0$. Those can create constant (equilibrium) solutions that may be lost if you divide by $h(y)$ too early. For example, in $\frac{dy}{dx}=(y-2)(x+1)$, the solution $y=2$ exists and should be included.

Linear first-order equations

Standard form and why it matters

A first-order linear ODE has the form:

$$\frac{dy}{dx} + p(x)\,y = q(x)$$

“Linear” means $y$ and $dy/dx$ appear to the first power and are not multiplied together. Many physical balance laws and rate equations naturally produce this structure.

Integrating factors

The standard method uses an integrating factor $\mu(x)$ that turns the left side into the derivative of a product.

Choose:

$$\mu(x) = e^{\int p(x)\,dx}$$

Multiply the ODE by $\mu(x)$:

$$\mu y' + \mu p y = \mu q$$

The left side becomes:

$$\frac{d}{dx}(\mu y) = \mu q$$

Integrate:

$$\mu(x)\,y(x) = \int \mu(x)\,q(x)\,dx + C$$

Then divide by $\mu(x)$.

Application: Newton’s law of cooling

Newton’s law of cooling says the rate of change of an object’s temperature $T(t)$ is proportional to the difference between its temperature and the ambient temperature $T_a$:

$$\frac{dT}{dt} = -k\,(T - T_a)$$

Rearrange into linear form:

$$\frac{dT}{dt} + kT = kT_a$$

Here $p(t)=k$ and $q(t)=kT_a$ (often constant). The integrating factor is $\mu(t)=e^{kt}$. Solving yields:

$$T(t) = T_a + (T_0 - T_a)e^{-kt}$$

This formula explains why cooling (or heating) is fastest initially and slows as the object approaches the ambient temperature. In practice, $k$ is estimated from measurements; it depends on airflow, surface area, and material properties.

Mixing problems as linear ODEs

Mixing problems model the amount of solute (like salt) in a tank as liquid flows in and out. Let $A(t)$ be the amount of salt (mass) in the tank, and let $V(t)$ be the volume of liquid.

A typical balance law is:

$$\frac{dA}{dt} = \text{rate in} - \text{rate out}$$

If inflow concentration is $c_{in}(t)$ and inflow rate is $r_{in}(t)$, then rate in is $r_{in}(t)c_{in}(t)$. If the mixture is well-stirred, the outflow concentration is $A(t)/V(t)$, so rate out is $r_{out}(t)\,A(t)/V(t)$.

That yields:

$$\frac{dA}{dt} + \frac{r_{out}(t)}{V(t)}A = r_{in}(t)c_{in}(t)$$

This is linear in $A(t)$ with:

  • $p(t)=\frac{r_{out}(t)}{V(t)}$
  • $q(t)=r_{in}(t)c_{in}(t)$

The integrating factor method applies directly. When $V(t)$ is constant (equal inflow and outflow rates), the solution is especially clean and illustrates exponential approach to a steady salt amount set by inflow concentration.

Exact differential equations

The “exactness” idea

Some first-order ODEs appear in the form:

$$M(x,y)\,dx + N(x,y)\,dy = 0$$

It is exact if there exists a potential function $F(x,y)$ such that:

$$\frac{\partial F}{\partial x} = M(x,y), \quad \frac{\partial F}{\partial y} = N(x,y)$$

Then the differential equation is simply $dF=0$, so solutions satisfy:

$$F(x,y) = C$$

Testing exactness

A standard test checks whether the mixed partial derivatives match:

$$\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}$$

If this holds on a region (with mild continuity assumptions), the equation is exact.

Solving an exact equation

  1. Integrate $M(x,y)$ with respect to $x$ to get a candidate $F(x,y)$ plus an unknown “function of $y$.”
  2. Differentiate that candidate with respect to $y$ and match it to $N(x,y)$ to determine the missing function.
  3. Set $F(x,y)=C$.

Exact equations often arise from conservative systems and energy-like invariants. Even when the original problem is not “physics,” exactness provides a powerful shortcut to an implicit solution.

Integrating factors beyond linear equations

Integrating factors are not limited to linear ODEs. For non-exact equations of the form $M\,dx+N\,dy=0$, sometimes multiplying by a function $\mu(x)$ or $\mu(y)$ can make the equation exact. While there are criteria to test whether such a factor depends only on $x$ or only on $y$, the key practical point is conceptual: an integrating factor is a multiplier that turns a difficult equation into one with a built-in conservation structure.

Choosing the right first-order method

In practice, success is less about memorizing formulas and more about pattern recognition:

  • If you can algebraically separate $x$ and $y$, use separation of variables.
  • If the equation matches $y' + p(x)y = q(x)$, use the integrating factor method for linear equations.
  • If the equation looks like $M\,dx + N\,dy = 0$, check exactness via $\partial M/\partial y$ and $\partial N/\partial x$.
  • If it is close to exact but not quite, consider whether an integrating factor might apply.

First-order methods remain central because they connect clean mathematics to interpretable models. Whether you are fitting a decay constant, predicting cooling time, or tracking concentration in a mixing tank, these techniques provide solutions you can compute, check, and use.

Write better notes with AI

Mindli helps you capture, organize, and master any subject with AI-powered summaries and flashcards.