Expanding and differentiating subscripts



Which one of the answers is what you want? The notion
of subscripting an expression (as opposed to a variable)
has at least three different semantic interpretations
that come to my mind.


(a+b+c)[3] ==>  c

(a+b+c)[3] ==> a[3]+b[3]+c[3]

(a+b+c)[3] ==> error

(a+b+c)[3] ==>  no change

I think you could get Maxima to do any of these, maybe with Tellsimp,
and the program someone posted here for traversing an expression,
in case you want choice 2.

RJF



edA-qa mort-ora-y wrote:

> Is there any simple way to get Maxima to handle subscripts correctly for 
> the purposes of differentiation.
> 
> Currently,
> 
> (C250) diff( (c*d)[1],d );
> (D250)                                 0
> 
> But,
> (C251) diff( (c[1]*d),d );
> (D251)                                c
>                                        1
> 
> Is there any function that would be able to expand the subscripts 
> automatically to the appropriate variables?  Or better, to get diff to 
> understand subscripts.
> 
>