1
$\begingroup$

I would like to automate a process to find the minimum of a non-differentiable function, perhaps using a similar system as the bisection method but adapted to finding minima instead of roots. Any ideas or tips on how to implement this or what functions to use would be greatly appreciated, thanks in advance.

$\endgroup$
  • $\begingroup$ example of function? $\endgroup$ – AccidentalFourierTransform Feb 22 at 16:07
  • $\begingroup$ Can you claim the minimum is a global one? Or that a local minima is good enough? $\endgroup$ – MikeY Feb 22 at 16:36
  • $\begingroup$ A non-differentiable function could be very badly behaving. Look at the Weierstrass function, which is continuous everywhere but differentiable nowhere. There exist no methods that can handle such functions. $\endgroup$ – yarchik Feb 22 at 16:54
  • $\begingroup$ Essentially i have a function which extracts an eigenvalue from a matrix and this eigenvalue is dependent on a parameter. I can plot the eigenvalue as a function of this parameter and see the minimum by eye but i get errors when using functions like findminimum because it cant differentiate it. $\endgroup$ – user63517 Feb 22 at 18:08
  • $\begingroup$ @KJohn when using these functions, are you using the list of eigenvalues you have created? If so, then it should be easy to find the minimum $\endgroup$ – CA Trevillian Feb 24 at 13:42
2
$\begingroup$

You can use the method "DifferentialEvolution" or "SimulatedAnnealing" in NMinimize

M = {{1, x, 2}, {-1, 3, 2}, {2, 2, 5}};
NMinimize[Max[Abs[Eigenvalues[M]]], x, Method -> "DifferentialEvolution" ]

Plot[Max[Abs[Eigenvalues[M]]], {x, -10, 0}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ This did not work for my code, I will edit my post with my code included. $\endgroup$ – user63517 Feb 24 at 13:09
  • $\begingroup$ I tried to run your code but it hangs on H2[] calculations. $\endgroup$ – Cesareo Feb 24 at 13:49