431 Reputation

14 years, 197 days

Extensions....

@Carl Love `evala/toprof` given a parameter containing RootOfs chooses one RootOf in the expression, not used in parameter of any other RootOfs or functions in the expression.

Thank You....

@Markiyan Hirnyk Oh, I see now, residue introduces radicals. That should not be. Can you keep it in RootOf notation, for example using series and coeff?

Last post....

Still I do not know what has caused the divergence. Also, I seem to have somehow omitted an important element regarding use of RootOfs. I added seq((evala@Expand)(Y*Z^i), i = 0 .. d - 1).

 alias(beta=RootOf(RootOf(_Z^4+2*_Z^2+2)^2+_Z^2+2),alpha=RootOf(_Z^4+2*_Z^2+2));C0 := rationalize(expand(2^(1/4)*exp(3/8*I*Pi)));P := z^2 / (z^4 + 2*z^2 + 2)^2;Pf := numer(P) / (evala@AFactor)(denom(P),z);Pfs := select(`@`(evalb, 0 = evalc, evala, Norm, `+`), map2(op, 1, (roots@denom)(Pf)), -C0); QRatpolyResidue := proc(Pf, z, Pfs, C0)local ANS, R, X, Y, Z, W, Wn, A, k, d, i;    A := NULL;    for R in Pfs do        #ANS := evala(residue(Pf, z = R));        ANS := evala(coeff(series(Pf, z = R, 1 + degree(numer(Pf), z) + degree(denom(Pf), z)), z - R, -1));        print(Residue, R, ANS);        X := R - k;        Y := X;        W := NULL;        Wn := NULL;        while hastype(Y, RootOf) do            Z := `evala/toprof`(Y);            d := frontend(degree, [op(1, Z), _Z], [{Non}(function), {}]);            W := W, seq((evala@Expand)(Y*Z^i), i = 0 .. d - 1);            print(Degree, Z, d);            Wn := Wn, Z;            Y := (evala@Norm)(Y, {Z}, indets(Y, RootOf) minus {Z})        od;        print(Basis, W);        print(Ordering, Wn);        ANS := frontend(factor@simplify, [ANS, [W], [Wn, k]],            [({Non}@map)(identical, {Wn}), {}]);        print(Simplified, ANS);        ANS := map(radnormal, subs(k = C0, ANS));        print(Result, ANS);        A := A, ANS    od;    Aend;ANS := {QRatpolyResidue}(Pf, z, Pfs, C0);ANS2 := {QRatpolyResidue}(Pf, z, Pfs, k), k = C0;

returns:

C0 := 2^(1/4)*(-1)^(3/8)
P := z^2/(z^4+2*z^2+2)^2
Pf := z^2/(z-beta)^2/(z+alpha)^2/(z+beta)^2/(z-alpha)^2
Pfs := [alpha, -beta, -alpha, beta]

Residue   alpha   -3/32*alpha^3-1/16*alpha
Degree   alpha   4
Basis   alpha-k   alpha^2-alpha*k   alpha^3-alpha^2*k   -2*alpha^2-2-alpha^3*k
Ordering   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   (1/32-3/32*I)*2^(1/4)*(-1)^(3/8)
Residue   -beta   -3/32*alpha^2*beta-1/8*beta
Degree   beta   2
Degree   alpha   4
Basis   -beta-k   alpha^2+2-beta*k   alpha^2+2+k^2   alpha^3+2*alpha+alpha*k^2
-2+alpha^2*k^2   -2*alpha+alpha^3*k^2
Ordering   beta   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   (1/32-3/32*I)*2^(1/4)*(-1)^(3/8)
Residue   -alpha   3/32*alpha^3+1/16*alpha
Degree   alpha   4
Basis   -alpha-k   -alpha^2-alpha*k   -alpha^3-alpha^2*k   2*alpha^2+2-alpha^3
*k
Ordering   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   (1/32-3/32*I)*2^(1/4)*(-1)^(3/8)
Residue   beta   3/32*alpha^2*beta+1/8*beta
Degree   beta   2
Degree   alpha   4
Basis   beta-k   -alpha^2-2-beta*k   alpha^2+2+k^2   alpha^3+2*alpha+alpha*k^2
-2+alpha^2*k^2   -2*alpha+alpha^3*k^2
Ordering   beta   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   (1/32-3/32*I)*2^(1/4)*(-1)^(3/8)
ANS := {(1/32-3/32*I)*2^(1/4)*(-1)^(3/8)}
Residue   alpha   -3/32*alpha^3-1/16*alpha
Degree   alpha   4
Basis   alpha-k   alpha^2-alpha*k   alpha^3-alpha^2*k   -2*alpha^2-2-alpha^3*k
Ordering   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   -1/32*k*(2+3*k^2)
Residue   -beta   -3/32*alpha^2*beta-1/8*beta
Degree   beta   2
Degree   alpha   4
Basis   -beta-k   alpha^2+2-beta*k   alpha^2+2+k^2   alpha^3+2*alpha+alpha*k^2
-2+alpha^2*k^2   -2*alpha+alpha^3*k^2
Ordering   beta   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   -1/32*k*(2+3*k^2)
Residue   -alpha   3/32*alpha^3+1/16*alpha
Degree   alpha   4
Basis   -alpha-k   -alpha^2-alpha*k   -alpha^3-alpha^2*k   2*alpha^2+2-alpha^3
*k
Ordering   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   -1/32*k*(2+3*k^2)
Residue   beta   3/32*alpha^2*beta+1/8*beta
Degree   beta   2
Degree   alpha   4
Basis   beta-k   -alpha^2-2-beta*k   alpha^2+2+k^2   alpha^3+2*alpha+alpha*k^2
-2+alpha^2*k^2   -2*alpha+alpha^3*k^2
Ordering   beta   alpha
Simplified   -1/32*k*(2+3*k^2)
Result   -1/32*k*(2+3*k^2)
ANS2 := {-1/32*k*(2+3*k^2)}, k = 2^(1/4)*(-1)^(3/8)

