"quotient is not exact" with Taylor series expansion?



Found a workaround: setting gcd:spmod allowed taylor(expr,x,0,6).
However, even after simplification the taylor series is significantly longer
than the result obtained through Mathematica.

Thanks,
Werner

Quoting wheigl@Mines.EDU:

> Thanks, that worked for that square root function. However, a little further
> in
> my derivation I need the taylor series of a longer expression which gave a
> different error:
> 
> Maxima encountered a Lisp error:
> 
>  Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
>     (LAMBDA (X Y)
>       (GREATERP (CAR X) (CAR Y))) is not of type (OR FUNCTION SYMBOL)
> 
> Automatically continuing.
> To reenable the Lisp debugger set *debugger-hook* to nil.
> 
> Here is the batch file I used:
> 
> --------------------------------------------------------------------------
> /* Maxima batch file to derive series expansion of group velocity */
> 
> vp2:(a+b*(sin(x))^2+sqrt(c+d*(sin(x))^2+e*(sin(x))^4))/2;
> ratsimp(diff(sqrt(vp2),x,1));
> subst(x,sin(x),%);
> subst(sqrt(1-x^2),cos(x),%);
> ratsimp(%);
> subst(x,sin(x),vp2);
> Vphi2:%o7+%o6^2;
> gcd:ez;
> taylor(%o8,x,0,6);
> --------------------------------------------------------------------------
> 
> Quoting Richard Fateman :
> 
> > try typing gcd:ez;
> > and then run it again.
> > it's a bug that has yet to be fixed involving interactions
> > with polynomial gcd and (I think) non-rational objects like sqrt.
> > 
> > RJF
> > 
> > 
> > wheigl@mines.edu wrote:
> > 
> > >Dear colleagues,
> > >
> > >I'm facing the following problem in Maxima 5.9.1:
> > >
> > >I need to find the 6-term Taylor expansion of
> > >
> > >sqrt((a+b*x^2+sqrt(c+d*x^2+e*x^4))/2);
> > >
> > >but Maxima responds with error message "quotient is not exact". However,
> a
> > >4-term Taylor expansion works fine. See below. Any ideas?
> > >
> >
> >--------------------------------------------------------------------------
> > >
> > >(%i1) sqrt((a+b*x^2+sqrt(c+d*x^2+e*x^4))/2);
> > >
> > >                                 4      2           2
> > >                    SQRT(SQRT(e x  + d x  + c) + b x  + a)
> > >(%o1)               --------------------------------------
> > >                                   SQRT(2)
> > >(%i2) taylor(%,x,0,6);
> > >
> > >quotient is not exact
> > > -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);
> > >(%i3) taylor(%o1,x,0,4);
> > >
> > >         SQRT(SQRT(c) + a)
> > >(%o3)/T/ -----------------
> > >              SQRT(2)
> > >
> > >                                                            2
> > >   (SQRT(SQRT(c) + a) SQRT(c) d + 2 SQRT(SQRT(c) + a) b c) x
> > > + ----------------------------------------------------------
> > >              (4 SQRT(2) a + 4 SQRT(c) SQRT(2)) c
> > >
> > >                          2
> > > + ((8 SQRT(SQRT(c) + a) c  + 8 SQRT(SQRT(c) + a) SQRT(c) a c) e
> > >
> > >                                                              2
> > > + (- 3 SQRT(SQRT(c) + a) c - 2 SQRT(SQRT(c) + a) SQRT(c) a) d
> > >
> > >                                                            2  2   4
> > > - 4 SQRT(SQRT(c) + a) SQRT(c) b c d - 4 SQRT(SQRT(c) + a) b  c ) x
> > >
> > >              3                2                          2
> > >/(32 SQRT(2) c  + (32 SQRT(2) a  + 64 SQRT(c) SQRT(2) a) c ) + . . .
> > >
> > >_______________________________________________
> > >Maxima mailing list
> > >Maxima@www.math.utexas.edu
> > >http://www.math.utexas.edu/mailman/listinfo/maxima
> > >  
> > >
> > 
> > 
> 
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>