On 06/22/2012 09:47 PM, Raymond Toy wrote:
> On 6/22/12 7:04 PM, Krishna Myneni wrote:
>> I have the following system of equations, for which I expected Maxima's
>> solve() to be able to find a solution:
>>
>> 1) x^2 + y^2 = 1
>>
>> 2) (x - 0.5)^2 + (y - 0.5)^2 = 1
>>
>> I obtain the following:
>>
>> --
>> $ maxima
>>
>> Maxima 5.24.0 http://maxima.sourceforge.net
>> using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL)
>> Distributed under the GNU Public License. See the file COPYING.
>> Dedicated to the memory of William Schelter.
>> The function bug_report() provides bug reporting information.
>> (%i1) e1: x^2 + y^2 = 1;
>> 2 2
>> (%o1) y + x = 1
>> (%i2) e2: (x - 0.5)^2 + (y - 0.5)^2 = 1;
>> 2 2
>> (%o2) (y - 0.5) + (x - 0.5) = 1
>> (%i3) solve( [e1, e2], [x,y] );
>>
>> rat: replaced -0.5 by -1/2 = -0.5
>>
>> rat: replaced -0.5 by -1/2 = -0.5
>> (%o3) []
>> --
> You can try the following.
>
> load(to_poly_solve);
> to_poly_solve([e1,e2],[x,y],'use_grobner=true);
>
> This gives
>
> %union([x = -(sqrt(7)-1)/4,y = (sqrt(7)+1)/4],
> [x = (sqrt(7)+1)/4,y = -(sqrt(7)-1)/4])$
>
> To_poly_solve is nicely documented.
>
>> Are there some documented inherent limitations of Maxima's solve() which
>> prevent it from finding a solution to the first problem?
> The shortcomings of solve are not documented anywhere that I know of,
> except in bug reports. Solve is not particularly smart, though.
>
> Ray
>
> ...
Odd. My maxima installation has a package named, to_poly_solver.mac and
here's what I obtain:
(%i1) load(to_poly_solver);
Loading maxima-grobner $Revision: 1.6 $ $Date: 2009/06/02 07:49:49 $
(%o1) /usr/share/maxima/5.24.0/share/contrib/to_poly_solver.mac
(%i2) e1: x^2+y^2=1;
2 2
(%o2) y + x = 1
(%i3) e2: (x-0.5)^2+(y-0.5)^2=1;
2 2
(%o3) (y - 0.5) + (x - 0.5) = 1
(%i4) to_poly_solve([e1,e2], [x,y], 'user_grobner=true);
(%o4) %union()
(%i5)
Krishna