Eliminate

• To: mathgroup at yoda.physics.unc.edu
• Subject: Eliminate
• From: puglisi at settimo.italtel.it
• Date: Mon, 4 Oct 93 15:43:10 MDT

```>>> Sergio Rescia writes:
>
> I am trying to use Eliminate to eliminate the unknown y in a system of 2 equations:
>
> In[1]:= Eliminate[{ (x-a)^2+(y-b)^2==r^2 ,
>                     x^2+y^2==9 },            {y}]
>
>            4    2           2      2
> Out[1]= r  + r  (-18 - 2 a  - 2 b  + 4 a x) ==
>
>                2    4       2      2  2    4               3          2
> >    -81 - 18 a  - a  + 18 b  - 2 a  b  - b  + 36 a x + 4 a  x + 4 a b  x -
>
>          2  2      2  2
> >     4 a  x  - 4 b  x
>
>
> Is there any way to force Eliminate to produce a result in the form:
>
> 	expr==0
>
> Or better yet there is any smart way to compute directly the discriminant of the second degree equation
> (in x) Out[1]?
>
> Thank you.
>
> Sergio rescia
>
>

Here is an answer:

In[5]:= eq={(-a + x)^2 + (-b + y)^2 == r^2, x^2 + y^2 == 9}

Out[5]= {(-a + x)^2 + (-b + y)^2 == r^2, x^2 + y^2 == 9}

In[6]:= Solve[eq,x,y]

Out[6]= {{x -> (-(a*(-4 - 36/(a^2 + b^2) + (4*r^2)/(a^2 + b^2))) +
(a^2*(-4 - 36/(a^2 + b^2) + (4*r^2)/(a^2 + b^2))^2 -
16*(18 + a^2 + b^2 + 81/(a^2 + b^2) - (36*b^2)/(a^2 + b^2) -
2*r^2 - (18*r^2)/(a^2 + b^2) + r^4/(a^2 + b^2)))^(1/2))/8},
{x -> (-(a*(-4 - 36/(a^2 + b^2) + (4*r^2)/(a^2 + b^2))) -
(a^2*(-4 - 36/(a^2 + b^2) + (4*r^2)/(a^2 + b^2))^2 -
16*(18 + a^2 + b^2 + 81/(a^2 + b^2) - (36*b^2)/(a^2 + b^2) -
2*r^2 - (18*r^2)/(a^2 + b^2) + r^4/(a^2 + b^2)))^(1/2))/8}}

In[7]:= Eliminate[eq,y]

Out[7]= b != 0 && a^4 - 4*a^3*x + a*(-36 - 4*b^2 + 4*r^2)*x +
a^2*(18 + 2*b^2 - 2*r^2 + 4*x^2) ==
-81 + 18*b^2 - b^4 + 18*r^2 + 2*b^2*r^2 - r^4 - 4*b^2*x^2 ||
b == 0 && a^2 - 2*a*x == -9 + r^2

Alberto Puglisi
Italtel R&D
Milan, Italy		Internet:   puglisi at settimo.italtel.it

```

• Prev by Date: Symbolic Eigenvectors
• Next by Date: Problems with Eigenvalues[..]
• Previous by thread: Symbolic Eigenvectors
• Next by thread: Problems with Eigenvalues[..]