Hello, list. Is it possible to don't expand sums explicitly?
Let's consider an example:
(%i1) expr1: exp( sum(a[i]*b[i],i,1,3));
a b + a b + a b
3 3 2 2 1 1
(%o1) %e
(%i2) result: factor(sum(c[j]*diff(expr1,a[j]),j,1,3));
a b + a b + a b
3 3 2 2 1 1
(%o2) %e (b c + b c + b c )
3 3 2 2 1 1
Is it possible to get answer in form, that does not have explicit summation, something like this:
exp( sum(a[i]*b[i],i,1,3)) * sum(b[i]*c[i],i,1,3)) ?
I tried to do not specify the number of terms:
(%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
It gives zero instead of b[j]*exp( sum(a[i]*b[i],i,1,3)), so i cannot cannot define:
(%i6) result2: sum(c[j]*diff(expr2,a[j]),j,1,n);
It gives zero instead of
n
====
\
> a b
/ i i n
==== ====
i = 1 \
(%o7) %e> b c
/ j j
====
j = 1
Any ideas?