Rational simplification bug ("Quotient by a polynomial of higher degree" error message)



On Wed, Nov 28, 2012 at 10:27 AM, Karl-Dieter Crisman
<kcrisman at gmail.com> wrote:
> Hi Alan,
>
> On Wed, Nov 28, 2012 at 5:27 AM,  <maxima-request at math.utexas.edu> wrote:
>> Rational simplification bug ("Quotient by a polynomial of
>>       higher degree" error message)
>
> You can just do the following to check this in Maxima.
>
> sage -maxima
>
> (%i1) fullratsimp(paste in your expression here);
> (%01) 0
>
> well, that's what I got for your big one.  But it looks like your
> expressions are well-formed enough that you can just paste them into
> Maxima directly.  If you try to report a bug upstream, it's good to
> try to do it in the "native" language, though of course sometimes
> that's challenging.

Also, even in Sage I get zero (5.4.1).  This is with nbody=3.

sage: Residual[0]
(2*(beta + gamma)*G*M_2/(sqrt((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)*c^2) - (vx_0^2 + vy_0^2 + vz_0^2)*gamma/c^2 - 1)*(x_0 -
x_2)*G*M_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) +
1/2*(4*gamma + 3)*G*M_2*a_x2/(sqrt((z_0 - z_2)^2 + (y_0 - y_2)^2 +
(x_0 - x_2)^2)*c^2) + (x_0 - x_2)*G*M_2/((z_0 - z_2)^2 + (y_0 - y_2)^2
+ (x_0 - x_2)^2)^(3/2) - 1/2*(x_0 - x_2)*(2*(gamma + 1)*(vx_2^2 +
vy_2^2 + vz_2^2) - 4*(gamma + 1)*(vx_0*vx_2 + vy_0*vy_2 + vz_0*vz_2) -
2*(2*beta - 1)*U_2 - (z_0 - z_2)*a_z2 - (y_0 - y_2)*a_y2 - (x_0 -
x_2)*a_x2 - 3*((z_0 - z_2)*vz_2 + (y_0 - y_2)*vy_2 + (x_0 -
x_2)*vx_2)^2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2))*G*M_2/(((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)^(3/2)*c^2) + (vx_0 - vx_2)*(2*(gamma + 1)*((z_0 - z_2)*vz_0 +
(y_0 - y_2)*vy_0 + (x_0 - x_2)*vx_0) - (2*gamma + 1)*((z_0 - z_2)*vz_2
+ (y_0 - y_2)*vy_2 + (x_0 - x_2)*vx_2))*G*M_2/(((z_0 - z_2)^2 + (y_0 -
y_2)^2 + (x_0 - x_2)^2)^(3/2)*c^2) + 1/2*(4*(gamma + 1)*((z_0 -
z_2)*(vz_0 - vz_2) + (y_0 - y_2)*(vy_0 - vy_2) + (x_0 - x_2)*(vx_0 -
vx_2))*G*M_2*vx_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)^(3/2) - 4*(gamma + 1)*G*M_2*a_x2/sqrt((z_0 - z_2)^2 + (y_0 -
y_2)^2 + (x_0 - x_2)^2) - (x_0 - x_2)*(2*(2*gamma + 1)*G*M_2/sqrt((z_0
- z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2) + vx_0^2 + vy_0^2 +
vz_0^2)*G*M_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) -
2*((2*gamma + 1)*((z_0 - z_2)*(vz_0 - vz_2) + (y_0 - y_2)*(vy_0 -
vy_2) + (x_0 - x_2)*(vx_0 - vx_2))*G*M_2/((z_0 - z_2)^2 + (y_0 -
y_2)^2 + (x_0 - x_2)^2)^(3/2) + (z_0 - z_2)*G*M_2*vz_0/((z_0 - z_2)^2
+ (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) + (y_0 - y_2)*G*M_2*vy_0/((z_0
- z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) + (x_0 -
x_2)*G*M_2*vx_0/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)^(3/2))*vx_0)/c^2 - 1/2*(2*(2*beta - 1)*(x_0 -
x_2)*G^2*M_2^2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^2 -
(2*gamma + 1)*(x_0 - x_2)*(vx_0^2 + vy_0^2 + vz_0^2)*G*M_2/((z_0 -
z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) - (x_0 - x_2)*(2*(gamma
+ 1)*(vx_2^2 + vy_2^2 + vz_2^2) - 2*(2*beta - 1)*U_2 - (z_0 -
z_2)*a_z2 - (y_0 - y_2)*a_y2 - (x_0 - x_2)*a_x2 - ((z_0 - z_2)*vz_2 +
(y_0 - y_2)*vy_2 + (x_0 - x_2)*vx_2)^2/((z_0 - z_2)^2 + (y_0 - y_2)^2
+ (x_0 - x_2)^2))*G*M_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)^(3/2) + (2*(x_0 - x_2)*((z_0 - z_2)*vz_2 + (y_0 - y_2)*vy_2 +
(x_0 - x_2)*vx_2)^2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^2
- 2*((z_0 - z_2)*vz_2 + (y_0 - y_2)*vy_2 + (x_0 -
x_2)*vx_2)*vx_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2) -
a_x2)*G*M_2/sqrt((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2) +
4*(gamma + 1)*((x_0 - x_2)*G*M_2*vx_0*vx_2/((z_0 - z_2)^2 + (y_0 -
y_2)^2 + (x_0 - x_2)^2)^(3/2) + (x_0 - x_2)*G*M_2*vy_0*vy_2/((z_0 -
z_2)^2 + (y_0 - y_2)^2 + (x_0 - x_2)^2)^(3/2) + (x_0 -
x_2)*G*M_2*vz_0*vz_2/((z_0 - z_2)^2 + (y_0 - y_2)^2 + (x_0 -
x_2)^2)^(3/2)))/c^2
sage: Residual[0].simplify_rational()
0

So I'm not sure why fullratsimp isn't working on your machine, unless
I made a mistake in your script.