MHB Multivariable optimization with constraint

Click For Summary
The discussion focuses on finding the maximum and minimum values of the function f(x,y)=x^5y^4e^{-3(x+y)} within a triangular region defined by the vertices (0,0), (6,0), and (0,6). Participants discuss the process of calculating partial derivatives with respect to x and y, confirming the use of product and chain rules, and identifying critical points by setting these derivatives to zero. The critical points identified include (0,0) and (5/3, 4/3), and the need to evaluate the function at these points and along the triangle's boundaries to determine absolute extrema is emphasized. The conversation highlights the importance of the Extreme Value Theorem in ensuring that absolute extrema exist within the closed region.
  • #31
MarkFL said:
Hey Petrus,

I dressed up your $\LaTeX$ just a bit. For the most part it was fine. I will address your points as follows:
Yes, that is correct, although I would keep the exact value for the purpose of answering the question, and use the decimal approximation for the purpose of comparison. So, we have:

$$f(0,0)=0$$

$$f\left(\frac{5}{3},\frac{4}{3} \right)=\frac{800000}{19683e^9}\approx0.005015894084709833$$
Yes, the function is zero at every point on the two legs. So we know the absolute minimum is zero, do you see why?
This part will be made much easier if you use Lagrange multipliers. Can you show us why this would imply:

$$f_x(x,y)=f_y(x,y)$$ ?
Can you help me with start with lagrange multipliers with this function?I can't see where I shall put the landa
 
Physics news on Phys.org
  • #32
Petrus said:
Can you help me with start with lagrange multipliers with this function?I can't see where I shall put the landa

I will show you the way I was taught to set it up.

We have the objective function $f(x,y)$ subject to the constraint $g(x,y)=x+y-6=0$

So, the method of Lagrange multipliers tells us to set up the system:

$$f_x(x,y)=\lambda\cdot g_x(x,y)$$

$$f_y(x,y)=\lambda\cdot g_y(x,y)$$

Now, what are $$g_x(x,y)$$ and $$g_y(x,y)$$ ?
 
  • #33
MarkFL said:
I will show you the way I was taught to set it up.

We have the objective function $f(x,y)$ subject to the constraint $g(x,y)=x+y-6=0$

So, the method of Lagrange multipliers tells us to set up the system:

$$f_x(x,y)=\lambda\cdot g_x(x,y)$$

$$f_y(x,y)=\lambda\cdot g_y(x,y)$$

Now, what are $$g_x(x,y)$$ and $$g_y(x,y)$$ ?
We got our tangent line $$y=6-x<=>6-x-y=0$$ and that is equalt to $$x+y-6=0$$
Answer to your question
$$g_x(x,y)=-5$$
$$g_y(x,y)=-5$$
 
Last edited:
  • #34
Petrus said:
We got our tangent line $$y=6-x<=>0=6-x-y=0$$ and that is equalt to$$x+y-6$$
Answer to your question
$$g_x(x,y)=-5$$
$$g_y(x,y)=-5$$

No, you want to take the partial derivatives of $g(x,y)$ with respect to the two variables. What you should find is:

$$g_x(x,y)=g_y(x,y)=1$$

Do you see why?

Note: I must leave for about 4.5 hours now, so if anyone else wishes to jump in that is fine with me. Petrus has informed me that he has not actually studied Lagrange multipliers yet, but he looked it up and wants to use it here. I have also told him once this is completed, I would help him also finish the problem by using the constraint to express $f$ as a function in one variable and optimizing with the method taught in Calc I. Petrus, when I return, I will check back in here first thing! :D
 
  • #35
MarkFL said:
No, you want to take the partial derivatives of $g(x,y)$ with respect to the two variables. What you should find is:

$$g_x(x,y)=g_y(x,y)=1$$

Do you see why?

