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.Sun, 23 Jun 2013 17:02:57 +0200Determine domain and range of linear equation?https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/I was able to determine obtain this easily with, Wolfram Alpha:
http://www.wolframalpha.com/input/?i=range+abs%28x%29+-+4
Is it possible with Sage 5.9?
Sat, 22 Jun 2013 17:08:35 +0200https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/Answer by ppurka for <p>I was able to determine obtain this easily with, Wolfram Alpha:
<a href="http://www.wolframalpha.com/input/?i=range+abs(x)+-+4">http://www.wolframalpha.com/input/?i=...</a></p>
<p>Is it possible with Sage 5.9?</p>
https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/?answer=15120#post-id-15120Whoops! Stupid answer deleted. :-/Sat, 22 Jun 2013 19:43:37 +0200https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/?answer=15120#post-id-15120Answer by tmonteil for <p>I was able to determine obtain this easily with, Wolfram Alpha:
<a href="http://www.wolframalpha.com/input/?i=range+abs(x)+-+4">http://www.wolframalpha.com/input/?i=...</a></p>
<p>Is it possible with Sage 5.9?</p>
https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/?answer=15123#post-id-15123Though it is not created for that purpose, you can use interval arithmetics:
sage: f(x) = abs(x) - 4
sage: a = RIF(-infinity,infinity) ; a
[-infinity .. +infinity]
sage: a.parent()
Real Interval Field with 53 bits of precision
sage: f(a)
[-4.0000000000000000 .. +infinity]
Here you get the exact result, but note that in general, you will only get an interval that contains the image of the function.
Sun, 23 Jun 2013 17:02:57 +0200https://ask.sagemath.org/question/8801/determine-domain-and-range-of-linear-equation/?answer=15123#post-id-15123