Maxima: Differentiate sum at specific index-position
Subject: Maxima: Differentiate sum at specific index-position
From: Rupert Swarbrick
Date: Tue, 07 May 2013 13:41:31 +0100
Pepe Sanchez <jose.sanchez at uv.es> writes:
> In my opinion, a CAS hardly can hand a particular value for an index
> in a general expression like that. Perhaps you can individualize your
> particular term of index A this way:
>
> --> mysum : sum(u[i]^2, i, 1, N-1)+u[A]^2;
>
> (%o1) u[A]^2+sum(u[i]^2,i,1,N-1)
>
> --> diff(mysum, u[A]);
>
> (%o2) 2*u[A]
Of course, the problem is that you just assumed A = N... I don't think
that there's a neat solution with "delta" symbols, as a differential
geometer might write, either: as far as I know, Maxima doesn't do any
clever simplification with them.
Regarding the question of whether Maxima could reasonably be expected to
solve this sort of question, I reckon that the following transcript is
Maxima doing The Right Thing:
(%i4) mysum : sum(u[i]^2, i, 1, N);
(%o4) 'sum(u[i]^2,i,1,N)
(%i5) diff(mysum, u[i]);
(%o5) 2*'sum(u[i],i,1,N)
Once you get to the second line, it doesn't make sense to say "oh, I
didn't mean all of them", of course.
However, it would be cool if you could type something like:
assume (1<=k, k<=N);
diff (mysum, u[k]);
which definitely doesn't work at the moment. I guess it's rather
difficult to *make* it work, though. Not sure quite how hard without
staring for a while at the implementation of diff (which I'm not doing
today).
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20130507/3fb61edd/attachment.pgp>