# When do the partial derivative and integral of different variables commute? [duplicate]

For which real functions $f(x,y)$ is this true?

$$\dfrac{\partial}{\partial x} \int{\mathrm dy f(x,y)} = \int{\mathrm dy \dfrac{\partial}{\partial x} f(x,y)}$$

The integrals should be interpreted as keeping $x$ constant and integrating over an interval of $y$.

-

## marked as duplicate by t.b., Nate Eldredge, Willie WongMay 10 '11 at 16:32

@J. M: Thanks, I didn't know about double-dollar or \partial. – user6701 May 10 '11 at 14:51

It is true for all functions $f(x,y)$ that are once-differentiable with respect to $x$, and such that $f(x,y)$ and $\partial f(x,y)/\partial y$ are integrable with respect to $y$.

Very roughly, differentiation and integration wrt different variables commute for the same reason that differentation and summation commute:

$$\frac{\partial}{\partial x} \sum_y f(x,y) = \sum_y \frac{\partial}{\partial x} f(x,y)$$

i.e. because differentiation is a linear operation. There are some technicalities to do with passing of limits through integral signs (to turn the sum into an integral) but the intuition is in realising that integration and summation are basically the same thing.

Also note that in your expression, the function on the left-hand side is a function of $x$ only, so your partial derivative might be more correctly expressed as a total derivative (the same comment applies to the equation in this answer - I've left it in this form to make the relationship with your equation clearer).

-
-
Thanks, that sufficiency criterion covers my case. – user6701 May 10 '11 at 14:54