# Calculating partial derivatives of integrals

Given that $$G(x_1,x_2) = \int_{0}^{x_1}g_1(x,0)dx + \int_0^{x_2}g_2(x_1,y)dy$$ and $$\frac{\partial g_1}{\partial x_2} = \frac{\partial g_2}{\partial x_1}$$

where $g_1 : \mathbb{R} \times \mathbb{R} \to \mathbb{R}$, $g_2 : \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ How can I show that $$\frac{\partial G}{\partial x_1} = g_1(x_1,x_2)$$

-

Derivation is a linear operation, so $$\frac{\partial G}{\partial x_1} = \frac{\partial}{\partial x_1}\int_0^{x_1}g_1(x,0)\,\mathrm dx + \frac{\partial}{\partial x_1}\int_0^{x_2}g_2(x_1,y)\,\mathrm dy$$ The first term is the derivative of the integral (with respect to $x_1$), so you should know how to compute it. For the second term, you need to justify this: $$\frac{\partial}{\partial x_1}\int_0^{x_2}g_2(x_1,y)\,\mathrm dy = \int_0^{x_2}\frac{\partial g_2}{\partial x_1}(x_1,y)\,\mathrm dy.$$ There should be a theorem somewhere in your notes/books about that. Finally, just use the property $\partial g_2/\partial x_1=\partial g_1/\partial x_2$, and then the fundamental theorem of calculus should seal the deal.
I got to the same spot as you, and I am unsure how to proceed from there. I get that the first term is $g_1(x_1,0)$, but how to apply $\partial g_2/\partial x_1=\partial g_1/\partial x_2$ to second term? And will it really get down to $g_1(x_1,x_2)$? Given the first term it doesn't seems so. – Sunny88 Dec 6 '12 at 6:43
You apply $\partial g_2/\partial x_1=\partial g_1/\partial x_2$ to the right-hand side of the second equation I wrote. Then what you get is the integral of a derivative, namely the integral w.r.t the second argument, of the derivative of $g_1$ w.r.t that same second argument. So it has the form $\int f'(y)\,\mathrm dy$ for some function $f$, and you can apply the fundamental theorem of calculus. – jathd Dec 6 '12 at 7:34