Calculate partial derivatives $f_x(x,y)$ and $f_y(x,y)$ if $f(x,y)=\int_{\int_y^xg(t)dt}^{\int_x^yg(t)dt}g(t)dt$
Idea: if $G'(t)=g(t)$ for all $t$. Then $\int_y^xg(t)dt= G(x)-G(y)$ and $\int_x^yg(t)dt=G(y)-G(x)$. Hence $f(x,y)=\int_{\int_y^xg(t)dt}^{\int_x^yg(t)dt}g(t)dt=\int_{G(x)-G(y)}^{G(y)-G(x)}g(t)dt=G(G(y)-G(x))-G(G(x)-G(y))$.
Then
$f_x(x,y)=-G'(G(y)-G(x))G'(x)-G'(G(x)-G(y))G'(x)=-g(x)(g(\int_x^yg(t)dt)+g(\int_y^xg(t)dt))?$
Is correct my idea?
Thanks...
Leibniz integral rule to the rescue:
$$\frac{d}{d x}\left(\int_{a(x)}^{b(x)} f(x, t) d t\right)=f(x, b(x)) \cdot \frac{d}{d x} b(x)-f(x, a(x)) \cdot \frac{d}{d x} a(x)+\int_{a(x)}^{b(x)} \frac{\partial}{\partial x} f(x, t) d t$$
Applying this formula to $I=I(x, y)=\int_x^y g(t) dt$ yields $\frac{d}{d x} I(x, y) = - g(x)$ and $\frac{d}{d y} I(x, y) = g(y)$.
Now, using $I(y,x)=-I(x,y)$ we can apply the rule a second time to the integral we are interested in:
$$\begin{aligned} \frac{d}{d x}\left(\int_{-I(x,y)}^{I(x,y)} g(t) d t\right) &= g(I)\frac{d}{d x}I(x, y) - g(-I)\frac{d}{d x}(-I(x,y)) \\ &=-g(x)\big(g(I)+g(-I)\big) \end{aligned}$$
which agrees with your result. In fact, your idea can be used to actually proof Leibniz's formula.
If we like to we can also use recursiveness of the problem and the chain rule
$$\begin{aligned} \frac{d}{d x}\left(\int_{-I(x,y)}^{I(x,y)} g(t) d t\right) &= \frac{d}{d x}I(-I(x,y), I(x,y)) = (-g(-I), g(I)) \cdot (g(x), -g(x))\\ &= -g(x)\big(g(I)+g(-I)\big) \end{aligned}$$