Simple question from a beginner: I seem to be unable to do maximization if the variable has a power specified symbolically instead of numerically?


But now:


Seems to fail. Am I doing something wrong? Or can indeed Mathematica no maximize symbolically, at least with powers? Are there other cases it will fail?

And last question, does this imply I should code manually, solving the FOCs by hand?


  • $\begingroup$ You are making assumptions on b that are not necessarily the same as Mathematica; e.g. it assumes everything is complex-valued unless explicitly told otherwise. $\endgroup$ Commented Apr 4, 2016 at 0:38

1 Answer 1


It is because there is no general solution for your problem, even for b being a positive integer: When b is odd, the maximum is positive infinity, while for even b it is not. You may want to use things like Maximize[-x^# + a*x, x] & /@ Table[i, {i, 5}] to observe.

  • $\begingroup$ Sure, makes full sense, thanks!! This leads me to the more precise question: how can I specify the range of my "parameters" (as opposed to arguments of the function) a and b? Here I had b between 0 and 1, and a >0? As an example, I tried Maximize[{x^0.5 - a*x, x > 0, a > 0}, x] but this didn't seem to work... Thanks so much! $\endgroup$
    – Matifou
    Commented Apr 4, 2016 at 3:10
  • $\begingroup$ @Matifou I recommend that you post a new question, rather than trying to add more material to the original question by meant of comments. $\endgroup$
    – bbgodfrey
    Commented Apr 4, 2016 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.