From: Michel T. <ta...@lp...> - 2022-03-25 17:53:17
|
Le 25/03/2022 à 18:33, Richard Fateman a écrit : > Solving for y in one equation, substituting in the other eq, and > solving for x.. > I got a number of solutions. Just picking one for x and the > corresponding y.. > here we have (one) solution for the two equations. > > [x=-(sqrt((-b^2+a^2+2)*sqrt(-b^2+2*a*b-a^2+2)*sqrt(b^2+2*a*b+a^2-2)+4*a^2)-2^(3/2))/2^(3/2),y=-sqrt(sqrt(-b^2+2*a*b-a^2+2)*(b^2-a^2-2)*sqrt(b^2+2*a*b+a^2-2)+4*a^2)/2^(3/2) > > There are nested sqrts in there. Does algsys give up too easily? > to_poly_solve seemed to get a better form. > RJF I think that what you are doing here is the algorithm that solve uses. At least it is documented that way. Choosing the "simplest" equation, here they are the same, and substituting in the other ones, etc. Then solve tries to check that the solutions are correct, and it is perhaps here that things go awry because computing with nested radicals is not a strong point of CAS systems and notably maxima. As Barton said the correct procedure is to try to triangularize the system (for example using Grobner). In the present case it is particularly trivial, since both equations begin by x^2+y^2, so a simple subtraction leaves a linear equation. It is then easy to solve and substitute in one of the circle equations, leaving a second order equation and not a fourth degree equation. So no nested radicals, and 2 points of intersection. Using maxima: (%o1) false (%i2) e1:(x-1)^2+y^2-a^2; (%o2) y^2+(x-1)^2-a^2 (%i3) e2:x^2+(y-1)^2-b^2; (%o3) (y-1)^2+x^2-b^2 (%i4) solve([e1,expand(e1-e2)],[x,y]); (%o4) [[x = -(sqrt((-b^4)+(2*a^2+4)*b^2-a^4+4*a^2-4)-b^2+a^2-2)/4, y = -(sqrt((-b^4)+(2*a^2+4)*b^2-a^4+4*a^2-4)+b^2-a^2-2)/4], [x = (sqrt((-b^4)+(2*a^2+4)*b^2-a^4+4*a^2-4)+b^2-a^2+2)/4, y = (sqrt((-b^4)+(2*a^2+4)*b^2-a^4+4*a^2-4)-b^2+a^2+2)/4]] -- Michel Talon |