MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

optimization nested in root-finding

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64984] optimization nested in root-finding
  • From: "E. Neely Atkinson" <eatkinso at mdanderson.org>
  • Date: Fri, 10 Mar 2006 05:15:16 -0500 (EST)
  • Organization: M. D. Anderson Cancer Center
  • Sender: owner-wri-mathgroup at wolfram.com

I want to find some zeros of a function f(x). The evaluation of
f in turn requires finding a minimum. For a simple example.

obj2[x_, y_] := (x - 2)^2 + (y - 3)^2

f2[x_] :=  
 Module[
    {y},    
    FindMinimum[obj2[x, y], {y, 0}][[1]]
    ]

Thus, f2[x] is the minimum value obj[x,y] can take for a
given fixed x.

Now, I can plot f2[x] and all is well. However, when
I try to solve f2[x]==5, I have trouble.

FindRoot[f2[x] == 5, {x, 1, 1.01}]

complains and returns. I am sure I am doing something silly,
but I am having a slow-brain day and would appreciate any help.

Neely Atkinson
Department of Biostatistics and Applied Mathematics
M. D. Anderson Cancer Center

eatkinso at mdanderson.org


  • Prev by Date: Problems with graphic output under linux
  • Next by Date: Content and Presentation MathML
  • Previous by thread: Problems with graphic output under linux
  • Next by thread: Re: optimization nested in root-finding