Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have the following problem, when I am trying to optimize function with pre-defined assumptions.

I am using Mathematica 8 and I wrote the following simple code

$Assumptions = (m > 0)
Minimize[{x^m, x >= 1}, x]

It is clear, that the answer is 1, since $x^m\ge 1$ if $x\ge 1$ for all positive $m$. However, Mathematica fails to calculate this simple problem.

What do I do wrong? Should I use another function for minimization?

share|improve this question
4  
The values of $Assumtpions will only be used by functions which themselves have an Assumptions option. I know this doesn't solve your problem, but at least it clarifies why this doesn't work. It seems sometimes it's possible to include assumptions on the parameters in the constraint list, but in this case it doesn't work. –  Szabolcs Jun 6 '12 at 12:40
    
Try mminimize x^m when x >= 1 and m>=0 and minimize x^m when x >= 1 and m<0 in Wolfram Alpha! The first question is bestowed with a better fitting answer than the second one. As for $0>m>-\infty$ the function $x^m$ has no global minimum the second answer suffers from numerical defects. –  PlatoManiac Jun 6 '12 at 13:35
    
Mathematica also fails for me with Minimize[{x^m,x>=1&&m>0},x] (additional condition explicitly given) and Minimize[{x^(Abs[m]+1/10),x>=1},x] (the exponent being obviously positive). Minimize[{x^2,x>=1},x] works fine, however. –  celtschk Jun 6 '12 at 19:10
    
It seems the symbolic engine cannot minimize functions with the power of two unknowns. You could try a numerical approach {NMinimize[{x^m, x >= 1 && m > 0.01}, {x, m}]}. –  Matariki Jun 7 '12 at 1:07
8  
Anyway, it looks like that optimization with parameters works rather poorly in Mathematica. –  Oleg Jun 7 '12 at 19:07
show 1 more comment

2 Answers 2

Try This,

NMinimize[{X^m, X >= 1, m > 0, m \[Element] Integers}, {X, m}]

This will give you what you like

{1., {X -> 1., m -> 2}}
share|improve this answer
add comment

Calling

Minimize[{x^m, x >= 1}, x]

gives the right answer

{1, {x -> 85}}

in Mathematica 9 (although the value 85 is rather arbitrary). I cannot check with Mathematica 8, but it may happen, that the problem has been already solved by Wolfram if existed. Or do you want something more from the result? Do you wish to optimize in m also?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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