Ask Your Question
1

get range of values for inequalities

asked 2016-06-03 01:36:05 -0600

abs_kumar gravatar image

updated 2016-06-03 12:59:16 -0600

tmonteil gravatar image

If I have a bunch of inequalities like $ x>y, y>z, z \neq 5,x<z+y $<="" p="">

how do I get a range of values of each variable for which all these inequalities are satisfied? Thanks.

Edit: I found that this can be achieved with mathematica as mentioned in the below link:

mathematica.stackexchange.com/questions/38507/solve-the-system-of-equalities-and-inequalities

But, I want an open source solution. Is it possible with sage at all?

edit retag flag offensive close merge delete

Comments

Could you precise what kind of result do you expect ?

tmonteil gravatar imagetmonteil ( 2016-06-04 06:31:41 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-06-03 13:17:19 -0600

tmonteil gravatar image

You can try with solve or solve_ineq, see http://doc.sagemath.org/html/en/refer...

Another possibility would be to use qepcad, see http://doc.sagemath.org/html/en/refer...

Tell us if it works as expected, so that we can report the bug in case of problem (which happens sometimes in such situations).

edit flag offensive delete link more

Comments

Simply using solve or solve_ineq is not solving the problem. For example, look at the piece of code mentioned in the sage docs:

sage: solve_ineq([x-y<0,x+y-3<0]) # random [[x < y, y < -x + 3, x < (3/2)]]

I get some other inequalities as output!

As for qepcad package, I too read that it might offer a solution to my problem and try to go through the docs. I couldn't really wrap my head around what's written there and I have very less time to do this :(

This is just a one time requirement for me. I don't really have to deal with sage or any other mathematics software again. Heck, I read about sage, mathematica etc for the first time yesterday. As for my mathematics prowess, I haven't really worked on this since my college :)

It would be really helpful if one could solve atleast one

abs_kumar gravatar imageabs_kumar ( 2016-06-03 23:23:03 -0600 )edit

Could you precise what kind of result do you expect ?

tmonteil gravatar imagetmonteil ( 2016-06-04 06:31:54 -0600 )edit

For the following set of inequalities, a == b + c && a >= 12 && b <= 10 && c <= 10 && b >= 1 && c >= 1 I expect the solution to be, 12 <= a <= 20 && 2 <= b <= 10 && 2 <= c <= 10 I would want range of values of the variables involved as the output

abs_kumar gravatar imageabs_kumar ( 2016-06-05 10:20:09 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-06-03 01:02:02 -0600

Seen: 81 times

Last updated: Jun 03 '16