I have the following Maxima code:
m:sum(x[i],i,1,N)/N;
and then I want to calculate $m^2$.
m2:m^2, sumexpand;
Then I get double summation:
sum(sum(x[i1]*x[i2],i1,1,N),i2,1,N)/N^2
What I want to achieve is to expand it into the two sums.
The first one is sum(x[i]^2,i,1,N)
and the second is the rest over non-equal indices
. How should I do that? How should I do that with arbitrary power of m
?