#555 partfrac/ratnumer of taylor bad: taychk2rat/FIX

open
nobody
5
2012-12-04
2004-04-09
Stavros Macrakis
No

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 ???

Discussion

    • summary: partfrac of taylor bogus taychk2rat/FIX --> partfrac/ratnumer of taylor bad: taychk2rat/FIX
     
  • 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.

     
  • Robert Dodier
    Robert Dodier
    2006-04-09

    • labels: --> Lisp Core - Taylor
     
  • Robert Dodier
    Robert Dodier
    2006-09-09

    • milestone: --> Includes_proposed_fix