Optimization With Two Constraints

Click For Summary

Discussion Overview

The discussion revolves around optimizing the expression \(ad - bc\) under two constraints: \(a^2 + b^2 = 2\) and \((c - 3)^2 + (d - 4)^2 = 1\). Participants explore methods for solving this optimization problem, particularly through the Lagrange Multipliers technique, while also considering algebraic approaches.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant introduces the optimization problem and expresses uncertainty about using the Lagrange Multipliers method with multiple constraints.
  • Another participant outlines the objective function and constraints, suggesting the formulation of a system of equations using partial derivatives.
  • Subsequent posts involve participants deriving equations from the Lagrange Multipliers method and discussing potential errors in their calculations.
  • Participants derive relationships between the variables \(a\), \(b\), \(c\), and \(d\) and explore critical points based on their findings.
  • There is a back-and-forth exchange where participants correct each other’s work and refine their understanding of the relationships between the variables.
  • One participant calculates critical points and evaluates the objective function at these points, leading to a discussion about the maximum value found.

Areas of Agreement / Disagreement

Participants generally agree on the approach of using Lagrange Multipliers but have differing views on the correctness of specific calculations and relationships derived from the equations. The discussion remains unresolved regarding the optimal value of the objective function, as participants present different critical points and values.

Contextual Notes

Some calculations involve assumptions about the relationships between variables, and there are indications of errors in earlier steps that were later corrected. The discussion reflects ongoing refinement of ideas rather than a final consensus.

Who May Find This Useful

Readers interested in optimization techniques, particularly in the context of constrained problems, may find this discussion valuable. It may also appeal to those exploring the application of Lagrange Multipliers in mathematical optimization.

anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
Hi MHB,

I've come across this problem recently:

If a²+b²=2 and (c-3)²+(d-4)²=1, find the maximum value of ad-bc.

I haven't solved it and actually, I don't know of any algebraic method I could use to solve it and I am wondering if this problem is doable with the Lagrange Multiplier method. However, as some of you know, I am new to this method, and I don't know how to handle multiple constraints.

If you're interested in this problem and want to share with me your idea on how to crack it using a purely algebraic method that would be fine, but if you could help me solve it using Lagrange Multipliers, I would like that too.

Thanks!
 
Physics news on Phys.org
We have the objective function:

$$f(a,b,c,d)=ad-bc$$

subject to the constraints:

$$g(a,b,c,d)=a^2+b^2-2=0$$

$$h(a,b,c,d)=(c-3)^2+(d-4)^2-1=0$$

So, what you want to do is write the system (involving the indicated partials):

$$f_a=\lambda g_a+\mu h_a$$

$$f_b=\lambda g_b+\mu h_b$$

$$f_c=\lambda g_c+\mu h_c$$

$$f_d=\lambda g_d+\mu h_d$$

What do you get?
 
MarkFL said:
We have the objective function:

$$f(a,b,c,d)=ad-bc$$

subject to the constraints:

$$g(a,b,c,d)=a^2+b^2-2=0$$

$$h(a,b,c,d)=(c-3)^2+(d-4)^2-1=0$$

So, what you want to do is write the system (involving the indicated partials):

$$f_a=\lambda g_a+\mu h_a$$

$$f_b=\lambda g_b+\mu h_b$$

$$f_c=\lambda g_c+\mu h_c$$

$$f_d=\lambda g_d+\mu h_d$$

What do you get?

Hey MarkFL, thanks for the quick reply!:)

Oh...what you have suggested is by approaching it using the Lagrange Multipliers method...(Tmi):o

Okay...for those 4 equations in the system, I get:

$$d=\lambda (2a)$$

$$-c=\lambda (2b)$$

$$-b=\mu (2(c-3))$$

$$a=\mu (2(d-4))$$
 
Your first two equations are correct, but the last two are not...do you see your error in taking the partials of $f$ with respect to $c$ and $d$?
 
MarkFL said:
Your first two equations are correct, but the last two are not...do you see your error in taking the partials of $f$ with respect to $c$ and $d$?

Yes, I realized I made two errors and have them fixed right before you replied...:D
 
Okay, looks good! :D

Now, what you want to do is try to find what this system implies regarding how the variables are related to get the critical point(s). I suggest solving the first two equations for $2\lambda$ and the last two equations for $2\mu$ and equate the results. What do you find?
 
MarkFL said:
Okay, looks good! :D

