Optimization with an Ellipse, Lagrange Multipliers












0














The plane $ x + y + 2z = 4$ intersects the paraboloid $z=x^2+y^2$ in an ellipse. Find the points on this ellipse that are nearest to and farthest from the origin.



From this, I thought that $x^2+y^2+z^2$ was the distance equation that I needed to minimize, and $x+y+2z=4$ and $z=x^2+y^2$ were the two constraints. I rearranged the second constraint equation to get $z-x^2-y^2=0$.



So I set it up as follows, ($a$ is supposed to be lambda and $b$ is supposed to be mu):



$2x = a(1) + b(-2x)$



$2y = a(1) + b(-2y)$



$2z = a(2) + b(1)$.



From this, I then got:



$2xyz = a(yz) + b(-2xyz)$



$2xyz = a(xz) + b(-2xyz)$



$2xyz = a(2xy) + b(xy)$



This gave me that $yz - 2xyz = xz-2xyz$. Therefore, $yz = xz$ and therefore $x=y$.



Plugging this into the plane equation, I got that $2x +2z$ $=$ $4$, and therefore $z$ $=$ $2-x$. This gave the values of $x=2$, $y=2$ and $z=0$ and therefore the point $(2, 2, 0)$. But this point is not right for either the minimum or maximum distance.



If anyone knows where I may have gone wrong and can provide feedback, I would greatly appreciate it!










share|cite|improve this question




















  • 1




    You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
    – amd
    Nov 24 at 5:13










  • $yz=xz$ implies either $y=x$ or $z=0$.
    – amd
    Nov 24 at 5:14
















0














The plane $ x + y + 2z = 4$ intersects the paraboloid $z=x^2+y^2$ in an ellipse. Find the points on this ellipse that are nearest to and farthest from the origin.



From this, I thought that $x^2+y^2+z^2$ was the distance equation that I needed to minimize, and $x+y+2z=4$ and $z=x^2+y^2$ were the two constraints. I rearranged the second constraint equation to get $z-x^2-y^2=0$.



So I set it up as follows, ($a$ is supposed to be lambda and $b$ is supposed to be mu):



$2x = a(1) + b(-2x)$



$2y = a(1) + b(-2y)$



$2z = a(2) + b(1)$.



From this, I then got:



$2xyz = a(yz) + b(-2xyz)$



$2xyz = a(xz) + b(-2xyz)$



$2xyz = a(2xy) + b(xy)$



This gave me that $yz - 2xyz = xz-2xyz$. Therefore, $yz = xz$ and therefore $x=y$.



Plugging this into the plane equation, I got that $2x +2z$ $=$ $4$, and therefore $z$ $=$ $2-x$. This gave the values of $x=2$, $y=2$ and $z=0$ and therefore the point $(2, 2, 0)$. But this point is not right for either the minimum or maximum distance.



If anyone knows where I may have gone wrong and can provide feedback, I would greatly appreciate it!










share|cite|improve this question




















  • 1




    You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
    – amd
    Nov 24 at 5:13










  • $yz=xz$ implies either $y=x$ or $z=0$.
    – amd
    Nov 24 at 5:14














0












0








0







The plane $ x + y + 2z = 4$ intersects the paraboloid $z=x^2+y^2$ in an ellipse. Find the points on this ellipse that are nearest to and farthest from the origin.



From this, I thought that $x^2+y^2+z^2$ was the distance equation that I needed to minimize, and $x+y+2z=4$ and $z=x^2+y^2$ were the two constraints. I rearranged the second constraint equation to get $z-x^2-y^2=0$.



So I set it up as follows, ($a$ is supposed to be lambda and $b$ is supposed to be mu):



$2x = a(1) + b(-2x)$



$2y = a(1) + b(-2y)$



$2z = a(2) + b(1)$.



From this, I then got:



$2xyz = a(yz) + b(-2xyz)$



$2xyz = a(xz) + b(-2xyz)$



$2xyz = a(2xy) + b(xy)$



This gave me that $yz - 2xyz = xz-2xyz$. Therefore, $yz = xz$ and therefore $x=y$.



