expr: 1/(x^2-1)$
texpr: taylor(expr,x,1,1)$
ptexpr: partfrac(texpr,x) => (x+4/(x-1)-3)/8 NO!
This is algebraically correct, but not in partfrac form.
The correct answer is given by:
partfrac(ratdisrep(texpr),x)
== partfrac(ptexpr,x)
=> 1/(2*(x-1))+(x-3)/8
The immediate fix is to replace
(DESETQ (RATFORM . EXP) (TAYCHK2RAT EXP))
with
(DESETQ (RATFORM . EXP) (RATF (TAYCHK2RAT EXP)))
however, I wonder if TAYCHK2RAT shouldn't be doing
this. Compare:
ratnumer(taylor(x+1/x,x,0,1)) => x+1/x ???
Logged In: YES
user_id=588346
taychk2rat is used in four places in Maxima:
ratnumer
ratdenom
partfrac
horner
In all of them, it would be better if taychk2rat performed the
ratf. So the fix should be in taychk2rat, not in the callers.
Or maybe in $taytorat. I don't understand what srrat does --
is that the problem? Maybe look at this later.