Open rtoy opened 4 months ago
Imported from SourceForge on 2024-07-04 23:19:09 Created by billingd on 2021-06-10 10:13:46 Original: https://sourceforge.net/p/maxima/bugs/3588/#74b9
We can simplify this by tracing algsys while running the test case. This shows the system of polynomials that crash algsys.
A little manipulation reduces the testcase to:
(%i1) display2d:false$
(%i2) eq1:w^2-2*v*w+v^2+1$
(%i3) eq2:2*w*x+2*v*x-2*x-w^2-2*v*w-v^2+sqrt(2)*%i+1$
(%i4) eq3:16*x^2-16*w*x-16*v*x-16*x-4*w^2+40*v*w-4*v^2-18$
(%i5) algsys([eq1,eq2,eq3],[v,w,x]);
algsys: Couldn't reduce system to a polynomial in one variable.
-- an error. To debug this try: debugmode(true);
This particular case can be solved by preconditioning the system of equations with poly_reduced_grobner(). That isn't particularly useful here.
load("grobner.lisp")$
(%i7) poly_reduced_grobner([eq1,eq2,eq3],[v,w,x]);
(%o7) [16*x^2-32*x+2^(7/2)*%i+2,
(-96*w^2*x)+96*w*x+(2^(7/2)*%i-48)*x+64*w^3+((-5*2^(7/2)*%i)-2)*w
+(2^(7/2)*%i+30)*v+2^(7/2)*%i+2,
4096*w^3*x-6144*w^2*x+(4096-2^(21/2)*%i)*w*x+(2^(19/2)*%i-1024)*x
-2048*w^4+(2^(23/2)*%i+256)*w^2+((-2^(21/2)*%i)-256)*w-128]
(%i8) algsys(%,[v,w,x]);
(%o8) [[v = 0.1464466094067264*%i+0.5,
w = 0.4999999999999999-0.8535533905932738*%i,
x = 2.0-0.353553390593274*%i],
[v = 0.4999999999999998-0.1464466094067258*%i,
w = 0.8535533905932738*%i+0.4999999999999999,
x = 0.353553390593274*%i-9.314731323704895E-17],
[v = 0.8535533905932744*%i+0.4999999999999999,
w = 0.5000000000000001-0.146446609406726*%i,
x = 0.353553390593274*%i-9.314731323704895E-17],
[v = 0.5-0.853553390593274*%i,
w = 0.146446609406726*%i+0.5000000000000001,
x = 2.0-0.353553390593274*%i],
[v = -(%i-3)/2,w = (%i+3)/2,x = -(sqrt(2)*%i-8)/4],
[v = (%i+3)/2,w = -(%i-3)/2,x = -(sqrt(2)*%i-8)/4],
[v = -(%i+1)/2,w = (%i-1)/2,x = %i/2^(3/2)],
[v = (%i-1)/2,w = -(%i+1)/2,x = %i/2^(3/2)]]
I traced a few other functions but didn't see any obvious leads to follow.
Imported from SourceForge on 2024-07-04 23:19:13 Created by billingd on 2021-06-10 10:14:16 Original: https://sourceforge.net/p/maxima/bugs/3588/#c270
Imported from SourceForge on 2024-07-04 23:19:08 Created by andreas-hermann on 2019-10-08 07:13:29 Original: https://sourceforge.net/p/maxima/bugs/3588
load('contrib_ode); eq: (1+2x^2)'diff(y,x,2)+'diff(y,x)+y=0; contrib_ode(eq,y,x); returns the following error message: algsys: Couldn't reduce system to a polynomial in one variable. : ode2_lin(eqn=(2x^2+1)'diff(y,x,2)+'diff(y,x,1)+y = 0,y=y,x=x) : contrib_ode(eqn=(2x^2+1)'diff(y,x,2)+'diff(y,x,1)+y = 0,y=y,x=x) (contrib_ode.mac line 64) -- an error. To debug this try: debugmode(true); This is the build_info version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7")