I came across this problem while helping another user find the maxima of an expression for
various values of a parameter here:
For various values of ga, it was required to find the maxima in a range of 0<delta<2.
Plots of the expression indicate that one such maxima exists for each value of the parameter.
My approach was to find the zeros of the first derivative of the expression, but this failed both
with fsolve and RootFinding:-NextZero. I was quite surprised that the latter did not work.
I was able find the zeros by wrapping an eval in a procedure and running fsolve against the
procedure. This, however, was very slow.
I'd be grateful for any comments on this and suggestions for other/better ways to do it.
I also tried findindg the maxima with the DirectSearch package, which also did not work.