FriCAS can denest many nested roots. This is implemented in an extra package so befor use we need to expose it: fricas (1) -> )expose RootSimplification Now we can try fricas r := sqrt(102*sqrt(7) + 272)
Type: AlgebraicNumber?
fricas rsimp(r)
Type: Union(Expression(Integer),
fricas r := sqrt(66000162*1000003^(1/2) + 11000159000324)
Type: AlgebraicNumber?
fricas rsimp(r)
Type: Union(Expression(Integer),
fricas r := sqrt(((-4030008370)*700001^(1/2)+12090025110)*1000003^(1/2)+((-78000162)*700001^(1/2)+312335685800846295))
Type: AlgebraicNumber?
fricas rsimp(r)
Type: Union(Expression(Integer),
We can denest roots of higher degree: fricas r := (((-6670600520850)*7^(1/2)+73781123539185)*13^(1/2)+((-77245760121201)*7^(1/2)+89932095680661))^(1/7)
Type: AlgebraicNumber?
fricas rsimp(r)
Type: Union(Expression(Integer),
Note: Current code supports root of degree 2, 3 or 4 outside. With square root outside inside can contain roots of degree up to 12. Roots of degree 3 outside more limited concerning what can appear inside. And we can have roots of higher degree inside: fricas r := (((-827820)*(17^(1/3))^2+(-58105080)*17^(1/3)+(-134584260))*19^(1/2)+(17045208*(17^(1/3))^2+79043889*17^(1/3)+1426984144))^(1/4)
Type: AlgebraicNumber?
fricas rsimp(r)
Type: Union(Expression(Integer),
Denesting is not limited to numbers, it works for algebraic functions and more general expressions: fricas )set output tex off fricas )set output algebra on Type: Expression(Integer)
fricas rsimp(r) Type: Union(Expression(Integer),
fricas )set output algebra off fricas )set output tex on
Type: Expression(Integer)
fricas rsimp(r)
Type: Union(Expression(Integer),
|