On Sun, Nov 19, 2023 at 07:17:14PM +0800, Qian Yun wrote:
>
> The core idea is that for polynomials with real coefficient,
> its roots come in pairs (symmetric over the real axis).
> So in the following computation of the rootSum of ilogs,
> many terms can cancel with each other.
<snip<
> Now, some questions:
>
> My code needs to use solve$TransSolvePackage. Because the
> resultant method mentioned in the book can't handle
> coefficients of EXPR. Are there alternatives?
>
> And will solve$TransSolvePackage only introduce necessary extra
> root kernels?
AFAICS TransSolvePackage is potentially problematic. In general,
working simultanelously with all roots of polynomials is
problematic. Done rigorously it is equivalent to computing
in splitting field, which usually is quite expensive due to
high degree algberaic extentions and need for algebraic
factoring. AFAIK our solvers do not compute splitting field,
and "all roots" commands are fake: they are reasonable when
one works with single root, but may give wrong result for
expressions involving multiple roots. Is seems that
TransSolvePackage uses formulas for solution of degree 3
and degree 4 polynomial. Those formulas are problematic too,
IIRC one has to treat them in special way to avoid troubles.
Also, you (and IIRC TransSolvePackage) use eval. 'eval' is
doing various simplifications which may transform kernels
in undesired ways. In integrator I switched to using 'subst',
but such change requires care, so we can not just mass-edit
the algebra. We could use something like 'quadeval' to
avoid 'eval'.
There is question in which cases your apprach works. Examples
in mapleok.input which work have minimal polynomial for residues
which is variation of x^4 + a^4 where a is a rational constant
or x^4 + 2*x^2 + 2 or x^4 + x^2/64 + 1/8192. x^4 + a^4 factors
in extention by square root of 2:
factor(x^4 + a^4, [sqrt(2)])
2 +-+ 2 2 +-+ 2
(13) (x - \|2 a x + a )(x + \|2 a x + a )
The two other need extention by sqrt(sqrt(2) - 1).
In general, your approach builds equations so
that real u, v
p(u + i*v) = 0 <=> PP(u, v) = 0 & QQ(u, v) = 0
Computing Groebner basis from PP and QQ we can find polynomial
r such that
r(u) = 0 <=> exists v p(u + i*v) = 0
AFAICS your approach needs set of real roots of r (so splitting
of a factor of r) and for each real root of r pair of
real v.
However, in
integrate(((-3)*x^3+6)/(x^6+(-1)*x^3+1), x)
minimal polynomial of residues is cyclotomic(9) (minimal
polynomial for primitive root of 1 of degree 9). Equation
for real parts of roots is 8*u^3 - 6*u + 1. But solution
via radicals looks complex:
(44) -> solve(8*u^3 - 6*u + 1, 1.0e-12)
(44)
[u = - 0.
9396926207_
8599058441, u = 0.7660444431_1897168518,
u = 0.1736481776_6656415188]
(48) -> radicalSolve(8*u^3 - 6*u + 1)
(48)
+----------+2
+---+ 3| +---+ 3+-+2
(- \|- 3 + 1)\|\|- 3 - 1 - 2 \|2
[u = --------------------------------------,
+----------+
+---+ 3+-+3| +---+
(2 \|- 3 + 2)\|2 \|\|- 3 - 1
+----------+2 +----------+2
+---+ 3| +---+ 3+-+2 3| +---+ 3+-+2
(- \|- 3 - 1)\|\|- 3 - 1 + 2 \|2 \|\|- 3 - 1 + \|2
u = --------------------------------------, u = ----------------------]
+----------+ +----------+
+---+ 3+-+3| +---+ 3+-+3| +---+
(2 \|- 3 - 2)\|2 \|\|- 3 - 1 2 \|2 \|\|- 3 - 1
It is not clear to me if TransSolvePackage produces the same
solutions, but it looks that solutions from TransSolvePackage
contain complex quantities.
Groebner produces sensible thing:
(50) -> groebner([PP::POLY(INT), QQ::POLY(INT), 8*u^3 - 6*u + 1])
2 2 3
(50) [v + u - 1, 8 u - 6 u + 1]
and solution of this could be passed to Rioboo. But TransSolvePackage
can not usefully handle it.
--
Waldek Hebisch