The problem I'm having is straightforward. The 3D advection equation is $\frac{\partial u}{\partial t} + \nabla \cdot{\vec{u}\vec{c}} =0$ for a constant $\vec{c}$ in this case. The solution to verify is $u =f(\vec{x} -\vec{c}t)$.
The time derivative is straightforward and gives $-\vec{c}\frac{\partial f}{\partial \psi}$ where $\psi =\vec{x} -\vec{c}t$.
My question is for the divergence term. Using the product rule for divergence and the fact that $\vec{c}$ is constant I only need to find the divergence of $f(\vec{x}-\vec{c}t)$.
Using index notation this is $\sum_j \frac{\partial f}{\partial \psi}\frac{\partial \psi}{\partial j}$ and the derivative of $\psi$ with respect $j=x,y,z$ is always 1 so the sum gives $3$. Is this correct?
Let us write $u = f (\vec \psi)$, where $\vec \psi = \vec x - t\, \vec c$ (note that $\vec\psi$ is a vector of $\Bbb R^3$, like $\vec x$). Using the chain rule, we write \begin{aligned} \frac{\partial u}{\partial t} &= \frac{\partial \vec \psi}{\partial t}\cdot \frac{\partial f}{\partial \vec \psi} \\ &= -\vec c\cdot \frac{\partial f}{\partial \vec \psi} \, . \end{aligned} Now, using an identity on the divergence of vector-valued functions, we have \begin{aligned} \vec\nabla\cdot (u\vec c) &= u\, \vec\nabla\cdot\vec c + \vec\nabla u\cdot \vec c \\ &= \vec c\cdot \vec\nabla u \, .\\ \end{aligned} The chain rule gives \begin{aligned} \vec\nabla u &= \frac{\partial u}{\partial \vec x} \\ &= \frac{\partial \vec \psi}{\partial \vec x}\cdot \frac{\partial f}{\partial \vec \psi} \\ &= \frac{\partial f}{\partial \vec \psi} \, , \end{aligned} so that $\vec\nabla\cdot (u\vec c) = \vec c\cdot \frac{\partial f}{\partial \vec \psi}$. Finally, we have shown that $\frac{\partial u}{\partial t} + \vec\nabla\cdot (u\vec c) = 0$.