## Reverse differentiation under the integral sign

Heya

I am trying to work out a formula and am pretty stuck. I have the start and I know where I want to get... but I cannot work out a couple of intermediate steps. What I have is the following integral:

$\int_{\Omega_i}f\left(\vec x, \vec\omega_i, \vec\omega\right)\frac{d^2\Phi_i}{d\Omega_i\,dA}\l eft(\vec x, \vec\omega_i\right)\,d\Omega_i$

Here, $\frac{d\Phi_i}{d\Omega_i\,dA}$ is the flux incident on a surface per unit solid angle, per unit area. The flux varies with position $\vec x$ on the area $A$ of the surface and direction $\vec\omega_i$ on the hemisphere $\Omega_i$ of directions above it. The flux is weighted by the BRDF function $f$ which can also vary with position $\vec x$ and direction $\omega_i$.

What I would like to do is move the derivative with respect to area $A$ outside the integral, essentially performing differentiation under the integral sign backwards:

$\frac{d}{dA}\int_{\Omega_i}f\left(\vec x, \vec\omega_i, \vec\omega\right)\frac{d\Phi_i}{d\Omega_i}\left(\v ec\omega_i\right)\,d\Omega_i$

The things I cannot figure out are:

a) Can I do this at all? The problem is that I have an integral over a two-dimensional space of directions... none of the "easy" explanations out there seem to cover this case.

b) If I can do it, what conditions do the functions have to fulfill? Obviously, the integral should exist in the first place or I would not even be embarking on the journey.

I am thinking that I will have to limit the BRDF to $f\left(\vec\omega_i, \vec\omega\right)$ so that I can write the entire integrand as one large derivative with respect to $A$, then move the $\frac{d}{dA}$ outside the integral. Am I on the right track here?