Note: I must leave for about 4.5 hours now, so if anyone else wishes to jump in that is fine with me. Petrus has informed me that he has not actually studied Lagrange multipliers yet, but he looked it up and wants to use it here. I have also told him once this is completed, I would help him also finish the problem by using the constraint to express $f$ as a function in one variable and optimizing with the method taught in Calc I. Petrus, when I return, I will check back in here first thing! :D
Hello Mark,
I see why, I just confused myself exemple when you derivate respect to x I did treated y as a constant and forgot to treat 6 as a constant aswell, my bad.
 
  • #36
So now that you know $$g_x(x,y)=g_y(x,y)=1$$ you can set up the equations you need to find $\lambda$. MarkFL alright wrote out $f_x(x,y)$ and $f_y(x,y)$ so you don't have to do as much work to use this method.

$$x^4y^4e^{-3(x+y)}(5-3x)=1*\lambda$$

$$x^5y^3e^{-3(x+y)}(4-3y)=1*\lambda$$

$$x+y=6$$

Since the first two equations are equal to lambda, set them equal to each other and a bunch of stuff should cancel out. Once you simplify that you should have have an equation in terms of $x$ and $y$. Now use this and the third equation to find $x$ and $y$.
 
  • #37
I was able to get in a few minutes here...(Whew)

Yes, what I did was what Jameson suggests...I equated the two first partials, simplified and solved for $y$, then plugged that into the constraint and obtained a quadratic in $x$. As I mentioned before, only one of the roots is $0<x<6$.

Can you find this valid root?
 
  • #38
MarkFL said:
I was able to get in a few minutes here...(Whew)

Yes, what I did was what Jameson suggests...I equated the two first partials, simplified and solved for $y$, then plugged that into the constraint and obtained a quadratic in $x$. As I mentioned before, only one of the roots is $0<x<6$.

Can you find this valid root?
Wat I get is $$(\frac{-10}{3},\frac{8}{3})$$ but that is not in the range... (have I done something wrong?)
 
  • #39
Petrus said:
Wat I get is $$(\frac{-10}{3},\frac{8}{3}$$ but that is not in the range... (have I done something wrong?

Yes. It's going to be impossible to know what you did without seeing your work.

$$x^4y^4e^{-3(x+y)}(5-3x)=x^5y^3e^{-3(x+y)}(4-3y)$$

$$y(5-3x)=x(4-3y)$$

$$5y-3xy=4x-3xy \implies 5y-3xy+3xy=4x \implies 5y=4x$$

You can now solve for $y$ and then plug in that into $x+y=6$ to solve. Hopefully I didn't make any errors but check my work.
 
Last edited:
  • #40
Jameson said:
Yes. It's going to be impossible to know what you did without seeing your work.

$$x^4y^4e^{-3(x+y)}(5-3x)=x^5y^3e^{-3(x+y)}(4-3y)$$

$$y(5-3x)=x(4-3y)$$

$$5y-3xy=4x-12xy \implies 5y-3xy+12xy=4x \implies y(5-3x+12x)=4x$$

You can now solve for $y$ and then plug in that into $x+y=6$ to solve. Hopefully I didn't make any errors but check my work.
Ok I am confused..? I get same as you but I get $$x(4-3y)=4x-3xy$$
 
  • #41
Petrus said:
Ok I am confused..? I get same as you but I get $$x(4-3y)=4x-3xy$$

That is an error on my part. Thanks for pointing it out! :) Will edit now.

EDIT: Fixed. You should get $$\left( +\frac{10}{3}, \frac{8}{3} \right)$$. Somehow you ended up with a negative. This is definitely inside the triangle so that is a good sign. MarkFL said that he found two solutions though and we've only found one, so I hope he can point out if we took a wrong step.
 
Last edited:
  • #42
$$(\frac{6}{5},\frac{24}{5})$$
That means max:0.005 and min:0
I am correct?
 
  • #43
I'm not sure where you got those values. I posted the solution to the two equations in my previous post. Assuming that we correctly found the critical point, we need to plug that into $f(x,y)$ to find it's value so we can compare it to the other critical points. Like I said though, we should wait for MarkFL to comment on how we solved the Lagrange multiplier equations. Once we make sure that we've solved for the last critical point correctly then you are almost done!
 
  • #44
Jameson said:
I'm not sure where you got those values. I posted the solution to the two equations in my previous post. Assuming that we correctly found the critical point, we need to plug that into $f(x,y)$ to find it's value so we can compare it to the other critical points. Like I said though, we should wait for MarkFL to comment on how we solved the Lagrange multiplier equations. Once we make sure that we've solved for the last critical point correctly then you are almost done!
Hello Jameson,
You got correct... I was just confusing with another problem I just finish ( It was a square a lot more easy:D), I was just rushing myself:P We wait for Mark:)
 
  • #45
