MHB How Does Changing the Sign of a Constraint Affect Lagrangian Solutions?

Knore88
Messages
14
Reaction score
0
A student wishes to minimize the time required to gain a given expected average
grade, 𝑚, in her end-of-semester examinations. Let $${t}_{i}$$ be the time spent studying
subject i$$\in$${1,2}.

Suppose that the expected grade functions are $${g}_{1}$$($${t}_{1}$$) = 40+8$$\sqrt{{t}_{i}}$$ and $${g}_{2}$$($${t}_{2}$$) = 2$${t}_{2}$$.

Thus the individual’s optimization problems is to choose $${t}_{1}$$ and $${t}_{2}$$ to minimize total studying time 𝑇 = $${t}_{1}$$ + $${t}_{2}$$ subject to obtaining a mean grade of 𝑚 where

𝑚 - $$\frac{[{g}_{1}({t}_{1})+{g}_{2}({t}_{2})]}{2}$$ = 0

I need to write down the Lagrangian for the individual’s optimization problem and solve for the optimal choices of $${t}_{1}$$, $${t}_{2}$$ and 𝑇 in the case where the student wishes to obtain an expected mean grade of 70.

To be completely honest, I'm not sure where to start.. or really how to do the problem :confused:
 
Physics news on Phys.org
First, for easier notation let's let $x=t_1$ and $y=t_2$. Next, we need to identify the objective function, which is the quantity we want to optimize, and this is:

$$T(x,y)=x+y$$

subject to the constraint:

$$g(x,y)=m-\frac{40+8\sqrt{x}+2y}{2}=m-20-4\sqrt{x}-y=0$$

And so, Lagrange multipliers gives rise to:

$$T_x=\lambda\cdot g_x$$

$$T_y=\lambda\cdot g_y$$

Can you compute the partials above to state the system pertaining to the problem?
 
$${T}_{x}$$(x,y) = 1
$${T}_{y}$$(x,y) = 1

$${g}_{x}$$(x,y) = -$$\frac{2}{\sqrt{x}}$$
$${g}_{y}$$(x,y) = -1

$${T}_{x}$$ = $$\lambda$$*$${g}_{x}$$: 1 = -$$\frac{2}{\sqrt{x}}$$$$\lambda$$

$${T}_{y}$$ = $$\lambda$$*$${g}_{y}$$: 1 = -$$\lambda$$

How does this look?
 
Knore88 said:
$${T}_{x}$$(x,y) = 1
$${T}_{y}$$(x,y) = 1

$${g}_{x}$$(x,y) = -$$\frac{2}{\sqrt{x}}$$
$${g}_{y}$$(x,y) = -1

$${T}_{x}$$ = $$\lambda$$*$${g}_{x}$$: 1 = -$$\frac{2}{\sqrt{x}}$$$$\lambda$$

$${T}_{y}$$ = $$\lambda$$*$${g}_{y}$$: 1 = -$$\lambda$$

How does this look?

That looks good! (Yes)

So what implication do you draw from this?
 
Does it imply that $$\lambda$$ = -1 and/or x = 4 ?
 
Knore88 said:
Does it imply that $$\lambda$$ = -1 and/or x = 4 ?

Yes...and it is $x$ we are interested in. So, if $x=4$, then what must $y$ be, according to our constraint?
 
Plugging x = 4 into our constraint we get

m - 20 - 4$$\sqrt{4}$$ - y = 0

y = m - 28, and if m = 70, then y = 42?
 
Knore88 said:
Plugging x = 4 into our constraint we get

m - 20 - 4$$\sqrt{4}$$ - y = 0

y = m - 28, and if m = 70, then y = 42?

Yes, $y=m-28$, but I would wait before using $m=70$ just yet. So, we now have:

$$T(4,m-28)=4+m-28=m-24$$

Now we must demonstrate that we have minimized $T$, rather than maximized it. To do this, we may pick another point on $g$, such as $(x,y)=(25,m)$...what do we find about $T$ at this point?
 
No problem.

T(25, m) = m + 25 (this is larger)

But why do we choose this point?
 
  • #10
Knore88 said:
No problem.

T(25, m) = m + 25 (this is larger)

But why do we choose this point?

We may choose any point on the constraint, other than our critical point. I chose that one because it was simple to find. :)

And yes, you are right:

$$T(25,m)>T(4,m-28)$$

And so we may conclude that:

$$T_{\min}=T(4,m-28)=m-24$$

Now you may substitute for $m=70$. :D
 
  • #11
