# Finding maximum and minimum values of 3 dimensional function

• Inveritatem
In summary, to find the maximum and minimum values of a function over a constrained region, one can use Lagrange multipliers and the gradient of the function and the constraint. However, for simpler problems, it is possible to use geometry to determine the critical points. Completing the squares can also help visualize the geometry of the function. Using calculation software or numerical methods can also provide a solution.
Inveritatem

## Homework Statement

Find the maximum and minimum values of f(x,y,z) = x^2 - 2x + y^2 - 4y + z^2 - 4z in the region x^2 + y^2 + z^2 <= 36.

## Homework Equations

Lagrange multipliers
<Fx, Fy, Fz> = lambda<Gx, Gy, Gz>

Test for local extrema
If Determinant D(x,y) < 0 it is a saddle point
If D(x,y) > 0:
If Fxx > 0, then it is a local minimum
If Fxx < 0, then it's a local maximum

## The Attempt at a Solution

Tried to solve for system of equations that result in 4 equations[/B]
2x-2 = lambda * 2x
2y-4 = lambda * 2y
2z-4 = lambda * 2z
X^2 + y^2 + z^2 = 36

I solved for lambda = 1/2 or 3/2 by solving for x y and z and substituting into the 4th equation.
I got (2,4,4) =0 and (-2,-4,-4) =72. BUT the minimum was actually (1,2,2) = -9 because I was supposed to "check the interior of the sphere". Am I just supposed to account for the possibility that lambda = 0?

For the minimum you don't need Lagrange multipliers. Setting them to zero seems to work as well.

Inveritatem said:

## Homework Statement

Find the maximum and minimum values of f(x,y,z) = x^2 - 2x + y^2 - 4y + z^2 - 4z in the region x^2 + y^2 + z^2 <= 36.

## Homework Equations

Lagrange multipliers
<Fx, Fy, Fz> = lambda<Gx, Gy, Gz>

Test for local extrema
If Determinant D(x,y) < 0 it is a saddle point
If D(x,y) > 0:
If Fxx > 0, then it is a local minimum
If Fxx < 0, then it's a local maximum

## The Attempt at a Solution

Tried to solve for system of equations that result in 4 equations[/B]
2x-2 = lambda * 2x
2y-4 = lambda * 2y
2z-4 = lambda * 2z
X^2 + y^2 + z^2 = 36

I solved for lambda = 1/2 or 3/2 by solving for x y and z and substituting into the 4th equation.
I got (2,4,4) =0 and (-2,-4,-4) =72. BUT the minimum was actually (1,2,2) = -9 because I was supposed to "check the interior of the sphere". Am I just supposed to account for the possibility that lambda = 0?

For either the max or the min, the solution will either be in the interior or on the boundary. The interior stationary point is a global min in ##\mathbb{R}^3## and obeys the constraint, so is the global min of the constrained problem. (The second-order test implies that the unconstrained stationary point is a min, but you do not need such a fancy test: just use the fact that f = sum of squares + linear to give the result automatically.)

For the way you wrote the Lagrangian equations, a positive lagrange multiplier is a necessary condition for a MAXIMUM, so both of your candidate boundary points satisfy the first-order necessary conditions for a constrained maximum. The second-order *sufficient* conditions for a max are much trickier than you may think, because you have a point on a boundary of an inequality constraint. Basically, you need to project the Hessian of the *Lagrangian* (not the function f!) down to the tangent space of the constraint, and determine if it is negative definite in that subspace.

However, in this case you can by-pass all that because you have both possible points, so can just take the one with the larger f-value.

Last edited:
In the interior of the sphere, $\nabla f= (2x- 2)\vec{i}+ (2y- 4)\vec{j}+ (2z- 4)\vec{k}$. Set that equal to 0 and solve for x, y, and z to find any critical points in the interior of the sphere. Your Lagrange multiplier method will solve for max or min among points that satisfy the equation x^2+ y^2+ z^2= 36, on the surface of the sphere. Another way to do that is to use parametric equations for the sphere: $x= 6cos(\theta)sin(\phi)$, $y= 6 sin(\theta)sin(\phi)$, $z= 6 cos(\phi)$. Putting those into the function, $f(\theta, \phi)= 36- 12cos(\theta)sin(\phi)- 24sin(\theta)si(\phi)- 24 cos(\phi)$. Set the gradient of that two variable function to 0 to find any critical points on the surface of the sphere. Find the value of the function at each critical point to determine the absolute max and min.

