Part 6 - Maximum and minimum values

Posted on Sep 8, 2023
(Last updated: May 26, 2024)

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

For maximum:

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

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

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

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

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

If $f(a, b) \leq f(x, y)$ for any $(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) \ \exists $$

For two variables, this is the same: If a function of two variables has local min/max at $(a, b)$, then $f_x(a, b) = 0$ and $f_y(a, b) = 0$ given that $f_x(a, b)$ and $f_y(a, b)$ exists.

Proof

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

In particular, take y = b: $$ f(a, b) = f(x, b) \ | \ x \text{ near } a $$

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

We can say that $a$ is a point of local maximum: $$ g’(a) = 0 $$

Which is just the same as: $$ f_x(a, b) = 0 $$

Similarly, for $f_y(a, b) = 0$, we just choose to fix $x = 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.

Definition

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

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

In other words, if $(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

Find the critical point(s) for the function: $$ f(x, y) = x^2 + y^2 - 2x - 6y + 14 $$

Let’s use our definition: $$ \nabla f = 0 \newline \langle 2x - 2, 2y - 6 \rangle = 0 $$

We find that $x = 1$ and $y = 3$. This means $(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 $a$ is a point and $f’’(a)$ exists, then: $$ f’’(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.

2nd derivate test for functions of two variables

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

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

Then: $$ D > 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

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

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

This means $(0, 0)$ is a critical point: $$ f_{xx} = 2 f_{yy} = -2 f_{xy} = 0 $$

This means: $$ D = -4 \ | \ \text{saddle point} $$

Let’s take one last example

Example

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

$$ \nabla f = 0 \langle 4x^3 - 4y, 4y³ - 4x \rangle = 0 $$

$$ \begin{cases} 4x^3 - 4y = 0 \newline 4y^3 - 4x = 0 \end{cases} $$

Solving this equation system we find that: $$ \begin{cases} x = 0 \newline x = \pm 1 \end{cases} $$ $$ \begin{cases} y = 0 \newline y = \pm 1 \end{cases} $$

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

$$ f_{xx} = 12x^2 \newline f_{yy} = 12y^2 \newline f_{xy} = f_{yx} = -4 $$

$$ D = 144x^2y^2 - 16 $$

$$ \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} $$