4.35 How to find parts of a Sum?
Given an inert Sum such as
\[ r = \sum _{n=2}^{\infty } a_{n -1} x^{n -1} \]
How to obtain the body of the sum, the index variable, the
lower starting value and the upper limit?
r:=Sum(a[n - 1]*x^(n - 1), n = 2 .. infinity);
op(0,r) #head
Sum
op(1,r) #body
a[n - 1] x^(n - 1)
op(2,r) # sum specs
n = 2 .. infinity
lhs(op(2,r)) #name of summation index
n
rhs(op(2,r)) # lower..upper limits
2 .. infinity
op(1,rhs(op(2,r))) #lower limit
2
op(2,rhs(op(2,r))) #upper limit
infinity