# partial differentiation or total differentiation?

Suppose that there is function $f(x_1, x_2, \ldots, x_n)$. We want derive the condition that we should impose on $x_i$, one of the variables of function to get the maximum value of function (suppose that function has no minimum value.). However, each variable of function itself is a function of other variables. In this case, should I use total differentiation or partial differentiation?

Function is assumed to be continuous in $\mathbb{R}^2$ when drawn against domain $x_i$.

Edit: $x_1$ depends on $x_2, \ldots, x_n$ and $x_2$ depends on $x_1, x_3, \ldots,x_n$ and so on. Would this case be same as having one independent variable and various functions on this variable?

-
But which variable(s) are you allowing to vary? – Avi Steiner Feb 3 '13 at 4:44
$x_i$. So this means that based on $x_i$, other variables will change - just that other variables will change according to $x_i$ and all other variables except itself. – Lanz Feb 3 '13 at 4:48

Let's assume $x_i$ is just $x_1$. If I understand you correctly, this $x_1$ is the only independent variable hanging around. Therefore, $x_2,x_3,\ldots,x_n$ all depend on $x_1$. In other words, they're all functions of $x_1$. Ultimately, replacing $x_1$ with the letter $t$ to make things easier to read, we want to find the value of $t$ which maximizes the function $$g(t) = f(t,x_2(t),x_3(t),\ldots,x_n(t)).$$ In order to do this, we need to figure out where the derivative $g'(t)$ vanishes, and to calculate $g'(t)$, we use the chain rule and partial derivatives: $$g'(t) = f_{x_1}\!(t,x_2(t),x_3(t),\ldots,x_n(t)) + \sum_{j=2}^n f_{x_j}\!(t,x_2(t),x_3(t),\ldots,x_n(t))\,x_j'\!(t).$$
If the independent variables are $s$ and $t$, in the same way your function is "just" a function of $s$ and $t$, and you want both patial derivatives to be zero at the maximum. – vonbrand Feb 3 '13 at 4:40