MathGroup Archive 2007

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

Search the Archive

Re: Minimize[] Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76349] Re: Minimize[] Problem
  • From: anguzman at ing.uchile.cl
  • Date: Sun, 20 May 2007 02:28:24 -0400 (EDT)
  • References: <f2mfj4$mh1$1@smc.vnet.net> <464F0CB0.4040401@gmail.com>

Thanks for your answer. You are right, I forgot to mention it, but  
I'm using Mathematica 5.2.

How about version 5.2.2 ?

Atte Andres Guzman


Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com> ha escrito:

> anguzman at ing.uchile.cl wrote:
>> Hello.
>>
>> Why do I get?
>>
>> In[4]:=
>> Minimize[(x^4-6 x^2+1)^2,{x}]
>> Out[4]=
>> {1,{x->0}}
>>
>> when..
>>
>> In[3]:=
>> (x^4-6 x^2+1)^2/.x->1-Sqrt[2]//Simplify
>> Out[3]=
>>
>>
>> x=0 is actually a local maximum.
>> Any answer will be appreciated.
>>
>> Atte Andres Guzman
>
> I am afraid this may be a bug in version 5.2. Even with a constraint,
> Minimize is unable to find a minimum.
>
> In[1]:=
> $Version
>
> Out[1]=
> "5.2 for Microsoft Windows (June 20, 2005)"
>
> In[2]:=
> Minimize[(x^4 - 6*x^2 + 1)^2, {x}]
>
> Out[2]=
> {1, {x -> 0}}
>
> In[3]:=
> Simplify[Minimize[{(x^4 - 6*x^2 + 1)^2, x < 0}, {x}]]
>
> Minimize::wksol: Warning: There is no minimum in the region described
> by the constraints; returning a result on the boundary. More...
>
> Out[3]=
> {1, {x -> 0}}
>
> In[4]:=
> Chop[NMinimize[(x^4 - 6*x^2 + 1)^2, {x}]]
>
> Out[4]=
> {0, {x -> -0.41421356237309503}}
>
> In[5]:=
> Chop[N[Solve[(x^4 - 6*x^2 + 1)^2 == 0, x]]]
>
> Out[5]=
> {{x -> -2.414213562373095},
>   {x -> -2.414213562373095},
>   {x -> -0.41421356237309515},
>   {x -> -0.41421356237309515},
>   {x -> 0.41421356237309515},
>   {x -> 0.41421356237309515},
>   {x -> 2.414213562373095}, {x -> 2.414213562373095}}
>
> The behavior of Minimize is correct in version 6.0.
>
> In[1]:= $Version
>
> Out[1]= "6.0 for Microsoft Windows (32-bit) (April 28, 2007)"
>
> In[2]:= Minimize[(x^4 - 6*x^2 + 1)^2, {x}]
>
> Out[2]= {(1 - 6*(-1 - Sqrt[2])^2 + (-1 - Sqrt[2])^4)^2, {x -> -1 -
>     Sqrt[2]}}
>
> In[3]:= Simplify[Minimize[(x^4 - 6*x^2 + 1)^2, {x}]]
>
> Out[3]= {0, {x -> -1 - Sqrt[2]}}
>
> In[4]:= Simplify[Minimize[{(x^4 - 6*x^2 + 1)^2, x > 0}, {x}]]
>
> Out[4]= {0, {x -> -1 + Sqrt[2]}}
>
> Regards,
> Jean-Marc



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



  • Prev by Date: Re: All permutations of a sequence
  • Next by Date: Re: Re: A harmless and amusing bug
  • Previous by thread: Re: Minimize[] Problem
  • Next by thread: change $UserDocumentsDirectory