Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Differential equations

Updated: 30 Jan 2026

Already in chapter 1 we have seen the concept of a differential equation: an equation that relates a function to its derivatives. In mechanics, differential equations arise naturally when we express Newton’s laws in terms of position, velocity, and acceleration.

First order

A first-order differential equation relates a function to its first derivative. The general form of a first-order differential equation is:

dxdt=f(t)\frac{dx}{dt} = f(t)

If we know the function f(t)f(t), we can solve for x(t)x(t) by integrating both sides with respect to time:

x(t)=x(t0)+t0tf(τ)dτx(t) = x(t_0) + \int_{t_0}^{t} f(\tau) d\tau

Note that these two examples are dependent on a function that is itself only dependent on time. More complex first-order differential equations can involve the function itself, such as:

dxdt=kx(t)\frac{dx}{dt} = -kx(t)

where kk is a constant. This type of equation often arises in contexts such as radioactive decay or cooling processes. We can solve this equation using separation of variables or integrating factors, leading to an exponential solution x(t)=Aektx(t)=Ae^{-kt}. We can verify this solution by differentiating it:

dxdt=kAekt=kx(t)\frac{dx}{dt} = -kAe^{-kt} = -kx(t)

Slotting in this equation in the above allows us to solve for the constant AA based on initial conditions:

dxdt=kx(t)    x(t)=x(t0)ek(tt0)\frac{dx}{dt} = -kx(t) \implies x(t) = x(t_0)e^{-k(t-t_0)}

Second order

In a second order differential equation, the function is related to its second derivative. The general form of a second-order differential equation is:

d2xdt2=f(t,x)\frac{d^2x}{dt^2} = f(t,x)

A familiar example from mechanics is Newton’s second law in relation to a mass-spring system:

Fnet=ma=md2xdt2=kxF_{net} = m a = m \frac{d^2x}{dt^2} = -kx

We know this leads to simple harmonic motion, with the general solution:

x(t)=Acos(ωt)+Bsin(ωt)x(t) = A \cos(\omega t) + B \sin(\omega t)

where ω=km\omega = \sqrt{\frac{k}{m}} is the angular frequency, and AA and BB are constants determined by initial conditions.