On Jul 8, 2012, at 16:52 , John C Nash wrote:

> 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.

As the function is unbounded in z, you can't really fault optimizers for not 
optimizing over x and y, can you? Or do you see other kinds of oddities?

-pd


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to