Skip to content
Prev 299459 / 398503 Next

Help in Optimization of a function

This looks like a homework trap set up to catch those trying to use facilities like Rhelp.

f = exp(x^2-y+z^(-1))= exp(x^2) * exp(1/z)/exp(y)

To maximize clearly needs biggest x (37), smallest y (2) and a z that
makes exp(1/z) big -- 0. Except that you'll get Inf etc.

Actually, several of the optimization tools in R don't do too badly on this (about half of
the routines in optplus (the R-forge version of optimx) get reasobable answers, but there
are some oddities depending on starting values.

JN
On 07/08/2012 06:00 AM, r-help-request at r-project.org wrote: