Waldek Hebisch wrote Mon, 14 Aug 2023 11:53:03 -0700:
I have now a prototype denesting code. It is somewhat long for
an email, so I put it at:
http://fricas.math.uni.wroc.pl/~hebisch/rsimp2.input
So try it first do
)read rsimp2.input
ATM there is one user oriented function called 'rsimp'. Argument
to 'rsimp' should be a single root, it tries to produce
denested version of the root, like:
rsimp(sqrt(12 + 2*sqrt(6) + 2*sqrt(14) + sqrt(6)*sqrt(14)))
+-+ +--+ +-+
(\|6 + 3)\|14 + 7 \|6
(275) ------------------------
+--+
\|42
Derive 6.10 simplifies this example of nested square roots to a much
simpler:
SQRT(12 + 2*SQRT(6) + 2*SQRT(14) + SQRT(6)*SQRT(14))
= SQRT(7) + SQRT(3) + SQRT(2)
Is something wrong with this?
or
rsimp(sqrt(x + sqrt(x^2 - 1)))
+-------+ +------+ +-------+
| 1 | 2 | 1
(276) |------- \|x - 1 + (x + 1) |-------
\|2 x + 2 \|2 x + 2
or
rsimp(sqrt(13^(1/3)+(108)^(1/3)))
3+--+2 3+-+3+--+ 3+-+2
2 \|13 + 2 \|4 \|13 - \|4
(277) ------------------------------
6
Due to interpreter limitation argument must be of type Expression(Integer). In principle the code should be able to denest roots of degree up
to 12 when nested roots are all square roots, and roots of degree up
to 4 when nested roots involve cube roots. But there are shortcuts
in implementation which may lead to loss of some denstings. ATM
code does not handle dependent roots, nested roots must be
independent. And computational complexity is quite high, so
complicated examples may take very long time or run out of
memory. Still, I think that even in its current state this is
quite powerful denester.
--
Waldek Hebisch
This was posted in <fricas-devel> on Google Groups.
Martin.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)