Now, what you want to do is try to find what this system implies regarding how the variables are related to get the critical point(s). I suggest solving the first two equations for $2\lambda$ and the last two equations for $2\mu$ and equate the results. What do you find?

Oh okay...after equating the results, I get

$bd=-ac$ and $-bd+4b=ac-3a$

and this implies $b=-\dfrac{3a}{4}$.
 
Okay good...can you think of a way to solve for $(a,b)$? Do you have any additional relationship between these variables that you can use?

Can you also find a relationship between $c$ and $d$?
 
MarkFL said:
Okay good...can you think of a way to solve for $(a,b)$? Do you have any additional relationship between these variables that you can use?

Can you also find a relationship between $c$ and $d$?

Sure...

After doing some simple addition and subtraction steps, we arrived at:

$(a,b,c,d)=\dfrac{4\sqrt{2}}{5}, -\dfrac{3\sqrt{2}}{5}, \dfrac{18}{5}, \dfrac{24}{5}$

or

$(a,b,c,d)=-\dfrac{4\sqrt{2}}{5},\dfrac{3\sqrt{2}}{5}, \dfrac{12}{5}, \dfrac{16}{5}$
 
  • #10
Let me check your work...:D

You found from $\lambda$:

$$ac+bd=0$$

and from $\mu$:

$$4b+3a=ac+bd$$

Hence, we know:

$$4b+3a=0\implies b=-\frac{3}{4}a$$

Substituting for $b$ into the first constraint, we obtain:

$$a^2+\left(-\frac{3}{4}a \right)^2=2$$

$$\frac{25}{16}a^2=2$$

$$a=\pm\frac{4}{5}\sqrt{2}\implies b=\mp\frac{3}{5}\sqrt{2}$$

Case 1: $$(a,b)=\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2} \right)$$

$$\left(\frac{4}{5}\sqrt{2} \right)c-\left(\frac{3}{5}\sqrt{2} \right)d=0$$

$$d=\frac{4}{3}c$$

Substituting into the second constraint, we obtain:

$$(c-3)^2+\left(\frac{4}{3}c-4 \right)=1$$

$$c^2-6c+9+\frac{16}{9}c^2-\frac{32}{3}c+16=1$$

$$\frac{25}{9}c^2-\frac{50}{3}c+24=0$$

$$25c^2-150c+216=0$$

$$(5c-18)(5c-12)=0$$

$$c=\frac{12}{5},\,\frac{18}{5}$$

Hence:

$$d=\frac{16}{5},\,\frac{24}{5}$$

Thus, from this first case, we have the critical points:

$$(a,b,c,d)=\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right),\,\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)$$

Case 2: $$(a,b)=\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2} \right)$$

$$\left(-\frac{4}{5}\sqrt{2} \right)c+\left(\frac{3}{5}\sqrt{2} \right)d=0$$

$$d=\frac{4}{3}c$$

And so the second constraint gives the same values we found from the first case:

$$c=\frac{12}{5},\,\frac{18}{5}$$

Hence:

$$d=\frac{16}{5},\,\frac{24}{5}$$

Thus, from this second case, we have the critical points:

$$(a,b,c,d)=\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right),\,\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)$$

So, we have a total of four critical points to check, and the one that gives the largest value for the objective function will maximize it.

What do you find is the value of the objective function for the four critical points?
 
  • #11
MarkFL said:
Let me check your work...:D

Hey, I'm so so sorry, Mark!

I should have included all of my steps in my previous post so that you wouldn't have to work it out and typed everything in LaTeX for me...please forgive me
9.gif
and I will not repeat this again, I promise!
MarkFL said:
$$(a,b,c,d)=\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right),\,\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right),\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right),\,\left(-\frac{4}{5}\sqrt{2},+\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)$$

So, we have a total of four critical points to check, and the one that gives the largest value for the objective function will maximize it.

What do you find is the value of the objective function for the four critical points?

Ops...there are a total of four critical points to check instead of two...:o

$$f\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right)=\left(\frac{4}{5}\sqrt{2} \right) \left( \frac{16}{5} \right)-\left(-\frac{3}{5}\sqrt{2} \right) \left( \frac{12}{5} \right)=4\sqrt{2}$$

$$f\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)=\left(\frac{4}{5}\sqrt{2} \right) \left( \frac{24}{5} \right)-\left(-\frac{3}{5}\sqrt{2} \right) \left( \frac{18}{5} \right)=6\sqrt{2}$$

