maximizing concave function with parameter












0














We want to maximize the convex function:
$$vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$$ where $lambda$ is some parameter.



I'm looking at a solution that states that the maximum is a piecewise function depending on whether $||q|| leq 2 cdot lambda$ or otherwise.



The value of $x$ that maximizes the function above is claimed to be: $$begin{cases}
(1/2)vec{q}/lambda + vec{1} & ||vec{q}|| leq 2lambda \
vec{q}/||vec{q}|| + vec{1} & ||vec{q}||> 2lambda\
end{cases}$$



I didn't even consider how the norm of $vec{q}$ might relate to $lambda$ when trying to compute this myself. In fact, I arrived at only the solution for when $||vec{q}|| leq 2lambda$ by taking the derivative of $vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$ with respect to $vec{x}$ coordinate-wise, setting it equal to $0$, and then solving for $vec{x}$ again coordinate-wise.



Can someone please explain why we should care whether or not $||vec{q}|| > 2lambda$, and how to compute the $x$ that maximizes the above function when $||vec{q}|| > 2lambda$?



Edit: there is a constraint on $vec{x}$ that was mentioned elsewhere in the solution: $vec{x}$ is in the $2-$norm unit ball centered at $1$.










share|cite|improve this question





























    0














    We want to maximize the convex function:
    $$vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$$ where $lambda$ is some parameter.



    I'm looking at a solution that states that the maximum is a piecewise function depending on whether $||q|| leq 2 cdot lambda$ or otherwise.



    The value of $x$ that maximizes the function above is claimed to be: $$begin{cases}
    (1/2)vec{q}/lambda + vec{1} & ||vec{q}|| leq 2lambda \
    vec{q}/||vec{q}|| + vec{1} & ||vec{q}||> 2lambda\
    end{cases}$$



    I didn't even consider how the norm of $vec{q}$ might relate to $lambda$ when trying to compute this myself. In fact, I arrived at only the solution for when $||vec{q}|| leq 2lambda$ by taking the derivative of $vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$ with respect to $vec{x}$ coordinate-wise, setting it equal to $0$, and then solving for $vec{x}$ again coordinate-wise.



    Can someone please explain why we should care whether or not $||vec{q}|| > 2lambda$, and how to compute the $x$ that maximizes the above function when $||vec{q}|| > 2lambda$?



    Edit: there is a constraint on $vec{x}$ that was mentioned elsewhere in the solution: $vec{x}$ is in the $2-$norm unit ball centered at $1$.










    share|cite|improve this question



























      0












      0








      0







      We want to maximize the convex function:
      $$vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$$ where $lambda$ is some parameter.



      I'm looking at a solution that states that the maximum is a piecewise function depending on whether $||q|| leq 2 cdot lambda$ or otherwise.



      The value of $x$ that maximizes the function above is claimed to be: $$begin{cases}
      (1/2)vec{q}/lambda + vec{1} & ||vec{q}|| leq 2lambda \
      vec{q}/||vec{q}|| + vec{1} & ||vec{q}||> 2lambda\
      end{cases}$$



      I didn't even consider how the norm of $vec{q}$ might relate to $lambda$ when trying to compute this myself. In fact, I arrived at only the solution for when $||vec{q}|| leq 2lambda$ by taking the derivative of $vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$ with respect to $vec{x}$ coordinate-wise, setting it equal to $0$, and then solving for $vec{x}$ again coordinate-wise.



      Can someone please explain why we should care whether or not $||vec{q}|| > 2lambda$, and how to compute the $x$ that maximizes the above function when $||vec{q}|| > 2lambda$?



      Edit: there is a constraint on $vec{x}$ that was mentioned elsewhere in the solution: $vec{x}$ is in the $2-$norm unit ball centered at $1$.










      share|cite|improve this question















      We want to maximize the convex function:
      $$vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$$ where $lambda$ is some parameter.



      I'm looking at a solution that states that the maximum is a piecewise function depending on whether $||q|| leq 2 cdot lambda$ or otherwise.



      The value of $x$ that maximizes the function above is claimed to be: $$begin{cases}
      (1/2)vec{q}/lambda + vec{1} & ||vec{q}|| leq 2lambda \
      vec{q}/||vec{q}|| + vec{1} & ||vec{q}||> 2lambda\
      end{cases}$$



      I didn't even consider how the norm of $vec{q}$ might relate to $lambda$ when trying to compute this myself. In fact, I arrived at only the solution for when $||vec{q}|| leq 2lambda$ by taking the derivative of $vec{q} cdot vec{x} - lambda||vec{x} - vec{1}||_2^2$ with respect to $vec{x}$ coordinate-wise, setting it equal to $0$, and then solving for $vec{x}$ again coordinate-wise.



      Can someone please explain why we should care whether or not $||vec{q}|| > 2lambda$, and how to compute the $x$ that maximizes the above function when $||vec{q}|| > 2lambda$?



      Edit: there is a constraint on $vec{x}$ that was mentioned elsewhere in the solution: $vec{x}$ is in the $2-$norm unit ball centered at $1$.







      optimization convex-analysis convex-optimization maxima-minima






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 11 '18 at 21:54

























      asked Dec 11 '18 at 5:19









      0k33

      12010




      12010






















          1 Answer
          1






          active

          oldest

          votes


















          2














          The function (which is concave, not convex) is always maximized at $x= 1 + frac{q}{2 lambda}$ for $lambda > 0$. Perhaps there is some constraint on $x$. Also, the solution you suggest for the second case is a number, not a vector.






          share|cite|improve this answer



















          • 1




            you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
            – LinAlg
            Dec 11 '18 at 14:25






          • 1




            Yes, that’s right. I edit my answer.
            – mineiro
            Dec 11 '18 at 15:39










          • @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
            – 0k33
            Dec 11 '18 at 21:56










          • I figured it out! never mind!
            – 0k33
            Dec 13 '18 at 2:09











          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%2f3034924%2fmaximizing-concave-function-with-parameter%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









          2














          The function (which is concave, not convex) is always maximized at $x= 1 + frac{q}{2 lambda}$ for $lambda > 0$. Perhaps there is some constraint on $x$. Also, the solution you suggest for the second case is a number, not a vector.






          share|cite|improve this answer



















          • 1




            you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
            – LinAlg
            Dec 11 '18 at 14:25






          • 1




            Yes, that’s right. I edit my answer.
            – mineiro
            Dec 11 '18 at 15:39










          • @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
            – 0k33
            Dec 11 '18 at 21:56










          • I figured it out! never mind!
            – 0k33
            Dec 13 '18 at 2:09
















          2














          The function (which is concave, not convex) is always maximized at $x= 1 + frac{q}{2 lambda}$ for $lambda > 0$. Perhaps there is some constraint on $x$. Also, the solution you suggest for the second case is a number, not a vector.






          share|cite|improve this answer



















          • 1




            you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
            – LinAlg
            Dec 11 '18 at 14:25






          • 1




            Yes, that’s right. I edit my answer.
            – mineiro
            Dec 11 '18 at 15:39










          • @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
            – 0k33
            Dec 11 '18 at 21:56










          • I figured it out! never mind!
            – 0k33
            Dec 13 '18 at 2:09














          2












          2








          2






          The function (which is concave, not convex) is always maximized at $x= 1 + frac{q}{2 lambda}$ for $lambda > 0$. Perhaps there is some constraint on $x$. Also, the solution you suggest for the second case is a number, not a vector.






          share|cite|improve this answer














          The function (which is concave, not convex) is always maximized at $x= 1 + frac{q}{2 lambda}$ for $lambda > 0$. Perhaps there is some constraint on $x$. Also, the solution you suggest for the second case is a number, not a vector.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Dec 11 '18 at 15:40

























          answered Dec 11 '18 at 6:34









          mineiro

          812




          812








          • 1




            you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
            – LinAlg
            Dec 11 '18 at 14:25






          • 1




            Yes, that’s right. I edit my answer.
            – mineiro
            Dec 11 '18 at 15:39










          • @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
            – 0k33
            Dec 11 '18 at 21:56










          • I figured it out! never mind!
            – 0k33
            Dec 13 '18 at 2:09














          • 1




            you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
            – LinAlg
            Dec 11 '18 at 14:25






          • 1




            Yes, that’s right. I edit my answer.
            – mineiro
            Dec 11 '18 at 15:39










          • @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
            – 0k33
            Dec 11 '18 at 21:56










          • I figured it out! never mind!
            – 0k33
            Dec 13 '18 at 2:09








          1




          1




          you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
          – LinAlg
          Dec 11 '18 at 14:25




          you actually need $lambda>0$ as otherwise the function is unbounded (and not concave)
          – LinAlg
          Dec 11 '18 at 14:25




          1




          1




          Yes, that’s right. I edit my answer.
          – mineiro
          Dec 11 '18 at 15:39




          Yes, that’s right. I edit my answer.
          – mineiro
          Dec 11 '18 at 15:39












          @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
          – 0k33
          Dec 11 '18 at 21:56




          @mineiro you are so right. I've edited my question to add the constraint (and I copied down the second part of the piecewise totally wrong, I have no idea where I got it from). Even with the constraint, it's not immediately coming to me!
          – 0k33
          Dec 11 '18 at 21:56












          I figured it out! never mind!
          – 0k33
          Dec 13 '18 at 2:09




          I figured it out! never mind!
          – 0k33
          Dec 13 '18 at 2:09


















          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%2f3034924%2fmaximizing-concave-function-with-parameter%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

          Karlovacs län

          Cabo Verde

          Fundamental Group of Connected Sum of two $3$-manifolds