Jameson said:
...MarkFL said that he found two solutions though and we've only found one, so I hope he can point out if we took a wrong step.

I made a silly blunder in my algebra. (Blush) Jameson is absolutely correct that we should in fact find:

$$y=\frac{5}{4}x$$

which means:

$$(x,y)=\left(\frac{10}{3},\frac{8}{3} \right)$$

Now, you want to determine which is greater, $$f\left(\frac{5}{3},\frac{4}{3} \right)$$ or $$f\left(\frac{10}{3},\frac{8}{3} \right)$$.
 
  • #46
MarkFL said:
I made a silly blunder in my algebra. (Blush) Jameson is absolutely correct that we should in fact find:

$$y=\frac{5}{4}x$$

which means:

$$(x,y)=\left(\frac{10}{3},\frac{8}{3} \right)$$

Now, you want to determine which is greater, $$f\left(\frac{5}{3},\frac{4}{3} \right)$$ or $$f\left(\frac{10}{3},\frac{8}{3} \right)$$.
Hi Mark
I now correctly find $$f\left(\frac{10}{3},\frac{8}{3} \right)$$ but how do you get $$f\left(\frac{5}{3},\frac{4}{3} \right)$$ from this equation? Or I am missunderstanding and there should be only one root?
 
  • #47
The first point is inside the triangle (look at post #17, remember the critical point from equating the first partials to zero?) while the second point is on the boundary, specifically the hypotenuse. These are your two candidates for the absolute maximum, so you need to compare the function's value at those points and take the greater value as the absolute maximum.
 
  • #48
MarkFL said:
The first point is inside the triangle (look at post #17, remember the critical point from equating the first partials to zero?) while the second point is on the boundary, specifically the hypotenuse. These are your two candidates for the absolute maximum, so you need to compare the function's value at those points and take the greater value as the absolute maximum.
Yeah I know that but Then Jameson Said that you Said that you did find Two critical point from the last equation but $$f(\frac{10}{3},\frac{8}{3})<f(\frac{5}{3},\frac{4}{3})$$
 
  • #49
I was mistaken, that was the silly blunder to which I referred. There is only 1 critical point on the hypotenuse as correctly found by Jameson.

Yes, you have correctly found that the function's value at the point in the interior is greater than the function's value at the point on the hypotenuse.

So, you are done! :D
 
  • #50
MarkFL said:
I was mistaken, that was the silly blunder to which I referred. There is only 1 critical point on the hypotenuse as correctly found by Jameson.

Yes, you have correctly found that the function's value at the point in the interior is greater than the function's value at the point on the hypotenuse.

So, you are done! :D
That means min value:$$f(0,0),f(x,0),f(0,y)$$ where x and y $$[0,6]$$
max value: $$f(\frac{5}{3},\frac{4}{3})$$
I am correct?
 
  • #51
I would state the actual extrema values (which I gave earlier), as well as where they occur.
 
  • #52
Hello,
Thanks Mark,Jameson,Zaid! For helping me with this problem! and taking your time:) problem solved but I will try later today this problem again without that lamda way (tomorow:))
 
  • #53
You had mentioned not knowing how to handle differentiating the product of 3 functions, and here is a formula you may use:

If $f(x)=f_1(x)f_2(x)f_3(x)$ then:

$f'(x)=f_1'(x)f_2(x)f_3(x)+f_1(x)f_2'(x)f_3(x)+f_1(x)f_2(x)f_3'(x)$

For practice, can you derive this formula from the product rule for 2 functions?
 

Similar threads

Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
6K