On 2012-04-26, Dmitry Shkirmanov <piminusmeson at bk.ru> wrote:
> (%i3) expr2: exp( sum(a[i]*b[i],i,1,n));
> n
> ====
> \
> > a b
> / i i
> ====
> i = 1
> (%o3) %e
>
> It is just what i need. But, it seems that is impossible to get derivative of such expression:
> (%i4) diff(exp2,a[j]);
> (%o4) 0
Maxima doesn't know much about differentiating sums.
I suppose it can be done with simplification rules (tellsimp).
After thinking about it for a few minutes, I don't see a solution.
I'll think about it over the weekend.
Basically we need a rule that is something like
diff (sum (foo (a[i]), i, 1, n), a[j])
--> sum (delta (i, j) * diff (foo (a[i]), a[j]), i, 1, n)
--> diff (foo (a[j]), a[j])
which is probably not too hard, but the devil is in the details.
best
Robert Dodier