Well, that's most annoying if it's a bug in FriCAS.  I might try the same 
thing in Axiom and see what happens.

I'll let you know tomorrow (it's nearly midnight in Melbourne, Australia 
right now).

-A.

On Monday, January 20, 2014 10:49:00 PM UTC+11, Ralf Hemmecke wrote:
>
> On 01/20/2014 12:19 PM, Alasdair wrote: 
> > Try this: 
>
> Thanks... I've shortened it a bit and somehow believe that must be a bug. 
>
> )cl completely 
> f:=operator 'f 
> y:=operator 'y 
> f1:=D(f(x,y(x)),x) 
> f2:=D(f1,x) 
> f3:=D(f2,x) 
> kxy:=eval(D(f(x,z),[x,z]),z=y(x)) 
>
> In the end I get... 
>
> f3:=D(f2,x) 
>
>
>    (5) 
>                                    ,,,       ,   3 
>      f      (x,y(x)) + f  (x,y(x))y   (x) + y (x) f      (x,y(x)) 
>       ,1,1,1            ,2                         ,2,2,2 
>    + 
>       ,   2                   ,                      ,   2 
>      y (x) f      (x,y(x)) + y (x)f      (x,y(x)) + y (x) f      (x,y(x)) 
>             ,2,2,1                 ,2,1,1                  ,2,1,2 
>    + 
>       ,                      ,   2                   , 
>      y (x)f      (x,y(x)) + y (x) f      (x,y(x)) + y (x)f      (x,y(x)) 
>            ,1,1,2                  ,1,2,2                 ,1,2,1 
>    + 
>         ,                                                               
>  ,, 
>      (3y (x)f    (x,y(x)) + f    (x,y(x)) + f    (x,%B) + f 
> (x,y(x)))y  (x) 
>              ,2,2            ,2,1            ,2,1          ,1,2 
>                                                     Type: 
> Expression(Integer) 
> kxy:=eval(D(f(x,z),[x,z]),z=y(x)) 
>
>
>    (6)  f    (%A,y(x)) 
>          ,1,2 
>                                                     Type: 
> Expression(Integer) 
>
> That looks to me like even two bugs. Why would evaluating f3:=D(f2,x) 
> have influence on kxy:=eval(D(f(x,z),[x,z]),z=y(x))? Note that the 
> ordinary result should be like this: 
>
> (7) -> )cl completely 
>    All user variables and function definitions have been cleared. 
>    All )browse facility databases have been cleared. 
>    Internally cached functions and constructors have been cleared. 
>    )clear completely is finished. 
> (1) -> f:=operator 'f 
>
>    (1)  f 
>                                                           Type: 
> BasicOperator 
> (2) -> y:=operator 'y 
>
>    (2)  y 
>                                                           Type: 
> BasicOperator 
> (3) -> kxy:=eval(D(f(x,z),[x,z]),z=y(x)) 
>
>    (3)  f    (x,y(x)) 
>          ,1,2 
>                                                     Type: 
> Expression(Integer) 
>
> But I guess that is a follow-up error from the computation of 
> f3:=D(f2,x). Also there I wouldn't want to see %B to appear in the output. 
>
> I faintly remember that Waldek introduced that local variables to 
> indicate "derivation wrt the n-th variable", because there was a bug for 
> another expression. Looks to me like this code must be revisited. 
>
> But I'm somehow clueless why evaluation of D(f2,x) leads to a side effect. 
>
> Ralf 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to