login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

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
RootSimplification is now explicitly exposed in frame initial

Now we can try

fricas
r := sqrt(102*sqrt(7) + 272)

\label{eq1}\sqrt{{{102}\ {\sqrt{7}}}+{272}}(1)
Type: AlgebraicNumber?
fricas
rsimp(r)

\label{eq2}{\left({\sqrt{7}}+ 3 \right)}\ {\sqrt{17}}(2)
Type: Union(Expression(Integer),...)
fricas
r := sqrt(66000162*1000003^(1/2) + 11000159000324)

\label{eq3}\sqrt{{{66000162}\ {\sqrt{1000003}}}+{11000159000324}}(3)
Type: AlgebraicNumber?
fricas
rsimp(r)

\label{eq4}\frac{{3 \ {\sqrt{\frac{99000243}{1000003}}}\ {\sqrt{1000003}}}+{{1000003}\ {\sqrt{\frac{99000243}{1000003}}}}}{3}(4)
Type: Union(Expression(Integer),...)
fricas
r := sqrt(((-4030008370)*700001^(1/2)+12090025110)*1000003^(1/2)+((-78000162)*700001^(1/2)+312335685800846295))

\label{eq5}\sqrt{{{\left(-{{4030008370}\ {\sqrt{700001}}}+{12090025110}\right)}\ {\sqrt{1
000003}}}-{{78000162}\ {\sqrt{700001}}}+{312335685800846295}}(5)
Type: AlgebraicNumber?
fricas
rsimp(r)

\label{eq6}\frac{{\left({{155}\ {\sqrt{1000003}}}-{\sqrt{700001}}+ 3 \right)}\ {\sqrt{3
12325648675}}}{155}(6)
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)

\label{eq7}\root{7}\of{{{\left(-{{6670600520850}\ {\sqrt{7}}}+{737811235
39185}\right)}\ {\sqrt{13}}}-{{77245760121201}\ {\sqrt{7}}}+{8
9932095680661}}(7)
Type: AlgebraicNumber?
fricas
rsimp(r)

\label{eq8}\frac{{\left({5 \ {\sqrt{13}}}-{\sqrt{7}}+ 1 \right)}\ {\root{7}\of{2
1699140625}}}{5}(8)
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)

\label{eq9}\root{4}\of{{{\left(-{{827820}\ {{\root{3}\of{17}}^{2}}}-{{58
105080}\ {\root{3}\of{17}}}-{134584260}\right)}\ {\sqrt{19}}}+{{17045208}\ {{\root{3}\of{17}}^{2}}}+{{79043889}\ {\root{3}\of{1
7}}}+{1426984144}}(9)
Type: AlgebraicNumber?
fricas
rsimp(r)

\label{eq10}\frac{{\left({{15}\ {\sqrt{19}}}-{3 \ {\root{3}\of{17}}}- 7 \right)}\ {\root{4}\of{3
695625}}}{15}(10)
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
r := ((x^6+3*x^5+73*x^4+429*x^3+63*x^2+213*x-1287)*(x^3-3)^(1/2)+3*x^7+37*x^6+39*x^5+451*x^4+1545*x^3+315*x^2+351*x-4860)^(1/3)
(11) ROOT +------+ 6 5 4 3 2 | 3 7 (x + 3 x + 73 x + 429 x + 63 x + 213 x - 1287)\|x - 3 + 3 x + 6 5 4 3 2 37 x + 39 x + 451 x + 1545 x + 315 x + 351 x - 4860 , 3
Type: Expression(Integer)
fricas
rsimp(r)
+------+ +----------+ | 3 3| 3 (12) (\|x - 3 + x + 12)\|x + x - 3
Type: Union(Expression(Integer),...)
fricas
)set output algebra off
 
fricas
)set output tex on
r := ((2*exp(x)^2-12*exp(x)-14)*(exp(x)+3)^(1/2)+exp(x)^3-12*exp(x)^2+39*exp(x)+52)^(1/2)

\label{eq11}\sqrt{{{\left({2 \ {{{e}^{x}}^{2}}}-{{12}\ {{e}^{x}}}-{14}\right)}\ {\sqrt{{{e}^{x}}+ 3}}}+{{{e}^{x}}^{3}}-{{12}\ {{{e}^{x}}^{2}}}+{{39}\ {{e}^{x}}}+{52}}(11)
Type: Expression(Integer)
fricas
rsimp(r)

\label{eq12}{{\sqrt{{{e}^{x}}+ 1}}\ {\sqrt{{{e}^{x}}+ 3}}}+{{\left({{e}^{x}}- 7 \right)}\ {\sqrt{{{e}^{x}}+ 1}}}(12)
Type: Union(Expression(Integer),...)




  Subject:   Be Bold !!
  ( 15 subscribers )  
Please rate this page: