# Langrange mutlipliers question

Hi, what am trying to do is maximise the area of a right angle triangle given a constant parameter. I have the sides a, b and root(a^2 + b^2) and the perimiter is 2s.

But I get to a point when trying to do the algebra where s=0, so obviosuly Ive done something wrong but I cant find anything when I look over it, can anyone find what I am doing wrong?

I first try to solve for root(a^2 + b^2).

Scroll to see replies

Original post by grhas98
Hi, what am trying to do is maximise the area of a right angle triangle given a constant parameter. I have the sides a, b and root(a^2 + b^2) and the perimiter is 2s.

But I get to a point when trying to do the algebra where s=0, so obviosuly Ive done something wrong but I cant find anything when I look over it, can anyone find what I am doing wrong?

I first try to solve for root(a^2 + b^2).

Here is my attempt
The solution must be a=b, so a division by zero (a-b) doesn't help.
But, Id have eliminated lambda when you combine La and Lb and get that solution. Then use that to get the hypotenuse in terms of s.
Original post by mqb2766
The solution must be a=b, so a division by zero (a-b) doesn't help.
But, Id have eliminated lambda when you combine La and Lb and get that solution. Then use that to get the hypotenuse in terms of s.

Oh, I see, by eliminate lambda you mean solve for it? And then put it i to one of the equation La or Lb?
Original post by grhas98
Oh, I see, by eliminate lambda you mean solve for it? And then put it i to one of the equation La or Lb?

La and Lb are two equations in three variables. So just eliminate lambda and get a constraint between the two remaining variables (a and b). As the perimeter is an equality constraint, you know that lambda must be non-zero so just eliminate it.
(edited 12 months ago)
Original post by mqb2766
La and Lb are two equations in three variables. So just eliminate lambda and get a constraint between the two remaining variables (a and b). As the perimeter is an equality constraint, you know that lambda must be non-zero so just eliminate it.

But when I try getting lambda on it’s own I end up having to divide by (b-a)/root(b^2+a^2) which would be 0?
Original post by grhas98
But when I try getting lambda on it’s own I end up having to divide by (b-a)/root(b^2+a^2) which would be 0?

Not sure what youve done, but if you rearrange both La and Lb for
lambda =
and equate, I dont get that.

Edit - see #9.
(edited 12 months ago)
Original post by mqb2766
Not sure what youve done, but if you rearrange both La and Lb for
lambda =
and equate, I dont get that.

Do u get rid of the -lambdas and then just get left with the lambda multiplied with the fraction?
Original post by grhas98
Do u get rid of the -lambdas and then just get left with the lambda multiplied with the fraction?

Im really not sure what youve tried to do. You have two simultaneous equations La and Lb in 3 variables. So you can eliiminate lambda (substiution or ...) and get a relationship for a in terms of b (or vice versa).

Upload what youve tried to do. Note your problem sees to be that you try and divde out the solution, rather than factorizing = 0 and reasoning about each factor. It may be that youre pretty much there otherwise.

Edit - its probably worth noting that you get something similar to your original equation (but not involving lambda). However, you factorise rather than divide to reason about how the variables are related. You could do this with your expression by thinking about how lambda is defined, but its probably more direct to eliminate it and factorise as suggested above.
(edited 12 months ago)
Original post by mqb2766
Im really not sure what youve tried to do. You have two simultaneous equations La and Lb in 3 variables. So you can eliiminate lambda (substiution or ...) and get a relationship for a in terms of b (or vice versa).

Upload what youve tried to do. Note your problem sees to be that you try and divde out the solution, rather than factorizing = 0 and reasoning about each factor. It may be that youre pretty much there otherwise.

Edit - its probably worth noting that you get something similar to your original equation (but not involving lambda). However, you factorise rather than divide to reason about how the variables are related. You could do this with your expression by thinking about how lambda is defined, but its probably more direct to eliminate it and factorise as suggested above.

Yea I see that now, thank you. The questions themeselves dont require much thought but the algebra is not something I am all that good at.
I have a similar question about another more algebra heavy question with two constraints. I simply font know where to go from this point:

I’m assuming I should plug it into the plane constraint and get lambda in terms of y, but I end up with such a mess, do you have any tips? Please ignore the second image I accidently uploaded it but I wont let me delete it.

(edited 12 months ago)
Original post by grhas98
Yea I see that now, thank you. The questions themeselves dont require much thought but the algebra is not something I am all that good at.
I have a similar question about another more algebra heavy question with two constraints. I simply font know where to go from this point:

I’m assuming I should plug it into the plane constraint and get lambda in terms of y, but I end up with such a mess, do you have any tips? Please ignore the second image I accidently uploaded it but I wont let me delete it.

one attachment is a paper clip - not found - so is it the one which starts off with 10) rotation matrix ... If so, its quite blurry/small. Any chance of uploading again with the full question?
Original post by mqb2766
one attachment is a paper clip - not found - so is it the one which starts off with 10) rotation matrix ... If so, its quite blurry/small. Any chance of uploading again with the full question?

Sorry here is it uploaded again:
and what is the actual question?
Original post by mqb2766
and what is the actual question?

This is the question:
Before ploughing into it, you realise the significance of the previous problem (2 vars, 1 eq cons) and this one (3 vars, 2 eq cons)? In both cases, you can reduce the problem to a single variable problem by incorporating the equality constraints. Also, any reaon you - the first constraint and - the second one?
Original post by mqb2766
Before ploughing into it, you realise the significance of the previous problem (2 vars, 1 eq cons) and this one (3 vars, 2 eq cons)? In both cases, you can reduce the problem to a single variable problem by incorporating the equality constraints. Also, any reaon you - the first constraint and - the second one?

Im not sure, I did that to eliminate the u, what would you suggest I start with doing instead? Again algebra is not something I’m good at, I just dont really have the intuition!
There are probably a few ways of proceeding, but with an eye on the solution, I'd be tempted to maximize r^2 (rather than r) as it is equivalent and when you get the Lx,Ly,Lz multiply through by the relevant variable and sum them.

You should have terms then like your = 0 constraints and thing should simplify, hopefully, but not worked it through.

Alternatively, solve for mu and lambda from Lx and Ly, and sub into Lz and simplify. Hopefully it would give the solution, but again, not worked it through.
(edited 12 months ago)
Original post by mqb2766
There are probably a few ways of proceeding, but with an eye on the solution, I'd be tempted to maximize r^2 (rather than r) as it is equivalent and when you get the Lx,Ly,Lz multiply through by the relevant variable and sum them.

You should have terms then like your = 0 constraints and thing should simplify, hopefully, but not worked it through.

Alternatively, solve for mu and lambda from Lx and Ly, and sub into Lz and simplify. Hopefully it would give the solution, but again, not worked it through.

Do you think I should equate the equations and then try to get x and y in terms of z? Then try to plug into the constraints? That is what I am currently trying
Original post by grhas98
Do you think I should equate the equations and then try to get x and y in terms of z? Then try to plug into the constraints? That is what I am currently trying

No, you want to eliminate (find values for) the lagrange multipliers, lambda and mu, and end up with a single equation in x^2, y^2... which can then be subbed for r^2. Try the previous hint.
I get to:

I’m sorry to keep bugging you with this question, its just when it comes to algebra I seem to always end up in dead ends. I’m assuming this is not the way to proceed, do you think setting the equations equal to the constraints would be more successful?