Evaluate global maxima

Hi
I have a function “fx”, whose maximum is sought in attached file.
There is a parameter “delta”, which significantly affects the maxima of function “fx”. The values of “delta” ranges from -1.5 to 1.5.

It is observed that, when the delta is defined to have values between 0 to 0.3, the program returns local maxima, rather that the global maxima of the function. For any other value of delta between -1.5 to 1.5 (except 0 to 0.3), it always return the global maxima.

Can we designate the command, so that it always returns the global maxima of fx for phi taking values between -Pi to Pi.

Kindly see the attached file for more explanations
Thanks.

Max.nb (17 KB)

Well, as it is written in the documentation, the function FindMaximum “searches for a local maximum” and it is not a surprise that it actually finds only a local maximum when called.

I suggest using the Maximize function:

Maximize[{fx , - Pi / 2 <= phi <= Pi / 2}, phi]

At least in my experiments it evaluated to the global maximum.

The documentation for FindMaximum states in the first line: “searches for a local maximum in f, starting from an automatically selected point.” So you can’t necessarily get there from here.

However, Maximize guarantees a global maximum for certain kinds of functions.