Lagrange Method Problem

139 Views Asked by At

I am from engineering background and I am currently studying calculus. I had a question from assignment to be solved from a course on coursera but I could not do it. People have posted solution in the discussion but I cannot understand it. The question is as follows:

Minimize the following function using the Lagrangean method: \begin{cases} f(x,y) = 6x+\frac{96}{x}+\frac{4y}{x}+\frac{x}{y}\\ x+y=6 \end{cases} Can anyone help me in understanding the approach of how to apply Lagrangean method here. Thank you.

3

There are 3 best solutions below

0
On BEST ANSWER

You can learn the method of Lagrange multipliers here and here. Maybe, the second link is more useful for you because it is using a problem-solving approach.

In your case, you have: $$ f(x,y)=6x+\frac{96}{x}+\frac{4y}{x}+\frac{x}{y} $$ and $$ g(x,y)=x+y=6. $$ Now, applying the method of Lagrange multipliers. $$ \Lambda(x,y,\lambda)=f(x,y)-\lambda(g(x,y)-6). $$ It turns to be $$ \begin{align} \frac{\partial f}{\partial x}&=\lambda\frac{\partial g}{\partial x}\\ 6-\frac{96}{x^2}-\frac{4y}{x^2}+\frac{1}{y}&=\lambda\tag1 \end{align} $$ and $$ \begin{align} \frac{\partial f}{\partial y}&=\lambda\frac{\partial g}{\partial y}\\ \frac{4}{x}-\frac{x}{y^2}&=\lambda.\tag2 \end{align} $$ This part is just a technical matter, you can learn here. Multiply $(1)$ by $x$ and $(2)$ by $y$, you will have $$ 6x-\frac{96}{x}-\frac{4y}{x}+\frac{x}{y}=\lambda x\tag3 $$ and $$ \frac{4y}{x}-\frac{x}{y}=\lambda y.\tag4 $$ Adding $(3)$ and $(4)$, you will obtain $$ \begin{align} 6x-\frac{96}{x}&=\lambda (x+y)\\ 6\left(x-\frac{16}{x}\right)&=\lambda (6)\\ x-\frac{16}{x}&=\lambda.\tag5 \end{align} $$ Now, using $(2)$, $(5)$, and $g(x,y)$, you can obtain the value of $x$ and $y$ and then plugging in the result $(x,y)$ to $f(x,y)$. I leave it the rest for you. I hope this helps.

$$\\$$


$$\Large\color{blue}{\text{# }\mathbb{Q.E.D.}\text{ #}}$$

6
On

So here, our constraint is $x + y = 6$. So what we do is define a function $L(x, y, \lambda) = f(x, y) - \lambda(x + y - 6)$. This gives us the $(x, y)$ solutions that maximize $f(x,y)$.

So by our first derivative test, we need to now when $\nabla L = (0, 0, 0)$. So we take partial derivatives with respect to $x, y, \lambda$ and set them to $0$.

So: $\frac{\partial L}{\partial x}: 6 - \frac{96 - 4y}{x^{2}} + \frac{1}{y} - \lambda = 0$
$\frac{\partial L}{\partial y}: \frac{4}{x} - \frac{x}{y^{2}} - \lambda = 0$
$\frac{\partial L}{\partial \lambda}: $x + y = 6$.

So now you solve these equations. The solutions are candidates to check to maximize $L(x, y, \lambda)$. The solution(s) you find also maximize $f(x, y)$.

Edit: So if $y = x - 6$, we have:
$\frac{\partial L}{\partial x}: 6 - \frac{96 - 4x + 24}{x^{2}} + \frac{1}{x - 6} - \lambda = 0$.

$\frac{\partial L}{\partial y}: \frac{4}{x} - \frac{x}{(x-6)^{2}} - \lambda = 0$

So it's algebra from here.

0
On

enter image description here

I get a maximum at $(4,2)$ of 48 for $f(x,y)$ , and a minimum at $(-4.45181,10.45181)$ of -49.0838 for $f(x,y)$ . As you can see from the picture these are critical points, not global maxima or minima -- just local maxima and minima. The picture is easier to look at if you just grab it down from the screen. The actual problem was to minimize f, but my picture doesn't show that so well. From below the situation looks similar.