Artificial Intelligence 🤖
Stationary points: multi-variable functions

Stationary Points: Multi-variable functions

We now move on to multi-variable functions. Again, we start off considering a function of two variables, f=f(x,y)f=f(x, y) and a point, (a,b)(a, b) in the domain of ff.

Let (x,y)=(a,b)(x, y)=(a, b) be a point in the domain of f(x,y)f(x, y). Then, the point (a,b)(a, b) is a

local minimum if f(x,y)f(a,b)\quad f(x, y) \geq f(a, b) when (x,y)(x, y) is near (a,b)(a, b)

local maximum if f(x,y)f(a,b)\quad f(x, y) \leq f(a, b) when (x,y)(x, y) is near (a,b)(a, b)

global minimum if f(x,y)f(a,b)(x,y)f(x, y) \geq f(a, b) \forall(x, y) in domain of ff

global maximum if f(x,y)f(a,b)(x,y)f(x, y) \leq f(a, b) \forall(x, y) in domain of ff

The above definitions are shown graphically in Fig. 1.9:

Figure 1.9: Plot of a function f(x,y)f(x, y) showing stationary points. The global maximum is shown at the point (0.5,1.2)(0.5,1.2) while a local maximum is shown at (1,1.2)(-1,-1.2). The global minimum is shown at (0.6,1)(0.6,-1) and a local minimum is shown at (1.2,1)(-1.2,1). Note that the global extrema are also local extrema near their respective points.

The function has four extrema (The term 'extrema' (singular: extremum) refers to minimum or maximum values): two minima and two maxima; these are labelled in Fig. 1.9. A local extreme value is a value f(a,b)f(a, b) that is a maximum or minimum near the point (a,b)(a, b). A global extreme value represents the maximum or minimum value of a function ff on a given domain, DD i.e. these are the absolute extreme values of ff on DD.

Local minima and maxima

Consider a function f(x,y)f(x, y) defined on a domain, DD and the point (a,b)(a, b) is in the domain of ff. Then, ff has a local maximum or minimum if

f(a,b)=0\nabla f(a, b)=0

this means we have zero partial derivatives at (a,b)(a, b), i.e. fx(a,b)=0f_{x}(a, b)=0 and fy(a,b)=0f_{y}(a, b)=0.

It is clear to see where Theorem 1.5 comes from by considering the singlevariable case. Let us define g(x)=f(x,b)g(x)=f(x, b), where bb is a fixed point. Then, by Theorem 1.3, gg has a local maximum (or minimum) at x=ax=a if g(a)=0g^{\prime}(a)=0, i.e. fx(a,b)=0f_{x}(a, b)=0. Similarly, by defining h(y)=f(a,y)h(y)=f(a, y) and re-using Theorem 1.3, we have h(y)=0h^{\prime}(y)=0 and hence fy(a,b)=0f_{y}(a, b)=0.

Definition 1.5 Consider a function f(x,y)f(x, y). The point (a,b)(a, b) is a critical point (or stationary point) of ff if

f(a,b)=0. \nabla f(a, b)=0 .

Being critical is necessary for a local maximum or local minimum. In other words, local maxima and minima must be looked for among critical points. Example 1.12 Suppose we have a function f(x,y)f(x, y) given by f(x,y)=x2+y22x6y+14f(x, y)=x^{2}+y^{2}-2 x-6 y+14. Determine any critical points.

Solution We need to compute the partial derivatives of ff, i.e. fx,fyf_{x}, f_{y} and set them to zero to find any critical points. So, we need to solve the following 2 equations:

fx=2x2=0,fy=2y6=0. f*{x}=2 x-2=0, \quad f*{y}=2 y-6=0 .

Equations (1.41) give x=1x=1 and y=3y=3. There is only one critical point and it occurs at (a,b)=(1,3)(a, b)=(1,3).

In Example 1.12, we found one critical point but at this point we did not classify it as maximum or minimum. In fact, not all critical points are maxima or minima; a stationary point can also be classified as a saddle point. To determine the nature of the critical points, we use the second derivative test given by Theorem 1.6.

Second derivative test

Consider a function f(x,y)f(x, y) that has continuous partial derivatives. Suppose that fx(a,b)=0f_{x}(a, b)=0 and fy(a,b)=0f_{y}(a, b)=0. Now take the Hessian matrix [see Eq. (1.13)], evaluated at the point (a,b)(a, b), and define its determinant, i.e.

D=Hf(a,b)=fxx(a,b)fxy(a,b)fyx(a,b)fyy(a,b)=fxx(a,b)fyy(a,b)[fyx(a,b)]2.D=|\mathcal{H} f(a, b)|=\left|\begin{array}{cc} f*{x x}(a, b) & f*{x y}(a, b) \\ f*{y x}(a, b) & f*{y y}(a, b) \end{array}\right|=f*{x x}(a, b) f*{y y}(a, b)-\left[f_{y x}(a, b)\right]^{2} .

Then, if

  • D>0D>0 and fxx<0(a,b)f_{x x}<0 \Rightarrow(a, b) is a local maximum;
  • D>0D>0 and fxx>0(a,b)f_{x x}>0 \Rightarrow(a, b) is a local minimum;
  • D<0(a,b)D<0 \Rightarrow(a, b) is a saddle point;
  • D=0D=0, the test is inconclusive (we need to consider higher order). Example 1.13 Consider the function f(x,y)=x4+y44xy+1f(x, y)=x^{4}+y^{4}-4 x y+1. Find the stationary points and determine whether they are local maxima, minima or saddle points.

Solution The first step is to compute the partial derivatives of ff and set them to zero:

fx=4x34y=0,fy=4y34x=0.f*{x}=4 x^{3}-4 y=0, \quad f*{y}=4 y^{3}-4 x=0 .

From Eqs. (1.42), we have the equalities y=x3y=x^{3} and y3=xy^{3}=x. Eliminating yy, gives:

0=x9x=x(x81)=x(x21)(x2+1)(x4+1).0=x^{9}-x=x\left(x^{8}-1\right)=x\left(x^{2}-1\right)\left(x^{2}+1\right)\left(x^{4}+1\right) .

Note that the terms in red are always >0>0 which means that Eq. (1.43) is equal to zero if x=0x=0 or x21=0x^{2}-1=0 (i.e. x=1x=-1 or x=1x=1 ). This gives us the following stationary points:

(0,0),(1,1),(1,1).(0,0),(1,1),(-1,-1) .

To classify the critical points, we compute the Hessian determinant given in Theorem 1.6. This requires calculation of the second-order partial derivatives, fxx,fxyf_{x x}, f_{x y} and fyyf_{y y} (recall that fxy=fyxf_{x y}=f_{y x} at each one of the critical points found). The Hessian determinant at an arbitrary point (x,y)(x, y) is given by,

D=12x24412y2=144x2y216.D=\left|\begin{array}{cc} 12 x^{2} & -4 \\ -4 & 12 y^{2} \end{array}\right|=144 x^{2} y^{2}-16 .

Evaluating Eq. (1.44) at the point (0,0)(0,0) gives,

D=16(0,0) is a saddle point. D=-16 \Rightarrow(0,0) \text { is a saddle point. }

Similarly, at the points (1,1)(1,1) and (1,1)(-1,-1) we have

D=128>0,f_xx=12>0(1,1) and (1,1) are local minima .D=128>0, f\_{x x}=12>0 \Rightarrow(1,1) \text { and }(-1,-1) \text { are local minima } .