Development of a matrix calculus package



On 3/22/2012 3:59 PM, Mike Valenzuela wrote:
> Thanks for the advice,
>
> but will other rules, outside of the ``diff'' command, be applied 
> intelligently/recursively? For example will rules (a) and (e) combine 
> to process:
> diff( X^3, X[i][j] ) -->
> diff( X.(X.X), X[i][j] ) -->
> J[i][j] . (X . X) + X . diff( X . X, X[i][j]) -->
> J[i][j] . X . X + X . J[i][j] . X + X . X . J[i][j] ?
>
> How is the ``diff'' command coded? Would you recommend I copy and 
> modify it?
>
> On Thu, Mar 22, 2012 at 3:32 PM, Richard Fateman 
> <fateman at eecs.berkeley.edu <mailto:fateman at eecs.berkeley.edu>> wrote:
>
>     I suggest you start out by not using the command "diff".
>     Later, if it appears that everything you need can be put on top of
>     diff without changing its
>     behavior in the previous cases, then they can be joined.
>
>
I haven't looked at the details of your rules.  The diff command is not 
so neat
because, among other things it has a variable number of arguments.  e.g.

diff(f(x),x)
diff(f(x),x,3)
diff(f(x),x,3,y,4)
etc.

Also it probably takes shortcuts like  diff(f,x) is 0 if f is free of x.
So copying it and modifying it would probably not be easy.  In terms of
defining your own separate program, you can declare that operators are 
linear.
Also the simplification of dot products
is independent of diff.