Plugging this into the plane equation, I got that $2x +2z$ $=$ $4$, and therefore $z$ $=$ $2-x$. This gave the values of $x=2$, $y=2$ and $z=0$ and therefore the point $(2, 2, 0)$. But this point is not right for either the minimum or maximum distance.



If anyone knows where I may have gone wrong and can provide feedback, I would greatly appreciate it!










share|cite|improve this question















The plane $ x + y + 2z = 4$ intersects the paraboloid $z=x^2+y^2$ in an ellipse. Find the points on this ellipse that are nearest to and farthest from the origin.



From this, I thought that $x^2+y^2+z^2$ was the distance equation that I needed to minimize, and $x+y+2z=4$ and $z=x^2+y^2$ were the two constraints. I rearranged the second constraint equation to get $z-x^2-y^2=0$.



So I set it up as follows, ($a$ is supposed to be lambda and $b$ is supposed to be mu):



$2x = a(1) + b(-2x)$



$2y = a(1) + b(-2y)$



$2z = a(2) + b(1)$.



From this, I then got:



$2xyz = a(yz) + b(-2xyz)$



$2xyz = a(xz) + b(-2xyz)$



$2xyz = a(2xy) + b(xy)$



This gave me that $yz - 2xyz = xz-2xyz$. Therefore, $yz = xz$ and therefore $x=y$.



Plugging this into the plane equation, I got that $2x +2z$ $=$ $4$, and therefore $z$ $=$ $2-x$. This gave the values of $x=2$, $y=2$ and $z=0$ and therefore the point $(2, 2, 0)$. But this point is not right for either the minimum or maximum distance.



If anyone knows where I may have gone wrong and can provide feedback, I would greatly appreciate it!







calculus multivariable-calculus optimization lagrange-multiplier






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 24 at 4:56









Key Flex

7,46941232




7,46941232










asked Nov 24 at 4:29









sktsasus

1,010415




1,010415








  • 1




    You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
    – amd
    Nov 24 at 5:13










  • $yz=xz$ implies either $y=x$ or $z=0$.
    – amd
    Nov 24 at 5:14














  • 1




    You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
    – amd
    Nov 24 at 5:13










  • $yz=xz$ implies either $y=x$ or $z=0$.
    – amd
    Nov 24 at 5:14








1




1




You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
– amd
Nov 24 at 5:13




You should really learn a bit of LaTeX if you’re going to be posting more questions on this site. For $lambda$ and $mu$, write lambda and mu, respectively.
– amd
Nov 24 at 5:13












$yz=xz$ implies either $y=x$ or $z=0$.
– amd
Nov 24 at 5:14




$yz=xz$ implies either $y=x$ or $z=0$.
– amd
Nov 24 at 5:14










1 Answer
1






active

oldest

votes


















1














Here, the two constraints are $g (x, y, z) = x+y+2z=4$ and $h (x, y, z) = x^2 + y^2 − z$.



Any critical point that we find during the Lagrange multiplier process will satisfy both of these constraints, so we actually don’t need to find an explicit equation for the ellipse that is their intersection.



Suppose that $(x, y, z)$ is any point that satisfies both of the constraints (and hence is on the ellipse.)



Then the distance from $(x, y, z)$ to the origin is given by $sqrt{(x-0)^2+(y-0)^2+(z-0)^2}$.This expression
(and its partial derivatives) would be cumbersome to work with, so we will find the the extrema
of the square of the distance. Thus, our objective function is
$$f (x, y, z) = x^2 + y^2 + z^2$$and$$∇f = langle2x, 2y, 2zrangle$$
$$lambda∇g = langleλ, λ, 2λrangle$$
$$mu∇h = langle2mu x, 2mu y, −mu rangle $$
Thus the system we need to solve for $(x, y, z)$ is
$$2x=lambda+2mu xtag1$$
$$2y=lambda+2mu ytag2$$
$$2z=2lambda-mu xtag3$$
$$x+y+2z=4tag4$$
$$x^2+y^2-z=0tag5$$
Subtracting $(2)$ from $(1)$ and factoring gives
$$2(x-y)=2mu(x-y)$$
so $mu=1$ whenever $xneq y$. Substituting $mu=1$ into $(1)$ gives us $lambda=0$ and substituting $mu=1$ and $lambda=0$ into $(3)$ gives us $2z=-1$ and thus $z=-dfrac12$ into $(4)$ and $(5)$ gives us $$x+y-5=0$$
$$x^2+y^2+dfrac12=0$$
However, $x^2+y^2+dfrac12=0$ has no solution. Thus we must have $x=y$



