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)*sqrt(11)+123)/68])

HTH, Andrej

On 9 bře, 12:02, "[email protected]" <[email protected]> wrote:
> 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+x^2-9
> sage: c2b(x,y) = expand(c2(x,y)-c1(x,y))
> sage: solve([c1(x,y)==0,c2b(x,y)==0],[x,y])
> [[x == -9/68*sqrt(55) + 135/68, y == -15/68*sqrt(5)*sqrt(11) +
> 123/68], [x == 9/68*sqrt(55) + 135/68, y == 15/68*sqrt(5)*sqrt(11) +
> 123/68]]
>
> And we can doublecheck the answer
>
> sage: sol=_
> sage: c1(sol[0][0].rhs(),sol[0][1].rhs()).expand().simplify_full()
> 0
> sage: c2(sol[0][0].rhs(),sol[0][1].rhs()).expand().simplify_full()
> 0
> sage: c1(sol[1][0].rhs(),sol[1][1].rhs()).expand().simplify_full()
> 0
> sage: c2(sol[1][0].rhs(),sol[1][1].rhs()).expand().simplify_full()
> 0
>
> Robert
>
> On 9 bře, 05:26, 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

Reply via email to