Partial derivative help I need to take the partial derivatives w.r.t. $x^*$ and $y^*$ of the following equation $L(x^*,y^*;x_0,y_0)$:
$$L(x^*,y^*;x_0,y_0)=\int_{x_0}^{x^*}\frac{\partial f}{\partial x}\mathrm{d}x+\int_{y_0}^{y^*}\frac{\partial f}{\partial x}\frac{\partial x}{\partial y}\mathrm{d}y.$$
The result I'm getting for the partial derivative of $L$ w.r.t. $x^*$ doesn't seem right.  First let me expand things a little:
$$L(x^*,y^*;x_0,y_0)=f(x^*)-f(x_0)+\frac{\partial f}{\partial x}(x(y^*)-x(y_0))$$
(Important to note that $x^=x(y^)$).
I think up to here it's ok.  But now when I take the partial derivative...
$$\frac{\partial L}{\partial x^*}=\frac{\partial f}{\partial x^*}+\frac{\partial^2 f}{\partial x^{2}}(x^*-x(y_0))+\frac{\partial f}{\partial x}$$
I'm confused as to whether the second term $\frac{\partial^2 f}{\partial x^{2}}(x^*-x(y_0))$ should be included in there since, strictly speaking, it is a derivative w.r.t. $x$ and not $x^*$.  Or does the fact that $x^*=x(y^*)$ imply that this is a derivitive w.r.t. $x^*$?  The last term, on the other hand, is indeed a derivative w.r.t. $x^*$ no matter how you slice it, but then what to do with $\frac{\partial f}{\partial x}$ which might be evaluated at  x=anything and thus is effectively a random number thrown into the equation?
My intuition tells me that I should just treat $\frac{\partial^2 f}{\partial x^{2}}$ and $\frac{\partial f}{\partial x}$ here as evaluated at $x^*$, but looking at the actual equations I can't see the justification.
Appreciate any advice in this regard.
 A: If I understand correctly despite the somewhat confusing notation, then the second displayed equation is wrong -- the second term should be
$$\int_{y_0}^{y^*}\frac{\mathrm df}{\mathrm dx}\frac{\mathrm dx}{\mathrm dy}\mathrm dy=\int_{x(y_0)}^{x(y^*)}\frac{\mathrm df}{\mathrm dx}\mathrm dx=f(x(y^*))-f(x(y_0))\;.$$
Quite apart from the details, the most direct way to take the partial derivatives would be to note that $x^*$ and $y^*$ occur only in the upper integration limits, so the derivatives with respect to them are just the respective function values:
$$
\begin{align}
\frac{\partial L}{\partial x^*}&=\frac{\mathrm d f}{\mathrm d x}(x^*)\;,\\
\frac{\partial L}{\partial y^*}&=\frac{\mathrm d f}{\mathrm d x}\frac{\mathrm d x}{\mathrm d y}(y^*)\;.\\
\end{align}
$$
A: Since it seems that $f$ is a function of $x$ and $x$ is a function of $y$, there is no reason to use partial derivatives in the integrals
Simply looking at your integrals, in the first, the only free variables are $x^*$ and $x_0$, so
$$
\begin{array}{}
\frac{\partial}{\partial x^*}\int_{x_0}^{x^*}\frac{\mathrm{d} f}{\mathrm{d} x}\mathrm{d}x=\frac{\mathrm{d} f}{\mathrm{d} x}(x^*)&\text{and}&\frac{\partial}{\partial x_0}\int_{x_0}^{x^*}\frac{\mathrm{d} f}{\mathrm{d} x}\mathrm{d}x=-\frac{\mathrm{d} f}{\mathrm{d} x}(x_0)
\end{array}
$$
in the second, the only free variables are $y^*$ and $y_0$, so assuming $x^*=x(y^*)$ and $x_0=x(y_0)$
$$
\begin{array}{}
\frac{\partial}{\partial y^*}\int_{y_0}^{y^*}\frac{\mathrm{d} f}{\mathrm{d} x}\frac{\mathrm{d} x}{\mathrm{d} y}\;\mathrm{d}y=\frac{\mathrm{d} f}{\mathrm{d} x}(x^*)\frac{\mathrm{d} x}{\mathrm{d} y}(y^*)&\text{and}&\frac{\partial}{\partial y_0}\int_{y_0}^{y^*}\frac{\mathrm{d} f}{\mathrm{d} x}\frac{\mathrm{d} x}{\mathrm{d} y}\;\mathrm{d}y=-\frac{\mathrm{d} f}{\mathrm{d} x}(x_0)\frac{\mathrm{d} x}{\mathrm{d} y}(y_0)
\end{array}
$$
In either case,
$$
\int_{x_0}^{x^*}\frac{\mathrm{d} f}{\mathrm{d} x}\mathrm{d}x=f(x^*)-f(x_0)
$$
and assuming $x^*=x(y^*)$ and $x_0=x(y_0)$
$$
\int_{y_0}^{y^*}\frac{\mathrm{d} f}{\mathrm{d} x}\frac{\mathrm{d} x}{\mathrm{d} y}\;\mathrm{d}y=f(x(y^*))-f(x(y_0))=f(x^*)-f(x_0)
$$
