Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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). $$

share|cite|improve this answer
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
Can you read my edited version? Thanks! – Lanz Feb 3 '13 at 4:45
@avisteiner Also, is your answer saying that I should use ordinary derivative, not partial derivative? – Lanz Feb 3 '13 at 4:47
Yes, essentially. – Avi Steiner Feb 3 '13 at 16:29

If every variable depend on other variables you have to define an independent variable and implement it into the function (as Avi Steiner stated). Otherwise there will be no analytical solution. Don't forget differentation is linear by definition.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.