Ask Your Question

Revision history [back]

How to get multiplication of square roots to simplify?

All I want is for Sage to take the sqrt(3)*sqrt(2) and show me it is sqrt(6). I have looked through the forums and found a few solutions but they are all from 5+ years ago and don't seem to do anything any more. Here is an example:

from sage.manifolds.utilities import simplify_chain_real
a = var("a")
assume(a>0)
a = sqrt(2)*sqrt(3)+6
show(a)
show(simplify_chain_real(a))
show(a.simplify_real())
show(a.canonicalize_radical())

My output is the following for all of these: sqrt(3)*sqrt(2)+6

What do I need to do to get the output to display sqrt(6)+6? I am sure there is some really advanced mathematical reason for this not to work, but I just dealing with fairly standard stuff.

I am using the following version of Sage:

SageMath version 9.8, Release Date: 2023-02-11

click to hide/show revision 2
retagged

How to get multiplication of square roots to simplify?

All I want is for Sage to take the sqrt(3)*sqrt(2) and show me it is sqrt(6). I have looked through the forums and found a few solutions but they are all from 5+ years ago and don't seem to do anything any more. Here is an example:

from sage.manifolds.utilities import simplify_chain_real
a = var("a")
assume(a>0)
a = sqrt(2)*sqrt(3)+6
show(a)
show(simplify_chain_real(a))
show(a.simplify_real())
show(a.canonicalize_radical())

My output is the following for all of these: sqrt(3)*sqrt(2)+6

What do I need to do to get the output to display sqrt(6)+6? I am sure there is some really advanced mathematical reason for this not to work, but I just dealing with fairly standard stuff.

I am using the following version of Sage:

SageMath version 9.8, Release Date: 2023-02-11