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 a, if f(a)≥f(x) when x is near a.
For minimum:
A function of one variable has local minimum at a, if f(a)≤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)≥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)≤f(x,y) when (x,y) is near (a,b).
For absolute max/min, we define them as:
If f(a,b)≥f(x,y) for any (x,y)∈D, we have an absolute maximum.
If f(a,b)≤f(x,y) for any (x,y)∈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) ∃
For two variables, this is the same:
Theorem 1
If a function of two variables has local min/max at (a,b), then fx(a,b)=0 and fy(a,b)=0 given that fx(a,b) and fy(a,b) exists.
Proof
Let (a,b) be a point of local maximum and fx(a,b) and fy(a,b) exists. f(a,b)≥f(x,y) when (x,y) near (a,b).
In particular, take y = b:
f(a,b)=f(x,b) ∣ x near aLet 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)=0Which is just the same as:
fx(a,b)=0Similarly, for fy(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.
Let’s properly define what we’ve covered so far:
Definition 2 (Critical point)
(a,b) is a critical point if ∇f(a,b)=0 or ∇f(a,b) ∄
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 1
Find the critical point(s) for the function:
f(x,y)=x2+y2−2x−6y+14Let’s use our definition:
∇f=0⟨2x−2,2y−6⟩=0We 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 ∣ local minf′′(a)<0 ∣ local maxf′′(a)=0 ∣ 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) 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)=fxx(a,b)fyy(a,b)−(fxy(a,b))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 point
Example 2
Let f(x,y)=x2−y2 Find critical point(s):
∇f=0\lange2x,−2y⟩=0This means (0,0) is a critical point:
fxx=2fyy=−2fxy=0This means:
D=−4 ∣ saddle point
Let’s take one last example
Example 3
Find local min/max/saddle points, f(x,y)=x4+y4−4xy+1
∇f=0⟨4x3−4y,4y3−4x⟩=0{4x3−4y=04y3−4x=0Solving this equation system we find that:
{x=0x=±1{y=0y=±1Let’s now find the 2nd order partial derivates:
fxx=12x2fyy=12y2fxy=fyx=−4D=144x2y2−16⎩⎨⎧D(0,0)=−16 ∣ saddle pointD(1,1)=128 ∣ local minimumD(−1,−1)=128 ∣ local minimum