Re: Re: no message from Minimize[] on a weird function(x^x)
- To: mathgroup at smc.vnet.net
- Subject: [mg96784] Re: [mg96777] Re: no message from Minimize[] on a weird function(x^x)
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Wed, 25 Feb 2009 04:01:01 -0500 (EST)
- References: <gnr1d2$ep0$1@smc.vnet.net> <200902241048.FAA23747@smc.vnet.net>
ADL wrote:
> Beyond what others have already commented, I would say that the
> problem stems with the definition of 0^0 which, in Mathematica, is
> Indeterminate.
I do not think the tests below show that to be the issue.
> In fact, even if the value of the function is
> constrained to be real positive, Minimize behavior is influenced by
> the value at 0:
>
> Minimize[{Abs[x^x], x > 0}, x] // InputForm
> {E^(-E^(-1)), {x -> E^(-1)}}
1/E<1, so there is no reason to expect that min to be at the origin.
> Minimize[{Abs[x^x], x < 0}, x] // InputForm
> {0, {x -> -Infinity}}
0<1, so...
> Minimize[{Abs[x^x], x >= 0}, x] // InputForm
> Minimize[{Abs[x^x], x >= 0}, x]
These simply show that Minimize, at heart an exact algebraic function,
does not know how to handle the input.
> In fact,
>
> 0^0
> Indeterminate
>
> but
> Limit[Abs[x^x], x -> 0]
> 1.
>
> In conclusion, Minimize does not appear to compute limits and cannot
> deal with "holes" in the function's domain.
>
> ADL
Nothing to do with 0^0 or holes in the domain. Try a variation of this
function but with extremum, in a limiting sense, at 0,
In[10]:= Maximize[{x^x, 0 < x <= 1/2}, x]
During evaluation of In[10]:= Maximize::wksol: Warning: There is no
maximum in the region in which the objective function is defined and the
constraints are satisfied; returning a result on the boundary. >>
Out[10]= {1, {x -> 0}}
When x<0 the function is not in general real valued, hence problems
arise there. NMinimize, howeverm can do sensible things with variants.
Here are two such.
In[16]:= NMinimize[{Re[x^x] + Im[x^x], -1 <= x <= 0}, x,
Method -> "DifferentialEvolution"]
Out[16]= {-1.79458, {x -> -0.687465}}
In[17]:= NMinimize[{Re[x^x] - Im[x^x], -1 <= x <= 0}, x,
Method -> "DifferentialEvolution"]
Out[17]= {-1., {x -> -1.}}
Daniel Lichtblau
Wolfram Research
- References:
- Re: no message from Minimize[] on a weird function(x^x) !?!
- From: ADL <alberto.dilullo@tiscali.it>
- Re: no message from Minimize[] on a weird function(x^x) !?!