I would like to do some abstract power series manipulation. I am defining a power series like this
func = Sum[Subscript[a,i] * x^i, {i, 0, M}]; When I try to take the derivative I find
D[func, x] # Sum[i x^(-1 + i) Subscript[a, i], {i, 0, Infinity}] Thus, the problem is that the index for sum still starts at zero as opposed to one. I am hoping some one can demonstrate a way to handle this issue, or point me toward a better way to handle abstract series.
This leads to problems when replacing with zero. Evaluating the expression below throws, "Power: Infinite expression 1/0 encountered" error.
D[func, x] /. x -> 0 Edit: An interesting thing I've found for higher derivatives is that mathematica will find ways to ensure that the proper terms are zero. In the following example, the 0th and 1st term of the second derivative of the power series is correctly zero.
D[Sum[Subscript[a, i] x^i, {i, 0, M}], {x, 2}] #Sum[i*Subscript[a, i]*(i*x^(i - 2) - x^(i - 2)), {i, 0, M}]
Sumitself. Clearly, you then need to keep track of the limits of the sum yourself. Without knowing what you plan to do next, it's difficult to make a definite suggestion. $\endgroup$