Use Lagrange multipliers to find the max & min

One way to determine whether a stationary point is a maximum or minimum is to use the Second Derivative Test. This involves taking the Hessian of the function and evaluating it at the stationary point. If the Hessian is positive definite, then the stationary point is a minimum. If the Hessian is negative definite, then the stationary point is a maximum. If the Hessian is indefinite, then the stationary point is a saddle point.Another way to determine the nature of a stationary point is to use the Lagrange Remainder Theorem, which states that if the second-order partial derivatives of a function are continuous at a stationary point, then the function can be approximated by a quadratic function near that point. The sign of the quadratic term in
  • #1
smize
78
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 [itex]\Rightarrow[/itex] yexy = λ3x2

fy = λgy [itex]\Rightarrow[/itex] xexy = λ3y2

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

Since x = y, [itex]x^{3} + y^{3} = 2x^{3} \Rightarrow 2x^{3} = 16, x = 2, y = 2[/itex]

f(2,2) = [itex]e^{(2)(2)} = e^{4}[/itex]

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
  • #2
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 [itex]\Rightarrow[/itex] yexy = λ3x2

fy = λgy [itex]\Rightarrow[/itex] xexy = λ3y2

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

Since x = y, [itex]x^{3} + y^{3} = 2x^{3} \Rightarrow 2x^{3} = 16, x = 2, y = 2[/itex]

f(2,2) = [itex]e^{(2)(2)} = e^{4}[/itex]

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
[tex] p^T H p > 0 [/tex] for all nonzero vectors p = (px,py) that satisfy [tex] p \cdot \nabla g(x,y) \equiv p_x \partial g/\partial x + p_y \partial g / \partial y = 0.[/tex]

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
 
  • #3
I am sorry, but can you elaborate more on what a Hessian is? Currently we have only covered Lagrange multipliers.
 
  • #4
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:
[tex]\text{Hessian} F(x,y) =
\begin{pmatrix} \frac{\partial^2 F}{\partial x ^2}& \frac{\partial^2 F}{\partial x \partial y}\\
\frac{\partial^2 F}{\partial y \partial x}&\frac{\partial^2 F}{\partial y ^2}
\end{pmatrix},[/tex]
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
[tex] H_{i,j} = \frac{\partial^2 F}{\partial x_i \partial x_j}.[/tex]

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:
[tex] 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. [/tex]

RGV
 
Last edited:
  • #5
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
 
  • #6
Ray Vickson said:
The Hessian of a function F(x,y) of two variables is the matrix of second partial derivatives:
[tex]\text{Hessian} F(x,y) =
\begin{pmatrix} \frac{\partial^2 F}{\partial x ^2}& \frac{\partial^2 F}{\partial x \partial y}\\
\frac{\partial^2 F}{\partial y \partial x}&\frac{\partial^2 F}{\partial y ^2}
\end{pmatrix},[/tex]
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
[tex] H_{i,j} = \frac{\partial^2 F}{\partial x_i \partial x_j}.[/tex]

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:
[tex] 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. [/tex]

RGV

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

1. What is the Lagrange multiplier method?

The Lagrange multiplier method is a mathematical technique used to find the maximum or minimum value of a function subject to constraints. It involves introducing a new variable, known as the Lagrange multiplier, to incorporate the constraints into the objective function.

2. When is the Lagrange multiplier method used?

The Lagrange multiplier method is used when optimizing a function with one or more constraints. It can be used in various fields such as economics, engineering, and physics to solve optimization problems.

3. How does the Lagrange multiplier method work?

The Lagrange multiplier method works by converting a constrained optimization problem into an unconstrained one. The method involves finding the partial derivatives of the objective function and the constraints, setting them equal to each other, and then solving the resulting system of equations.

4. Can the Lagrange multiplier method find both maximum and minimum values?

Yes, the Lagrange multiplier method can find both maximum and minimum values. It involves finding the critical points of the objective function and determining which one is the maximum and which one is the minimum.

5. Are there any limitations to using the Lagrange multiplier method?

While the Lagrange multiplier method is a powerful tool for solving optimization problems, it does have some limitations. It can only be used for functions with continuous derivatives, and it may not always provide the global maximum or minimum, but rather a local one. Additionally, it can become computationally intensive for problems with a large number of constraints.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
301
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
776
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
988
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
784
Replies
1
Views
774
  • Calculus and Beyond Homework Help
Replies
2
Views
453
  • Calculus and Beyond Homework Help
Replies
6
Views
849
Back
Top