I am trying to evaluate the following expression when $c=0$:
$$\sum _{k=1}^{\infty} \dfrac{(k+1) c^{k-1} g(k)}{(k-1)!}+\left(\sum_{k=0}^{\infty} \dfrac{(k+1) c^k g(k)}{k!}\right)^2$$
(copyable Mathematica plaintext version):
Sum[((k+1) c^(k-1) g[k])/(k-1)!, {k, 1, Infinity}] +
(Sum[((k+1) c^k g[k])/k!, {k, 0, Infinity}])^2
but when I tell Mathematica to do so, it simply gives me:
$$\sum_{k=1}^{\infty} \dfrac{0^{k-1} (k+1) g(k)}{(k-1)!}+\left(\sum _{k=0}^{\infty} \dfrac{0^k (k+1) g(k)}{k!}\right)^2$$
So to find the result that I am looking for, I suppose I should somehow isolate the order zero terms $\cal{O}(c^0)$ and then evaluate these when $c=0$, so the final result is:
$$2g(1)+g(0)^2$$
Is there any way of obtaining the $0$th order coefficients from a non-closed expression as the one I have using only Mathematica?
/.\[Infinity]->0
, but only if you normalize both sums to have an exponent ofk
onc
. $\endgroup$