GWR309's question at Yahoo Answers regarding Lagrange multipliers

In summary, the conversation discusses the use of Lagrange multipliers to solve optimization problems. The specific problem given is to minimize the function f(x,y)=xy subject to the constraint x-2y=1. The conversation includes a detailed explanation of the steps involved in solving the problem, as well as an invitation for others to post similar problems for discussion in a forum. The questioner also asks for clarification on how to determine if the solution is a maximum, minimum, or neither.
  • #1
MarkFL
Gold Member
MHB
13,288
12
Here is the question:

Please help with lagrange multipliers?

I don't understand how to do these at all. Here is one of the problems I have to do:

f(x,y) = xy x-2y=1Additional Details i thought I had more spaces when I typed... xy and x-2y=1 are 2 different equations.

Here is a link to the question:

Please help with lagrange multipliers? - Yahoo! Answers

I have posted a link there to this topic so the OP can find my response.
 
Mathematics news on Phys.org
  • #2
Hello GWR309,

We are given the objective function:

\(\displaystyle f(x,y)=xy\)

subject to the constraint:

\(\displaystyle g(x,y)=x-2y-1=0\)

Using Lagrange multipliers, we get the system:

\(\displaystyle y=\lambda\)

\(\displaystyle x=-2\lambda\)

and this implies:

\(\displaystyle x=-2y\)

Substituting for $x$ into the constraint, we find:

\(\displaystyle -2y-2y-1=0\)

\(\displaystyle y=-\frac{1}{4}\,\therefore\,x=\frac{1}{2}\)

And so the critical point is:

\(\displaystyle (x,y)=\left(\frac{1}{2},-\frac{1}{4} \right)\)

and the optimize value for the objective function is:

\(\displaystyle f\left(\frac{1}{2},-\frac{1}{4} \right)=-\frac{1}{8}\)

Since other test points such as \(\displaystyle \left(0,-\frac{1}{2} \right)\) and \(\displaystyle \left(1,0 \right)\) give \(\displaystyle f(x,y)>-\frac{1}{8}\) we may conclude that:

\(\displaystyle f_{\min}=f\left(\frac{1}{2},-\frac{1}{4} \right)=-\frac{1}{8}\)

As a check, we may use the constraint to write $f$ as a function of 1 variable, namely:

\(\displaystyle f(x)=\frac{x}{2}(x-1)\)

We can see now that $f(x)$ is a parabola opening upwards, and we know its vertex (which is the global minimum) will line on the axis of symmetry, which is midway between the roots, on the line:

\(\displaystyle x=\frac{1}{2}\)

and so the minimum is:

\(\displaystyle f_{\min}=f\left(\frac{1}{2} \right)=-\frac{1}{8}\)

To GWR309 and any other guests viewing this topic, I invite and encourage you to post other optimization problems in our http://www.mathhelpboards.com/f10/ forum.

Best Regards,

Mark.
 
  • #3
MarkFL said:
Hello GWR309,

We are given the objective function:

\(\displaystyle f(x,y)=xy\)

subject to the constraint:

\(\displaystyle g(x,y)=x-2y-1=0\)

Using Lagrange multipliers, we get the system:

\(\displaystyle y=\lambda\)

\(\displaystyle x=-2\lambda\)

and this implies:

\(\displaystyle x=-2y\)

Substituting for $x$ into the constraint, we find:

\(\displaystyle -2y-2y-1=0\)

\(\displaystyle y=-\frac{1}{4}\,\therefore\,x=\frac{1}{2}\)

And so the critical point is:

\(\displaystyle (x,y)=\left(\frac{1}{2},-\frac{1}{4} \right)\)

and the optimize value for the objective function is:

\(\displaystyle f\left(\frac{1}{2},-\frac{1}{4} \right)=-\frac{1}{8}\)

Since other test points such as \(\displaystyle \left(0,-\frac{1}{2} \right)\) and \(\displaystyle \left(1,0 \right)\) give \(\displaystyle f(x,y)>-\frac{1}{8}\) we may conclude that:

\(\displaystyle f_{\min}=f\left(\frac{1}{2},-\frac{1}{4} \right)=-\frac{1}{8}\)

As a check, we may use the constraint to write $f$ as a function of 1 variable, namely:

