Daniel B. answered 10/23/22
A retired computer professional to teach math, physics
In general, a maximum or a minimum occurs either at a critical point or on the boundary.
Lets first consider the boundary, which is the unit circle
x² + y² = 1
This circle does not have any boundary itself, such as end points.
Therefore the minimum or maximum of f(x, y) restricted to the circle
must occur at a critical point of the function F:
F(x, y, λ) = f(x, y) - λ(x² + y² - 1) = x + y + 4 - λ(x² + y² - 1)
(This last statement about F is what is meant by the method of gradients,
or Lagrange multipliers.)
The critical points of F are those satisfying
0 = ∂F/∂x = 1 - 2λx (1)
0 = ∂F/∂y = 1 - 2λy (2)
0 = ∂F/∂λ = -(x² + y² - 1) (3)
From equation (1)
x = 1/2λ (4)
From equation (2)
y = 1/2λ (5)
Substituting both into (3)
1/4λ² + 1/4λ² - 1 = 0
Rearrange into
λ² = 1/2
which has two solutions λ = 1/√2 and -1/√2.
When we plug those two solutions into (4) and (5) we get the critical points
(√2/2, √2/2) and (-√2/2, -√2/2)
(These are candidates for being maxima and minima of the function f(x,y).)
The corresponding function values are
f(√2/2, √2/2) = √2 + 4
f(-√2/2, -√2/2) = -√2 + 4
The other candidates for maximum or minimum are critical points of the function f(x,y)
on the open domain of the inside of the circle x² + y² < 1
Those critical points satisfy
0 = ∂f/∂x = 1
0 = ∂f/∂y = 1
That means f(x, y) has no critical points.
Therefore the maximum of f(x, y) on the unit disk occurs at (√2/2, √2/2),
and the minimum occurs at (-√2/2, -√2/2),