Solving Geometric Program












0












$begingroup$


(Use a Calculator) Use geometric programming to solve the following program:



Minimine: $g(x) = frac{1000}{xy} + 2x + 2y + xy$, $forall x,y > 0$



I am a little confused on how to begin this program, can anyone give me any tips? Thanks!










share|cite|improve this question











$endgroup$












  • $begingroup$
    Should the function be $g(x,y)?$
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:17










  • $begingroup$
    Hmm good point, I'm not sure, I was given g(x).
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:20












  • $begingroup$
    Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:23










  • $begingroup$
    @RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:28


















0












$begingroup$


(Use a Calculator) Use geometric programming to solve the following program:



Minimine: $g(x) = frac{1000}{xy} + 2x + 2y + xy$, $forall x,y > 0$



I am a little confused on how to begin this program, can anyone give me any tips? Thanks!










share|cite|improve this question











$endgroup$












  • $begingroup$
    Should the function be $g(x,y)?$
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:17










  • $begingroup$
    Hmm good point, I'm not sure, I was given g(x).
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:20












  • $begingroup$
    Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:23










  • $begingroup$
    @RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:28
















0












0








0





$begingroup$


(Use a Calculator) Use geometric programming to solve the following program:



Minimine: $g(x) = frac{1000}{xy} + 2x + 2y + xy$, $forall x,y > 0$



I am a little confused on how to begin this program, can anyone give me any tips? Thanks!










share|cite|improve this question











$endgroup$




(Use a Calculator) Use geometric programming to solve the following program:



Minimine: $g(x) = frac{1000}{xy} + 2x + 2y + xy$, $forall x,y > 0$



I am a little confused on how to begin this program, can anyone give me any tips? Thanks!







calculus






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Feb 26 '16 at 0:15









Ross Millikan

299k24200374




299k24200374










asked Feb 26 '16 at 0:12









hawk2015hawk2015

5917




5917












  • $begingroup$
    Should the function be $g(x,y)?$
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:17










  • $begingroup$
    Hmm good point, I'm not sure, I was given g(x).
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:20












  • $begingroup$
    Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:23










  • $begingroup$
    @RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:28




















  • $begingroup$
    Should the function be $g(x,y)?$
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:17










  • $begingroup$
    Hmm good point, I'm not sure, I was given g(x).
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:20












  • $begingroup$
    Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
    $endgroup$
    – Ross Millikan
    Feb 26 '16 at 0:23










  • $begingroup$
    @RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
    $endgroup$
    – hawk2015
    Feb 26 '16 at 0:28


















$begingroup$
Should the function be $g(x,y)?$
$endgroup$
– Ross Millikan
Feb 26 '16 at 0:17




$begingroup$
Should the function be $g(x,y)?$
$endgroup$
– Ross Millikan
Feb 26 '16 at 0:17












$begingroup$
Hmm good point, I'm not sure, I was given g(x).
$endgroup$
– hawk2015
Feb 26 '16 at 0:20






$begingroup$
Hmm good point, I'm not sure, I was given g(x).
$endgroup$
– hawk2015
Feb 26 '16 at 0:20














$begingroup$
Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
$endgroup$
– Ross Millikan
Feb 26 '16 at 0:23




$begingroup$
Without the $forall y$ at the end, it could be that $y$ is a parameter and you are supposed to find the $x$ that minimizes $g(x)$. But with it, I believe you are supposed to find both $x$ and $y$ that make $g(x,y)$ a minimum.
$endgroup$
– Ross Millikan
Feb 26 '16 at 0:23












$begingroup$
@RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
$endgroup$
– hawk2015
Feb 26 '16 at 0:28






$begingroup$
@RossMillikan Pretty sure I am supposed to use the AM-GM inequality here.
$endgroup$
– hawk2015
Feb 26 '16 at 0:28












3 Answers
3






active

oldest

votes


















2












$begingroup$

