TITLE: Prove that $\frac{d}{dx}\int_0^xf(x,y)dy = f(x,x)+\int_0^x\frac{\partial}{\partial x}f(x,y)dy$
QUESTION [5 upvotes]: Let $f:\mathbb{R}^2\rightarrow\mathbb{R}$.  Assume that $$\frac{d}{dx}\int_a^bf(x,y)dy=\int_a^b\frac{\partial}{\partial x}f(x,y)dy.$$
Use the above property and the chain rule to prove that
$$\frac{d}{dx}\int_0^xf(x,y)dy = f(x,x)+\int_0^x\frac{\partial}{\partial x}f(x,y)dy.$$
This doesn't seem like it should be that hard but I haven't been able to get it, I especially can't figure out how to take advantage of the chain rule.  Here's my best shot:
Let $a<x$.  Then we have
\begin{align}
\frac{d}{dx}\int_0^xf(x,y)dy &= \frac{d}{dx}\int_a^xf(x,y)dy +
\int_0^a\frac{\partial}{\partial x}f(x,y)dy.\\
&=\frac{d}{dx}(F(x,x)-F(x,a)) + \int_0^a\frac{\partial}{\partial x}f(x,y)dy.\\
&=f(x,x) - \frac{d}{dx}F(x,a)+\int_0^a\frac{\partial}{\partial x}f(x,y)dy.
\end{align}
Anyways I'm not sure where to go from here or if this is even correct, but it's the best I've been able to come up with.

REPLY [2 votes]: Actually, you can regard the integral as a composite function which chain rule can be easily used.
$$\begin{align}
\frac d{dx}\int_0^xf(x,y)dy&=\frac d{dx}\int_0^sf(x,y)dx|_{s=x}+\frac d{dx}\int_0^xf(t,y)dy|_{t=x}\\
&=\int_0^s\frac{\partial}{\partial x}f(x,y)dy|_{s=x}+f(t,x)|_{t=x}\\
&=\int_0^x\frac{\partial}{\partial x}f(x,y)dy+f(x,x)
\end{align}$$