Lagrangian with two nonzero constraints
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Determine the maximum value of $OP$, $O$ being the origin and $P$ being a point on the curve defined by $x^2+y^2-2z^2=5$ and $x+2y+z=5$.
I am using Lagrangian multipliers $lambda$ and $mu$. I have done problems in which one of the constraints goes to zero. Here both are non-zero. How will we eliminate them from the differential equation?
optimization lagrange-multiplier
add a comment |Â
up vote
0
down vote
favorite
Determine the maximum value of $OP$, $O$ being the origin and $P$ being a point on the curve defined by $x^2+y^2-2z^2=5$ and $x+2y+z=5$.
I am using Lagrangian multipliers $lambda$ and $mu$. I have done problems in which one of the constraints goes to zero. Here both are non-zero. How will we eliminate them from the differential equation?
optimization lagrange-multiplier
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Determine the maximum value of $OP$, $O$ being the origin and $P$ being a point on the curve defined by $x^2+y^2-2z^2=5$ and $x+2y+z=5$.
I am using Lagrangian multipliers $lambda$ and $mu$. I have done problems in which one of the constraints goes to zero. Here both are non-zero. How will we eliminate them from the differential equation?
optimization lagrange-multiplier
Determine the maximum value of $OP$, $O$ being the origin and $P$ being a point on the curve defined by $x^2+y^2-2z^2=5$ and $x+2y+z=5$.
I am using Lagrangian multipliers $lambda$ and $mu$. I have done problems in which one of the constraints goes to zero. Here both are non-zero. How will we eliminate them from the differential equation?
optimization lagrange-multiplier
edited Jul 21 at 6:56
Rodrigo de Azevedo
12.6k41751
12.6k41751
asked Jul 21 at 4:50
Fulcrum
195
195
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52
add a comment |Â
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
1
down vote
accepted
Grit your teeth and grind through the solution. It’s really not all that involved and requires at worst solving a simple quadratic equation. Besides the two constraints, you have the equations $$2x-2lambda x -mu = 0 \ 2y-2lambda y-2mu = 0 \ 2z+4lambda z - mu = 0.$$ You should be able to see at a glance that $mu$ can be eliminated by forming various linear combinations of these equations. For example, if you subtract twice the first from the second, the result factors nicely into $$2(2x-y)(lambda-1) = 0.$$ Now you have two possibilities to pursue. Back-substitute each in turn into your system of equations and continue solving. (It turns out that one of these two paths leads to $mu=0$. One of the multipliers vanishes after all.)
add a comment |Â
up vote
1
down vote
Guide:
We can convert $x^2+y^2-2z^2=5$ to $x^2+y^2-2z^2-5=0$. Let $g_1(x,y,z)=x^2+y^2-2z^2-5$.
Perform similar trick for the second constraint.
Hence now, you have reduced the problem to an expression that you are familiar with $$max_x,y,z f(x)$$ subject to $$g_1(x,y,z)=0$$ $$g_2(x,y,z)=0.$$
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
add a comment |Â
up vote
1
down vote
Computers were invented for a reason! Using SymPy to solve the system of polynomial equations:
from sympy import *
x, y, z, mu1, mu2 = symbols('x y z mu1 mu2', real=True)
# define Lagrangian
L = (x**2 + y**2 + z**2) - mu1 * (x**2 + y**2 - 2*z**2 - 5) - mu2 * (x + 2*y + z - 5)
# compute partial derivatives
partials = [ diff(L,var) for var in [x, y, z, mu1, mu2] ]
# find where partial derivatives vanish
print solve_poly_system(partials, x, y, z, mu1, mu2)
This script outputs the following list of solutions.
[(1, 2, 0, 1, 0), (11/9, 22/9, -10/9, -7/3, 220/27)]
Plotting the hyperboloid, the plane, and points $(1, 2, 0)$ and $left( frac119, frac229, -frac109 right)$, we have
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Grit your teeth and grind through the solution. It’s really not all that involved and requires at worst solving a simple quadratic equation. Besides the two constraints, you have the equations $$2x-2lambda x -mu = 0 \ 2y-2lambda y-2mu = 0 \ 2z+4lambda z - mu = 0.$$ You should be able to see at a glance that $mu$ can be eliminated by forming various linear combinations of these equations. For example, if you subtract twice the first from the second, the result factors nicely into $$2(2x-y)(lambda-1) = 0.$$ Now you have two possibilities to pursue. Back-substitute each in turn into your system of equations and continue solving. (It turns out that one of these two paths leads to $mu=0$. One of the multipliers vanishes after all.)
add a comment |Â
up vote
1
down vote
accepted
Grit your teeth and grind through the solution. It’s really not all that involved and requires at worst solving a simple quadratic equation. Besides the two constraints, you have the equations $$2x-2lambda x -mu = 0 \ 2y-2lambda y-2mu = 0 \ 2z+4lambda z - mu = 0.$$ You should be able to see at a glance that $mu$ can be eliminated by forming various linear combinations of these equations. For example, if you subtract twice the first from the second, the result factors nicely into $$2(2x-y)(lambda-1) = 0.$$ Now you have two possibilities to pursue. Back-substitute each in turn into your system of equations and continue solving. (It turns out that one of these two paths leads to $mu=0$. One of the multipliers vanishes after all.)
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Grit your teeth and grind through the solution. It’s really not all that involved and requires at worst solving a simple quadratic equation. Besides the two constraints, you have the equations $$2x-2lambda x -mu = 0 \ 2y-2lambda y-2mu = 0 \ 2z+4lambda z - mu = 0.$$ You should be able to see at a glance that $mu$ can be eliminated by forming various linear combinations of these equations. For example, if you subtract twice the first from the second, the result factors nicely into $$2(2x-y)(lambda-1) = 0.$$ Now you have two possibilities to pursue. Back-substitute each in turn into your system of equations and continue solving. (It turns out that one of these two paths leads to $mu=0$. One of the multipliers vanishes after all.)
Grit your teeth and grind through the solution. It’s really not all that involved and requires at worst solving a simple quadratic equation. Besides the two constraints, you have the equations $$2x-2lambda x -mu = 0 \ 2y-2lambda y-2mu = 0 \ 2z+4lambda z - mu = 0.$$ You should be able to see at a glance that $mu$ can be eliminated by forming various linear combinations of these equations. For example, if you subtract twice the first from the second, the result factors nicely into $$2(2x-y)(lambda-1) = 0.$$ Now you have two possibilities to pursue. Back-substitute each in turn into your system of equations and continue solving. (It turns out that one of these two paths leads to $mu=0$. One of the multipliers vanishes after all.)
edited Jul 22 at 1:56
answered Jul 21 at 18:58
amd
25.9k2943
25.9k2943
add a comment |Â
add a comment |Â
up vote
1
down vote
Guide:
We can convert $x^2+y^2-2z^2=5$ to $x^2+y^2-2z^2-5=0$. Let $g_1(x,y,z)=x^2+y^2-2z^2-5$.
Perform similar trick for the second constraint.
Hence now, you have reduced the problem to an expression that you are familiar with $$max_x,y,z f(x)$$ subject to $$g_1(x,y,z)=0$$ $$g_2(x,y,z)=0.$$
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
add a comment |Â
up vote
1
down vote
Guide:
We can convert $x^2+y^2-2z^2=5$ to $x^2+y^2-2z^2-5=0$. Let $g_1(x,y,z)=x^2+y^2-2z^2-5$.
Perform similar trick for the second constraint.
Hence now, you have reduced the problem to an expression that you are familiar with $$max_x,y,z f(x)$$ subject to $$g_1(x,y,z)=0$$ $$g_2(x,y,z)=0.$$
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Guide:
We can convert $x^2+y^2-2z^2=5$ to $x^2+y^2-2z^2-5=0$. Let $g_1(x,y,z)=x^2+y^2-2z^2-5$.
Perform similar trick for the second constraint.
Hence now, you have reduced the problem to an expression that you are familiar with $$max_x,y,z f(x)$$ subject to $$g_1(x,y,z)=0$$ $$g_2(x,y,z)=0.$$
Guide:
We can convert $x^2+y^2-2z^2=5$ to $x^2+y^2-2z^2-5=0$. Let $g_1(x,y,z)=x^2+y^2-2z^2-5$.
Perform similar trick for the second constraint.
Hence now, you have reduced the problem to an expression that you are familiar with $$max_x,y,z f(x)$$ subject to $$g_1(x,y,z)=0$$ $$g_2(x,y,z)=0.$$
answered Jul 21 at 4:58


