I'm slightly confused about derivatives of multivariable functions evaluated at coinciding arguments.
For instance, if I have a function $f(x_1,x_2,x_3,x_4,x_5)$ such that $f(x_1,x_2,x_3,x_4,x_5=x_4) = x_2$ and $f(x_1,x_2,x_3,x_4,x_5=x_3) = x_1$. What can we find out about the derivatives of $f$ at $x_5=x_4$?
We know that $f$ is a constant there with respect to $x_1$, $x_3$ and $x_4$. So if we change any of these a bit the change must be undone by the others.
I expect that this will give that $\frac{\partial f} {\partial x_1}|_{x_5=x_4}+\frac{\partial f} {\partial x_3}|_{x_5=x_4}+ \frac{\partial f} {\partial x_4}|_{x_5=x_4} +\frac{\partial f} {\partial x_5}|_{x_5=x_4} =0$. Is this correct and if so how do I show this?
There must be a better way then to write the most general function that obeys the constraints and acting on that (although I did that for the hopefully most general function I propose below and indeed it holds).
The dependence on $x_5$ and $x_4$ is such that if $x_5=x_4$, $f$ does not depend on $x_4$. This must mean the the $x_5$ and $x_4$ dependence is of some form $g(\frac{x_5}{x_4},(x_5-x_4)h(x_5,x_4))$, right?
Moreover, if we also apply the second condition (which I edited in later, sorry) it seems that the most general function obeying these constraints is of the form
$$ h(\frac{x_5-x_3}{x_4-x_3}) x_2 + j(\frac{x_4-x_5}{x_4-x_3}) x_1 +(x_5-x_4)(x_5-x_3) k(x_1,x_2,x_3,x_4,x_5) $$
From this it follows that
$\frac{\partial}{\partial x_5} f|_{x_5=x_4} = -\frac{\partial}{\partial x_4} f|_{x_5=x_4} $ ,
by acting explicitly with the partial derivatives. The $x_5$ and $x_4$ derivative will only differ by terms proportional to $x_5-x_4$ which will vanish.
I do not know what to ask for the differentiability, but assume the function f is differentiable in all coordinates ($x_i \in \mathbb R$) (unless that is already inconsistent with things I wrote earlier). Or assume something else if you can write an interesting answer for another case.
Let's just write all the variables as $x_1,x_2,x_3,x_4,x_5$. Then your condition is that $f(x_1,x_2,x_3,x_4,x_4)=x_2$. Then we have \begin{align*} \frac{\partial f}{\partial x_1}(x_1,x_2,x_3,x_4,x_4)&=\lim_{t\to 0}\frac{f(x_1+t,x_2,x_3,x_4,x_4)-f(x_1,x_2,x_3,x_4,x_4)}{t}\\ &=\lim_{t\to 0}\frac{x_2-x_2}{t}\\ &=0. \end{align*} The same can be done to obtain $\frac{\partial f}{\partial x_3}(x_1,x_2,x_3,x_4,x_4)=0$, and we similarly get $\frac{\partial f}{\partial x_2}(x_1,x_2,x_3,x_4,x_4)=1$.
Without more information on the behavior of the function, we can't really say anything about the partial derivatives of the function with respect to the fourth and fifth variables (without some basic smoothness conditions, these may not exist at all). What we can say is that if we define $\tilde f(x_1,x_2,x_3,x_4)=f(x_1,x_2,x_3,x_4,x_4)$, then we have $\frac{\partial\tilde f}{\partial x_4}(x_1,x_2,x_3,x_4)=0$.