## 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:

$\displaystyle \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, $\displaystyle \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 $\displaystyle \vec x$ on the area $\displaystyle A$ of the surface and direction $\displaystyle \vec\omega_i$ on the hemisphere $\displaystyle \Omega_i$ of directions above it. The flux is weighted by the BRDF function $\displaystyle f$ which can also vary with position $\displaystyle \vec x$ and direction $\displaystyle \omega_i$.

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

$\displaystyle \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 $\displaystyle f\left(\vec\omega_i, \vec\omega\right)$ so that I can write the entire integrand as one large derivative with respect to $\displaystyle A$, then move the $\displaystyle \frac{d}{dA}$ outside the integral. Am I on the right track here?