How do I evaluate these derivatives? (Involving integrals) I'm studying Green's functions, and I came acorss the following problem: To calculate $\frac{du}{dx}$, where:
$$u(x) = \int_{a}^{x} G_1(x,y)f(y)dy + \int_{x}^{b} G_2(x,y)f(y)dy$$
Where $a,b \in \mathbb{R}$, $G_1,G_2,f$ are functions. Let's first take a look at the first term:
$$u_1(x) = \int_{a}^{x} G_1(x,y)f(y)dy$$
Now, my textbook (Eugene Butkov's Mathematical Physics) says that:
$$u_1'(x) = \int_{a}^{x} \frac{\partial G_1}{\partial x} f(y)dy \quad \!\!\!\!\!+ G_1(x,x)f(x)$$
How come? I've tried to derive this formula but I couldn't go anywhere. I was able to verify it, however, in the case that $G_1(x,y)$ is a separable function $G_1(x,y)=a(x)b(y)$. Then
$$u(x) = a(x)\int_{a}^{x} b(y)f(y)dy$$
Hence, by the product rule
$$\frac{du(x)}{dx} = a'(x) \int_{a}^{x} b(y)f(y)dy \quad \!\!\!\!+ a(x)b(x)f(x)$$
Which is the verified result. However, I would like to see a proof of the formula for a more general case.  
 A: The usual trick is to "separate" the variables by defining a new function depending on more variables. I'll differentiate your $$u_1(x)= \int_a^xG_1(x,y)f(y)\,{\rm d}y$$by defining $\displaystyle{U_1(x,z) = \int_a^z G_1(x,y)f(y)\,{\rm d}y}$ and noting that $u_1(x) = U_1(x,x)$. Then $$\begin{align} u_1'(x) &= \frac{\partial U_1}{\partial x}(x,x) + \frac{\partial U_1}{\partial z}(x,x).\end{align}$$Each partial derivative is easy to compute: $$\frac{\partial U_1}{\partial x}(x,z) = \int_a^z \frac{\partial G_1}{\partial x}(x,y)f(y)\,{\rm d}y, \quad\mbox{and}\quad \frac{\partial U_1}{\partial z}(x,z) = G_1(x,z)f(z).$$So $$u_1'(x) = \int_a^x \frac{\partial G_1}{\partial x}(x,y)f(y)\,{\rm d}y + G_1(x,x)f(x),$$as wanted.
A: This is a special case of the Leibniz integral rule which states that
provided all functions involved have continuous partial derivatives then
$$
 {\frac {d}{dx}}\left(\int _{a(x)}^{b(x)}f(x,t)\,dt\right)=f{\big (}x,b(x){\big )}\cdot {\frac {d}{dx}}b(x)-f{\big (}x,a(x){\big )}\cdot {\frac {d}{dx}}a(x)+\int _{a(x)}^{b(x)}{\frac {\partial }{\partial x}}f(x,t)\,dt
$$
In your case you have
$$
 \frac{d}{dx} \left(\int_a^x G_1(x,y) f(y)dy\right)
= G_1(x,x)f(x) \frac{dx}{dx} - G_1(x,a)f(a) \frac{da}{dx} + 
\int_a^x \frac{\partial}{\partial x}G_1(x,y) f(y)dy
=  \int_a^x \frac{\partial}{\partial x}G_1(x,y) f(y)dy + G_1(x,x)f(x)
$$
The wikipedia article contains proofs of the various versions.
