Ask Your Question
0

Solving system of inequalities in one variable

asked 9 years ago

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

Preview: (hide)

Comments

rws gravatar imagerws ( 9 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 9 years ago

tmonteil gravatar image

updated 9 years ago

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).

Preview: (hide)
link

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: 9 years ago

Seen: 794 times

Last updated: May 27 '15