Lagrange multipliers with two constraints

In summary, the conversation is about using Lagrange multipliers to find the extrema of a function with constraints. The attempt at a solution involves solving for x, y, and z and taking into account the multiple roots for y and z. The error was due to a mistake in distributing a negative sign.
  • #1
aclotm81
2
0

Homework Statement


By using the Lagrange multipliers find the extrema of the following function:
f(x,y)=x+y
subject to the constraints:

x2+y2+z2=1
y+z=12. The attempt at a solution
Using lambda = 1/(2x) I got x=y-z and y=1-z
plugging that into the first constraint, I got:
6y^2-6y+1=0 which makes y=0.5+-(31/2/6)

I got the same thing when solving for z, which means x=0 and lambda = infinity, which doesn't make sense.
 
Physics news on Phys.org
  • #2
You've also got z=1-y. So if you choose the root y=(3+sqrt(3))/2 you have to choose z=(3-sqrt(3))/2 not the other root for z. You can't mix and match any two roots with each other.
 
  • #3
Ah, I forgot to distribute the negative! I hate when that happens...it's all worked out now, thanks a lot!
 

Related to Lagrange multipliers with two constraints

1. What are Lagrange multipliers and how are they used in optimization problems with two constraints?

Lagrange multipliers are a mathematical tool used to find the maximum or minimum value of a function subject to one or more constraints. In optimization problems with two constraints, they are used to find the optimal solution that satisfies both constraints simultaneously.

2. How do Lagrange multipliers work?

Lagrange multipliers work by introducing a new variable, known as the Lagrange multiplier, into the objective function to convert it into a constrained optimization problem. The Lagrange multiplier acts as a weight or penalty for violating the constraints, and the optimal solution is found by setting the gradient of the objective function equal to the gradient of the Lagrange multiplier times the constraints.

3. When are Lagrange multipliers with two constraints useful?

Lagrange multipliers with two constraints are useful in optimization problems where there are two independent constraints that must be satisfied. This could include problems in economics, engineering, or physics where there are multiple constraints that need to be considered in finding the optimal solution.

4. How do you solve for the Lagrange multipliers in a problem with two constraints?

To solve for the Lagrange multipliers in a problem with two constraints, you first need to set up the Lagrangian function by adding the Lagrange multiplier multiplied by each constraint to the objective function. Then, you take the partial derivatives of the Lagrangian function with respect to each variable and set them equal to zero. This will give you a system of equations that can be solved to find the optimal values for the variables and the Lagrange multipliers.

5. Can Lagrange multipliers be used with more than two constraints?

Yes, Lagrange multipliers can be used with any number of constraints. However, as the number of constraints increases, the complexity of the problem also increases, making it more difficult to find a closed-form solution. In these cases, numerical methods may be used to approximate the optimal solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
598
  • Calculus and Beyond Homework Help
Replies
2
Views
636
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
699
  • Calculus and Beyond Homework Help
Replies
6
Views
946
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
1
Views
873
  • Calculus and Beyond Homework Help
Replies
4
Views
941
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
Back
Top