I have been trying to evaluate the following double integral:
$$\frac{\partial}{\partial \theta_1 \partial \theta_2} \int_{\theta_1-\theta_2}^{\theta_1+\theta_2} \int_{\theta_1 -\theta_2}^{x} u(y,x) (x-y)^{n-2} dydx $$
where $u(.)$ is a differentiable function.
I know that I can make use of Leibniz's rule but I think something goes wrong along the way.
The result I get is:
$$-u(\theta_1-\theta_2,\theta_1+\theta_2)*(2\theta_2)^n +u\prime_{\theta_2} (y,\theta_1+\theta_2) *(\theta_1+\theta_2-y)^{n-2}+(n-2)*u(y,\theta_1+\theta_2)*(\theta_1+\theta_2-y)^{n-3}-u(\theta_1-\theta_2,\theta_1+\theta_2)*(2\theta_2)^n +u\prime _{\theta_2} (\theta_1-\theta_2,x)*(x+\theta_2-\theta_1)^{n-2}-(n-2)u(\theta_1-\theta_2,x)*(x+\theta_2-\theta_1)^{n-3}$$
Could somebody do it the long way so that I can see where I went wrong and how to correctly apply Leibniz rule?
Thank you in advance
Hints:
1) Define
$$\theta_{\pm}~:=~\theta_1\pm \theta_2,$$
and note that
$$\partial_1\partial_2~=~\partial_+^2-\partial_-^2. $$
2) Assuming that we are allowed to use Tonelli's and Fubini's theorem's to interchange the order of integration, we want to consider the following double integral
$$ I(\theta_+,\theta_-)~:=~\int_{\theta_-}^{\theta_+} \!dx \int_{\theta_-}^{x} \!dy~f(x,y)~=~\int_{\theta_-}^{\theta_+} \!dy \int_{y}^{\theta_+} \!dx~f(x,y). $$
3) Also assume that
$$f(\theta_{\pm},\theta_{\pm})~=~0.$$
4) Assuming that we are allowed to differentiate under the integration sign, we get
$$ \partial_+ I ~=~ \int_{\theta_-}^{\theta_+} \!dy~f(\theta_+,y), $$
$$ \partial_+^2 I ~=~ \int_{\theta_-}^{\theta_+} \!dy~f_x(\theta_+,y), $$
$$ \partial_- I ~=~ -\int_{\theta_-}^{\theta_+} \!dx~f(x,\theta_-), $$
$$ \partial_-^2 I ~=~ -\int_{\theta_-}^{\theta_+} \!dx~f_y(x,\theta_-). $$
Here the notations $f_x(x,y):=\partial_x f(x,y)$ and $f_y(x,y):=\partial_y f(x,y)$ mean differentiation wrt. the 1st and 2nd variable, respectively.
5) Hence the result becomes
$$ \partial_1\partial_2 I ~=~\int_{\theta_-}^{\theta_+} \!dz~[f_x(\theta_+,z)+f_y(z,\theta_-)].$$