fixed at http://trac.sagemath.org/sage_trac/ticket/8487
R.M.
On 9 bře, 05:26, Markus wrote:
> Hi,
>
> when trying to compute the intersection points of 2 circles i got
> strange results.
>
> Example 1:
>
> c1(x,y)=(x-5)^2+y^2-25; c2(x,y)=(y-3)^2+x^2-9
> solve([c1(x,y)==0,c2(x,y)==0],x,y)
>
> pro
I got the following message from Andrej Vodopivec:
You can solve this system in maxima with to_poly_solve:
(%i2) to_poly_solve([(x-5)^2+y^2-16, (y-3)^2+x^2-9], [x,y],
use_grobner=true);
(%o2) %union([x=-(9*sqrt(55)-135)/68,y=-(3*5^(3/2)*sqrt(11)-123)/68],
[x=(9*sqrt(55)+135)/68,y=(3*5^(3/2)*sqr
No, it is because Maxima (which solves equations for Sage) cannot
solve this system. My suggestions:
1. (better but long term) - improve Maxima's solver
2. (shorter) - help Maxima and write your simstem in simpler form like
this
sage: x,y=var('x y')
sage: c1(x,y)=(x-5)^2+y^2-16; c2(x,y)=(y-3)^2+
One alternative is to use the optional package phcpack. You have to
install that ("sage -i phc-2.3.53.p0") and then you could do something
like:
sage: from sage.interfaces.phc import phc
sage: R. = PolynomialRing(CDF,2)
sage: sols = phc.blackbox([(x-5)^2+y^2-16, (y-3)^2+x^2-9],R)
sage: sols = sol
On 9 bře, 14:57, "ma...@mendelu.cz" wrote:
> I got the following message from Andrej Vodopivec:
>
> You can solve this system in maxima with to_poly_solve:
>
> (%i2) to_poly_solve([(x-5)^2+y^2-16, (y-3)^2+x^2-9], [x,y],
> use_grobner=true);
> (%o2) %union([x=-(9*sqrt(55)-135)/68,y=-(3*5^(3/2)*sq