Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2655 error lratsubst or fullratsimp

None
open
nobody
None
5
2014-07-11
2013-11-01
dan hayes
No

error lratsubst(...) and/or fullratsimp(...)

wxMaxima version: 13.4.0
Maxima version: 5.31.1
Maxima build date: 2013-09-24 09:49:12
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

input:
(n:4,load("lrats"), liseq:makelist(sum(x[i]^2/(e[k]^2-a[i]),i,1,n)-1,k,1,n),lisv:makelist(x[i],i,1,n),ans:part(solve(liseq,lisv),1),t1:lratsubst(ans,liseq)
,ldisp(["t1",fullratsimp(t1)]) );

output:

Quotient by a polynomial of higher degree
#0: lratsubst1(listofeqns=[x[3] = sqrt(a[3]^2*e[3]^2*e[4]^2/(a[3]^2*a[4]-   a[2]*a[3]*a[4]-a[1]*a[3]*a[4]+a[1]*a[2]*a[4]-a[3]^3+a...,exp=[-((((a[2]^2+(-e[1]^2-a[1])*a[2]+a[1]*e[1]^2)*a[3]^2+((-e[1]^2-a[1])*a[2]^2+(e[1]^4+2*a[1]*e[1]^2+a[...)(lrats.mac line 47)
#1: lratsubst1(listofeqns=[x[2] = -sqrt(a[2]*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[2]^2*a[4]+a[1]*a[2]*a[4]-a[...,exp=[-((((e[1]^2-a[1])*a[2]-e[1]^4+a[1]*e[1]^2)*a[3]+(a[1]*e[1]^2-e[1]^4)*a[2]+e[1]^6-a[1]*e[1]^4)*x[4]^...)(lrats.mac line 41)
#2: lratsubst1(listofeqns=[x[1] = -sqrt(e[1]^2*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[1]*a[2]*a[4]+a[1]^2*a[4]-...,exp=[x[4]^2/(e[1]^2-a[4])+x[3]^2/(e[1]^2-a[3])+x[2]^2/(e[1]^2-a[2])+x[1]^2/(e[1]^2-a[1])-1,x[4]^2/(e[2]^...)(lrats.mac line 41)
-- an error. To debug this try: debugmode(true);

whereas the correct answer is (0,0,0,0) with no error message as one can verify as have i in regular macsyma 2.2 or 2.1. NOte if put n:3 rather than n:4 it does give the correct output of
(0,0,0)

Discussion

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,16 +8,16 @@
     Lisp implementation version: GCL 2.6.8
    
     input:
    -(n:4,load("lrats"), liseq:makelist(sum(x[i]^2/(e[k]^2-a[i]),i,1,n)-1,k,1,n),lisv:makelist(x[i],i,1,n),ans:part(solve(liseq,lisv),1),t1:lratsubst(ans,liseq)
    -,ldisp(["t1",fullratsimp(t1)]) );
    +    (n:4,load("lrats"), liseq:makelist(sum(x[i]^2/(e[k]^2-a[i]),i,1,n)-1,k,1,n),lisv:makelist(x[i],i,1,n),ans:part(solve(liseq,lisv),1),t1:lratsubst(ans,liseq)
    +    ,ldisp(["t1",fullratsimp(t1)]) );
    
     output:
    
    -Quotient by a polynomial of higher degree
    -#0: lratsubst1(listofeqns=[x[3] = sqrt(a[3]^2*e[3]^2*e[4]^2/(a[3]^2*a[4]-a[2]*a[3]*a[4]-a[1]*a[3]*a[4]+a[1]*a[2]*a[4]-a[3]^3+a...,exp=[-((((a[2]^2+(-e[1]^2-a[1])*a[2]+a[1]*e[1]^2)*a[3]^2+((-e[1]^2-a[1])*a[2]^2+(e[1]^4+2*a[1]*e[1]^2+a[...)(lrats.mac line 47)
    -#1: lratsubst1(listofeqns=[x[2] = -sqrt(a[2]*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[2]^2*a[4]+a[1]*a[2]*a[4]-a[...,exp=[-((((e[1]^2-a[1])*a[2]-e[1]^4+a[1]*e[1]^2)*a[3]+(a[1]*e[1]^2-e[1]^4)*a[2]+e[1]^6-a[1]*e[1]^4)*x[4]^...)(lrats.mac line 41)
    -#2: lratsubst1(listofeqns=[x[1] = -sqrt(e[1]^2*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[1]*a[2]*a[4]+a[1]^2*a[4]-...,exp=[x[4]^2/(e[1]^2-a[4])+x[3]^2/(e[1]^2-a[3])+x[2]^2/(e[1]^2-a[2])+x[1]^2/(e[1]^2-a[1])-1,x[4]^2/(e[2]^...)(lrats.mac line 41)
    - -- an error. To debug this try: debugmode(true);
    +    Quotient by a polynomial of higher degree
    +    #0: lratsubst1(listofeqns=[x[3] = sqrt(a[3]^2*e[3]^2*e[4]^2/(a[3]^2*a[4]-   a[2]*a[3]*a[4]-a[1]*a[3]*a[4]+a[1]*a[2]*a[4]-a[3]^3+a...,exp=[-((((a[2]^2+(-e[1]^2-a[1])*a[2]+a[1]*e[1]^2)*a[3]^2+((-e[1]^2-a[1])*a[2]^2+(e[1]^4+2*a[1]*e[1]^2+a[...)(lrats.mac line 47)
    +    #1: lratsubst1(listofeqns=[x[2] = -sqrt(a[2]*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[2]^2*a[4]+a[1]*a[2]*a[4]-a[...,exp=[-((((e[1]^2-a[1])*a[2]-e[1]^4+a[1]*e[1]^2)*a[3]+(a[1]*e[1]^2-e[1]^4)*a[2]+e[1]^6-a[1]*e[1]^4)*x[4]^...)(lrats.mac line 41)
    +    #2: lratsubst1(listofeqns=[x[1] = -sqrt(e[1]^2*e[2]^2*e[3]^2*e[4]^2/(a[2]*a[3]*a[4]-a[1]*a[3]*a[4]-a[1]*a[2]*a[4]+a[1]^2*a[4]-...,exp=[x[4]^2/(e[1]^2-a[4])+x[3]^2/(e[1]^2-a[3])+x[2]^2/(e[1]^2-a[2])+x[1]^2/(e[1]^2-a[1])-1,x[4]^2/(e[2]^...)(lrats.mac line 41)
    +    -- an error. To debug this try: debugmode(true);
    
     whereas the correct answer is (0,0,0,0) with no error message as one can verify as have i in regular macsyma 2.2 or 2.1. NOte if put n:3 rather than n:4 it does give the correct output of
     (0,0,0)