Sorry for the late reply. How does using the fact that the sum of the squares + linear establish that (1,2,2) is the global min? We were told to use geometry to show what the min and max are because we do not use advanced calculus to prove these mins and maxes? How can we use geometry/equations to prove these are the min and max values?

Inveritatem said:
Sorry for the late reply. How does using the fact that the sum of the squares + linear establish that (1,2,2) is the global min? We were told to use geometry to show what the min and max are because we do not use advanced calculus to prove these mins and maxes? How can we use geometry/equations to prove these are the min and max values?

The surface ##w = x^2 - 2x + y^2 - 4y + z^2 - 4z## is a bit hard to visualize, because it is a 3-dimensional object lying in 4 dimensions.

To gain insight, drop ##z## and look at the 2-dimensional surface ##w = x^2 - 2x + y^2 - 4y## in 3-dimensional ##(x,y,w)##-space. This surface is cup-shaped, opening up as we go farther and farther out in the ##(x,y)## plane; you could fashion it out of sheet metal and it would very nicely hold rainwater. Its bottom is where all derivatives = 0, and there is only one such point. Now just imagine doing the same in a higher dimension.

Alternatively, you can re-write ##f(x,y,z)## by "completing the squares"; that will show the geometry very plainly.

BTW: I did not assume you would follow my remarks about Hessians projected down into tangent subspaces and the like; I just wanted to de-rail any thoughts you might have had about looking at the second derivatives in the way you did. In this case that works for the minimum (because the minimum is the same in the unconstrained problem and the constrained problem---that is, the constraint does not affect the minimum in this case), but those simple tests would lead you very far astray in the maximization case! They would also lead you astray in other cases of minimization where the constraint is active at the solution.

Last edited:

## 1. What is the process for finding the maximum and minimum values of a 3 dimensional function?

The process for finding the maximum and minimum values of a 3 dimensional function involves setting partial derivatives to zero and solving for the critical points. These critical points are then plugged into the original function to determine the maximum and minimum values.

## 2. Can a 3 dimensional function have multiple maximum or minimum values?

Yes, it is possible for a 3 dimensional function to have multiple maximum and minimum values. This can occur when there are multiple critical points that yield the same maximum or minimum value.

## 3. Are there any shortcuts or tricks for finding the maximum and minimum values of a 3 dimensional function?

There are no shortcuts or tricks for finding the maximum and minimum values of a 3 dimensional function. The process involves setting partial derivatives to zero and solving for critical points, which can be time-consuming and require advanced mathematical knowledge.

## 4. How do the maximum and minimum values of a 3 dimensional function relate to the shape of the function's graph?

The maximum and minimum values of a 3 dimensional function are related to the shape of the function's graph by the presence of peaks and valleys. The maximum values correspond to the peaks, while the minimum values correspond to the valleys on the graph.

## 5. Can the maximum or minimum values of a 3 dimensional function change if the function is rotated or translated?

No, the maximum and minimum values of a 3 dimensional function remain the same regardless of any rotations or translations. The shape of the graph may change, but the maximum and minimum values will remain at the same points on the graph.

• Calculus and Beyond Homework Help
Replies
6
Views
1K
• Calculus and Beyond Homework Help
Replies
1
Views
527
• Calculus and Beyond Homework Help
Replies
10
Views
665
• Calculus and Beyond Homework Help
Replies
2
Views
586
• Calculus and Beyond Homework Help
Replies
18
Views
1K
• Calculus and Beyond Homework Help
Replies
9
Views
1K
• Calculus and Beyond Homework Help
Replies
8
Views
582
• Calculus and Beyond Homework Help
Replies
2
Views
623
• Calculus and Beyond Homework Help
Replies
1
Views
281
• Calculus and Beyond Homework Help
Replies
4
Views
1K