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 Mar 2018 10:05:09 +0100Assumptions on symbolic functionshttps://ask.sagemath.org/question/41582/assumptions-on-symbolic-functions/I have a symbolic function f = function('f')(x). Is there a way to assume it is real and get abs(exp(I*f)) = 1?Fri, 16 Mar 2018 13:39:00 +0100https://ask.sagemath.org/question/41582/assumptions-on-symbolic-functions/Answer by Emmanuel Charpentier for <p>I have a symbolic function f = function('f')(x). Is there a way to assume it is real and get abs(exp(I*f)) = 1?</p>
https://ask.sagemath.org/question/41582/assumptions-on-symbolic-functions/?answer=41594#post-id-41594None at the moment, as far as I know.
Note however that :
* `maxima` has such a facility (see `maxima.declare?`) ;
* similarly, `Sympy` has such a facility (it even has two, the newer progressively replacing the older) ;
* there are some reported bugs pointing the the way `sage` handles assumptions and tests thereof, and these bugs are worked on.
You might try to isolate the part of your computations where you need such a handling, do them in maxima or Sympy, and reimport the relevant results.
Note also that you can
assume(f(x)>0)
But that won't do a thing about `bool(f(2*x+1)>0)`...Sat, 17 Mar 2018 10:05:09 +0100https://ask.sagemath.org/question/41582/assumptions-on-symbolic-functions/?answer=41594#post-id-41594