Timeline for How to find the maximum value of an integer that satisfies some inequality
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 26, 2012 at 7:04 | comment | added | Dr. belisarius | @R.M Let's continue this in a proper duel | |
Aug 25, 2012 at 21:52 | comment | added | rm -rf♦ |
Yes, but that seems more like a bug in Maximize when given a constraint. Compare: Maximize[{x, x > 2}, x, Integers] with Maximize[{x}, x, Integers] . This is a bug worth being aware though... I can think of a few instances where this would've misled me.
|
|
Aug 25, 2012 at 21:38 | comment | added | Dr. belisarius |
@R.M Well, your answer does not return Infinity for Maximize[j, 2^j/(j + 1) >= 4, j, Integers] either :)
|
|
Aug 25, 2012 at 21:31 | comment | added | rm -rf♦ |
except that it doesn't generalize to situations where the actual answer is in the j ∈ Integers && j ... case :) For example, find the minimum $j$ such that $2^j/(j+1)\geq 4$. Reduce[2^j/(j + 1) >= 4, j, Integers] will give j ∈ Integers && j >= 5 which will lead to errors with Solve . But something in the spirit of what you're doing would be: Maximize[{j, Reduce[2^j/(j + 1) <= 10, j, Integers]}, j]
|
|
Aug 25, 2012 at 21:28 | history | answered | Dr. belisarius | CC BY-SA 3.0 |