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.

Some second-order ODEs can be solved by making a substitution

u=d ⁣yd ⁣xu = \dd{}{y}{x}

Then, you effectively “integrate twice”: once to solve for u, then once more to get y from u.

Example: Kinematics

Newton’s second law is F=maF = ma, where F is the applied force, m is the mass, and a is the acceleration of a body. We also know that acceleration is the derivative of the velocity v, which is itself the first derivative of position x. Hence, Newton’s second-law is a second-order ODE:

md ⁣2xd ⁣t2=Fm \dd{2}{x}{t} = F

Solve for the position of a body x as a function of time t experience a constant gravitational force F=mgF = -mg, where g is the acceleration due to gravity.


Substitute the gravitational force and simplify

md ⁣2xd ⁣t2=mgd ⁣2xd ⁣t2=g\begin{align} m \dd{2}{x}{t} &= -mg \\ \dd{2}{x}{t} &= -g \end{align}

Make the substitution v=d ⁣x/d ⁣tv = \d{x}/\d{t}, then integrate because the ODE is separable

d ⁣vd ⁣t=gd ⁣v=gd ⁣tv=gt+c1\begin{align} \dd{}{v}{t} &= -g \\ \int \d{v} &= \int -g \d{t} \\ v &= -g t + c_1 \end{align}

Replace v and integrate again:

d ⁣xd ⁣t=gt+c1d ⁣x=(gt+c1)d ⁣tx=12gt2+c1t+c2\begin{align} \dd{}{x}{t} &= -g t + c_1 \\ \int \d{x} &= \int\left(-g t + c_1 \right)\d{t} \\ x &= -\frac{1}{2} g t^2 + c_1 t + c_2 \end{align}

If the initial position is x(0)=x0x(0) = x_0 and initial velocity is v(0)=x(0)=v0v(0)=x'(0)=v_0, then

x(0)=c2=x0v(0)=c1=v0\begin{align} x(0) &= c_2 = x_0 \\ v(0) &= c_1 = v_0 \end{align}

so

x(t)=12gt2+v0t+x0x(t) = -\frac{1}{2} g t^2 + v_0 t + x_0

This is the classic equation of ballistic motion!

Example: Incompressible flow in a cylinder

Steady, laminar pressure-driven flow in a cylindrical pipe:

Pipe flow

is governed by the simplified Navier-Stokes equation:

μ1rd ⁣d ⁣r(rd ⁣uzd ⁣r)=ΔPL\mu \frac{1}{r} \dd{}{}{r} \left( r \dd{}{u_z}{r} \right) = -\frac{\Delta P}{L}

where uzu_z is the velocity along the pipe axis, ΔP\Delta P is the difference between the pressure at the inlet and at the outlet, L is the length of the pipe, and μ\mu is the dynamic viscosity.

The pipe walls have no-slip boundary conditions, meaning the velocity is zero there. Derive an expression for uz(r)u_z(r).


Make the substitution v=rd ⁣uz/d ⁣rv = r \d{u_z}/\d{r}, then rearrangeso

μ1rd ⁣vd ⁣r=ΔPμLd ⁣v=1μΔPLrd ⁣rv=12μΔPLr2+c1\begin{align} \mu \frac{1}{r} \dd{}{v}{r} &= -\frac{\Delta P}{\mu L} \\ \int \d{v} &= \int -\frac{1}{\mu} \frac{\Delta P}{L} r \d{r} \\ v &= -\frac{1}{2\mu} \frac{\Delta P}{L} r^2 + c_1 \end{align}

Then, substitute for v, separate, and integrate again:

rd ⁣uzd ⁣r=12μΔPLr2+c1d ⁣uz=(12μΔPLr+c1r)d ⁣ruz=14μΔPLr2+c1lnr+c2\begin{align} r \dd{}{u_z}{r} &= -\frac{1}{2\mu} \frac{\Delta P}{L} r^2 + c_1 \\ \int \d{u_z} &= \int \Biggl( -\frac{1}{2\mu} \frac{\Delta P}{L} r + \frac{c_1}{r} \Biggr) \d{r} \\ u_z &= -\frac{1}{4\mu} \frac{\Delta P}{L} r^2 + c_1 \ln r + c_2 \end{align}

The walls have no-slip boundary conditions so uz(R)=0u_z(R) = 0. Additionally, the pipe must have radial symmetry so uz(0)=0u_z'(0) = 0. Applying these boundary conditions requires:

limr0uz(r)=limr0c1r=0uz(R)=14μΔPLR2+c1lnR+c2=0\begin{align} \lim_{r \to 0} u_z'(r) &= \lim_{r \to 0} \frac{c_1}{r} = 0 \\ u_z(R) &= -\frac{1}{4\mu} \frac{\Delta P}{L} R^2 + c_1 \ln R + c_2 = 0 \end{align}

The first equation requires c1=0c_1 = 0. The second equation then gives

c2=14μΔPLR2c_2 = \frac{1}{4\mu} \frac{\Delta P}{L} R^2

All together,

uz(r)=14μΔPL(R2r2)u_z(r)=\frac{1}{4 \mu}\frac{\Delta P}{L}(R^2-r^2)

This is the classic Hagen-Poiseuille flow profile.