       Re: Minimize[] Problem

• To: mathgroup at smc.vnet.net
• Subject: [mg76381] Re: Minimize[] Problem
• From: dimitris <dimmechan at yahoo.com>
• Date: Sun, 20 May 2007 02:45:06 -0400 (EDT)
• References: <f2mfj4\$mh1\$1@smc.vnet.net>

```It seems there is a problem.

Note however (I copy from Help Browser)

"Even if the same minimum is achieved at several points, only one is
returned."

"An important feature of Minimize and Maximize is that they always
find global minima and maxima. Often functions will have various
local
minima and maxima at which derivatives vanish. But Minimize and
Maximize use global methods to find absolute minima or maxima, not
just local extrema. "

Anyway my goal is not to explain the problem but rather to offer a
simple
workaround.

)

In:=
f[x_] := (x^4 - 6*x^2 + 1)^2

In:=
Plot[f[x], {x, -3, 3}]

In:=
Plot[Derivative[f][x], {x, -3, 3}]

In:=
Plot[Derivative[f][x], {x, -3, 3}]

In:=
Off[General::spell1]
Print["Position of local extrema"]
ex = x /. (Reduce[f'[x] == 0, x] // {ToRules[#]} &)
Print["number of local extrema"]
Length[%%]
Print["criterion of second derivative"]
crit = {#, f''[x] /. x -> #} & /@ ex // Simplify
Print["local minima"]
min = Cases[crit, {a_, x_?Positive} -> a]
Print["local maxima"]
max = Cases[crit, {a_, x_?Negative} -> a]
On[General::spell1]

Regards
Dimitris

/  anguzman at ing.uchile.cl       :
> Hello.
>
> Why do I get?
>
> In:=
> Minimize[(x^4-6 x^2+1)^2,{x}]
> Out=
> {1,{x->0}}
>
> when..
>
> In:=
> (x^4-6 x^2+1)^2/.x->1-Sqrt//Simplify
> Out=
>
>
> x=0 is actually a local maximum.
> Any answer will be appreciated.
>
> Atte Andres Guzman
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

```

• Prev by Date: Re: Number of Differing Digits & Another Problem (want to see different ways it can be done)
• Next by Date: Re: Re: 64-bit again
• Previous by thread: Re: Minimize[] Problem
• Next by thread: Re: Minimize[] Problem