How to solve for x and y with Lagrange functions?

  • Thread starter Thread starter nikk834
  • Start date Start date
  • Tags Tags
    Lagrange
Click For Summary

Homework Help Overview

The discussion revolves around solving for variables x and y using Lagrange functions in the context of a cost minimization problem subject to a constraint related to knitting hours. The original poster presents partial derivatives of a Lagrange function and seeks guidance on how to solve for the variables.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants explore the formulation of the Lagrange function and the associated partial derivatives. Questions arise regarding the correctness of the derivatives and the interpretation of the constraint. Some participants suggest setting the derivatives to zero to find extrema, while others express uncertainty about the algebra involved in solving the resulting equations.

Discussion Status

Participants are actively discussing the formulation of the problem and the necessary steps to solve the equations derived from the Lagrange function. There is a recognition of the need to clarify the relationships between the variables and the constraint, with some guidance provided on how to manipulate the equations. However, no consensus has been reached on the correct approach to find the values of x and y.

Contextual Notes

The problem is constrained by the total knitting hours available, which is set at 2,000, and there is an ongoing debate about the correctness of the initial equations and the subsequent algebraic manipulations required to solve for the variables.

nikk834
Messages
27
Reaction score
0

Homework Statement



if you have dl/dx= -2 +0.002x-lagrange function(backword L)

dl/dy=0.012y-5-lagrange function

dl/dl= -(x+y-2000)
How do you solve for x, y and backword l?

Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
Is this problem about maximizing or minimizing a function subject to a constraint? If so, what are the function and constraint? I'm asking because I'm not convinced your partial derivatives are correct.

nikk834 said:

Homework Statement



if you have dl/dx= -2 +0.002x-lagrange function(backword L)

dl/dy=0.012y-5-lagrange function

dl/dl= -(x+y-2000)
How do you solve for x, y and backword l?

Homework Equations





The Attempt at a Solution

 
Hi Vela , here is the problem that i am asked to solve.

The costs incurred by the company are denoted as follows:
R(x,y) = 7,500 -2x +0.006y^2-5y+0.001x^2

The company has a total of 2,000 knitting hours available each year, representing a constraint as follows:
x+y = 2,000

The company wishes to determine how to allocate the hours of operation between the two sweaters while minimizing cost.
(a)
Using the method of Lagrange, determine how many hours to allocate to each sweater.
(b)
Using the optimal hours determined above, what is the total cost?
 
OK, so what I gather you did so far was to construct this function:

[tex]L(x,y,\lambda) = 7000-2x+0.006y^2-5y+0.001x^2-\lambda(x+y-2000)[/tex]

and took the partial derivatives. (The "backward L" is the Greek letter lambda.)

When you take the partial derivative with respect to x, for example, you have to also differentiate the term representing the constraint, so you'd get

[tex]\frac{\partial L}{\partial x}=-2+0.002x-\lambda[/tex]

Once you get the derivatives, to find the extrema, you set the partial derivatives to zero and solve the equations.
 
Hi Vela,

I have done that so far and gotten 3 functions:

dl/dx=-2 + 0.002x-Langrange
dl/dy=0.012y-5-lagrange
dl/dl=-(x+y-2000)

I do not know how you would go about solving these equations but i know the solutions are x =1500 y=500 and lagrange=1

How exactly do you solve?
 
Like I said, you set them equal to zero so you actually have equations to solve:

[tex]-2+0.002x-\lambda=0[/tex]

[tex]-5+0.012y-\lambda=0[/tex]

[tex]x+y-2000=0[/tex]
 
If i solve it comes out to
0.002x=2L
this comes out as 1000 which is not right
and the next one comes out to 0.012y=5
this comes out to 416 which is not right
 
You're not doing the algebra correctly. The first equation should become

[tex]0.002x = \lambda+2[/tex]

for example. Try solving for lambda in the first equation, and then substitute that into the second equation, so you just have x's and y's. Then solve for either x or y and substitute that into the last equation.
 
ok so lamda=2-0.02x
if i substitude that into the next equation i get 0.012y-5-2-0.02x
how do i solve for that when i got 2 variables x and y.
 
  • #10
nikk834 said:
ok so lamda=2-0.02x
if i substitude that into the next equation i get 0.012y-5-2-0.02x
how do i solve for that when i got 2 variables x and y.
You can't solve that since, for one, it's not an equation. What does that expression equal? Once you have that sorted out, remember that you still have one more equation you can use to help you solve for x and y.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K