Minimum of function under constraint

In summary, the conversation discusses finding the minimum of the function $g(x_1, x_2)=2x_1+ x_2$ under the constraint $f(x_1, x_2)=x_1\cdot x_2=18$. Two methods, using the second derivative test and Lagrange multipliers, are used to find the critical points. The conversation also covers the concept of local and global extrema, as well as finding the range of the function.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

We want to minimize the function $g(x_1, x_2)=2x_1+ x_2$ under the constraint $f(x_1, x_2)=x_1\cdot x_2=18$.

\begin{equation*}x_1\cdot x_2=18 \Rightarrow x_1=\frac{18}{x_2}\end{equation*}

\begin{equation*}\tilde{g}(x_2)=g\left (\frac{18}{x_2}, x_2\right )=2\cdot \frac{18}{x_2}+ x_2= \frac{36}{x_2}+ x_2\end{equation*}

\begin{equation*}\tilde{g}'(x_2)=-\frac{36}{x_2^2}+1=\frac{-36+x_2^2}{x_2^2}\end{equation*}

\begin{equation*}\tilde{g}'(x_2)=0 \Rightarrow \frac{-36+x_2^2}{x_2^2}=0 \Rightarrow -36+x_2^2=0 \Rightarrow x_2^2=36 \Rightarrow x_2=\pm 6\end{equation*}

\begin{equation*}\tilde{g}''(x_2)=-\frac{36}{x_2^2}=\frac{72}{x_2^3}\end{equation*}

For $x=6$ we get $\tilde{g}''(6)=\frac{72}{6^3}=\frac{1}{3}>0$ and for $x=-6$ we get $\tilde{g}''(-6)=\frac{72}{-6^3}=-\frac{1}{3}<0$.

So, $\tilde{g}$ has a minimum at $x_2=6$.

The fuction $g$ has theerfore the minimum at $\left (\frac{18}{x_2}, x_2\right ) =(3, 6)$.

In Wolfram it says that this is the maximum.

What have I done wrong? (Wondering)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
The function:

\(\displaystyle f(x)=\frac{36}{x}+x\)

has 2 local extrema, but we need to also look at the range, which is $(-\infty,-6]\,\cup\,[6,\infty)$. You correctly found the local minimum for $0<x$, bur the local maximum for $x<0$ is $-6$. :D
 
  • #3
MarkFL said:
The function:

\(\displaystyle f(x)=\frac{36}{x}+x\)

has 2 local extrema, but we need to also look at the range, which is $(-\infty,-6]\,\cup\,[6,\infty)$. You correctly found the local minimum for $0<x$, bur the local maximum for $x<0$ is $-6$. :D

So, do we not get in this case the result using the second derivative test? (Wondering)
 
  • #4
You also need to check the boundaries of the function, one of which is $x=0$, at which the function is discontinuous. Another way to find the range of the function $f$ I gave is by writing:

\(\displaystyle fx=36+x^2\)

\(\displaystyle x^2-fx+36=0\)

We then know (from the discriminant) that we require:

\(\displaystyle f^2-12^2\ge0\)

\(\displaystyle (f+12)(f-12)\ge0\)

Hence, we find $f$ is on:

\(\displaystyle (-\infty,-12]\,\cup\,\,[12,\infty)\)

In my haste earlier, I gave the incorrect range.

So, while $f$ has a local min. of $12$ at $x=6$, this is not the global minimum, as the left branch of the function lies wholly below that value, i.e. when $x<0$, then $-\infty<f\le-12$.
 
  • #5
MarkFL said:
You also need to check the boundaries of the function, one of which is $x=0$, at which the function is discontinuous.

How do we find the boundaries? (Wondering)
MarkFL said:
Another way to find the range of the function $f$ I gave is by writing:

\(\displaystyle fx=36+x^2\)

\(\displaystyle x^2-fx+36=0\)

We then know (from the discriminant) that we require:

\(\displaystyle f^2-12^2\ge0\)

\(\displaystyle (f+12)(f-12)\ge0\)

Hence, we find $f$ is on:

\(\displaystyle (-\infty,-12]\,\cup\,\,[12,\infty)\)

In my haste earlier, I gave the incorrect range.

So, while $f$ has a local min. of $12$ at $x=6$, this is not the global minimum, as the left branch of the function lies wholly below that value, i.e. when $x<0$, then $-\infty<f\le-12$.
Since $-\infty <f\leq -12$ the function is not bounded from below, is it? (Wondering)
 
  • #6
Yes, the function as a whole is not bounded from below or from above. Let's look at this using Lagrange Multipliers...

We have the objective function:

\(\displaystyle f(x,y)=2x+y\)

Subject to the constraint:

\(\displaystyle g(x,y)=xy-18=0\)

We then obtain the system:

\(\displaystyle 2=\lambda y\)

\(\displaystyle 1=\lambda x\)

This implies:

\(\displaystyle y=2x\)

Substituting this into the constraint yields:

\(\displaystyle x^2=9\implies x=\pm3\)

So, this does yield the two critical points you found by using the constraint to write the objective function in one variable:

\(\displaystyle (\pm3,\pm6)\)

However, these two points correspond only to local extrema, not global. If we turn now to the objective function in one variable:

\(\displaystyle f(x)=2x+\frac{18}{x}=2\cdot\frac{x^2+9}{x}\)

And differentiate while equating the result to zero to obtain critical values:

