On Mon, Dec 18, 2023 at 06:37:28PM +0100, Waldek Hebisch wrote:
> On Mon, Dec 18, 2023 at 06:12:01PM +0800, Qian Yun wrote:
> > I'm opening a new thread for this newly added rsimp.spad.
> >
> > I have tested with first 10k of Nasser's integrals, the recent
> > changes to integrator is positive:
> >
> > It affects the result of a few percent integrals, almost all are
> > positive improvement.
> >
> > Only a few regressions, in 3 classes:
> >
> > 1. not invertiable:
> > integrate(x^6/(2*x^5+3)^3,x)
>
> This is caused by troubles with other routines. Namely 'complex_roots'
> gets polynomial witgh dependent roots which causes failure in 'factor'.
> To reproduce do:
>
> a := (-1)^(1/5)/(108)^(1/5)
> p1 := x^4 + a*x^3/250 + a^2*x^2/62500 + a^3*x/15625000 + a^4/3906250000
>
> factor(p1::UP('x, EXPR(INT))::SUP(EXPR(INT)))
>
> If one replaces a by
>
> a := subst(b^(1/5), b = -1/108)
>
> then there is error later, again coused by dependent roots. This
> time 'factor' returns empty list of factors for polynomial of
> degree 2...
Dependent roots are introduced by 'hackroot' in src/algebra/algfunc.spad
AFAICS current code is from open source Axiom era. NAG version
was doing no splitting, but when fraction had nominator 1 or -1 it
replaced root by inverse of root of inverse, which caused undesirable
effect for things like sqrt(-1/x), so the code was replaced by
version doing splitting.
I think now that we should disable this splitting. ATM I am not
sure if we should just drop this part. Or maybe restore restricted
variant of old code.
Anyway, current
(5) -> (-1/108)^(1/5)
5+---+
\|- 1
(5) ------
5+---+
\|108
Type: AlgebraicNumber
(6) -> sqrt(3/1501)
+-+
\|3
(6) -------
+----+
\|1501
Type: AlgebraicNumber
is arguably wrong: root of degree 5 satisfies equation of degree 5, while
above we produce two root suggesting extention of degree 25. If they are
independent we merely are doing more work than needed. With dependent
roots various things no longer work. In particular, eqation for
(-1)^(1/5) is reducible, so we should avoid producing such things.
Similarly in the second case, we get two roots giving extention of
degree 4. This time roots are independent, but we if we already
have sqrt(2) and sqrt(6), then we will get dependence. And for
things like
(7) -> sqrt(3^(2/3)/11)
+-----+
|3+-+2
\|\|3
(7) --------
+--+
\|11
Type: AlgebraicNumber
we get reducible exuation for the nominator, while expression for
the whole root is irreducible.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZYD5Nc8EEUeKlA46%40fricas.org.