Taking the derivative of an Integral I would like to express the derivative of an integral in as elegant a form as possible. However, I am struggling at the moment. I would like to find the derivative $f'(y)$ of the function
$f(y) = \int_{h(y)}^{g(y)}u(x,y)\,\mathrm{d}x$
in terms of only the functions $g$, $h$ and $u$ which can be assumed to be sufficiently well behaved.
 A: First of all, it is sufficient to know how to do it for an expression of the form
$f(y) = \int_{0}^{g(y)}u(x,y)\,\mathrm{d}x$
since $\int_{h(y)}^{g(y)}u(x,y)\,\mathrm{d}x=\int_{0}^{g(y)}u(x,y)\,\mathrm{d}x-\int_{0}^{h(y)}u(x,y)\,\mathrm{d}x$.
Now, consider the integration as a function $F$ of its upper bound and the second variable of $u$; that is,
$$f(y) = F(y, g(y))$$
where 
$$F(y, t) = \int_{0}^{t}u(x,y)\,\mathrm{d}x$$
You then have, using the chain rule
$$
\begin{align*}
f^\prime(y) &= F(y, g(y)) = \frac{\partial}{\partial y}F(y, g(y)) + g^\prime(y)\frac{\partial}{\partial t}F(y, g(y)) \\
&= \int_{0}^{g(y)}\frac{\partial u}{\partial y}(x,y)\,\mathrm{d}x + g^\prime(y)\cdot u(g(y),y)
\end{align*} $$
A: Setting
$$
U(x,y)=\int_{a}^xu(t,y)\,dt
$$
for some $a$ such that $(x,y) \mapsto U(x,y)$ is well-defined, 
we have
$$
f(y)=\int_a^{g(y)}u(t,y)\,dt-\int_a^{h(y)}u(t,y)\,dt=U(g(y),y)-U(h(y),y).
$$
It follows that
\begin{eqnarray}
f'(y)&=&g'(y)\partial_1U(g(y),y)+\partial_2U(g(y),y)-h'(y)\partial_1U(h(y),y)-\partial_2U(h(y),y)\\
&=&g'(y)u(g(y),y)-h'(y)u(h(y),y)+\partial_2U(g(y),y)-\partial_2U(h(y),y)\\
&=&g'(y)u(g(y),y)-h'(y)u(h(y),y)+\int_a^{g(y)}\frac{\partial u}{\partial y}(t,y)\,dt-\int_a^{h(y)}\frac{\partial u}{\partial y}u(t,y)\,dt\\
&=&g'(y)u(g(y),y)-h'(y)u(h(y),y)+\int_{h(y)}^{g(y)}\frac{\partial u}{\partial y}(t,y)\,dt.
\end{eqnarray}
A: Ok so here it is:
Let $U(x,y)$ be the antiderivative of $u(x,y)$ with respect to $x$, i.e. $\frac{\partial U}{\partial x} = u(x,y)$. Then
$f(y) = U(g(y),y) - U(h(y),y)$.
Now using the chain rule,
$f'(y) = \frac{\partial U}{\partial g} g'(y) + \frac{\partial U}{\partial y}(g,y)- [\frac{\partial U}{\partial h} h'(y) + \frac{\partial U}{\partial y}(h,y)]$.
Since $\frac{\partial U}{\partial g} = u(g(y),y)$ and $\frac{\partial U}{\partial h} = u(h(y),y)$, we get
$f'(y) = u(g(y),y) \,g'(y) -u(h(y),y) \,h'(y) + \frac{\partial U}{\partial y}(g,y)- \frac{\partial U}{\partial y}(h,y)$ 
which is just
$u(g(y),y) \,g'(y) -u(h(y),y) \,h'(y) + \int_{h(y)}^{g(y)}u_y(x,y)\,\mathrm{d}x$
