From: Barton W. <wi...@un...> - 2022-03-25 00:06:49
|
Hi Randall, You did nothing wrong---the problem is that solve just isn’t powerful enough to solve these equations. A workaround is to use Maxima’s Grobner basis code to triangularize the equations before solving. Maybe the easiest way to do this is to use an alternative solve package. (%i1) load("to_poly_solve")$ (%i2) %solve([(x-1)^2+y^2-a^2=0,x^2+(y-1)^2-b^2=0],[x,y], 'use_grobner = true); (%o2) %union([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]) There are other approaches—maybe others can comment. Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows From: website.reader via Maxima-discuss<mailto:max...@li...> Sent: Thursday, March 24, 2022 6:36 PM To: max...@li...<mailto:max...@li...> Subject: [Maxima-discuss] trying to solve for intersection of 2 circles Non-NU Email I have two circles, first is centered at [1,0] with radius a and the second is at [0,1] with radius b (1) (x-1)^2 + y^2 = a^2 (2) x^2 + (y-1)^2 = b^2 I used some known points, with p = [16/9, 28/15] thus giving a = 91/45 and b = 89/45 for the two circles passing through point p. When I use maxima to solve for the general case (%i1) solve([(x-1)^2+y^2-a^2=0,x^2+(y-1)^2-b^2=0],[x,y]); (%o1) [] Maxima says that the solution is the empty set. However the example showed that we do have a rational solution for known values. What did I do wrong? If I used the values, Maxima finds 2 intersection points [ -13/15, -7/9] and p = [16/9, 28/15] but it refuses to solve for distances a,b for the general case. Randall |