1
$\begingroup$

Generally the Argmax function returns one position, where a function is maximized. Is there a easy way to obtain a list of rules for all maximizer points?

$\endgroup$
0
1
$\begingroup$
f[x_] = LaguerreL[6, x];

ArgMax[{f[x], 0 < x < 10}, x] // N

(* 8.39907 *)

The maxima occur where the derivative is zero and the second derivative is negative.

(argMax = Solve[{f'[x] == 0, f''[x] < 0}, x, Reals]) // N

(* {{x -> 2.11297}, {x -> 8.39907}} *)

Plot[f[x], {x, 0, 10},
 Epilog -> {Red, AbsolutePointSize[4],
   Point[{x, f[x]} /. argMax]}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much! $\endgroup$ – oyy Nov 25 '20 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.