Questions tagged [lagrange-multiplier]

This tag is for the questions on Lagrange multipliers. The method of Lagrange multipliers (named after Joseph Louis Lagrange) provides a strategy for finding the local maxima and minima of a function subject to equality constraints.

When are Lagrange multipliers useful?

One of the most common problems in calculus is that of finding maxima or minima (in general, "extrema") of a function, but it is often difficult to find a closed form for the function being extremized. Such difficulties often arise when one wishes to maximize or minimize a function subject to fixed outside conditions or constraints. The method of Lagrange multipliers is a powerful tool for solving this class of problems without the need to explicitly solve the conditions and use them to eliminate extra variables.

Put more simply, it's usually not enough to ask, "How do I minimize the aluminum needed to make this can?" (The answer to that is clearly "Make a really, really small can!") You need to ask, "How do I minimize the aluminum while making sure the can will hold $10$ ounces of soup?" Or similarly, "How do I maximize my factory's profit given that I only have $\$15,000$ to invest?" Or to take a more sophisticated example, "How quickly will the roller coaster reach the ground assuming it stays on the track?" In general, Lagrange multipliers are useful when some of the variables in the simplest description of a problem are made redundant by the constraints.

The mathematics of Lagrange multipliers:

To find critical points of a function $f(x, y, z)$ on a level surface $g(x, y, z) = C$ (or subject to the constraint $g(x, y, z) = C$), we must solve the following system of simultaneous equations: $$∇f(x, y, z) = λ∇g(x, y, z)$$ $$g(x, y, z) = C$$ Remembering that $∇f$ and $∇g$ are vectors, we can write this as a collection of four equations in the four unknowns $x, y, z,$ and $λ$ : $$f_x(x, y, z) = λ~g_x(x, y, z)$$ $$f_y(x, y, z) = λ~g_y(x, y, z)$$ $$fz(x, y, z) = λ~g_z(x, y, z)$$ $$g(x, y, z) = C$$ The variable $~λ~$ is a dummy variable called a Lagrange multiplier; we only really care about the values of $x, y,$ and $z$ .

Once we have found all the critical points, we plug them into $~f~$ to see where the maxima and minima. The critical points where $~f~$ is greatest are maxima and the critical points where $~f~$ is smallest are minima.

Note:

Solving the system of equations can be hard! Here are some tricks that may help:

$1.\quad$ Since we don’t actually care what $~λ~$ is, you can first solve for $~λ~$ in terms of $~x,~ y,~$ and $~z~$ to remove $~λ~$ from the equations.

$2.\quad$ Try first solving for one variable in terms of the others.

$3.\quad$ Remember that whenever you take a square root, you must consider both the positive and the negative square roots.

$4.\quad$ Remember that whenever you divide an equation by an expression, you must be sure that the expression is not $~0~$. It may help to split the problem into two cases: first solve the equations assuming that a variable is $~0~$, and then solve the equations assuming that it is not $~0~$.

Reference:

https://en.wikipedia.org/wiki/Lagrange_multiplier

2808 questions
8
votes
2 answers

Maximum and minimum absolute of a function $(x,y)$

I want to know the maximum and minimum absolutes values of this function: $\ f(x,y)= 4x^2 + 9y^2 - x^2y^2 $ $\nabla f(x,y)=(8x-2xy^2,18y-2yx^2) $ I find these critical points: $\ (0,0);(3,2);(-3,2);(3,-2);(-3;-2) $ In$\ (0,0)$ the Hessian…
7
votes
1 answer

When using the method of Lagrangian multipliers, does it matter whether I subtract or add the lambda term?

As I understand it, the method of Lagrangian multipliers follows the form Minimize $f(x,y)$ subject to constraint $g(x,y)= c$ and involves an equation of the form $L(x,y,\lambda) = f(x,y) + \lambda (g(x,y) -c)$. Does it matter whether I add or…
6
votes
0 answers

Positive Lagrange multipliers of an equality constraint

Consider the problem \begin{align} \max_{x\in\mathbb{R}^n} f(x)\\ \text{subject to }\quad h(x) = 0\\ x\in X \end{align} where $X$ is a convex and compact subset of $\mathbb{R}^n$. I also know that the Jacobian $\nabla h(x)$ is full rank for all…
jonem
  • 383
6
votes
4 answers

Why does taking derivatives of $L$ in Lagrangian multiplier problems let me find solutions to optimizations problems?

