1

I have a question about using maxima. Supposing I have the following sum:

sum (i^2, i, 0, n);

\[\sum_{i=0}^{n}{i}^{2}\]

and say I use it to sum up to 4:

sum (i^2, i, 0, 4);

= 61

If I want to list all the sum terms

1 + 4 + 9 + 16

how can I do this?

onepound
  • 1,365
  • If you just want the list of numbers, you can makelist(i^2,i,0,4). – achille hui Jan 09 '15 at 17:51
  • that's a good work around. But the example I used was simple I need this for more complex double summations to check I've got the notation right. Maybe this still can be done with makelist() I'll investigate. – onepound Jan 09 '15 at 19:44
  • 1
    If you want to inspect a two dimension slice of numbers, you can define a formula for the $(i,j)-$entry and then use genmatrix to generate a matrix on screen. e.g

    $$ \begin{array}{lc} \verb/M[i,j] := i^2 + j^2;/\ \verb/genmatrix(M,3,3);/ \end{array} \quad\text{ returns }; \begin{bmatrix}2 & 5 & 10\5 & 8 & 13\10 & 13 & 18\end{bmatrix} ;\text{ on screen. } $$

    – achille hui Jan 09 '15 at 19:58
  • okay this is good for double sums that have conditions that form same lenght rows or column numbers but not for conditions that produce varying lenghts unfortunately. – onepound Jan 10 '15 at 09:51

0 Answers0