# Leibniz Rule with Balls

Let's say I have an integral: $$\int_{B_{t}} f(t,x) \mathrm{d}x$$Where $B_t$ is the ball of radius $t$. And I would like to apply the Leibniz rule to compute the derivative of this. How would I do it?

I know that the formula goes something like this: $$\frac{d}{dt}\int_{B_{t}} f(t,x) \mathrm{d}x = \int_{B_t} \frac{d}{dt}f(t,x) \mathrm{d}x + \int_{\partial B_t}g(t,x) \mathrm{d}S$$ I know that $g$ is supposed to have something to do with the velocity of the boundary (I saw this term used when discussing the Reynolds transport theorem). What does this mean exactly? How can I compute it for the case of the unit ball?

See it this way: The function $$\Phi(u,v):=\int_{B_u} f(v,x)\>{\rm d}x$$ of two variables is precomposed with the function $$t\mapsto\bigl(u(t),v(t)\bigr):=(t,t)\qquad(t>0)\ ,$$ and we are told to compute the derivative of the function $$\phi(t):=\Phi\bigl(u(t),v(t)\bigr)$$ with respect to $t$. According to the chain rule we have $$\phi'(t)=\Phi_u\bigl(u(t),v(t)\bigr)u'(t)+\Phi_v\bigl(u(t),v(t)\bigr)v'(t)=\Phi_u\bigl(t,t\bigr)+\Phi_v\bigl(t,t\bigr)\ .\tag{1}$$ The basic form of Leibniz' rule tells us that $$\Phi_v(u,v)=\int_{B_u}f_{.1}(v,x)\>{\rm d}x\ .$$ In order to compute $\Phi_u$ we look at $$\Phi(u+h,v)-\Phi(u,v)=\int_{B_{u+h}\setminus B_u}f(v,x)\>{\rm d}x\tag{2}$$ for $0<h\ll1$. The domain of integration then is a spherical shell of thickness $h$. Partition this shell into $N$ tiny fragments of area $\omega_k$, and choose a sampling point $x_k$ in each of these fragments. The integral on the right hand side of $(2)$ then is approximatively equal to the Riemann sum $$\sum_{k=1}^N f(v,x_k)\omega_k h\ .$$ This makes it plausible that $${\Phi(u+h,v)-\Phi(u,v)\over h}\approx \sum_{k=1}^N f(v,x_k)\omega_k\ ,$$ and that in the limit $h\to0+$ we have $$\Phi_u(u,v)=\int_{S_u}f(v,x)\>{\rm d}\omega\ ,$$ whereby now the integral is over the sphere $S_u$ of radius $u$.
Plugging everything into $(1)$ we obtain $$\phi'(t)=\int_{B_t}f_{.1}(v,x)\>{\rm d}x+\int_{S_t}f(v,x)\>{\rm d}\omega\ .$$
We can formulate this derivative starting with the definition, and making some minor assumptions about the smoothness of $f$ and $B$. \begin{align} \frac{d}{dt}\int_{B(t)}f(\vec x,t)d\vec x & = \lim_{\Delta\to 0}\frac{1}{\Delta}\left[\int_{B(t+\Delta)}f(\vec x,t+\Delta)d\vec x-\int_{B(t)}f(\vec x,t)d\vec x\right] \\ & = \int_{B(t)}\lim_{\Delta\to 0}\frac{1}{\Delta}\left[f(\vec x,t+\Delta)+f(\vec x,t+\Delta)\right]d\vec x-\lim_{\Delta\to 0}\frac{1}{\Delta}\int_{B(t+\Delta)\setminus B(t)}f(\vec x,t+\Delta)d\vec x \\ & = \int_{B(t)}\frac{\partial}{\partial t}f(\vec x, t)d\vec x+\lim_{\Delta\to 0}\frac{1}{\Delta}\int_{B(t+\Delta)\setminus B(t)}f(\vec x,t)d\vec x \end{align} The first term is self explanatory. The second can be thought of as integrating $f$ over the shell of expansion of $B$ on the interval $(t, t+\Delta)$. This shell has thickness equal to $\Delta$ multiplied by the magnitude of the surface velocity of $B$, which I'll call $\vec v_B(\vec x, t)$. If the domain of integration is strictly expanding we can write: $$\frac{d}{dt}\int_{B(t)}f(\vec x,t)d\vec x = \int_{B(t)}\frac{\partial}{\partial t}f(\vec x, t)d\vec x+\int_{\partial B(t)}f(\vec x,t)|\vec v_B(\vec x, t)|d\vec \sigma$$ In the case of a ball the surface velocity is simply $|\vec v_B(\vec x, t)|=\frac{dr}{dt}$. As an alternative for the general case, it might be useful to think in terms of the characteristic function of $B$, though the derivative of this function will not be well behaved.