Optimizing a Multivariable Function with Lagrange Multipliers

  • Thread starter Gekko
  • Start date
  • Tags
    Lagrange
In summary, the conversation discusses the function f(x,y,z) and its maximum and minimum values subject to the constraint x^2+y^2+z^2=1. It is determined that the minimum value of f is 1 and the maximum value is 4, with multiple possible solutions for the maximum. The Lagrange method is mentioned as a possible solution method, but it is noted that the problem can also be solved without it by using the symmetry between variables.
  • #1
Gekko
71
0
f(x,y,z)=4x^2+4y^2+z^2 subject to x^2+y^2+z^z=1

So I have:

F(x,y,z,c) = 4x^2+4y^2+z^2+L(x^2+y^2+z^2-1)

dF/dx = 8x+2xL
dF/dy = 8y+2yL
dF/dz=2z+2zL

Either x=y=0 and L=-1 OR z=0 and L=-4

For first case, z^2=1 therefore z=+/- 1 giving f(0,0,1)=1
For second case, x^2+y^2=1 2x^2=1 x=y=+/-sqrt(1/2) giving f(sqrt(1/2),sqrt(1/2),0)=4

Is this correct?
The minimum is therefore the first case giving f(0,0,1)=1?
 
Last edited:
Physics news on Phys.org
  • #2
Yup, it all looks right to me.
 
  • #3
Does that mean both cases are valid? One is the maximum and one is the minimum?
 
  • #4
I'm assuming
Gekko said:
subject to x^2+y^2+z^z=1
is typo for
x^2+y^2+z^2 = 1.

Without using Lagrange you could subtract x^2+y^2+z^2=1 from f(x,y,z)=4x^2+4y^2+z^2 giving you 3(x2 + y2) = f - 1. As this LHS contains only squares it cannot be less than 0. Which is f=1. That is your minimum.

For the maximum looking at the form of f and your constraint you see that so to speak, x, y and z contribute indifferently to your constraint, but taking stuff away from z and investing it in x or y yields you more f. So z=0 will maximise f. The constraint is a sphere round the origin, but the the maximum of f is along a circle z=0, x2 + y2 = 1.
I think it is everywhere along that circle. From this you still get the maximum of f=4, but if I am not mistaken :rolleyes: your answer is not unique but all points satisfying this x2 + y2 = 1 are solutions to the maximum problem.

It is necessary to know the Lagrange method but surprisingly often you can solve problems without it - use the constraint to solve or simplify your problem and use symmetry between variables.
 
  • #5
Thanks for your replies. Very helpful
 

FAQ: Optimizing a Multivariable Function with Lagrange Multipliers

What is the concept of Lagrange multipliers?

Lagrange multipliers are a mathematical technique used to optimize a function subject to constraints. It involves finding the maximum or minimum value of a function while satisfying a set of constraints.

How does the method of Lagrange multipliers work?

The method of Lagrange multipliers involves creating a new function, called the Lagrangian, which combines the original function and the constraints. This new function is then solved using partial derivatives to find the optimal values for the variables.

What are the applications of Lagrange multipliers?

Lagrange multipliers have various applications in mathematics, physics, and engineering. They are commonly used in optimization problems, such as finding the minimum cost of a production process or the maximum profit of a business. They are also used in physics to find the path of least resistance or the path that minimizes the action.

What are the limitations of Lagrange multipliers?

Lagrange multipliers can only be used for constrained optimization problems where the constraints are continuous and differentiable. They also cannot handle inequality constraints, and in some cases, the method may not converge to the optimal solution.

How is the Lagrange multiplier calculated?

The Lagrange multiplier is calculated by taking the partial derivative of the Lagrangian with respect to the constraint variable and setting it equal to zero. This equation is then solved along with the original function and constraints to find the optimal values for the variables.

Back
Top