       Nested optimization teaser

• To: mathgroup at smc.vnet.net
• Subject: [mg46047] Nested optimization teaser
• From: "Joshua A. Solomon" <J.A.Solomon at city.ac.uk>
• Date: Tue, 3 Feb 2004 18:20:51 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Consider the toy identity function egg:

In:= egg[in_]:=NMinimize[{(x-in)^2},{{x,-1,1}}][[2,1,2]]

In:= egg[#]&/@{1,2,3}
Out:= {1.,2.,3.}

Now then, clearly

In:= NMinimize[(2-a)^2,a]
Out:= {0.,{a->2.}}

However,

In:= NMinimize[(2-egg[a])^2,a]
Out:= {9.,{a->0}}

I know why this happens. What I don't know, is how to properly construct a
nested optimization so this doesn't happen. Specifically, how can I find the
minimum value (and the parameter values that produce it) of a function that
depends on the minimum value of another function, which, in turn, depends on
those same parameters?

js
--
Joshua A. Solomon
http://www.staff.city.ac.uk/~solomon

```

• Prev by Date: Re: Difference of numbers in the list
• Next by Date: Re: arnoldi method with Mathematica
• Previous by thread: Re: help for time series basic operations
• Next by thread: Re: Nested optimization teaser