Consider the problem Maximize $f(\mathbf{x})$ subject to $g(\mathbf{x})=c$ Using the method of Lagrangian multpliers, I would set up a Lagrangian like $$L = f(\mathbf{x})-\lambda (g(\mathbf{x})-c)$$ I would then solve for $\frac{\partial…
5
votes
1 answer

Lagrange multipliers and not tangent contour lines

I've seen a few questions about the subject but still couldn't figure it out. I don't fully understand why the Lagrange multipliers always relate to tangent contour lines between the specified function and the constraint. What if the maximum or the…
merto
  • 53
5
votes
3 answers

Lagrange multiplier to function $x^2+y^2+z^2$

Use Lagrange multipliers to find the maximum and minimum values of the function subject to the given condition: $$f(x,y,z)=x^2+y^2+z^2; \quad x^4+y^4+z^4=1$$ My solution: As we do in Lagrange multipliers I have considered $\nabla f=\lambda \nabla g$…
RFZ
  • 16,814
4
votes
4 answers

Maximum and minimum distance from the origin

Find the maximum and minimum distances from the origin to the curve $5x^3+6xy+5y^2-8=0$ My attempt: We have to maximise and minimise the following function $x^2+y^2$ with the constraint that $5x^3+6xy+5y^2-8=0$.…
GTX OC
  • 1,569
  • 2
  • 12
  • 19
4
votes
1 answer

How to determine the dual constraints when solving Lagrange duality problems?

I'm studying convex optimization and had a question regarding dual constraints while solving an exercise. The problem is as follows: $$\begin{array}{ll} \text{minimize} & x^2 + 1\\ \text{subject to} & (x-2)(x-4)\le0\end{array}$$ with variable…
Sean
  • 1,487
4
votes
0 answers

For what functions do Lagrange multipliers fail to find the maximum?

Wikipedia gives the following illustration for the method of Lagrange multipliers. In this case, $d_1$ is the highest-valued contour line, so clearly the method works. But what if $d_2$ or $d_3$ were higher than $d_1$? Wouldn't the method fail? If…
Tyler
  • 287
4
votes
1 answer

Use Lagrangian multiplier to minimize divergence of a field

Lagrangian multipliers can be used to mini-/maximize a multivariable function $f()$ subject to one or multiple constraints. Dedner et al. used the technique of generalized Lagrangian multipliers (GLM) to minimize the divergence of the magnetic field…
MrD
  • 93
3
votes
1 answer

Explain Lagrange multipliers?

I am having serious issues with comprehension of this method. In particular, I don't understand the conditions. Thus far, I think it's something like; Given an objective $f: A \to \mathbb{R}^1$ and a constraint $g: A \to \mathbb{R}^1$, wherein $C =…
user41281
  • 554
3
votes
2 answers

Lagrange multiplier pedagogy

From what I can tell, the traditional way to teach Lagrange multipliers is to start with a function $f(x,y,z)$ and to look for extrema of $f$ subject to $g(x,y,z)=k$. That is, we restrict $(x,y,z)$ to be on the level curve $g(x,y,z)=k$. We then look…
drzaius7
  • 464
3
votes
2 answers

Lagrange multipliers - maximum and minimum values given constraint

Use Lagrange multipliers to find the maximum and minimum values of the function subject to the given constraint. (If an answer does not exist, enter DNE.) $ \ \ f(x, y, z) = xyz \ ; \ \ x^2 + 2y^2 + 3z^2 = 96$ What I have gotten to: $\Delta f = \…
Jason
  • 41
  • 1
  • 1
  • 5
3
votes
1 answer

Lagrange multiplier method - cannot resolve equations but graphically I have the answer

My problem is similar to this: Intuitive explanation for formula of maximum length of a pipe moving around a corner? However my pipe (20m long) must pass through a specific point (5,5) in the X-Y plane and the question is then how high up the wall…
3
votes
1 answer

What goes wrong when I use squared constraint as a Lagrange multiplier?

Consider a problem of minimizing $f(x)$ under the constraint that $g(x)=0$. The standard approach is to use Lagrange multiplier $$\mathcal L = f(x) -\lambda g(x)$$ and differentiate $\mathcal L$ to get $$f'(x) - \lambda g'(x) = 0.$$ Now, $g(x) =0$…
amoeba
  • 291
1
2 3
12 13