Lagrangian with two nonzero constraints

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1













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?







share|cite|improve this question





















  • 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














up vote
0
down vote

favorite
1













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?







share|cite|improve this question





















  • 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












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1






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?







share|cite|improve this question














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?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








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
















  • 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










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.)






share|cite|improve this answer






























    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.$$






    share|cite|improve this answer





















    • 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


















    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



    enter image description here






    share|cite|improve this answer





















    • sorry mine was a pure mathematical question, i dont need an answer using a script.
      – Fulcrum
      Jul 21 at 12:01










    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    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






























    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.)






    share|cite|improve this answer



























      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.)






      share|cite|improve this answer

























        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.)






        share|cite|improve this answer















        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.)







        share|cite|improve this answer















        share|cite|improve this answer



        share|cite|improve this answer








        edited Jul 22 at 1:56


























        answered Jul 21 at 18:58









        amd

        25.9k2943




        25.9k2943




















            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.$$






            share|cite|improve this answer





















            • 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















            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.$$






            share|cite|improve this answer





















            • 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













            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.$$






            share|cite|improve this answer













            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.$$







            share|cite|improve this answer













            share|cite|improve this answer



            share|cite|improve this answer











            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

















            • 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











            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



            enter image description here






            share|cite|improve this answer





















            • sorry mine was a pure mathematical question, i dont need an answer using a script.
              – Fulcrum
              Jul 21 at 12:01














            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



            enter image description here






            share|cite|improve this answer





















            • sorry mine was a pure mathematical question, i dont need an answer using a script.
              – Fulcrum
              Jul 21 at 12:01












            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



            enter image description here






            share|cite|improve this answer













            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



            enter image description here







            share|cite|improve this answer













            share|cite|improve this answer



            share|cite|improve this answer











            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
















            • 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












             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            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













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?