Stumped....

@Carl Love What does `evala/toprof`(Pf); `evala/toprof`(indets(Pf,RootOf)); return? ANS2 should contain variable k. If it does not then what would explain this? Also I added a print command.

I am editing too much. The codes work flawlessly in Maple V R4. I wonder in which version the discontinuity occurs.

Explicit....

@Markiyan Hirnyk It appears _EnvExplicit:=true; is being used, converting all RootOfs into radicals. Lets see if _EnvExplicit:=false; would change that.

Roots....

@Carl Love roots or evala@Roots or another? Which is better?

Roots?...

@Carl Love Thank you for your help. It appears roots command does not succeed. I'll change it to evala@Roots.

I ask, what command would you use to obtain roots of a factored polynomial?

Interesting....

@Carl Love I suppose split is the same thing as evala@AFactor. I tested it. It seems to work. I already edited my original answer.

Author....

@Dave L If you do that you should state the author of the statement you edit.

Characteristic....

@Carl Love I have forgotten about this option completely, my apology. Unfortunately I have no access to the Groebner package. I can only suggest using method=buchberger and plex(X,Q). Quote from the help file for GB:

- GB is an implementation of Buchberger's algorithm for computing Grobner bases
over Zp(a,b,...)[x1, ..., xn].

- GB(F,X,termorder) computes the reduced, minimal Grobner basis of the
polynomials F with respect to the indeterminates X and the given term order-
ing.

No help otherwise.

..Also the basis you quoted is identical to tdeg basis.

Monic....

Your definitions for x and q are:

 L := 1+X+X^6+X^7+X^8, (X^3+X+1)*Q+Q^3+(X^7+X^6+X^4+1)*Q^2+X^7+X^6+X^4+X^3+X^2+X+1;

so the monic for Q is what you seek and it is obtained with:

 GB([L], [X, Q], plex) mod 2;

Excellent reference....

@roman_pearce Thank You, that is precisely the function I needed. But also I was wondering if there is any support for this from side of Maple (even though the solution is so simple).

Do you mean this:...

 L:=[seq([seq(x^i*y^j,j=1..5)],i=1..5)];[[op(-1,op(-1,L)),op(1..-2,op(1,L))],seq([op(-1,op(i-1,L)),op(1..-2,op(i,L))],i=2..nops(L))];;

Do you mean for this to be a question or...

Perhaps you want to try it using symmetric polynomials:

 A := [(a+b+c+d)*(a*b+a*c+a*d+b*c+b*d+c*d)-12*sqrt((a^2+b^2+c^2+d^2)*a*b*c*d), [a+b+c+d-1]];G := [-a*b*c*d+p14, -a^2*b-a^2*c-a^2*d-a*b^2-a*b*c-a*b*d-a*c^2-a*c*d-a*d^2-b^2*c-b^2*d-b*c^2-b*c*d-b*d^2-c^2*d-c*d^2+p23, -a^2-a*b-a*c-a*d-b^2-b*c-b*d-c^2-c*d-d^2+p22, -a-b-c-d+p11], [a, b, c, d, p11, p22, p23, p14];simplify(A,G);simplify(A,map(op,[G[1],A[2]]),G[2]);

Look for symmetric polynomials package.

Small....

@Carl Love I was supposing this could work:

 R := {Product(g-i, i=-4..-3), Product(f-i, i=0..2)};#R := {product(g-i, i=-4..-3), product(f-i, i=0..2)};

But now I think it would work only for small cases.

 3 4 5 6 7 Page 5 of 7
﻿