\(\displaystyle f(x)=\frac{x}{2}(x-1)\)

We can see now that $f(x)$ is a parabola opening upwards, and we know its vertex (which is the global minimum) will line on the axis of symmetry, which is midway between the roots, on the line:

\(\displaystyle x=\frac{1}{2}\)

and so the minimum is:

\(\displaystyle f_{\min}=f\left(\frac{1}{2} \right)=-\frac{1}{8}\)

To GWR309 and any other guests viewing this topic, I invite and encourage you to post other optimization problems in our http://www.mathhelpboards.com/f10/ forum.

Best Regards,

Mark.

Where did you get the system though? this:
y=λ

x=−2λ
 
  • #4
GWR309 said:
Where did you get the system though? this:
y=λ

x=−2λ

Hello GWR309,

Glad you joined us here! (Cool)

The method of Lagrange multipliers states:

To find the extrema of $z=f(x,y)$ subject to the constraint $g(x,y)=0$, solve the system of equations:

\(\displaystyle f_x(x,y)=\lambda g_x(x,y)\)

\(\displaystyle f_y(x,y)=\lambda g_y(x,y)\)

\(\displaystyle g(x,y)=0\)

Among the solutions $(x,y,\lambda)$ of the system will be the points \(\displaystyle \left(x_i,y_i \right)\), where $f$ has an extremum. When $f$ has a maximum (or minimum), it will be the largest (or smallest) number in the list of functional values \(\displaystyle f\left(x_i,y_i \right)\).

So, given that:

\(\displaystyle f(x,y)=xy\)

\(\displaystyle g(x,y)=x-2y-1=0\)

we then find by computing the first partials, that:

\(\displaystyle f_x(x,y)=y,\,f_y(x,y)=x,\,g_x(x,y)=1,\,g_y(x,y)=-2\)

and so the system we are to solve is:

\(\displaystyle y=\lambda\)

\(\displaystyle x=-2\lambda\)

\(\displaystyle g(x,y)=x-2y-1=0\)

From the first two equations, we find:

\(\displaystyle \lambda=y=-\frac{x}{2}\,\therefore\,x=-2y\)

and the rest follows as in my second post above.
 
  • #5
for general lagrange multipliers problems, how do I determine if it is a max, min or neither?
 
Last edited:
  • #6
GWR309 said:
for general lagrange multipliers problems, how do I determine if it is a max, min or neither?

You could check the Hessian matrix. Or check that your function is convex (which would imply you have a minimum). Or even just substitute in the value and compare it to the endpoints of your function...
 

Related to GWR309's question at Yahoo Answers regarding Lagrange multipliers

1. What is the purpose of using Lagrange multipliers in optimization problems?

Lagrange multipliers are used in optimization problems to find the maximum or minimum value of a function subject to certain constraints. They allow us to convert a constrained optimization problem into an unconstrained one, making it easier to solve.

2. How do Lagrange multipliers work?

Lagrange multipliers work by introducing a new variable, known as the multiplier, to the original objective function. This multiplier is then used to form a new function, known as the Lagrangian, which is then optimized to find the optimal solution that satisfies the given constraints.

3. What are the conditions for using Lagrange multipliers?

There are two conditions that must be met in order to use Lagrange multipliers: first, the objective function and the constraint equations must be continuous and differentiable; second, the constraints must be independent, meaning that no constraint equation can be a linear combination of the others.

4. Are there any limitations to using Lagrange multipliers?

Yes, there are some limitations to using Lagrange multipliers. They may not work for problems with non-differentiable constraints or for problems with a large number of constraints. In addition, Lagrange multipliers may not always give the global optimal solution, but rather a local optimal solution.

5. How can Lagrange multipliers be applied in real-world scenarios?

Lagrange multipliers have various applications in fields such as economics, engineering, and physics. They can be used to optimize production and allocation of resources, minimize energy consumption in a system, and determine the most efficient way to distribute goods, among others. They are a powerful tool for solving constrained optimization problems in many real-world situations.

Similar threads

Replies
1
Views
3K
Replies
1
Views
9K
  • Calculus and Beyond Homework Help
Replies
8
Views
485
Replies
1
Views
2K
Replies
1
Views
2K
  • General Math
Replies
11
Views
3K
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
Replies
25
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
557
Replies
1
Views
824
Back
Top