MathGroup Archive 2007

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

Search the Archive

Re: Two successive FindMinimum -> Bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74352] Re: Two successive FindMinimum -> Bug?
  • From: Peter Pein <petsie at dordos.net>
  • Date: Mon, 19 Mar 2007 02:09:09 -0500 (EST)
  • References: <etik3j$j32$1@smc.vnet.net>

Dmitry Garanin schrieb:
> Hi All,
> 
> I am trying to solve a problem that requires application of FindMinimum (or similar rutines two times and it does not work. Here is a simplified example:
> 
> 
> fxt[x_,t_]=(x^2-t)^2  (* Searching for a minimal t for which fxt turns to zero *)
> tminx[x_]:=t/.FindMinimum[fxt[x,t],{t,1}][[2]] (* Finding the minimizing t for a given x *)
> tminabs=FindMinimum[tminx[x],{x,1}]  (* Minimizing this t with respect to x. The result should be tminabs=0 at x=0 *)
> 
> The last command here does not work since, evidently tminx[x] (that is x^2 for us humans) is not treated as a regular function.
> 
> Is there a bug here or I am doing something wrong??
> 
> Help is appreciated.
> 
> 
> http://profiles.yahoo.com/dgaranin
> 

Hi Dmitry,

either define tmin as a function of numerical arguments:

tmin[x_?NumericQ]:=...

or (for simple functions fxt)

tmin[x_]:=
  t /. ToRules[Reduce[D[fxt[x,t],t] == 0 && D[fxt[x,t], {t,2}] > 0, t]]

hth,
Peter


  • Prev by Date: Re: Definite Integration vs Newton-Leibniz formula
  • Next by Date: Re: Noob evaluation question
  • Previous by thread: Re: Two successive FindMinimum -> Bug?
  • Next by thread: Re: Two successive FindMinimum -> Bug?