Hi, all, I'm new here and new-ish to sage and I was hoping you could help me with a rather complicated problem. My professor gave me this inequality:
0 < (2*n*(i+j+k))/(-k*n+j*(n-s)+i*s) < 1 and he wants me to see if I can find solutions within the following constraints: 0 < s < n, i,j,k integers, and i <= j+k, j <= i+k, k<=i +j. It seemed like it would be possible to get Sage to do this for me, and sure enough, when i input: sage: n = var('n') sage: sage: s = var('s') sage: sage: assume(s>0) sage: sage: assume(n>s) sage: sage: i = var('i') sage: sage: j = var('j') sage: sage: k = var('k') sage: sage: assume(i,'integer') sage: sage: assume(j,'integer') sage: sage: assume(k,'integer') sage: assume(i<=j+k) sage: assume(j<=i+k) sage: assume(k<=i+j) sage: solve((0 < (2*n*(i+j+k))/(-k*n+j*(n-s)+i*s) < 1),n) I got a result, namely: [[k < -i - j, 0 < n, -i*s - j*n + j*s + k*n > 0], [-i - j < k, n < 0, - i*s - j*n + j*s + k*n > 0], [-i - j < k, 0 < n, i*s + j*n - j*s - k*n > 0], [k < -i - j, n < 0, i*s + j*n - j*s - k*n > 0]] My problem is, first, that I'm not sure the solutions are correct-- note that some of them have n < 0, when I'm assuming the contrary (and when I try to have it assume explicitly that n > 0, Sage will tell me that my assumption is redundant); and second, that I'm not sure how to get specific numbers out of this. I've tried assigning specific values to the variables, one by one, but I keep getting equations that don't work, or simply [] Does anyone know what's going on, and if this problem is solvable in sage? Thank you! Cal -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org