$$f\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right)=\left(-\frac{4}{5}\sqrt{2} \right) \left( \frac{16}{5} \right)-\left(\frac{3}{5}\sqrt{2} \right) \left( \frac{12}{5} \right)=-4\sqrt{2}$$

$$f\left(-\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)=\left(-\frac{4}{5}\sqrt{2} \right) \left( \frac{24}{5} \right)-\left(\frac{3}{5}\sqrt{2} \right) \left( \frac{18}{5} \right)=-6\sqrt{2}$$

So the maximum value of $ad-bc=6\sqrt{2}$.
 
  • #12
anemone said:
Hey, I'm so so sorry, Mark!

I should have included all of my steps in my previous post so that you wouldn't have to work it out and typed everything in LaTeX for me...please forgive me
9.gif
and I will not repeat this again, I promise!

Hey, no worries! (Hug)

anemone said:
Ops...there are a total of four critical points to check instead of two...:o

$$f\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right)=\left(\frac{4}{5}\sqrt{2} \right) \left( \frac{16}{5} \right)-\left(-\frac{3}{5}\sqrt{2} \right) \left( \frac{12}{5} \right)=4\sqrt{2}$$

$$f\left(\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)=\left(\frac{4}{5}\sqrt{2} \right) \left( \frac{24}{5} \right)-\left(-\frac{3}{5}\sqrt{2} \right) \left( \frac{18}{5} \right)=6\sqrt{2}$$

$$f\left(-\frac{4}{5}\sqrt{2},\frac{3}{5}\sqrt{2},\frac{12}{5},\frac{16}{5} \right)=\left(-\frac{4}{5}\sqrt{2} \right) \left( \frac{16}{5} \right)-\left(\frac{3}{5}\sqrt{2} \right) \left( \frac{12}{5} \right)=-4\sqrt{2}$$

$$f\left(-\frac{4}{5}\sqrt{2},-\frac{3}{5}\sqrt{2},\frac{18}{5},\frac{24}{5} \right)=\left(-\frac{4}{5}\sqrt{2} \right) \left( \frac{24}{5} \right)-\left(\frac{3}{5}\sqrt{2} \right) \left( \frac{18}{5} \right)=-6\sqrt{2}$$

So the maximum value of $ad-bc=6\sqrt{2}$.

Looks good! (Yes)

Would you know what to do for a problem with 3 or more constraints? (Thinking)
 
  • #13
MarkFL said:
Hey, no worries! (Hug)

Thank you for forgiving me...:o(Inlove) and also thank you for guiding me through the problem!
MarkFL said:
Looks good! (Yes)

Would you know what to do for a problem with 3 or more constraints? (Thinking)

I honestly think I can, but my preference is to try my very best to solve any optimization problems algebraically first, and if I failed, then and only then I would consider the LM method!:p

I think it's best to tell what I've attempted so that if anyone happens to know of a way to crack it without the use of LM method, they can show me their method.:)

My Attempt (by algebraic approach):


I first let $a, b$ to represent $x_1$ and $y_1$ respectively and then I let $d$ and $c$ to become $x_2$ and $y_2$ and I then plot them separately on the same Cartesian diagram and I get
View attachment 1536

But the question asked us to maximize the expression $ad-bc$, which is equivalent to $x_1(x_2)-y_1(y_2)$, and I just don't see there is any significant meaning to the expression $x_1(x_2)-y_1(y_2)$ and up to this point, I know I am headed in the wrong direction. I still believe this problem is doable with the algebraic method, just that I don't see it...
 

Attachments

  • optimization problem.JPG
    optimization problem.JPG
    14.3 KB · Views: 93
  • #14
For each constraint, we need a multiplier, traditionally (or at least the way I was taught) we use $\lambda$ for the first, and $\mu$ for the second. I think what I would do for more than two constraints, is to simply subscript $\lambda$, so I don't have to keep choosing Greek letters. :D
 
  • #15
MarkFL said:
For each constraint, we need a multiplier, traditionally (or at least the way I was taught) we use $\lambda$ for the first, and $\mu$ for the second. I think what I would do for more than two constraints, is to simply subscript $\lambda$, so I don't have to keep choosing Greek letters. :D

I see...hey, I'm not afraid...because if I ever encounter any math optimization problems which I couldn't solve, I have MHB or you to help me out!:)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K