rat(q) gives (2*sqrt(17)+1)/16. factor(q), ratsimp(q) ... give quotient by zero expand(q) gives 0.
Subject: rat(q) gives (2*sqrt(17)+1)/16. factor(q), ratsimp(q) ... give quotient by zero expand(q) gives 0.
From: Stavros Macrakis
Date: Fri, 28 Oct 2011 14:38:14 -0400
Well, (2*sqrt(17)+1)/16 is correct for almost all values of 17 :-) :
Consider e17: subst(t,17,q)$
ratsimp(e17) => (2*sqrt(t)+1)/16
but
factor(denom(e17)) => (t-17)^2
This is probably related to cases like this:
r: (sqrt(3)+1)^2-2*sqrt(3)-4;
r/r => 1
ratsimp(r) => 0
where Maxima (and apparently Mathematica as well) assumes that expr/expr =>
1 regardless of what expr is.
On Fri, Oct 28, 2011 at 13:37, Richard Fateman <fateman at eecs.berkeley.edu>wrote:
> q: -((((-1 + sqrt(17))**2 - ((-3 + sqrt(17))*(5 + 3*sqrt(17)))/2)*
> (((-1 + sqrt(17))**2*(4 + sqrt(17)))/4 -
> ((5 + sqrt(17))*(5 + 3*sqrt(17)))/8))/
> (-1 - 8*(4 + sqrt(17)) + (4 + sqrt(17))**2)**2);
>