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.Mon, 30 Jul 2012 11:37:45 +0200Is it possible to define (or assume) a general positive function?https://ask.sagemath.org/question/8558/is-it-possible-to-define-or-assume-a-general-positive-function/Hi,
Is it possible to assume a positive function when doing simplifications? (like Simplify[expr,a[t]>0] in Mathematica)
To be explicit, I have
# output: abs(a(t))
# changing to assume(a(t)>0) still doesn't work, and results in a DeprecationWarning
a = function('a',var('t'))
assume(a>0)
sqrt(a**2).simplify_full()
This is to be compared to variable case (where works):
# output: t
assume(t>0)
sqrt(t**2).simplify_full()
I could do a replacement to subs_expr abs(a(t)) into a(t). But is there a simple and elegant resolution? Thank you!
Thu, 15 Dec 2011 14:36:40 +0100https://ask.sagemath.org/question/8558/is-it-possible-to-define-or-assume-a-general-positive-function/Comment by brenogil for <p>Hi, </p>
<p>Is it possible to assume a positive function when doing simplifications? (like Simplify[expr,a[t]>0] in Mathematica)</p>
<p>To be explicit, I have</p>
<pre><code># output: abs(a(t))
# changing to assume(a(t)>0) still doesn't work, and results in a DeprecationWarning
a = function('a',var('t'))
assume(a>0)
sqrt(a**2).simplify_full()
</code></pre>
<p>This is to be compared to variable case (where works):</p>
<pre><code># output: t
assume(t>0)
sqrt(t**2).simplify_full()
</code></pre>
<p>I could do a replacement to subs_expr abs(a(t)) into a(t). But is there a simple and elegant resolution? Thank you!</p>
https://ask.sagemath.org/question/8558/is-it-possible-to-define-or-assume-a-general-positive-function/?comment=19324#post-id-19324
I also have this doubt
Mon, 30 Jul 2012 11:37:45 +0200https://ask.sagemath.org/question/8558/is-it-possible-to-define-or-assume-a-general-positive-function/?comment=19324#post-id-19324