You can use
out= ((abs(c0)).^2) + symsum(c,n,1,inf);
and that will be faster than for upper bound 100. The symsum() will stay unevaluated, and will be converted into numeric form when you vpa().
Alternately you could use
out= ((abs(c0)).^2) + sum(subs(c,n,1:100));
This will be a bit slow. I would suggest instead
guard_digits = 10;
out= ((abs(c0)).^2) + sum(vpa(subs(c,n,1:100), guard_digits);
Any of these methods will give the same result to within round-off error -- and none of them will give 1.0 for the final result, not even the one with symsum() to infinity. I recommend that you re-check the formulaes.
Best Answer