## Maximum-Finder Utility for |

## f(M) = a |

This page contains a routine that numerically finds a local maximum of the equation presented above on the interval specified by the user.

**References:**

Brent, Richard

"Algorithms for Minimization Without Derivatives"

Prentice - Hall, Inc.

1973

The utility posted on this page is based on the NETLIB sub-program FMIN, which is a slightly modifed version of the ALGOL 60 procedure LOCALMIN written by Richard Brent (cited above). FMIN was written in FORTRAN and has been translated to Javascript here. Although all care has been taken to ensure that the sub-routine was translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routine has been thoroughly tested and works properly. Please report any errors to the webmaster.

To increase the flexibility of this utility, the user is given fields into which values can be entered for the *constants* **a _{1}**,

**a**, and

_{2}**a**. If any of the three terms in this equation is not required, just enter

_{3}**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 **a _{1}** and

**a**are 0, but

_{2}**a**is non-zero, the function is a straight line; its maximum is the constant value of the function itself.

_{3}