Assume $u:\mathbb{R^{3}\times \mathbb{R}\rightarrow \mathbb{R}}$ is smooth for $x \in \mathbb{R^{3}}$. Let $$f(x)=u(x,t-|x|)$$ what is the gradient of $f$? Is the components partial derivatives of $f$, i.e. $$\frac{\partial}{\partial x_{1}}, \frac{\partial}{\partial x_{2}},\frac{\partial}{\partial x_{3}}$$ Or also a $\dfrac{\partial}{\partial t}$? I'm a little confused since this function $u$ maps from a product space to real line. By the way, this is from a wave equation problem, and $t$ denotes the time.
Any idea?
Denote for clarity the first argument of $u$ by $y$ and the second one by $s$.
This will alow you to write
$$\partial_{x_1} f(x) = \partial_{y_1}u (x,t-|x|)\cdot \partial_{x_1} x_1 +\partial_{y_2}u (x,t-|x|)\cdot \partial_{x_1} x_2+\partial_{y_3}u (x,t-|x|)\cdot \partial_{x_1} x_3+\partial_{s}u (x,t-|x|)\cdot \partial_{x_1} (t-|x|) $$
$$ = \partial_{y_1}u (x,t-|x|) -\partial_{s}u (x,t-|x|)\cdot \frac{x_1}{|x|}. $$
With that you have $$\nabla_x f(x) = \nabla_y u(x,t-|x|) - \frac{x}{|x|}\partial_s u(x,t-|x|) $$