solve([x^2+y^2=1, (x-2)^2+(y-3)^2=9],[x,y]);
then it returns []
why?
Bugs: #1106
Bugs: #1266
Bugs: #1302
Bugs: #2038
Bugs: #2736
Bugs: #3150
Bugs: #3208
Bugs: #3223
Bugs: #3557
Bugs: #453
This is an algsys failure.
algsys([x^2+y^2=1,(x-2)^2+(y-3)^2=9],[x,y]);
[]
Duplicate of [bugs:#3150] and [bugs:#2736]
Probably related to [bugs:#1106] [bugs:#1266] [bugs:#1302] [bugs:#1369] [bugs:#1370] [bugs:#1469] [bugs:#1647] [bugs:#2038]
The ev(...,radcan) bug found below is [bugs:#3223]
and from the mailing list:
Also consider [bugs:#196] after we fix above.
Related
Bugs: #1106
Bugs:
#1266Bugs:
#1302Bugs: #1369
Bugs: #1370
Bugs:
#1469Bugs: #1647
Bugs:
#196Bugs:
#2038Bugs:
#2736Bugs:
#3150Bugs:
#3223Last edit: David Billinghurst 2016-09-25
I have started to explore this. It interesting to compare
algsys([x^2+y^2=1,(x-2)^2+(y-3)^2=9],[x,y]);
[]
and
algsys([x^2+y^2=1, (x-2)^2+(y-3)^2=8],[x,y]);
[[x = 12/13,y = 5/13],[x = 0,y = 1]]
Tracing the higher level functions in algsys
?trace(?algsys);
?trace(?algsys0);
?trace(?algsys1);
?trace(?condensesolnl);
?trace(?distrep);
?trace(?lofactors);
?trace(?findleastvar);
?trace(?bakalevel);
?trace(?presultant);
I can see that what is attempted is equivalent to (but not using sqrtdenest)
This gives solutions [x = -(3^(5/2)-10)/26, y = -(sqrt(4077-28*3^(7/2))-78)/26] and [x = (3^(5/2)+10)/26, y = -(sqrt(28*3^(7/2)+4077)-78)/26]
Comparing the traces in the two cases above, I think that the failure occurs in the back-substitution of the solutions for x and y into eq1. I'm guessing that algsys doesn't simplify the expression to 0 and therefore rejects the correct solutions. More digging required.
Last edit: David Billinghurst 2016-09-22
--> eq1:x^2+y^2=1$ eq2:(x-2)^2+(y-3)^2=9$
solve([eq1,eq2-eq1],[x,y]);
(%o3) [[x=-(3^(5/2)-10)/26,y=(23^(5/2)+45)/78],[x=(3^(5/2)+10)/26,y=-(23^(5/2)-45)/78]]
Also you can do the following:load(grobner)$poly_reduced_grobner([x^2+y^2-1, (x-2)^2+(y-3)^2-9], [x,y])$algsys(%,[x,y])$
to get your answer without having to figure out what to make out of the 2 eqs.
hisham...
--> eq1:x^2+y^2=1$ eq2:(x-2)^2+(y-3)^2=9$
solve([eq1,eq2-eq1],[x,y]);
(%o3) [[x=-(3^(5/2)-10)/26,y=(23^(5/2)+45)/78],[x=(3^(5/2)+10)/26,y=-(23^(5/2)-45)/78]] [bugs:#3208] Can't solve this simple equation..Status: open
Group: None
Labels: algsys solve
Created: Sun Sep 04, 2016 06:12 AM UTC by nightwing
Last Updated: Thu Sep 22, 2016 02:06 AM UTC
Owner: nobodysolve([x^2+y^2=1, (x-2)^2+(y-3)^2=9],[x,y]);
then it returns []
why?Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3208/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#3208Thanks. I am looking to fix the bugs in algsys, rather than a work around for this particular problem. As you can see above, there are many bug reports for similar simple problems.
More tracing. algsys is recursive. Annotated trace attached.
The test case above can be reduced to the following
This has a solution
Last edit: David Billinghurst 2016-09-23
Getting closer now.
The problem seems to be the call to lisp function presultant in algsys.lisp.
The resultant(eq3,eq4,y) above is zero. However, when we trace the lisp calls we get a non-zero result from presultant. Don't understand why.
now
mmm. Add a resimplify to presultant. (not sure if this is a good idea. try anyway).
Now the offending call to presultant returns 0. algsys still returns [].
Last edit: David Billinghurst 2016-09-23
Next problem is in ebaksubst when we backsubstitute solution Y2 into eq4 and the result isn't simplified to 0.
Calling sqrtdenest within ebaksubst works for this simple case, and algsys returns the correct solution for this case. It still fails on others.
We have identified
twothree problems:Related
Bugs:
#3223Commit: [2986fc]
Commit: [5fd2f5]
Commit: [640ca7]
Last edit: David Billinghurst 2016-10-04
(%i2) eq1:x^2+y^2=1$ eq2:(x-2)^2+(y-3)^2=9$
(%i3) solve([eq1,eq1-eq2],[x,y]);
(%o3)
[[x=-(3^(5/2)-10)/26,y=(23^(5/2)+45)/78],[x=(3^(5/2)+10)/26,y=-(23^(5/2)-45)/78]]
2016-09-23 16:28 GMT+03:00 David Billinghurst billingd@users.sf.net:
Related
Bugs:
#3208With some hacks in place to resimplify the resultant and apply sqrtdenest in ebaksubst, I find another problem.
The first reduced test case works
but the second reduced test case still returns []
Some tracing shows that algsys is attempting
This looks wrong as
Something wrong elsewhere in maxima? Reported as [bugs:#3223]
Related
Bugs:
#3223Last edit: David Billinghurst 2016-09-25
Fixed by commit [2986fc]
Related
Commit: [2986fc]
Related
Bugs:
#3208