Skip to main content
unicode and other minor edits
Source Link
Carl Woll
  • 131.7k
  • 6
  • 246
  • 359

Consider the following Mathematica expression:

Reduce[2^j/(j + 1) <= 10, j, Integers]

which outputs:

j == 0 || j == 1 || j == 2 || j == 3 || j == 4 || 
j == 5 || j == 6 || (j \[Element] Integers && j <= -2)

Therefore, the maximum integer $j$ satisfying $\frac{2^j}{j + 1}$ is 6.

I tried to using the function FindMaximum, as follows:

FindMaximum[{j, 2^j/(j + 1) <= 10 && j \[Element] Integers}, j]

but it gives the following error:

FindMaximum::eqineq: "Constraints in {j\[Element]Integersj∈Integers,2^j/(1+j)<=10} are 
not all equality or inequality constraints. 
With the exception of integer domain constraints for linear programming, 
domain constraints or constraints with Unequal (!=) are not supported."

My general question is:

How to solve inequalities like $\frac{2^j}{j + 1} \le c$ (for some constant $c$) in Mathematica, over Integers?

Consider the following Mathematica expression:

Reduce[2^j/(j + 1) <= 10, j, Integers]

which outputs:

j == 0 || j == 1 || j == 2 || j == 3 || j == 4 || 
j == 5 || j == 6 || (j \[Element] Integers && j <= -2)

Therefore, the maximum integer $j$ satisfying $\frac{2^j}{j + 1}$ is 6.

I tried to using the FindMaximum, as follows:

FindMaximum[{j, 2^j/(j + 1) <= 10 && j \[Element] Integers}, j]

but it gives the following error:

FindMaximum::eqineq: "Constraints in {j\[Element]Integers,2^j/(1+j)<=10} are 
not all equality or inequality constraints. 
With the exception of integer domain constraints for linear programming, 
domain constraints or constraints with Unequal (!=) are not supported."

My general question is:

How to solve inequalities like $\frac{2^j}{j + 1} \le c$ (for some constant $c$) in Mathematica, over Integers?

Consider the following Mathematica expression:

Reduce[2^j/(j + 1) <= 10, j, Integers]

which outputs:

j == 0 || j == 1 || j == 2 || j == 3 || j == 4 || 
j == 5 || j == 6 || (j  Integers && j <= -2)

Therefore, the maximum integer $j$ satisfying $\frac{2^j}{j + 1}$ is 6.

I tried to using the function FindMaximum, as follows:

FindMaximum[{j, 2^j/(j + 1) <= 10 && j  Integers}, j]

but it gives the following error:

FindMaximum::eqineq: "Constraints in {j∈Integers,2^j/(1+j)<=10} are 
not all equality or inequality constraints. 
With the exception of integer domain constraints for linear programming, 
domain constraints or constraints with Unequal (!=) are not supported."

My general question is:

How to solve inequalities like $\frac{2^j}{j + 1} \le c$ (for some constant $c$) in Mathematica, over Integers?

Tweeted twitter.com/#!/StackMma/status/239558074950635522
edited title
Link

Finding How to find the maximum with non-linear constraintsvalue of an integer that satisfies some inequality

Source Link

Finding the maximum with non-linear constraints

Consider the following Mathematica expression:

Reduce[2^j/(j + 1) <= 10, j, Integers]

which outputs:

j == 0 || j == 1 || j == 2 || j == 3 || j == 4 || 
j == 5 || j == 6 || (j \[Element] Integers && j <= -2)

Therefore, the maximum integer $j$ satisfying $\frac{2^j}{j + 1}$ is 6.

I tried to using the FindMaximum, as follows:

FindMaximum[{j, 2^j/(j + 1) <= 10 && j \[Element] Integers}, j]

but it gives the following error:

FindMaximum::eqineq: "Constraints in {j\[Element]Integers,2^j/(1+j)<=10} are 
not all equality or inequality constraints. 
With the exception of integer domain constraints for linear programming, 
domain constraints or constraints with Unequal (!=) are not supported."

My general question is:

How to solve inequalities like $\frac{2^j}{j + 1} \le c$ (for some constant $c$) in Mathematica, over Integers?