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.<x,y> = PolynomialRing(CDF,2)
sage: sols = phc.blackbox([(x-5)^2+y^2-16, (y-3)^2+x^2-9],R)
sage: sols = sols.classified_solution_dicts()
sage: sols['real']
[{y: 0.172897392552427, x: 1.00373843553146}, {y: 3.44474966627110, x:
2.96684979976266}]
-M. Hampton
On Mar 8, 10:26 pm, Markus <[email protected]> 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)
>
> produces the expected result:
>
> [[x == (45/17), y == (75/17)], [x == 0, y == 0]]
>
> Example 2:
> (circle 1 smaller)
>
> c1(x,y)=(x-5)^2+y^2-16; c2(x,y)=(y-3)^2+x^2-9
> solve([c1(x,y)==0,c2(x,y)==0],x,y)
>
> produces the unexpected result:
>
> []
>
> whereas intersection points do exist, e.g.
> x=(-9(sqrt(55)-15)/68, y=(-3(sqrt(55)-41)/68
>
> Is it because Example 1 has a rational result, whereas Examples 2 has
> an irrational one?
>
> Thanks for any help.
>
> Markus
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org