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.Wed, 04 Jul 2018 13:32:58 +0200Assumptions and inequalitieshttps://ask.sagemath.org/question/42825/assumptions-and-inequalities/Hello all.
I have some expressions like **sums of ratios of real polynomials in a variable t**. Mathematically, by assuming t real in a specific interval, each such expression is either always positive, or always non-negative.
For Sage, this is **sometimes the case, sometimes not:** as you can see, the first one is correct, the second one not
<pre><code>
var('t')
expr1 = -1 + (t^2 - 1)/t^2 + 1/t^2
expr2 = (t^2 - 1)/(t^2 - 3)
with assuming(t > 0, t < 1/2):
print(bool(expr1 <= 0), bool(expr1 > 0))
print(bool(expr2 <= 0), bool(expr2 > 0))
</code></pre>
**Output:** (True, False) \n (False, False)
**Questions:** Why? How can I avoid this problem?
(An answer to the second question would be enough for me)
Thanks in advance :)yeahWed, 04 Jul 2018 13:32:58 +0200https://ask.sagemath.org/question/42825/Solving an inequality symbolically under constraintshttps://ask.sagemath.org/question/40456/solving-an-inequality-symbolically-under-constraints/Hello,
new to Sage. How would you go about this problem?
Assumptions:
a) e0, e1 are positive real numbers
b) e1 <= e0/2
Define:
A=e0/2-e1; (notice, greater than or equal to zero)
B=e0/2+e1; (equivalently, B=A+2e1)
Solve for e1:
Int(1/B)+2 >= 1/A, where Int(x) is the largest integer less or equal to x
Output:
An expression linking e0 and e1erw1Thu, 04 Jan 2018 05:07:00 +0100https://ask.sagemath.org/question/40456/Extract equalities from a list of assumptionshttps://ask.sagemath.org/question/32008/extract-equalities-from-a-list-of-assumptions/Hi,
how can I recognize an equality from an inequality, in a list of assumptions?
thanks, danieleSun, 03 Jan 2016 14:49:04 +0100https://ask.sagemath.org/question/32008/