Optimization

Optimization is the process of finding the input to a function that minimizes or maximizes it.

Objective Function

The quantity being optimized, f(x)f(x), is the objective function or merit function. The quantities free to adjust, xx, are the design variables.

Turning Points

For a differentiable function on a closed interval, an absolute optimum can occur at an endpoint or at an interior turning point. At an interior turning point, f′(x)=0f'(x) = 0. The second derivative f′′(x)f''(x) determines the type

  • Maximum
    f′′(x)<0f''(x) < 0.
  • Minimum
    f′′(x)>0f''(x) > 0.

Saddle Points

A saddle point is a stationary point that is neither a local maximum nor a local minimum.

For a function of 2 variables, (x0,y0)(x_0, y_0) is a saddle point if

  • Stationary
    fx(x0,y0)=0f_x(x_0, y_0) = 0 and fy(x0,y0)=0f_y(x_0, y_0) = 0.
  • Indefinite curvature
    The function increases in some directions and decreases in other directions near (x0,y0)(x_0, y_0).

The Hessian test uses

D=fxx(x0,y0)fyy(x0,y0)−[fxy(x0,y0)]2D = f_{xx}(x_0, y_0)f_{yy}(x_0, y_0) - [f_{xy}(x_0, y_0)]^2
  • D>0D > 0 and fxx(x0,y0)>0f_{xx}(x_0, y_0) > 0
    Local minimum.
  • D>0D > 0 and fxx(x0,y0)<0f_{xx}(x_0, y_0) < 0
    Local maximum.
  • D<0D < 0
    Saddle point.
  • D=0D = 0
    The test is inconclusive.

One-Dimensional Optimization

One-dimensional optimization finds xx such that f′(x)=0f'(x) = 0.

Constrained and Unconstrained Optimization

  • Unconstrained optimization
    No restrictions are placed on the design variables. See steepest ascent method.
  • Constrained optimization
    Restrictions are placed on the design variables. See constrained optimization.

Local and Global Optima

A function is unimodal iff it has a single optimum. A function with more than 1 local optimum is multimodal.

Worked Examples

Example 1

Find and classify the turning points of f(x)=x3−6x2+9x+1f(x) = x^3 - 6x^2 + 9x + 1.

Solution Reveal Hide
f′(x)=3x2−12x+9=3(x−1)(x−3)f'(x) = 3x^2 - 12x + 9 = 3(x - 1)(x - 3)

f′(x)=0f'(x) = 0 at x=1x = 1 and x=3x = 3.

f′′(x)=6x−12f''(x) = 6x - 12

At x=1x = 1

f′′(1)=−6<0,f(1)=5f''(1) = -6 < 0, \quad f(1) = 5

A local maximum.

At x=3x = 3

f′′(3)=6>0,f(3)=1f''(3) = 6 > 0, \quad f(3) = 1

A local minimum.

ff has 2 local optima, so it’s multimodal. It has no global optimum on R\mathbb{R}, since f(x)→±∞f(x) \to \pm\infty as x→±∞x \to \pm\infty.

Example 2

Find and classify the turning point of f(x)=−x2+4x−1f(x) = -x^2 + 4x - 1.

Solution Reveal Hide
f′(x)=−2x+4=0  ⟹  x=2f'(x) = -2x + 4 = 0 \implies x = 2f′′(2)=−2<0,f(2)=3f''(2) = -2 < 0, \quad f(2) = 3

A maximum. ff is unimodal, so it is also the global maximum.

Example 3

Find and classify the stationary point of f(x,y)=x2−y2f(x, y) = x^2 - y^2.

Solution Reveal Hide
fx=2x,fy=−2yf_x = 2x, \qquad f_y = -2y

The stationary point is (0,0)(0, 0).

fxx=2,fyy=−2,fxy=0f_{xx} = 2, \qquad f_{yy} = -2, \qquad f_{xy} = 0D=(2)(−2)−02=−4<0D = (2)(-2) - 0^2 = -4 < 0

The stationary point (0,0)(0, 0) is a saddle point.

Wolfram Mathematica notebook

The summary notebook defines every function used in this module, with documentation and no examples, as a starting point for your own problems.

Written by November 5, 2026 2 min read
Was this helpful?