# Differentiation under the Integral sign for the Lebesgue integral

I want to prove the following version of Liebniz's Rule:

Let $f:[a,b]\times [c,d]\to \mathbb{R}$ be integrable with respect to the first variable, $\phi,\psi:[c,d]\to [a,b]$ be differentiable and let $F:[c,d]\to \mathbb{R}$, \begin{equation}F(y)=\int_{\phi(y)}^{\psi (y)}f(x,y)\, dx\end{equation} If $f$ is partially differentiable with respect to $y\in [c,d]$ and there exists an integrable functions $g:[a,b]\to \mathbb{R}$ so that \begin{equation}\forall x\in [a,b]\ \left|\partial_y f(x,y)\right|\le g(x)\end{equation} then $F$ is differentiable in $[c,d]$ and it holds \begin{equation}F'(y)=f(\psi(y),y)\psi'(y)-f(\phi(y),y)\phi'(y)+\int_{\phi(y)}^{\psi(y)}\partial_yf(x,y)\, dx\end{equation} almost everywhere in $[c,d]$.

Proof: By linearity it suffices to deal with constant $\phi(y)=a$. Now let $y_n\to y$ in $[c,d]$ with $y_n\neq y$. Then,

\begin{equation}\frac{F(y_n)-F(y)}{y_n-y}=\frac1{y_n-y}\left(\int_{a}^{\psi (y_n)}f(x,y_n)\, dx-\int_{a}^{\psi (y)}f(x,y)\, dx\right)=\\ \frac1{y_n-y}\left(\int_{a}^{\psi (y_n)}f(x,y_n)-f(x,y)\, dx\right)+\frac1{y_n-y} \int_{\psi(y)}^{\psi (y_n)}f(x,y)\, dx\end{equation}

The limit of the second term is essentialy the derivative of $\int_a^{\phi(t)}f(x,y) dx$ with respect to $t$ at $y$. By Lebesgue's differentiation theorem, \begin{equation}\lim_{y\to +\infty}\frac1{y_n-y}\int_{\psi(y)}^{\psi (y_n)}f(x,y)\, dx=f(\psi(y),y)\psi'(y)\end{equation} almost everywhere.

For the first term, consider the integrable function \begin{equation}h_n(x)=\frac{f(x,y_n)-f(x,y)}{y_n-y}\end{equation} By the Mean Value Theorem there exists some $\xi_{n,x}$ between $y_n$ and $y$ with \begin{equation}h_n(x)=\frac{f(x,y_n)-f(x,y)}{y_n-y}=\partial_yf(x,\xi_{n,x})\end{equation} By the Dominated Convergence Theorem, as $h_n(x)\to \partial_yf(x,y)$, \begin{equation}\int_a^{\psi(y_m)}\partial_yf(x,t)\, dx=\lim_{n\to+\infty}\frac1{y_n-y}\left(\int_{a}^{\psi (y_m)}f(x,y_n)-f(x,y)\, dx\right) \end{equation} and so by the continuity of the integral, \begin{equation}\lim_{m\to+\infty}\lim_{n\to+\infty}\frac1{y_n-y}\left(\int_{a}^{\psi (y_m)}f(x,y_n)-f(x,y)\, dx\right)=\int_a^{\psi(y)}\partial_yf(x,y)\, dx\end{equation} and similarly, \begin{equation}\lim_{n\to+\infty}\lim_{m\to+\infty}\frac1{y_n-y}\left(\int_{a}^{\psi (y_m)}f(x,y_n)-f(x,y)\, dx\right)=\int_a^{\psi(y)}\partial_yf(x,y)\, dx\end{equation}

As I asked here earlier today we can't deduce that \begin{equation}\lim_{n\to+\infty}\frac1{y_n-y}\left(\int_{a}^{\psi (y_n)}f(x,y_n)-f(x,y)\, dx\right)=\int_a^{\psi(y)}\partial_yf(x,y)\, dx\end{equation} So how do we proceed?

First, of all note that if you consider φ and ψ as variables which are dependent on y, then you obtain: $$F(y)=\int_\phi^\psi (x,y)dx=H(\phi,\psi,y)$$ Now differentiate, and by application of Leibniz's rule you obtain: $$F'(y)= \frac{\partial H}{\partial \phi}\frac{d \phi}{dy}+ \frac{\partial H}{\partial \psi}\frac{d \psi}{dy}+\frac{\partial H}{\partial y}$$
It's easy now to see that : $$\frac{\partial H}{\partial \psi}=f(\psi,y), \frac{\partial H}{\partial \phi}=-f(\phi,y)$$ also since $|\frac{\partial f(x,y)}{\partial y}|\leq g(x)$, by applying dominated convergence theorem we can put the derivative inside the integral:$$\frac{\partial H}{\partial y}=\int_\phi^\psi\frac{\partial f(x,y)}{\partial y}dx$$ and combining the above relations we obtain the desired result.