Possible Duplicate:
Minimizing a function of many coordinates

Suppose that the function $F[\vec{x}]$ computes a certain polynomial of the elements of the list $\vec{x}$. How can I use Nminimize or FindMinimum to find the vector $\vec{x}$ which minimizes the function $F[\vec{x}]$ ?

Edit: I found this question Minimizing a function of many coordinates which asks about the same thing. The answer offered there using arrays, worked for my problem as well.

  • 2
    $\begingroup$ What is your actual problem ? Doesn't really FindMinimum work ? Have you read documentation pages ? $\endgroup$
    – Artes
    Dec 29, 2012 at 16:45
  • $\begingroup$ @Artes All the examples I found in the documentation uses the elements of $\vec{x}$ explicitly in the call of FindMinimum. Suppose the length of $\vec{x}$ is too big and I want to optimize a generic function over its elements. I don't want to enumerate them one by one in the function call. $\endgroup$
    – Tarek
    Dec 29, 2012 at 16:51
  • $\begingroup$ Not sure what you mean, but seems like you need Apply, e.g. poly @@ {a, b, c, d, e, f} yields poly[a, b, c, d, e, f]. $\endgroup$
    – Artes
    Dec 29, 2012 at 16:58
  • 1
    $\begingroup$ Is the list of variables in x available? Please provide a (toy) example of the expression. $\endgroup$
    – Yves Klett
    Dec 29, 2012 at 16:59
  • 1
    $\begingroup$ Your question is incomplete and unanswerable in its present form. Please add sufficient additional detail, especially an example of the kind of input you would feed to Nminimize or FindMinimum. $\endgroup$
    – m_goldberg
    Dec 29, 2012 at 17:59


Browse other questions tagged or ask your own question.