Question: A simplification / reduction question

I know this question has been asked time and time again. Starting of with the expr . That is the end goal I want to achieve.  How would I reduce the expansion to get it into 1-f(x,y,z)/g(x,y,z) format?. I have tried all sorts of approaches.
 

restart

#

expr:=1 - (x__1*x__2 + y__1*y__2 - z__1*z__2)^2/((x__1^2 + y__1^2 - z__1^2)*(x__2^2 + y__2^2 - z__2^2))

1-(x__1*x__2+y__1*y__2-z__1*z__2)^2/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(1)

normal( (1) );

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(2)

simplify( (2) );

((y__2^2-z__2^2)*x__1^2-2*x__2*(y__1*y__2-z__1*z__2)*x__1+(y__1^2-z__1^2)*x__2^2-(y__1*z__2-y__2*z__1)^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(3)

radnormal(%)

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(4)

Test:=combine(%)

(x__1^2*y__2^2-x__1^2*z__2^2-2*x__1*x__2*y__1*y__2+2*x__1*x__2*z__1*z__2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2+2*y__1*y__2*z__1*z__2-y__2^2*z__1^2)/((x__1^2+y__1^2-z__1^2)*(x__2^2+y__2^2-z__2^2))

(5)

 

n:={op(numer(Test))}

{x__1^2*y__2^2, x__2^2*y__1^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2, -2*x__1*x__2*y__1*y__2, 2*x__1*x__2*z__1*z__2, 2*y__1*y__2*z__1*z__2}

(6)

d:={op(expand(denom(Test)))}

{x__1^2*x__2^2, x__1^2*y__2^2, x__2^2*y__1^2, y__1^2*y__2^2, z__1^2*z__2^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2}

(7)

d subset n

false

(8)

d intersect n

{x__1^2*y__2^2, x__2^2*y__1^2, -x__1^2*z__2^2, -x__2^2*z__1^2, -y__1^2*z__2^2, -y__2^2*z__1^2}

(9)

add(%[i],i=1..nops(%))

x__1^2*y__2^2-x__1^2*z__2^2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2-y__2^2*z__1^2

(10)

factor( (10) );

x__1^2*y__2^2-x__1^2*z__2^2+x__2^2*y__1^2-x__2^2*z__1^2-y__1^2*z__2^2-y__2^2*z__1^2

(11)

n minus d

{-2*x__1*x__2*y__1*y__2, 2*x__1*x__2*z__1*z__2, 2*y__1*y__2*z__1*z__2}

(12)

 


 

Download 2024-07-20_Q_Simplify_Reformat.mw

Please Wait...