Use Lagrange multipliers to find the max & min

Click For Summary
SUMMARY

The discussion focuses on using Lagrange multipliers to find the maximum and minimum values of the function f(x,y) = exy subject to the constraint g(x,y) = x3 + y3 = 16. The solution involves calculating the gradients ∇f and ∇g, leading to the conclusion that the critical point occurs at (2,2) where f(2,2) = e4. To determine whether this point is a maximum or minimum, participants discuss the use of the Hessian matrix of the Lagrangian and its properties, specifically focusing on positive and negative definiteness.

PREREQUISITES
  • Understanding of Lagrange multipliers
  • Knowledge of gradient vectors and their calculations
  • Familiarity with Hessian matrices and second-order derivative tests
  • Basic concepts of multivariable calculus
NEXT STEPS
  • Study the properties of Hessian matrices in multivariable calculus
  • Learn how to apply second-order tests for constrained optimization
  • Explore examples of Lagrange multipliers with different functions and constraints
  • Investigate contour plots and their use in visualizing maxima and minima
USEFUL FOR

Students and educators in calculus, particularly those focusing on optimization techniques, as well as mathematicians interested in constrained optimization problems.

smize
Messages
78
Reaction score
1

Homework Statement



Use Lagrange multipliers to find the maximum and minimum values of the function subject to the given constraint.

f(x,y) = exy; g(x,y) = x3 + y3 = 16

Homework Equations



∇f(x,y) = λ∇g(x,y)

fx = λgx
fy = λgy

The Attempt at a Solution



∇f(x,y) = < yexy, xexy >
∇g(x,y) = < 3x2, 3y2 >

fx = λgx \Rightarrow yexy = λ3x2

fy = λgy \Rightarrow xexy = λ3y2

λ = \frac{xe^{xy}}{3y^{2}} = \frac{ye^{xy}}{3x^{2}} \Rightarrow 3x^{3}e^{xy} = 3y^{3}e^{xy} \Rightarrow x = y

Since x = y, x^{3} + y^{3} = 2x^{3} \Rightarrow 2x^{3} = 16, x = 2, y = 2

f(2,2) = e^{(2)(2)} = e^{4}

Here is where I'm having troubles. How do I determine whether it is a maximum or minimum? Could you give me more than one example? If I did anything wrong, please point it out.
 
Physics news on Phys.org
smize said:

Homework Statement



Use Lagrange multipliers to find the maximum and minimum values of the function subject to the given constraint.

f(x,y) = exy; g(x,y) = x3 + y3 = 16

Homework Equations



∇f(x,y) = λ∇g(x,y)

fx = λgx
fy = λgy

The Attempt at a Solution



∇f(x,y) = < yexy, xexy >
∇g(x,y) = < 3x2, 3y2 >

fx = λgx \Rightarrow yexy = λ3x2

fy = λgy \Rightarrow xexy = λ3y2

λ = \frac{xe^{xy}}{3y^{2}} = \frac{ye^{xy}}{3x^{2}} \Rightarrow 3x^{3}e^{xy} = 3y^{3}e^{xy} \Rightarrow x = y

Since x = y, x^{3} + y^{3} = 2x^{3} \Rightarrow 2x^{3} = 16, x = 2, y = 2

f(2,2) = e^{(2)(2)} = e^{4}

Here is where I'm having troubles. How do I determine whether it is a maximum or minimum? Could you give me more than one example? If I did anything wrong, please point it out.

You could try a rough plot of g = 16 and a rough contour plot of f, to see whether the point you have is a maximum or a minimum. It might be easier to use f = x*y instead, because in the first quadrant x,y ≥ 0, x*y is a max or min if and only if exp(x*y) is a max or a min.

There are second-order tests for max or min in constrained problems: (1) A necessary condition for a min of f at a stationarty point (x,y) of the Lagrangian is that the Hessian of the Lagrangian (not f or g separately!) is positive semi-definite in the tangent space of the constraint at (x,y); and (2) a sufficient condition for a (strict) local min is that the Hessian of the Lagrangian is positive definite in the tangent space of the constraint. By positive (semi-)definite in the tangent space, I mean that the Hessian H of L must satisfy
p^T H p &gt; 0 for all nonzero vectors p = (px,py) that satisfy p \cdot \nabla g(x,y) \equiv p_x \partial g/\partial x + p_y \partial g / \partial y = 0.

Tests for a max are the opposite: just test for negative (semi-) definite instead.

Note that to carry out the test you need a value of λ as well as values for x and y, because you need the Hessian of the Lagrangian at (x,y,λ).

RGV
 
I am sorry, but can you elaborate more on what a Hessian is? Currently we have only covered Lagrange multipliers.
 
smize said:
I am sorry, but can you elaborate more on what a Hessian is? Currently we have only covered Lagrange multipliers.

The Hessian of a function F(x,y) of two variables is the matrix of second partial derivatives:
\text{Hessian} F(x,y) =<br /> \begin{pmatrix} \frac{\partial^2 F}{\partial x ^2}&amp; \frac{\partial^2 F}{\partial x \partial y}\\<br /> \frac{\partial^2 F}{\partial y \partial x}&amp;\frac{\partial^2 F}{\partial y ^2}<br /> \end{pmatrix},
where all partial derivatives are evaluated at (x,y).

If you have more than two variables, say ##F(x_1, x_2, \ldots, x_n),## the Hessian is an n×n matrix with elements
H_{i,j} = \frac{\partial^2 F}{\partial x_i \partial x_j}.

In the multivariate case the Hessian plays a role similar to that of the second derivative in the univariate case, in the sense that it gives the second-order terms in the Taylor expansion of F:
F(x+u,y+v) \approx F(x,y) + uF_x(x,y) + v F_y(x,y) + \frac{1}{2} (u,v)^T H(x,y) \pmatrix{u \\v} + \text{ higher order terms in } u, \; v.

RGV
 
Last edited:
smize said:
Here is where I'm having troubles. How do I determine whether it is a maximum or minimum? Could you give me more than one example? If I did anything wrong, please point it out.

Choose an x value close to x=2, (say x=2.1) and the appropriate y value which satisfy the condition. (y~1.89) It should be less than e4 if (2,2) is a maximum point.

ehild
 
Ray Vickson said:
The Hessian of a function F(x,y) of two variables is the matrix of second partial derivatives:
\text{Hessian} F(x,y) =<br /> \begin{pmatrix} \frac{\partial^2 F}{\partial x ^2}&amp; \frac{\partial^2 F}{\partial x \partial y}\\<br /> \frac{\partial^2 F}{\partial y \partial x}&amp;\frac{\partial^2 F}{\partial y ^2}<br /> \end{pmatrix},
where all partial derivatives are evaluated at (x,y).

If you have more than two variables, say ##F(x_1, x_2, \ldots, x_n),## the Hessian is an n×n matrix with elements
H_{i,j} = \frac{\partial^2 F}{\partial x_i \partial x_j}.

In the multivariate case the Hessian plays a role similar to that of the second derivative in the univariate case, in the sense that it gives the second-order terms in the Taylor expansion of F:
F(x+u,y+v) \approx F(x,y) + uF_x(x,y) + v F_y(x,y) + \frac{1}{2} (u,v)^T H(x,y) \pmatrix{u \\v} + \text{ higher order terms in } u, \; v.

RGV

Ah! Yes, I know this function. I just didn't know it's name. Thank-you for reminding me of it!
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 18 ·
Replies
18
Views
3K