Solution (source code)

= Solution

Fix $x\in\mathbb R^n$ and a coordinate direction $e_i$. The <fundamental theorem of calculus> gives
$$
\frac{g(t,x+he_i)-g(t,x)}h
=\int_0^1D_i g(t,x+she_i)\,ds.
$$
For sufficiently small $h$, the points $(t,x+she_i)$ lie in a fixed compact set. The continuity of $D_i g$ makes it <uniform continuity>[uniformly continuous] there, so the right-hand side converges to $D_i g(t,x)$ uniformly in $t$. We may consequently pass the limit through the finite <integral>:
$$
\begin{aligned}
D_iG(x)
&=\lim_{h\to0}\int_0^1
\frac{g(t,x+he_i)-g(t,x)}h\,dt\\
&=\boxed{\int_0^1D_i g(t,x)\,dt}.
\end{aligned}
$$

To prove continuity, if $x_k\to x$, joint continuity makes $D_i g(t,x_k)\to D_i g(t,x)$ uniformly for $t\in[0,1]$ once the $x_k$ lie in a compact neighbourhood of $x$. Hence $D_iG(x_k)\to D_iG(x)$. This proves the stated <differentiation under the integral sign> result and the continuity of every partial derivative.