0

If you Solve an equation, you obtain all solutions.

But If you NMinimize a function, you only get one minimum.

The question is: is there a way to obtain all minima of a given function?

Example:

Solve[((x - 2) (x + 2))^2 == 0, x]
Print["____________"]
NMinimize[((x - 2) (x + 2))^2, x]
NMinimize[ {((x - 2) (x + 2))^2, x >= 0}, x]

yields

{{x -> -2}, {x -> -2}, {x -> 2}, {x -> 2}}
____________
{0., {x -> -2.}}
{0., {x -> 2.}}

You can see that for Solve you obtain all solutions, even with their multiplicity, but in the minimization, you only obtain one solution.

Yves Klett
  • 15,383
  • 5
  • 57
  • 124
Mika Ike
  • 3,241
  • 1
  • 23
  • 38

0 Answers0