Since we now know $x=y$, $(4)$ and $(5)$ become
$$2x+2z=4$$
$$2x^2-z=0$$so
$$z=2-x$$
$$z=2x^2$$
Combining these together gives us $$2x^2=2-x$$, so $2x^2+x-2=0$.



Now solve the above equation for $x$.



Then substitute to get the critical points $(x_1,y_1,z_1)$ and $x_2,y_2,z_2$.



When you substitute them into the objective functions then you get $f(x_1,y_1,z_1)=?$ and $f(x_2,y_2,z_2)=?$



Then compare both $sqrt{f(x_1,y_1,z_1)=?}$ and $sqrt{f(x_2,y_2,z_2)=?}$ to find minimum and maximum distance.






share|cite|improve this answer























    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f3011182%2foptimization-with-an-ellipse-lagrange-multipliers%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Here, the two constraints are $g (x, y, z) = x+y+2z=4$ and $h (x, y, z) = x^2 + y^2 − z$.



    Any critical point that we find during the Lagrange multiplier process will satisfy both of these constraints, so we actually don’t need to find an explicit equation for the ellipse that is their intersection.



    Suppose that $(x, y, z)$ is any point that satisfies both of the constraints (and hence is on the ellipse.)



    Then the distance from $(x, y, z)$ to the origin is given by $sqrt{(x-0)^2+(y-0)^2+(z-0)^2}$.This expression
    (and its partial derivatives) would be cumbersome to work with, so we will find the the extrema
    of the square of the distance. Thus, our objective function is
    $$f (x, y, z) = x^2 + y^2 + z^2$$and$$∇f = langle2x, 2y, 2zrangle$$
    $$lambda∇g = langleλ, λ, 2λrangle$$
    $$mu∇h = langle2mu x, 2mu y, −mu rangle $$
    Thus the system we need to solve for $(x, y, z)$ is
    $$2x=lambda+2mu xtag1$$
    $$2y=lambda+2mu ytag2$$
    $$2z=2lambda-mu xtag3$$
    $$x+y+2z=4tag4$$
    $$x^2+y^2-z=0tag5$$
    Subtracting $(2)$ from $(1)$ and factoring gives
    $$2(x-y)=2mu(x-y)$$
    so $mu=1$ whenever $xneq y$. Substituting $mu=1$ into $(1)$ gives us $lambda=0$ and substituting $mu=1$ and $lambda=0$ into $(3)$ gives us $2z=-1$ and thus $z=-dfrac12$ into $(4)$ and $(5)$ gives us $$x+y-5=0$$
    $$x^2+y^2+dfrac12=0$$
    However, $x^2+y^2+dfrac12=0$ has no solution. Thus we must have $x=y$



    Since we now know $x=y$, $(4)$ and $(5)$ become
    $$2x+2z=4$$
    $$2x^2-z=0$$so
    $$z=2-x$$
    $$z=2x^2$$
    Combining these together gives us $$2x^2=2-x$$, so $2x^2+x-2=0$.



    Now solve the above equation for $x$.



    Then substitute to get the critical points $(x_1,y_1,z_1)$ and $x_2,y_2,z_2$.



    When you substitute them into the objective functions then you get $f(x_1,y_1,z_1)=?$ and $f(x_2,y_2,z_2)=?$



    Then compare both $sqrt{f(x_1,y_1,z_1)=?}$ and $sqrt{f(x_2,y_2,z_2)=?}$ to find minimum and maximum distance.






    share|cite|improve this answer




























      1














      Here, the two constraints are $g (x, y, z) = x+y+2z=4$ and $h (x, y, z) = x^2 + y^2 − z$.



      Any critical point that we find during the Lagrange multiplier process will satisfy both of these constraints, so we actually don’t need to find an explicit equation for the ellipse that is their intersection.



      Suppose that $(x, y, z)$ is any point that satisfies both of the constraints (and hence is on the ellipse.)



      Then the distance from $(x, y, z)$ to the origin is given by $sqrt{(x-0)^2+(y-0)^2+(z-0)^2}$.This expression
      (and its partial derivatives) would be cumbersome to work with, so we will find the the extrema
      of the square of the distance. Thus, our objective function is
      $$f (x, y, z) = x^2 + y^2 + z^2$$and$$∇f = langle2x, 2y, 2zrangle$$
      $$lambda∇g = langleλ, λ, 2λrangle$$
      $$mu∇h = langle2mu x, 2mu y, −mu rangle $$
      Thus the system we need to solve for $(x, y, z)$ is
      $$2x=lambda+2mu xtag1$$
      $$2y=lambda+2mu ytag2$$
      $$2z=2lambda-mu xtag3$$
      $$x+y+2z=4tag4$$
      $$x^2+y^2-z=0tag5$$
      Subtracting $(2)$ from $(1)$ and factoring gives
      $$2(x-y)=2mu(x-y)$$
      so $mu=1$ whenever $xneq y$. Substituting $mu=1$ into $(1)$ gives us $lambda=0$ and substituting $mu=1$ and $lambda=0$ into $(3)$ gives us $2z=-1$ and thus $z=-dfrac12$ into $(4)$ and $(5)$ gives us $$x+y-5=0$$
      $$x^2+y^2+dfrac12=0$$
      However, $x^2+y^2+dfrac12=0$ has no solution. Thus we must have $x=y$



      Since we now know $x=y$, $(4)$ and $(5)$ become
      $$2x+2z=4$$
      $$2x^2-z=0$$so
      $$z=2-x$$
      $$z=2x^2$$
      Combining these together gives us $$2x^2=2-x$$, so $2x^2+x-2=0$.



      Now solve the above equation for $x$.



      Then substitute to get the critical points $(x_1,y_1,z_1)$ and $x_2,y_2,z_2$.



      When you substitute them into the objective functions then you get $f(x_1,y_1,z_1)=?$ and $f(x_2,y_2,z_2)=?$



      Then compare both $sqrt{f(x_1,y_1,z_1)=?}$ and $sqrt{f(x_2,y_2,z_2)=?}$ to find minimum and maximum distance.






      share|cite|improve this answer


























        1












        1








        1






        Here, the two constraints are $g (x, y, z) = x+y+2z=4$ and $h (x, y, z) = x^2 + y^2 − z$.



        Any critical point that we find during the Lagrange multiplier process will satisfy both of these constraints, so we actually don’t need to find an explicit equation for the ellipse that is their intersection.



        Suppose that $(x, y, z)$ is any point that satisfies both of the constraints (and hence is on the ellipse.)



        Then the distance from $(x, y, z)$ to the origin is given by $sqrt{(x-0)^2+(y-0)^2+(z-0)^2}$.This expression
        (and its partial derivatives) would be cumbersome to work with, so we will find the the extrema
        of the square of the distance. Thus, our objective function is
        $$f (x, y, z) = x^2 + y^2 + z^2$$and$$∇f = langle2x, 2y, 2zrangle$$
        $$lambda∇g = langleλ, λ, 2λrangle$$
        $$mu∇h = langle2mu x, 2mu y, −mu rangle $$
        Thus the system we need to solve for $(x, y, z)$ is
        $$2x=lambda+2mu xtag1$$
        $$2y=lambda+2mu ytag2$$
        $$2z=2lambda-mu xtag3$$
        $$x+y+2z=4tag4$$
        $$x^2+y^2-z=0tag5$$
        Subtracting $(2)$ from $(1)$ and factoring gives
        $$2(x-y)=2mu(x-y)$$
        so $mu=1$ whenever $xneq y$. Substituting $mu=1$ into $(1)$ gives us $lambda=0$ and substituting $mu=1$ and $lambda=0$ into $(3)$ gives us $2z=-1$ and thus $z=-dfrac12$ into $(4)$ and $(5)$ gives us $$x+y-5=0$$
        $$x^2+y^2+dfrac12=0$$
        However, $x^2+y^2+dfrac12=0$ has no solution. Thus we must have $x=y$



        Since we now know $x=y$, $(4)$ and $(5)$ become
        $$2x+2z=4$$
        $$2x^2-z=0$$so
        $$z=2-x$$
        $$z=2x^2$$
        Combining these together gives us $$2x^2=2-x$$, so $2x^2+x-2=0$.



        Now solve the above equation for $x$.



        Then substitute to get the critical points $(x_1,y_1,z_1)$ and $x_2,y_2,z_2$.



        When you substitute them into the objective functions then you get $f(x_1,y_1,z_1)=?$ and $f(x_2,y_2,z_2)=?$



        Then compare both $sqrt{f(x_1,y_1,z_1)=?}$ and $sqrt{f(x_2,y_2,z_2)=?}$ to find minimum and maximum distance.






        share|cite|improve this answer














        Here, the two constraints are $g (x, y, z) = x+y+2z=4$ and $h (x, y, z) = x^2 + y^2 − z$.



        Any critical point that we find during the Lagrange multiplier process will satisfy both of these constraints, so we actually don’t need to find an explicit equation for the ellipse that is their intersection.



        Suppose that $(x, y, z)$ is any point that satisfies both of the constraints (and hence is on the ellipse.)



        Then the distance from $(x, y, z)$ to the origin is given by $sqrt{(x-0)^2+(y-0)^2+(z-0)^2}$.This expression
        (and its partial derivatives) would be cumbersome to work with, so we will find the the extrema
        of the square of the distance. Thus, our objective function is
        $$f (x, y, z) = x^2 + y^2 + z^2$$and$$∇f = langle2x, 2y, 2zrangle$$
        $$lambda∇g = langleλ, λ, 2λrangle$$
        $$mu∇h = langle2mu x, 2mu y, −mu rangle $$
        Thus the system we need to solve for $(x, y, z)$ is
        $$2x=lambda+2mu xtag1$$
        $$2y=lambda+2mu ytag2$$
        $$2z=2lambda-mu xtag3$$
        $$x+y+2z=4tag4$$
        $$x^2+y^2-z=0tag5$$
        Subtracting $(2)$ from $(1)$ and factoring gives
        $$2(x-y)=2mu(x-y)$$
        so $mu=1$ whenever $xneq y$. Substituting $mu=1$ into $(1)$ gives us $lambda=0$ and substituting $mu=1$ and $lambda=0$ into $(3)$ gives us $2z=-1$ and thus $z=-dfrac12$ into $(4)$ and $(5)$ gives us $$x+y-5=0$$
        $$x^2+y^2+dfrac12=0$$
        However, $x^2+y^2+dfrac12=0$ has no solution. Thus we must have $x=y$



        Since we now know $x=y$, $(4)$ and $(5)$ become
        $$2x+2z=4$$
        $$2x^2-z=0$$so
        $$z=2-x$$
        $$z=2x^2$$
        Combining these together gives us $$2x^2=2-x$$, so $2x^2+x-2=0$.



        Now solve the above equation for $x$.



        Then substitute to get the critical points $(x_1,y_1,z_1)$ and $x_2,y_2,z_2$.



        When you substitute them into the objective functions then you get $f(x_1,y_1,z_1)=?$ and $f(x_2,y_2,z_2)=?$



        Then compare both $sqrt{f(x_1,y_1,z_1)=?}$ and $sqrt{f(x_2,y_2,z_2)=?}$ to find minimum and maximum distance.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 24 at 4:55

























        answered Nov 24 at 4:46









        Key Flex

        7,46941232




        7,46941232






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3011182%2foptimization-with-an-ellipse-lagrange-multipliers%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...