Re: no message from Minimize[] on a weird function(x^x) !?!
- To: mathgroup at smc.vnet.net
- Subject: [mg96771] Re: no message from Minimize[] on a weird function(x^x) !?!
- From: dh <dh at metrohm.com>
- Date: Tue, 24 Feb 2009 05:47:23 -0500 (EST)
- References: <gnr1d2$ep0$1@smc.vnet.net>
Hi Roger, your function is more "weird" than you think, but it is not discontinuous and non-differentiable, except at zero where it is not defined. What you have is a multi valued complex function. For numerical calculations mathematica has to pick a branch, what creates problems with branch cuts. Therefore, it does not make sense to minimize x^x, but you may e.g. minimize Abs[f[x]]. Therefore, you may minimize e.g. Abs[f[x]]. hope this helps, Daniel congruentialuminaire at yahoo.com wrote: > Hello MathGroup: > > I have: > > f[x_]=x^x > Plot[f[x],{x,-3,3.}] > > What makes this a weird function is that when x<0, the function is > discontinuous and non-differentiable and has a global minimum at -1. > > To answer the question: "what is the minimum of this function", I > tried > > FindMinimum[f[x],{x,2}] (* this appears correct *) >> {0.692201, {x -> 0.367879}} > FindMinimum[f[x],{x,2}] (* this complains about the gradient, but > appears correct *) >> FindMinimum::nrgnum: The gradient is not a vector of real numbers at {x} = {-1.}. >> >> {-1., {x -> -1.}} > NMinimize[f[x], x] (* this gives the minimum in the positive domain *) >> {0.692201, {x -> 0.367879}} > Minimize[f[x], x] (* this gives no answer and no error message *) >> Minimize[x^x, x] > > Is this expected behavior? > > TIA. > > Roger Williams > Franklin Laboratory >