Solution (source code)

= Solution

The <fundamental theorem of calculus> differentiates the upper endpoint, while <differentiation under the integral sign> differentiates the parameter:
$$
\boxed{\left(\frac{\partial G}{\partial\theta}\right)_k=g(\theta,k),\qquad \left(\frac{\partial G}{\partial k}\right)_\theta=\int_0^\theta\frac{\partial g}{\partial k}(x,k)dx.}
$$
These formulas hold, for example, when $g$ and its displayed parameter <partial derivative> are continuous on a neighborhood of the integration interval and the parameter value.