Ask Your Question
0

How to keep 1/sqrt(2) as 1/sqrt(2) ? [the canonical form is not canonical]

asked 2017-03-14 18:20:00 +0100

Laurent B gravatar image

Hi all Using sagetex to make computaion, I would like it to keep radical in the denominator (though I remember my 8 th grade course viewing the canonical form today in a pdf file seems odd ) so something like 1/sqrt(2) would not be written as sqrt(2)/2 as it is normally. I saw this related link : https://ask.sagemath.org/question/352... but for me the command 1/sqrt(2).maxima_methods().rootscontract().simplify() gives also a "canonical" result. Cheers,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-03-15 14:36:52 +0100

ndomes gravatar image
expr = sqrt(2).power(-1,hold=True)
expr

Unfortunately this is not consistent . 3*expr is evaluated to 3/2*sqrt(2)

We can keep expr untouched with an effort:

SR(3).mul(expr,hold=True)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-14 18:20:00 +0100

Seen: 381 times

Last updated: Mar 15 '17