Substituting for m = 70 we have,

T = 46
$${t}_{1}$$ = 4
$${t}_{2}$$ = 42

T(4, 42) = 46 for an m of 70?
 
  • #12
Knore88 said:
Substituting for m = 70 we have,

T = 46
$${t}_{1}$$ = 4
$${t}_{2}$$ = 42

T(4, 42) = 46 for an m of 70?

Yes, looks good to me! (Yes)
 
  • #13
Further on this question I need to check the second order conditions.

$$D(x,y,\lambda) = ({f}_{xx}-\lambda {g}_{xx}){({g}_{y})}^{2} - 2({f}_{xy}-\lambda {g}_{xy}){g}_{x}{g}_{y}+({f}_{yy}-\lambda {g}_{yy}){({g}_{x})}^{2}$$

$${g}_{y}=-1$$

$${g}_{x}=-2{x}^{-\frac{1}{2}}$$

$${g}_{xx}={x}^{-\frac{3}{2}}$$

$${g}_{yy}=0$$

$${g}_{xy}=0$$

$${f}_{xx}=0$$

$${f}_{yy}=0$$

$${f}_{xy}=0$$

$$D(x,y,\lambda)=(0 - \lambda {x}^{-\frac{2}{3}}){(-1)}^{2} - 2(0 - \lambda0)(-2{x}^{-\frac{1}{2}})(-1) + (0 - \lambda0){(-2{x}^{-\frac{1}{2}})}^{2} =- \lambda {x}^{-\frac{2}{3}} $$

Because $$- \lambda {x}^{-\frac{2}{3}} < 0$$ it infers that it is a max.

Can you see where I am going wrong?
 
  • #14
Well, didn't you find $\lambda=-1$? And so $-\lambda x^{-\frac{2}{3}}>0$...
 
  • #15
Of course. Sorry.

In a situation like this would you state

$$-\lambda {x}^{-\frac{2}{3}} > 0 $$ for all $$x > 0$$ or do you use the value of $$x$$ we already found $$x=4 \therefore -\lambda {x}^{-\frac{2}{3}} = 0.125 > 0$$

Thank you again
 
  • #16
Knore88 said:
Of course. Sorry.

In a situation like this would you state

$$-\lambda {x}^{-\frac{2}{3}} > 0 $$ for all $$x > 0$$ or do you use the value of $$x$$ we already found $$x=4 \therefore -\lambda {x}^{-\frac{2}{3}} = 0.125 > 0$$

Thank you again

I was taught simply to use other points on the constraint to determine the nature of single critical points. In the case of functions of 2 variables, if we can solve the constraint for at least one of the variables, then we can express the objective function in terms of 1 variable and determine the nature of the extremum using Calc I methods.

To be honest, I didn't even know a second partials test existed for Lagrange multipliers.
 
  • #17
Hey Mark,

I was just told

"To avoid some confusion in this question, I'll point out that you need to have the constraint in the form "g(x, y) - c" in order to get the correct sign for the Lagrange multiplier. In other words, you need to multiply the constraint, as it's given, by minus one."

So this changes the constraint from

$$m - \frac{40+8\sqrt{x}+2y}{2}=0$$ to $$\frac{40-8\sqrt{x}-2y}{2}-m=0$$ or $$20-4\sqrt{x}-2y-m$$

Am I interpreting this correctly?

It has some implication to the answer we derived when we come to finding y.
 
  • #18
If we multiply the constraint, equated to zero, by -1, then we will get the same implication...so I don't see how that makes any difference.
 
  • #19
When we get to finding y:

$$20-4\sqrt{x}-y-m=0$$

$$20-8-y-m=0$$

$$12-y-m=0$$

$$y=12-m$$

or do we assume $$\sqrt{4}=-2$$?
 
  • #20
The constraint we used is:

$$g(x,y)=m-20-4\sqrt{x}-y=0$$

Now, instead, suppose we use:

$$g(x,y)=20+4\sqrt{x}+y-m=0$$

Recall the objective function is:

$$T(x,y)=x+y$$

ANd so, using Lagrange, we obtain:

$$1=\lambda\left(\frac{2}{\sqrt{x}}\right)$$

$$1=\lambda(1)$$

And so this implies:

$$\frac{2}{\sqrt{x}}=1\implies x=4$$

This is the same implication we drew using the original constraint.

See if you can demonstrate in general that changing the constraint $g(x,y)=0$ to $-g(x,y)=0$ leads to the same implication. :D
 
Back
Top