ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 17 Oct 2015 21:06:50 +0200Wrong answer on inequality problemhttps://ask.sagemath.org/question/30076/wrong-answer-on-inequality-problem/The problem I'm having is the solution I get on sage when solving the following inequality
[(4*x+5)/(x^2)>=4/(x+5)]
It gives me the wrong answer
([x < -5], [x >= -1])
the answer should be
(x<-5),(-1<=x<0),(0<x<oo).
The answer can be checked at [here at wolframalpha](http://www.wolframalpha.com/input/?i=%284x%2B+5%29%2Fx^2%3E%3D4%2F%28x%2B5%29). I'm still new to sage and in the learning process I don't know if I might be doing something wrong.Sat, 17 Oct 2015 18:15:53 +0200https://ask.sagemath.org/question/30076/wrong-answer-on-inequality-problem/Answer by vdelecroix for <p>The problem I'm having is the solution I get on sage when solving the following inequality</p>
<pre><code>[(4*x+5)/(x^2)>=4/(x+5)]
</code></pre>
<p>It gives me the wrong answer</p>
<pre><code>([x < -5], [x >= -1])
</code></pre>
<p>the answer should be</p>
<pre><code>(x<-5),(-1<=x<0),(0<x<oo).
</code></pre>
<p>The answer can be checked at <a href="http://www.wolframalpha.com/input/?i=%284x%2B+5%29%2Fx^2%3E%3D4%2F%28x%2B5%29">here at wolframalpha</a>. I'm still new to sage and in the learning process I don't know if I might be doing something wrong.</p>
https://ask.sagemath.org/question/30076/wrong-answer-on-inequality-problem/?answer=30081#post-id-30081The problem seems to be that Sage makes sense of "+infinity > finite number" situations. Even in the following where both sides of the inequality are infinite
sage: A = (4*x+5)/(x^2)
sage: B = 4/(x+5)
sage: solve(A >= B, x)
[[x < -5], [x >= -1]]
sage: solve(A/x^2 >= B/x^2, x)
[[x < -5], [x >= -1]]
Vincent
Sat, 17 Oct 2015 21:06:50 +0200https://ask.sagemath.org/question/30076/wrong-answer-on-inequality-problem/?answer=30081#post-id-30081