Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

How cam I simplify

Sum[UnitStep[-1 + n]/Sqrt[n!], {n, 0, ∞}]

to

$$\sum _{n=1}^{\infty } \frac{1}{\sqrt{n!}}$$

and then to

$$\sum _{n=0}^{\infty } \frac{1}{\sqrt{(n+1)!}}$$

I tried Simplify and FullSimplify, but neither of them worked.

share|improve this question
It seems the Sum will either evaluates to something and if not, then it remain as is. i.e if M can't evaluate it, then it will leave it as is. It will not look inside it to see it it can simplify the internal for specific index. No point. The sum does not evaluate. Since Sum[1/Sqrt[n!], {n, 1, Infinity]}] does not evaluate. I tried this on Maple and Maxima, and they both do the same as M. So, this will require special function to handle this specific case. – Nasser Mar 3 at 10:16
Try PiecewiseExpand on UnitStep[-1 + n]/Sqrt[n!] – Silvia Mar 4 at 0:33

1 Answer

up vote 0 down vote accepted

Here is a brute force way, hope it will help.

changeindex = Sum[a_, b_] :> Module[{nstart, rule, body},
rule = 
 Reduce[And @@ 
   Thread[Flatten@Cases[a, UnitStep[x__] :> {x}, \[Infinity]] >= 
     0]];
nstart = Max[rule /. _ >= x_ -> x, 0];
body = 
 Evaluate[Simplify[a /. b[[1]] -> b[[1]] + nstart, b[[1]] >= 0]];
Sum[Evaluate@body, Evaluate@b]
];


In[1]:= Sum[UnitStep[-1 + n]/Sqrt[n!], {n, 0, \[Infinity]}] /. changeindex
Out[1]:=

$$\sum _{n=0}^{\infty } \frac{1}{\sqrt{(1+n)!}}$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.