# Hyperbolic PDE from total derivative?

Given a density function $p(t, \boldsymbol{x})$, where $t$ is time and the vector $\boldsymbol{x}$ represents a point in $n$ dimensional space, a hyperbolic PDE describing the time evolution of the density function may be written as

$$\partial_{t} p = \text{(source - sink)} - \nabla_{\boldsymbol{x}} \cdot [p \boldsymbol{v}],$$

where $\partial_{t} p \equiv \partial p / \partial t$ is the partial derivative of the density function with respect to time $t$, $\nabla_{\boldsymbol{x}} \equiv \partial / \partial \boldsymbol{x}^{\text{T}} \equiv (\partial_{x_{1}},...,\partial_{x_{n}})$ is the gradient operator, and $\boldsymbol{v} \equiv d\boldsymbol{x} / dt$ is the velocity vector field. There are several ways to derive this PDE, but the one I'm most familiar with proceeds via the divergence theorem.

I'm interested in how this equation is related to the total derivative of $p(t, \boldsymbol{x})$ with respect to time $t$. This is given by

$$\frac{dp}{dt} = \frac{\partial p}{\partial t} \frac{dt}{dt} + \frac{\partial p}{\partial \boldsymbol{x}^{\text{T}}} \cdot \frac{d \boldsymbol{x}}{dt}.$$

After simplifying, and rearranging, we obtain

$$\frac{\partial p}{\partial t} = \frac{dp}{dt} - \frac{\partial p}{\partial \boldsymbol{x}^{\text{T}}} \cdot \frac{d \boldsymbol{x}}{dt}.$$

By the product rule, however, we can re-write the second term on the RHS as

$$\frac{\partial p}{\partial \boldsymbol{x}^{\text{T}}} \cdot \frac{d \boldsymbol{x}}{dt} = \frac{\partial}{\partial \boldsymbol{x}^{\text{T}}} \cdot \left(p \frac{d \boldsymbol{x}}{dt}\right) - p \frac{\partial}{\partial \boldsymbol{x}^{\text{T}}} \cdot \frac{d \boldsymbol{x}}{dt}$$

Substituting back in and switching notation using the definition of the gradient and velocity vector field above, we have

$$\partial_{t} p = \frac{dp}{dt} + p \nabla_{\boldsymbol{x}} \cdot \boldsymbol{v} - \nabla_{\boldsymbol{x}} \cdot [p \boldsymbol{v}].$$

This is obviously similar to the PDE we started with. I know I've played fast and loose with notation a bit, but does this make any sense? Is it useful?

• What you call "total derivative" is usually called material derivative. Your first equation is incomplete as a hyperbolic system: you have not specified how $v$ evolves in time. But no matter, your final equation can be simplified: assuming that (source-sink)=0 you get $$\frac{dp}{dt} = p \nabla_x \cdot v$$ which you will find, for example, as one of the equations in the compressible Euler system. – Willie Wong May 12 '16 at 13:46
• Writing your PDE in terms of $\partial_t$ and $\frac{d}{dt}$ corresponds to the difference between choosing the Eulerian versus the Lagrangian coordinate systems for analyzing your fluid equations. – Willie Wong May 12 '16 at 14:06
• @WillieWong just come back to this after a break. Is it the case that $dp/dt$ = source - sink? If so, why is it that the $$p \nabla_x \cdot v$$ disappears in the derivation via the divergence theorem? – Michael Andrew Bentley Aug 4 '16 at 12:20