Part 6 - Maximum and minimum values

Introduction

In this part we’ll cover how we find maximum and minimum values for a function, we’ll also see how this is related to the 2nd derivative.

Maximum and minimum values

Let’s first recall how we define maximum and minimum values for functions of one variable.

Definition 1 (Local and absolute extrema)

For maximum:

A function of one variable has local maximum at aa, if f(a)f(x)f(a) \geq f(x) when xx is near aa.

For minimum: A function of one variable has local minimum at aa, if f(a)f(x)f(a) \leq f(x) when xx is near aa.

Similarly, for two variables: A function of two variables has local maximum at (a,b)(a, b) if f(a,b)f(x,y)f(a, b) \geq f(x, y) when (x,y)(x, y) is near (a,b)(a, b).

A function of two variables has local minimum at (a,b)(a, b) if f(a,b)f(x,y)f(a, b) \leq f(x, y) when (x,y)(x, y) is near (a,b)(a, b).

For absolute max/min, we define them as: If f(a,b)f(x,y)f(a, b) \geq f(x, y) for any (x,y)D(x, y) \in D, we have an absolute maximum.

If f(a,b)f(x,y)f(a, b) \leq f(x, y) for any (x,y)D(x, y) \in D, we have an absolute minimum.

How do we find these minimums and maximums?

How to find min/max

Let’s recall for functions of one variable, min/max points have derivate of zero, therefore:

f(a)=0  f(a) f'(a) = 0 \ | \ f'(a) \ \exists

For two variables, this is the same:

Theorem 1

If a function of two variables has local min/max at (a,b)(a, b), then fx(a,b)=0f_x(a, b) = 0 and fy(a,b)=0f_y(a, b) = 0 given that fx(a,b)f_x(a, b) and fy(a,b)f_y(a, b) exists.

Proof

Let (a,b)(a, b) be a point of local maximum and fx(a,b)f_x(a, b) and fy(a,b)f_y(a, b) exists. f(a,b)f(x,y)f(a, b) \geq f(x, y) when (x,y)(x, y) near (a,b)(a, b).

In particular, take y = b:

f(a,b)=f(x,b)  x near af(a, b) = f(x, b) \ | \ x \text{ near } a

Let g(x)=f(x,b)g(x) = f(x, b), this means:

g(a)=f(a,b)g(a) = f(a, b)

We can say that aa is a point of local maximum:

g(a)=0g'(a) = 0

Which is just the same as:

fx(a,b)=0f_x(a, b) = 0

Similarly, for fy(a,b)=0f_y(a, b) = 0, we just choose to fix x=ax = a instead.

Geometrical sense

In functions of one variable, at points of local min/max, the tangent line is horizontal to our point, if the line exists.

For functions of two variables, instead of a line, we have a plane. The tangent plane is horizontal to our point, if the plane exists.

Let’s properly define what we’ve covered so far:

Definition 2 (Critical point)

(a,b)(a, b) is a critical point if f(a,b)=0 or f(a,b) \nabla f(a, b) = 0 \textbf{ or } \nabla f(a, b) \ \nexists

In other words, if (a,b)(a, b) is a critical point of local minimum/maximum then it is a critical point.

However, the other way around this implication is not true. A critical point might not be a local minimum/maxium.

Example 1

Find the critical point(s) for the function:

f(x,y)=x2+y22x6y+14f(x, y) = x^2 + y^2 - 2x - 6y + 14

Let’s use our definition:

f=02x2,2y6=0\nabla f = 0 \newline \langle 2x - 2, 2y - 6 \rangle = 0

We find that x=1x = 1 and y=3y = 3. This means (1,3)(1, 3) is a critical point (and the only one!).

But how do we actually know if a critical point is a local minimum or maximum?

2nd derivate test

For functions of one variable, if we do the 2nd derivate test:

Suppose aa is a point and f(a)f''(a) exists, then:

f(a)>0  local minf(a)<0  local maxf(a)=0  does not say anythingf''(a) > 0 \ | \ \text{local min} \newline f''(a) < 0 \ | \ \text{local max} \newline f''(a) = 0 \ | \ \text{does not say anything}

Let’s see what we can do in functions of two variables.

Theorem 2 (2nd derivate test for functions of two variables)

Suppose (a,b)(a, b) is a critical point of a function, ff, of two variables. Suppose 2nd order partial derivatives exists and are continous.

Let D=D(a,b)=fxx(a,b)fyy(a,b)(fxy(a,b))2D = D(a, b) = f_{xx}(a, b) f_{yy}(a,b) - \left(f_{xy} (a,b)\right)^2

Then:

D>0 and fxx(a,b)>0  local minimumD>0 and fxx(a,b)<0  local maximumD<0  neither, this is a saddle pointD > 0 \text{ and } f_{xx}(a, b) > 0 \ | \ \text{local minimum} \newline D > 0 \text{ and } f_{xx}(a, b) < 0 \ | \ \text{local maximum} \newline D < 0 \ | \ \text{neither, this is a saddle point} \newline
Example 2

Let f(x,y)=x2y2f(x, y) = x^2 - y^2 Find critical point(s):

f=0\lange2x,2y=0\nabla f = 0 \newline \lange 2x, -2y \rangle = 0

This means (0,0)(0, 0) is a critical point:

fxx=2fyy=2fxy=0f_{xx} = 2 f_{yy} = -2 f_{xy} = 0

This means:

D=4  saddle pointD = -4 \ | \ \text{saddle point}

Let’s take one last example

Example 3

Find local min/max/saddle points, f(x,y)=x4+y44xy+1f(x, y) = x^4 + y^4 - 4xy + 1

f=04x34y,4y34x=0\nabla f = 0 \langle 4x^3 - 4y, 4y³ - 4x \rangle = 0{4x34y=04y34x=0\begin{cases} 4x^3 - 4y = 0 \newline 4y^3 - 4x = 0 \end{cases}

Solving this equation system we find that:

{x=0x=±1\begin{cases} x = 0 \newline x = \pm 1 \end{cases}{y=0y=±1\begin{cases} y = 0 \newline y = \pm 1 \end{cases}

Let’s now find the 2nd order partial derivates:

fxx=12x2fyy=12y2fxy=fyx=4f_{xx} = 12x^2 \newline f_{yy} = 12y^2 \newline f_{xy} = f_{yx} = -4D=144x2y216D = 144x^2y^2 - 16{D(0,0)=16  saddle pointD(1,1)=128  local minimumD(1,1)=128  local minimum\begin{cases} D(0, 0) = -16 \ | \ \text{saddle point} \newline D(1, 1) = 128 \ | \ \text{local minimum} \newline D(-1, -1) = 128 \ | \ \text{local minimum} \newline \end{cases}