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, 30 Mar 2022 09:33:01 +0200Why doesn't full_simplify() simplify?https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/I defined and integrated a gaussian:
from sage.symbolic.integration.integral import definite_integral
var('A,w,x')
assume(A, "real")
assume(w, "real")
assume(w > 0)
G(A,w,x)=A*(2*sqrt(ln(2)/pi)/w) * exp(-4*ln(2)*(x/w)^2)
a=definite_integral(G(A,w,x),x,-infinity,infinity)
a.full_simplify()
> sqrt(pi)*A*sqrt(log(2)/pi)/sqrt(log(2))
It's trivial to see that the answer is just A; why doesn't simplify simplify?Tue, 29 Mar 2022 11:20:56 +0200https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/Answer by masher for <p>I defined and integrated a gaussian:</p>
<pre><code>from sage.symbolic.integration.integral import definite_integral
var('A,w,x')
assume(A, "real")
assume(w, "real")
assume(w > 0)
G(A,w,x)=A*(2*sqrt(ln(2)/pi)/w) * exp(-4*ln(2)*(x/w)^2)
a=definite_integral(G(A,w,x),x,-infinity,infinity)
a.full_simplify()
> sqrt(pi)*A*sqrt(log(2)/pi)/sqrt(log(2))
</code></pre>
<p>It's trivial to see that the answer is just A; why doesn't simplify simplify?</p>
https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?answer=61741#post-id-61741and of course, I find the answer after I post...
simplify_real()
does what I want.Tue, 29 Mar 2022 11:52:20 +0200https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?answer=61741#post-id-61741Comment by slelievre for <p>and of course, I find the answer after I post...</p>
<pre><code>simplify_real()
</code></pre>
<p>does what I want.</p>
https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?comment=61771#post-id-61771@masher -- you can accept your answer to mark the question as solved. For that, click the "accept" button, which is the one with a check mark, next to the answer.Wed, 30 Mar 2022 09:33:01 +0200https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?comment=61771#post-id-61771Comment by tolga for <p>and of course, I find the answer after I post...</p>
<pre><code>simplify_real()
</code></pre>
<p>does what I want.</p>
https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?comment=61743#post-id-61743`canonicalize_radical()` is also useful.Tue, 29 Mar 2022 13:09:13 +0200https://ask.sagemath.org/question/61739/why-doesnt-full_simplify-simplify/?comment=61743#post-id-61743