This relates to a research problem I am trying to solve. With $x_\mu,k_\mu,b_\mu$ indicating 4-vectors, $\mu=0,1,2,3$ being the index that denotes the components, and scalar products such as $k\cdot x=k_0 x_0-k_1 x_1-k_2 x_2-k_3 x_3$, here is an example of a simple derivative of scalar products that is known.
$\frac{\partial}{\partial x_\mu} \left[\int^{k\cdot x} g(\phi)d\phi\right]=k_\mu \, g(k\cdot x)$
What I need however, and you would think should be trivial to get, is to solve for the unknown functions $S_1$ and $S_2$ in terms of the scalar products and the known functions g and h such that
$\frac{\partial}{\partial x_\mu} S_1(k\cdot x,b\cdot x)=b_\mu \, g(k\cdot x)\quad$ and $\quad\frac{\partial}{\partial x_\mu} S_2(k\cdot x,K\cdot x,b\cdot x)=b_\mu \, h(k\cdot x,K\cdot x)$
If the vectors were one dimensional it would be easy
$\frac{\partial}{\partial x_0} \left[\frac{b_0}{k_0}\int^{k_0 x_0} g(\phi)d\phi\right]=b_0 \, g(k_0 x_0)$ but I need the 4-D versions.
Probably someone yawns and the answer is so obvious that cant be bothered writing it down. But, please, if you would, it would greatly help me finish of a longish project. Cheers.
You can basically apply the chain rule. For the first example, define $u_1 = k \cdot x$ and $u_2 = b \cdot x$; then we have $$ \vec{\nabla} S_1(u_1, u_2) = \frac{\partial S}{\partial u_1} \vec{\nabla}u_1 + \frac{\partial S}{\partial u_2} \vec{\nabla}u_2 = \vec{k} \frac{\partial S}{\partial u_1} + \vec{b} \frac{\partial S}{\partial u_2}. $$ If this needs to be true for all vectors, and the dimension of the space is greater than 1, then we can pick $\vec{b}$ to be linearly independent of $\vec{k}$; and so the equation $$ \vec{\nabla} S_1(u_1, u_2) = [g(u_1)] \vec{b} + [0] \vec{k} $$ implies that $$ \frac{\partial S}{\partial u_1} = 0, \qquad\frac{\partial S}{\partial u_2} = g(u_1). $$ Assuming that $S$ is $\mathcal{C}^2$, this is a contradiction unless $g(u_1)$ is constant, since taking the mixed partials implies that $$ \frac{\partial^2 S}{\partial u_2 \partial u_1} = 0 \qquad \text{but} \qquad \frac{\partial^2 S}{\partial u_1 \partial u_2} = g'(u_1). $$ If $g(u_1) = g_0$ is a constant, then the general solution is $S_1 = g_0 u_2 + C = g_0 (b\cdot x) + C$.
Similar logic can be applied to show that if the second equation must hold for all vectors $\vec{k}$, $\vec{K}$ and $\vec{b}$, and the dimension of the space is greater than 2, then there is no $\mathcal{C}^2$ solution unless $h(k\cdot x, K\cdot x) = h_0$ is a constant function, in which case the general solution is $S_2 = h_0 (b\cdot x) + C$.