The Maximize() and Minimize() functions find the factor values that optimize an expression. The expression is assumed to be a continuous function of the factor values.
objectiveExpression is the expression whose value is to be optimized, and can either be the expression itself, or the name of a global containing a stored expression.
The name can be followed by limits that bound the permitted values, for example name(lowerBound,upperBound).
The return value is currently the value of the objective function, if the optimization was successful, or Empty() if not.
The following example uses Minimize to find the least squares estimates of this exponential model, with data taken from the Nonlinear Example/US Population.jmp sample data table.
xx = [1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870, 1880, 1890, 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990];
yy = [3.929, 5.308, 7.239, 9.638, 12.866, 17.069, 23.191, 31.443, 39.818, 50.155, 62.947, 75.994, 91.972, 105.71, 122.775, 131.669, 151.325, 179.323, 203.211, 226.5, 248.7];
b0 = 3.9;
b1 = .022;
sseExpr = Expr(
Show( b0, b1, sse );