Ask Your Question
1

Why doesn't full_simplify() simplify?

asked 2022-03-29 11:20:56 +0100

masher gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-03-29 11:52:20 +0100

masher gravatar image

and of course, I find the answer after I post...

simplify_real()

does what I want.

edit flag offensive delete link more

Comments

canonicalize_radical() is also useful.

tolga gravatar imagetolga ( 2022-03-29 13:09:13 +0100 )edit

@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.

slelievre gravatar imageslelievre ( 2022-03-30 09:33:01 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2022-03-29 11:20:56 +0100

Seen: 225 times

Last updated: Mar 29 '22