This solution works for combining any number of separate sums:
Sum[a/Sqrt[n!], {n, 0, Infinity}] +
Sum[b/Sqrt[n!], {n, 0, Infinity}] +
Sum[c/Sqrt[n!], {n, 0, Infinity}] //. Sum[x_, z_] + Sum[y_, z_] :> Sum[Simplify[x + y], z]
(*outputs: Sum[(a + b + c)/Sqrt[n!], {n, 0, Infinity}]*)
Here, we apply a rule to combine two sums together. The ReplaceRepeated
(//.
) is used to apply the combination rule as long as there are separate sums left. Note that in the present form, my solution only works if the summation variable (here n
) is the same in all the sums.
And here is how to separate the sums:
Sum[(a + b + c)/Sqrt[n!], {n, 0, Infinity}] /. Sum[x_, y_] :> (Sum[#, y] & /@ Expand@x)
(*outputs: Sum[a/Sqrt[n!], {n, 0, Infinity}] +
Sum[b/Sqrt[n!], {n, 0, Infinity}] +
Sum[c/Sqrt[n!], {n, 0, Infinity}]*)