This is exercise 26 from Chapter 2 , Peressini.
Solution is solve Dual geometric Programing: Maximize $$V(delta)=(frac{1000}{delta_1})^{delta_1}(frac{2}{delta_2})^{delta_2}(frac{2}{delta_3})^{delta_3}(frac{1}{delta_4})^{delta_4}$$
Where $delta = (delta_1 ,delta_2 ,delta_3 ,delta_4)$
with the conditions normality and ortogonality
$$ left{ begin{array}{2}
delta_1 +delta_2+delta_3+delta_4 =1 \[2ex]
-delta_1 +delta_2+0delta_3+delta_4 =0 \[3ex]
-delta_1 +0delta_2+delta_3+delta_4 =0end{array} right.
$$
And positivity condition $delta_1>0,delta_2>0,delta_3>0,delta_4>0$
Where the solution set from the system is $$K={(delta_1 ,delta_2 ,delta_3 ,delta_4) / delta_2=delta_3=1-2delta_1 , delta_4 = 3delta_1-1, frac{1}{3}<delta_1<frac{1}{2} }$$
Now Maximize $$f(s)=(frac{1000}{s})^{s}(frac{2}{1-2s})^{1-2s}(frac{2}{1-2s})^{1-2s}(frac{1}{3s-1})^{3s-1}$$ on the interval $1/3<s<1/2$.Taking logs,we maximize
$$ u(s) =ln f(s)=-sln frac{s}{1000}-2(1-2s)ln frac{1-2s}{2}-(3s-1)ln (3s-1)$$
Using Newton Method in $s_0 = 0.4$
$$s^{k+1}=s^k-frac{u'(s^k)}{u''(s^k)}approx s^k-frac{frac{u(s^k)-u(s^k-h)}{h}}{frac{u(s^k+h)-2u(s^k)+u(s^k-h)}{h^2}}$$
with $h = 0.001$ and 100 iterations, $s^*=0.4394 Rightarrow u(s^*)=4.4405$
Then $$f(s^*) =e^{u(s^*)}=84.8197 $$
This is the minimun of $g(mathbf{x})$






share|cite|improve this answer











$endgroup$





















    0












    $begingroup$

    Without a calculator, I would just use the fact that at the minimum you must have $frac {partial g(x,y)}{partial x}=frac {partial g(x,y)}{partial y}=0$ That will give you two equations in two unknowns. The symmetry indicates that $x=y$ at the minimum (though you should check that).



    My graphing calculator, Alpha, finds the minimum to be near $x=y=5.18284$ As it does not offer an exact result, I think you are just supposed to search around to find the minimum.






    share|cite|improve this answer











    $endgroup$





















      0












      $begingroup$

      The problem can also be solved numerically using cvxpy's geometric programming capabilities, like so:



      #!/usr/bin/env python3

      import cvxpy as cp

      x = cp.Variable(pos=True)
      y = cp.Variable(pos=True)

      constraints =
      objective = 1000/x/y+2*x+2*y+x*y

      prob = cp.Problem(cp.Minimize(objective), constraints)

      objval = prob.solve(gp=True)

      print("Objective value = {0}".format(objval))
      print("x value = {0}".format(x.value))
      print("y value = {0}".format(y.value))


      As output, this gives:



      Objective value = 84.82073466127639
      x value = 5.182852109768804
      y value = 5.18285210938629





      share|cite|improve this answer









      $endgroup$













        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%2f1672505%2fsolving-geometric-program%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2












        $begingroup$

        This is exercise 26 from Chapter 2 , Peressini.
        Solution is solve Dual geometric Programing: Maximize $$V(delta)=(frac{1000}{delta_1})^{delta_1}(frac{2}{delta_2})^{delta_2}(frac{2}{delta_3})^{delta_3}(frac{1}{delta_4})^{delta_4}$$
        Where $delta = (delta_1 ,delta_2 ,delta_3 ,delta_4)$
        with the conditions normality and ortogonality
        $$ left{ begin{array}{2}
        delta_1 +delta_2+delta_3+delta_4 =1 \[2ex]
        -delta_1 +delta_2+0delta_3+delta_4 =0 \[3ex]
        -delta_1 +0delta_2+delta_3+delta_4 =0end{array} right.
        $$
        And positivity condition $delta_1>0,delta_2>0,delta_3>0,delta_4>0$
        Where the solution set from the system is $$K={(delta_1 ,delta_2 ,delta_3 ,delta_4) / delta_2=delta_3=1-2delta_1 , delta_4 = 3delta_1-1, frac{1}{3}<delta_1<frac{1}{2} }$$
        Now Maximize $$f(s)=(frac{1000}{s})^{s}(frac{2}{1-2s})^{1-2s}(frac{2}{1-2s})^{1-2s}(frac{1}{3s-1})^{3s-1}$$ on the interval $1/3<s<1/2$.Taking logs,we maximize
        $$ u(s) =ln f(s)=-sln frac{s}{1000}-2(1-2s)ln frac{1-2s}{2}-(3s-1)ln (3s-1)$$
        Using Newton Method in $s_0 = 0.4$
        $$s^{k+1}=s^k-frac{u'(s^k)}{u''(s^k)}approx s^k-frac{frac{u(s^k)-u(s^k-h)}{h}}{frac{u(s^k+h)-2u(s^k)+u(s^k-h)}{h^2}}$$
        with $h = 0.001$ and 100 iterations, $s^*=0.4394 Rightarrow u(s^*)=4.4405$
        Then $$f(s^*) =e^{u(s^*)}=84.8197 $$
        This is the minimun of $g(mathbf{x})$






        share|cite|improve this answer











        $endgroup$


















          2












          $begingroup$

          This is exercise 26 from Chapter 2 , Peressini.
          Solution is solve Dual geometric Programing: Maximize $$V(delta)=(frac{1000}{delta_1})^{delta_1}(frac{2}{delta_2})^{delta_2}(frac{2}{delta_3})^{delta_3}(frac{1}{delta_4})^{delta_4}$$
          Where $delta = (delta_1 ,delta_2 ,delta_3 ,delta_4)$
          with the conditions normality and ortogonality
          $$ left{ begin{array}{2}
          delta_1 +delta_2+delta_3+delta_4 =1 \[2ex]
          -delta_1 +delta_2+0delta_3+delta_4 =0 \[3ex]
          -delta_1 +0delta_2+delta_3+delta_4 =0end{array} right.
          $$
          And positivity condition $delta_1>0,delta_2>0,delta_3>0,delta_4>0$
          Where the solution set from the system is $$K={(delta_1 ,delta_2 ,delta_3 ,delta_4) / delta_2=delta_3=1-2delta_1 , delta_4 = 3delta_1-1, frac{1}{3}<delta_1<frac{1}{2} }$$
          Now Maximize $$f(s)=(frac{1000}{s})^{s}(frac{2}{1-2s})^{1-2s}(frac{2}{1-2s})^{1-2s}(frac{1}{3s-1})^{3s-1}$$ on the interval $1/3<s<1/2$.Taking logs,we maximize
          $$ u(s) =ln f(s)=-sln frac{s}{1000}-2(1-2s)ln frac{1-2s}{2}-(3s-1)ln (3s-1)$$
          Using Newton Method in $s_0 = 0.4$
          $$s^{k+1}=s^k-frac{u'(s^k)}{u''(s^k)}approx s^k-frac{frac{u(s^k)-u(s^k-h)}{h}}{frac{u(s^k+h)-2u(s^k)+u(s^k-h)}{h^2}}$$
          with $h = 0.001$ and 100 iterations, $s^*=0.4394 Rightarrow u(s^*)=4.4405$
          Then $$f(s^*) =e^{u(s^*)}=84.8197 $$
          This is the minimun of $g(mathbf{x})$






          share|cite|improve this answer











          $endgroup$
















            2












            2








            2





            $begingroup$

            This is exercise 26 from Chapter 2 , Peressini.
            Solution is solve Dual geometric Programing: Maximize $$V(delta)=(frac{1000}{delta_1})^{delta_1}(frac{2}{delta_2})^{delta_2}(frac{2}{delta_3})^{delta_3}(frac{1}{delta_4})^{delta_4}$$
            Where $delta = (delta_1 ,delta_2 ,delta_3 ,delta_4)$
            with the conditions normality and ortogonality
            $$ left{ begin{array}{2}
            delta_1 +delta_2+delta_3+delta_4 =1 \[2ex]
            -delta_1 +delta_2+0delta_3+delta_4 =0 \[3ex]
            -delta_1 +0delta_2+delta_3+delta_4 =0end{array} right.
            $$
            And positivity condition $delta_1>0,delta_2>0,delta_3>0,delta_4>0$
            Where the solution set from the system is $$K={(delta_1 ,delta_2 ,delta_3 ,delta_4) / delta_2=delta_3=1-2delta_1 , delta_4 = 3delta_1-1, frac{1}{3}<delta_1<frac{1}{2} }$$
            Now Maximize $$f(s)=(frac{1000}{s})^{s}(frac{2}{1-2s})^{1-2s}(frac{2}{1-2s})^{1-2s}(frac{1}{3s-1})^{3s-1}$$ on the interval $1/3<s<1/2$.Taking logs,we maximize
            $$ u(s) =ln f(s)=-sln frac{s}{1000}-2(1-2s)ln frac{1-2s}{2}-(3s-1)ln (3s-1)$$
            Using Newton Method in $s_0 = 0.4$
            $$s^{k+1}=s^k-frac{u'(s^k)}{u''(s^k)}approx s^k-frac{frac{u(s^k)-u(s^k-h)}{h}}{frac{u(s^k+h)-2u(s^k)+u(s^k-h)}{h^2}}$$
            with $h = 0.001$ and 100 iterations, $s^*=0.4394 Rightarrow u(s^*)=4.4405$
            Then $$f(s^*) =e^{u(s^*)}=84.8197 $$
            This is the minimun of $g(mathbf{x})$






            share|cite|improve this answer











            $endgroup$



            This is exercise 26 from Chapter 2 , Peressini.
            Solution is solve Dual geometric Programing: Maximize $$V(delta)=(frac{1000}{delta_1})^{delta_1}(frac{2}{delta_2})^{delta_2}(frac{2}{delta_3})^{delta_3}(frac{1}{delta_4})^{delta_4}$$
            Where $delta = (delta_1 ,delta_2 ,delta_3 ,delta_4)$
            with the conditions normality and ortogonality
            $$ left{ begin{array}{2}
            delta_1 +delta_2+delta_3+delta_4 =1 \[2ex]
            -delta_1 +delta_2+0delta_3+delta_4 =0 \[3ex]
            -delta_1 +0delta_2+delta_3+delta_4 =0end{array} right.
            $$
            And positivity condition $delta_1>0,delta_2>0,delta_3>0,delta_4>0$
            Where the solution set from the system is $$K={(delta_1 ,delta_2 ,delta_3 ,delta_4) / delta_2=delta_3=1-2delta_1 , delta_4 = 3delta_1-1, frac{1}{3}<delta_1<frac{1}{2} }$$
            Now Maximize $$f(s)=(frac{1000}{s})^{s}(frac{2}{1-2s})^{1-2s}(frac{2}{1-2s})^{1-2s}(frac{1}{3s-1})^{3s-1}$$ on the interval $1/3<s<1/2$.Taking logs,we maximize
            $$ u(s) =ln f(s)=-sln frac{s}{1000}-2(1-2s)ln frac{1-2s}{2}-(3s-1)ln (3s-1)$$
            Using Newton Method in $s_0 = 0.4$
            $$s^{k+1}=s^k-frac{u'(s^k)}{u''(s^k)}approx s^k-frac{frac{u(s^k)-u(s^k-h)}{h}}{frac{u(s^k+h)-2u(s^k)+u(s^k-h)}{h^2}}$$
            with $h = 0.001$ and 100 iterations, $s^*=0.4394 Rightarrow u(s^*)=4.4405$
            Then $$f(s^*) =e^{u(s^*)}=84.8197 $$
            This is the minimun of $g(mathbf{x})$







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Jul 5 '17 at 6:24

























            answered Jul 3 '17 at 20:47









            Brayan CruzBrayan Cruz

            265




            265























                0












                $begingroup$

                Without a calculator, I would just use the fact that at the minimum you must have $frac {partial g(x,y)}{partial x}=frac {partial g(x,y)}{partial y}=0$ That will give you two equations in two unknowns. The symmetry indicates that $x=y$ at the minimum (though you should check that).



                My graphing calculator, Alpha, finds the minimum to be near $x=y=5.18284$ As it does not offer an exact result, I think you are just supposed to search around to find the minimum.






                share|cite|improve this answer











                $endgroup$


















                  0












                  $begingroup$

                  Without a calculator, I would just use the fact that at the minimum you must have $frac {partial g(x,y)}{partial x}=frac {partial g(x,y)}{partial y}=0$ That will give you two equations in two unknowns. The symmetry indicates that $x=y$ at the minimum (though you should check that).



                  My graphing calculator, Alpha, finds the minimum to be near $x=y=5.18284$ As it does not offer an exact result, I think you are just supposed to search around to find the minimum.






                  share|cite|improve this answer











                  $endgroup$
















                    0












                    0








                    0





                    $begingroup$

                    Without a calculator, I would just use the fact that at the minimum you must have $frac {partial g(x,y)}{partial x}=frac {partial g(x,y)}{partial y}=0$ That will give you two equations in two unknowns. The symmetry indicates that $x=y$ at the minimum (though you should check that).



                    My graphing calculator, Alpha, finds the minimum to be near $x=y=5.18284$ As it does not offer an exact result, I think you are just supposed to search around to find the minimum.






                    share|cite|improve this answer











                    $endgroup$



                    Without a calculator, I would just use the fact that at the minimum you must have $frac {partial g(x,y)}{partial x}=frac {partial g(x,y)}{partial y}=0$ That will give you two equations in two unknowns. The symmetry indicates that $x=y$ at the minimum (though you should check that).



                    My graphing calculator, Alpha, finds the minimum to be near $x=y=5.18284$ As it does not offer an exact result, I think you are just supposed to search around to find the minimum.







                    share|cite|improve this answer














                    share|cite|improve this answer



                    share|cite|improve this answer








                    edited Feb 26 '16 at 1:02

























                    answered Feb 26 '16 at 0:17









                    Ross MillikanRoss Millikan

                    299k24200374




                    299k24200374























                        0












                        $begingroup$

                        The problem can also be solved numerically using cvxpy's geometric programming capabilities, like so:



                        #!/usr/bin/env python3

                        import cvxpy as cp

                        x = cp.Variable(pos=True)
                        y = cp.Variable(pos=True)

                        constraints =
                        objective = 1000/x/y+2*x+2*y+x*y

                        prob = cp.Problem(cp.Minimize(objective), constraints)

                        objval = prob.solve(gp=True)

                        print("Objective value = {0}".format(objval))
                        print("x value = {0}".format(x.value))
                        print("y value = {0}".format(y.value))


                        As output, this gives:



                        Objective value = 84.82073466127639
                        x value = 5.182852109768804
                        y value = 5.18285210938629





                        share|cite|improve this answer









                        $endgroup$


















                          0












                          $begingroup$

                          The problem can also be solved numerically using cvxpy's geometric programming capabilities, like so:



                          #!/usr/bin/env python3

                          import cvxpy as cp

                          x = cp.Variable(pos=True)
                          y = cp.Variable(pos=True)

                          constraints =
                          objective = 1000/x/y+2*x+2*y+x*y

                          prob = cp.Problem(cp.Minimize(objective), constraints)

                          objval = prob.solve(gp=True)

                          print("Objective value = {0}".format(objval))
                          print("x value = {0}".format(x.value))
                          print("y value = {0}".format(y.value))


                          As output, this gives:



                          Objective value = 84.82073466127639
                          x value = 5.182852109768804
                          y value = 5.18285210938629





                          share|cite|improve this answer









                          $endgroup$
















                            0












                            0








                            0





                            $begingroup$

                            The problem can also be solved numerically using cvxpy's geometric programming capabilities, like so:



                            #!/usr/bin/env python3

                            import cvxpy as cp

                            x = cp.Variable(pos=True)
                            y = cp.Variable(pos=True)

                            constraints =
                            objective = 1000/x/y+2*x+2*y+x*y

                            prob = cp.Problem(cp.Minimize(objective), constraints)

                            objval = prob.solve(gp=True)

                            print("Objective value = {0}".format(objval))
                            print("x value = {0}".format(x.value))
                            print("y value = {0}".format(y.value))


                            As output, this gives:



                            Objective value = 84.82073466127639
                            x value = 5.182852109768804
                            y value = 5.18285210938629





                            share|cite|improve this answer









                            $endgroup$



                            The problem can also be solved numerically using cvxpy's geometric programming capabilities, like so:



                            #!/usr/bin/env python3

                            import cvxpy as cp

                            x = cp.Variable(pos=True)
                            y = cp.Variable(pos=True)

                            constraints =
                            objective = 1000/x/y+2*x+2*y+x*y

                            prob = cp.Problem(cp.Minimize(objective), constraints)

                            objval = prob.solve(gp=True)

                            print("Objective value = {0}".format(objval))
                            print("x value = {0}".format(x.value))
                            print("y value = {0}".format(y.value))


                            As output, this gives:



                            Objective value = 84.82073466127639
                            x value = 5.182852109768804
                            y value = 5.18285210938629






                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered Dec 26 '18 at 8:47









                            RichardRichard

                            252110




                            252110






























                                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.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1672505%2fsolving-geometric-program%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

                                Probability when a professor distributes a quiz and homework assignment to a class of n students.

                                Aardman Animations

                                Are they similar matrix