\(\displaystyle f'(x)=2\left(\frac{2x^2-(1)\left(x^2+9\right)}{x^2}\right)=0\)

\(\displaystyle \frac{x^2-9}{x^2}=0\)

We must observe that we obtain critical values not only when the numerator is zero, but also when the denominator is zero. And we observe that:

\(\displaystyle \lim_{x\to0^{-}}y=-\infty\)

\(\displaystyle \lim_{x\to0^{+}}y=\infty\)

So we therefore may conclude that the objective function has no global extrema. :D
 
  • #7
Ah ok! How could we plot this function to see the local extremas? With desmos we cannot, can we? (Wondering)
 
  • #8
mathmari said:
Ah ok! How could we plot this function to see the local extremas? With desmos we cannot, can we? (Wondering)

I would use W|A:

W|A - optimize 2x+y subject to xy=18
 
  • #10
mathmari said:
Hey! :eek:

We want to minimize the function $g(x_1, x_2)=2x_1+ x_2$ under the constraint $f(x_1, x_2)=x_1\cdot x_2=18$.
Another way, using "Lagrange multipliers": With $g(x, y)= 2x+ y$ with $f(x, y)= xy$ then $\nabla g= 2\vec{i}+ \vec{j}$ and $\nabla f= y\vec{i}+ x\vec{j}$. At an extremum those gradient vectors must be parallel: $2\vec{i}+ \vec{j}= \lambda(y\vec{i}+ x\vec{j})$. ($\lambda$ is the "Lagrange multiplier".) So we must have $2= \lambda y$ and $1= \lambda x$. Together with the constraint, $xy= 18$, those are three equations to solve for x, y, and $\lambda$. But since a value for $\lambda$ is not necessary for a solution, a good way to start is to eliminate $\lambda$ from those equations by dividing one by the other: $\frac{2}{1}= \frac{y}{x}$ or $y= 2x$. Then $xy= x(2x)= 2x^2= 18$, $x^2= 9$, $x= 3$ or $x= -3$. Only $x= 3$ gives a point in the first quadrant. Further, $y= 2(3)= 6$. The only extremum in the first quadrant is (3, 6). To see that this gives a maximum, not that g(3, 6)= 2(3)+ 6= 12 while g(1, 1)= 2(1)+ 3= 5, a smaller value. The point is that since g(1, 1)< g(3, 6), (3, 6) cannot give a minimum so must give a maximum.
 
  • #11
HallsofIvy said:
Another way, using "Lagrange multipliers": With $g(x, y)= 2x+ y$ with $f(x, y)= xy$ then $\nabla g= 2\vec{i}+ \vec{j}$ and $\nabla f= y\vec{i}+ x\vec{j}$. At an extremum those gradient vectors must be parallel: $2\vec{i}+ \vec{j}= \lambda(y\vec{i}+ x\vec{j})$. ($\lambda$ is the "Lagrange multiplier".) So we must have $2= \lambda y$ and $1= \lambda x$. Together with the constraint, $xy= 18$, those are three equations to solve for x, y, and $\lambda$. But since a value for $\lambda$ is not necessary for a solution, a good way to start is to eliminate $\lambda$ from those equations by dividing one by the other: $\frac{2}{1}= \frac{y}{x}$ or $y= 2x$. Then $xy= x(2x)= 2x^2= 18$, $x^2= 9$, $x= 3$ or $x= -3$. Only $x= 3$ gives a point in the first quadrant. Further, $y= 2(3)= 6$. The only extremum in the first quadrant is (3, 6). To see that this gives a maximum, not that g(3, 6)= 2(3)+ 6= 12 while g(1, 1)= 2(1)+ 3= 5, a smaller value. The point is that since g(1, 1)< g(3, 6), (3, 6) cannot give a minimum so must give a maximum.

I see! Thank you very much! (Sun)
 

Related to Minimum of function under constraint

1. What is a "minimum of function under constraint"?

A minimum of function under constraint is a concept in mathematics and physics that refers to finding the lowest possible value of a mathematical function while satisfying certain constraints or conditions. It involves optimizing the function with respect to the given constraints.

2. How is a "minimum of function under constraint" different from a regular minimum value?

A regular minimum value refers to the lowest value of a function without any constraints. However, a minimum of function under constraint takes into account the limitations or restrictions imposed on the function, making it a more complex optimization problem.

3. What are some examples of constraints in a "minimum of function under constraint" problem?

Constraints in a minimum of function under constraint problem can include inequalities, equations, or other conditions that the function must satisfy. For example, a constraint could be that the function must have a certain minimum value, or that it must pass through a specific point.

4. How is a "minimum of function under constraint" problem solved?

A minimum of function under constraint problem is typically solved using mathematical techniques such as Lagrange multipliers, which involve setting up equations to find the optimal values of the function and the constraints. These equations can then be solved to find the minimum value of the function.

5. What are some real-world applications of "minimum of function under constraint"?

Minimum of function under constraint problems can be found in various fields, including engineering, economics, and physics. For example, in engineering, it can be used to optimize the design of a structure while considering factors such as cost and material constraints. In economics, it can be used to determine the most efficient allocation of resources while adhering to budget constraints.

Similar threads

  • Calculus
Replies
2
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
  • Calculus
Replies
4
Views
1K
  • Calculus
Replies
4
Views
2K
Replies
3
Views
760
Replies
24
Views
2K
Replies
16
Views
3K
  • Advanced Physics Homework Help
Replies
1
Views
817
Back
Top