Maximum-Finder Utility for
f(M) = a1cos(M)sin2(M) + a2cos2(M)sin2(M) + a3
This page contains a routine that numerically finds a local maximum of the equation presented above on the interval specified by the user.
"Algorithms for Minimization Without Derivatives"
Prentice - Hall, Inc.
To increase the flexibility of this utility, the user is given fields into which values can be entered for the constants a1, a2, and a3. If any of the three terms in this equation is not required, just enter 0's for the appropriate a constant(s).
In addition to the a values, the user must enter a range, [b, c], over which a local maximum will be sought for this function. These values represent time variables, from which M is calculated as M = (2πt)/T. T is the period of the motion, which must be entered by the user as well.
The user should ensure that a local maximum is included on this interval before entering these values. Otherwise, the result may be meaningless. The user must try again, entering b and c values such that a local maximum is contained on the interval.
Even before using this utility, an observation may be made:
If a1 and a2 are 0, but a3 is non-zero, the function is a straight line; its maximum is the constant value of the function itself.