Ask Your Question
0

Solving system of inequalities in one variable

asked 2015-05-26 11:38:05 +0200

anonymous user

Anonymous

I am probably missing something about how to use sage:

If I run this:

x = var('x')
a = var('a')
solve([a*x>0,a>0],[x])

I get this results:

[[0 < x, a > 0], [x < 0, -a > 0, a > 0]]

However, I would expect something like:

[0 < x, a > 0]

What am I missing?

Thanks

edit retag flag offensive close merge delete

Comments

rws gravatar imagerws ( 2015-07-15 11:08:08 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-27 14:51:38 +0200

tmonteil gravatar image

updated 2015-05-27 14:52:28 +0200

Formally, there is nothing wrong since the second list of inequalities leads to the empty set (because of -a > 0, a > 0). That said, one could indeed expect that that list would have been automatically removed. In general, the solve function is not reliable since it might fail silently (e.g. give less solution than expected), for such systems of inequelities, an alternative is to use qepcad, whose installation is unfortunately currently broken (it used to be an experimental package).

edit flag offensive delete link more

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: 2015-05-26 11:38:05 +0200

Seen: 672 times

Last updated: May 27 '15