Derivative of integral with varying domain? Fundamental theorem of calculus? Say I want to find the $n^{th}$ derivative of
$$\int_{V_x} F{(x_1,...,x_k)}dV$$
where $V_x$ is some $k$-dimensional volume dependent on $x$. In the $1$-dimensional case this is the fundamental theorem of calculus for $n=1$ and we can take higher derivatives after applying the fundamental theorem. To be concrete, say $V_x$ is the cube $[0,x]^k$. What can I do in general? Is this Stokes theorem?
 A: Do a change of variable to eliminate the dependence on $x$ in the integral bounds and note that $x$ inside the integral is a dummy variable. Namely, $$\int_{V_x} F(x)\,{\rm d}x = \int_{[0,x]^k} F(y)\,{\rm d}y$$Now write $g\colon [0,1]^k \to [0,x]^k$ as $y = g(z) = xz$. Then $Dg(z) = x{\rm Id}_{\Bbb R^k}$, so $\det Dg(z) = x^{k}$. So ${\rm d}y = x^k\,{\rm d}z$, and so $$\int_{[0,x]^k} F(y)\,{\rm d}y =\int_{g([0,1]^k)} F(y)\,{\rm d}y =\int_{[0,1]^k} F(xz)\, x^k\,{\rm d}z = x^k\int_{[0,1]^k} F(xz)\,{\rm d}z.$$Hence $$\frac{{\rm d}}{{\rm d}x} \left(x^k\int_{[0,1]^k}F(xz)\,{\rm d}z\right) = kx^{k-1}\int_{[0,1]^k} F(xz)\,{\rm d}z + x^k \int_{[0,1]^k} \langle \nabla F(xz), z\rangle\,{\rm d}z.$$To bring the domain back to what it was in the beginning, we undo the change of variable, to get: $$\frac{{\rm d}}{{\rm d}x}\left(\int_{[0,x]^k}F(y)\,{\rm d}y\right) = \frac{k}{x} \int_{[0,x]^k}F(y)\,{\rm d}y + \frac{1}{x}\int_{[0,x]^k} \langle \nabla F(y), y\rangle\,{\rm d}y.$$
Note that it makes perfect sense for this formula to become singular for $x=0$, as this is the case where your domain of integration $[0,x]^k$ degenerates to a point.
A: The general problem would be to compute the derivative of
$$ F(\mathbf{x},\mathbf{u}) = \int_{\Omega(\mathbf{u})} f(\mathbf{x})d\mathbf{x} $$
with respect to $\mathbf{x}$ with $\mathbf{u} = \mathbf{T}(\mathbf{x})$ (in this case $T = I$ is the identity map). The generalized Leibniz rule gives:
$$ \frac{\partial F}{\partial \mathbf{u}} = \int_{\partial \Omega(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma $$ Combining this result with Leibniz rule again for differentiation under the integral sign and using the chain rule  the gradient with respect to $\mathbf{x}$ is:
$$ \frac{\partial F}{\partial \mathbf{x}} =  \int_{\Omega(\mathbf{u}))} \nabla_{\mathbf{x}}f(\mathbf{x})d\mathbf{x} + \frac{\partial T}{\partial \mathbf{x}}^{\top}\int_{\partial \Omega(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma   $$
The hidden complexity here is how to compute the "velocity" of the boundary points as the domain change. As an example consider the two-dimensional domain $\Omega = [0,x_1] \times [0,x_2]$ and the function $f=1$ then $F = \int_{\Omega} f d\mathbf{x} = x_1 x_2$ and obviously $\nabla F = [x_2 \, \,  x_1]^{\top}$. Applying the previous machinery we get:
$$  \frac{\partial F}{\partial \mathbf{x}} =  \int_{\Omega(\mathbf{u}))} \nabla_{\mathbf{x}}f(\mathbf{x})d\mathbf{x} + \frac{\partial T}{\partial \mathbf{x}}^{\top}\int_{\partial \Omega(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma =  \int_{\partial \Omega(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma = \int_{\Gamma_2(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma + \int_{\Gamma_3(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma $$
Being $\Gamma_2$ and $\Gamma_3$ the right and upper sides of the rectangle that are the only ones that have non-zero velocity of their boundaries. Since $\Gamma_2$ is moving in the horizontal direction we have $\frac{\partial \mathbf{x}}{\partial\mathbf{u}}^{\top} = \begin{bmatrix} 1 & 0 \\ 0 & 0\end{bmatrix}$ on $\Gamma_2$ while $\frac{\partial \mathbf{x}}{\partial\mathbf{u}}^{\top} = \begin{bmatrix} 0 & 0 \\ 0 & 1\end{bmatrix}$ on $\Gamma_2$ (i.e. $\Gamma_2$ is moving vertically) then we have:
$$ \frac{\partial F}{\partial \mathbf{x}} = \int_{\Gamma_2(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma + \int_{\Gamma_3(\mathbf{u})} f(\mathbf{x})\frac{\partial \mathbf{x}}{\partial \mathbf{u}}^{\top} \mathbf{n}(\mathbf{x})d\Gamma = \int_{\Gamma_2(\mathbf{u})} \begin{bmatrix} 1 \\ 0 \end{bmatrix} d\Gamma + \int_{\Gamma_3(\mathbf{u})} \begin{bmatrix} 0 \\ 1 \end{bmatrix} d\Gamma  = \begin{bmatrix} x_2 \\ x_1 \end{bmatrix}$$