Siong Thye Goh
77.6k134795
77.6k134795
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
add a comment |Â
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
That I know, I have done problems. But you see in most of these problems one of the contraints equals to zero, just check in this site itself for similar problems. So that after taking partial derivatives and manipulating the fractions we are able to eliminate one of the lambda or mu. But here since both constraints are nonzero, so Im unable to eliminate neither of lamda or mu from the partial derivative equations.
– Fulcrum
Jul 21 at 5:02
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
can you include your attempt in your post?
– Siong Thye Goh
Jul 21 at 5:05
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
@Fulcrum You happened to get lucky in those other problems. In general, the multipliers will be non-zero and their values sometimes have physical or geometrical significance. Plug in the values you’re getting and keep solving.
– amd
Jul 21 at 5:06
add a comment |Â
up vote
1
down vote
Computers were invented for a reason! Using SymPy to solve the system of polynomial equations:
from sympy import *
x, y, z, mu1, mu2 = symbols('x y z mu1 mu2', real=True)
# define Lagrangian
L = (x**2 + y**2 + z**2) - mu1 * (x**2 + y**2 - 2*z**2 - 5) - mu2 * (x + 2*y + z - 5)
# compute partial derivatives
partials = [ diff(L,var) for var in [x, y, z, mu1, mu2] ]
# find where partial derivatives vanish
print solve_poly_system(partials, x, y, z, mu1, mu2)
This script outputs the following list of solutions.
[(1, 2, 0, 1, 0), (11/9, 22/9, -10/9, -7/3, 220/27)]
Plotting the hyperboloid, the plane, and points $(1, 2, 0)$ and $left( frac119, frac229, -frac109 right)$, we have
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
add a comment |Â
up vote
1
down vote
Computers were invented for a reason! Using SymPy to solve the system of polynomial equations:
from sympy import *
x, y, z, mu1, mu2 = symbols('x y z mu1 mu2', real=True)
# define Lagrangian
L = (x**2 + y**2 + z**2) - mu1 * (x**2 + y**2 - 2*z**2 - 5) - mu2 * (x + 2*y + z - 5)
# compute partial derivatives
partials = [ diff(L,var) for var in [x, y, z, mu1, mu2] ]
# find where partial derivatives vanish
print solve_poly_system(partials, x, y, z, mu1, mu2)
This script outputs the following list of solutions.
[(1, 2, 0, 1, 0), (11/9, 22/9, -10/9, -7/3, 220/27)]
Plotting the hyperboloid, the plane, and points $(1, 2, 0)$ and $left( frac119, frac229, -frac109 right)$, we have
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Computers were invented for a reason! Using SymPy to solve the system of polynomial equations:
from sympy import *
x, y, z, mu1, mu2 = symbols('x y z mu1 mu2', real=True)
# define Lagrangian
L = (x**2 + y**2 + z**2) - mu1 * (x**2 + y**2 - 2*z**2 - 5) - mu2 * (x + 2*y + z - 5)
# compute partial derivatives
partials = [ diff(L,var) for var in [x, y, z, mu1, mu2] ]
# find where partial derivatives vanish
print solve_poly_system(partials, x, y, z, mu1, mu2)
This script outputs the following list of solutions.
[(1, 2, 0, 1, 0), (11/9, 22/9, -10/9, -7/3, 220/27)]
Plotting the hyperboloid, the plane, and points $(1, 2, 0)$ and $left( frac119, frac229, -frac109 right)$, we have
Computers were invented for a reason! Using SymPy to solve the system of polynomial equations:
from sympy import *
x, y, z, mu1, mu2 = symbols('x y z mu1 mu2', real=True)
# define Lagrangian
L = (x**2 + y**2 + z**2) - mu1 * (x**2 + y**2 - 2*z**2 - 5) - mu2 * (x + 2*y + z - 5)
# compute partial derivatives
partials = [ diff(L,var) for var in [x, y, z, mu1, mu2] ]
# find where partial derivatives vanish
print solve_poly_system(partials, x, y, z, mu1, mu2)
This script outputs the following list of solutions.
[(1, 2, 0, 1, 0), (11/9, 22/9, -10/9, -7/3, 220/27)]
Plotting the hyperboloid, the plane, and points $(1, 2, 0)$ and $left( frac119, frac229, -frac109 right)$, we have
answered Jul 21 at 9:08
Rodrigo de Azevedo
12.6k41751
12.6k41751
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
add a comment |Â
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
sorry mine was a pure mathematical question, i dont need an answer using a script.
– Fulcrum
Jul 21 at 12:01
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2858254%2flagrangian-with-two-nonzero-constraints%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Try eliminating the first multiplier through manipulating fractions. Then use the given constraints to eliminate the second.
– user575693
Jul 21 at 6:48
or else just use partial derivatives and utilize the function paramater for the same.
– user575693
Jul 21 at 6:52