7

How can I convert the sum into Σ notation in output? For example, I have an array of Array[k,4]. My input is

Array[k,4]
Sum[K[i], {i, 1, 4}]-K[4]

Then the output will be

K[1] + K[2] + K[3]. 

If I use Holdform in the input

HoldForm[Sum[K[i], {i, 1, 4}]-K[4]]

the result will be $$ \sum _{i=1}^4 K[i]-K[4] $$ What I want in the output is $$ \sum _{i=1}^3 K[i] $$

user2230101
  • 195
  • 4
  • 3
    Would you kindly give additional examples? This one seems too easy to be representative of your actual cases; I mean one would simply write out the result for something this simple. Or are you handling many simple cases of the same form? – Mr.Wizard Mar 30 '17 at 03:12
  • 1
    Have a look at my Summa package on Mathsource (or how they call it now). You only need to fix it according to http://mathematica.stackexchange.com/questions/31426/summa-package-problem – Peltio Mar 30 '17 at 17:38

0 Answers0