0
$\begingroup$

I have a sum in the form of pure function

s = Sum[f[k], {k, 0, # - 1}] &

of perhaps complicated terms f[k]. The terms f[k] are fractions whose denominators and numerators are products of terms of form Pochhammer[a, k], where a is an arbitrary (in the most cases rational) number. I know, how to simplify f[k]:

FullSimplify[f[k], Assumptions -> {k ∈ Integers, k >= 1}]

does the work (and I obtain 1/(k + 1)). A call

FullSimplify[s[n], Assumptions -> {n ∈ Integers, n >= 1}]

returns only

$\quad \quad \sum_{k = 0}^{n -1} f(x)$

where f[k] remains in the complicated form. So the question is

How do I simplify the terms of f[k] when they are hidden in a sum?

In the specific case of the given example, the goal is to obtain a sum with terms 1/(k + 1), or, even better, HarmonicNumber[n].

Among the other things, I've taken a look at this question, but the problem is that I do not know the exact form of my terms; also, I would like to have an approach that works for sums of sums (of ... ) of any described terms.

Edit: On of the f's is

$\texttt{f} = \frac{\texttt{Product[Pochhammer[aa,#],{aa,{3,1}}] Product[Pochhammer[cc+1,#],{cc,{}}]}}{\texttt{Product[Pochhammer[bb,#],{bb,{4}}] Product[Pochhammer[cc,#],{cc,{}}]}}\text{&}$

$\endgroup$
5
  • 3
    $\begingroup$ Hard to say without explicit code, but have you tried s = Sum[FullSimplify[f[k], Assumptions -> {k \[Element] Integers, k >= 1}], {k, 0, # - 1}] & and then calling s[n]? Sum will symbolically evaluate it's summand when the index bounds are either symbolic (which is the case here) or the number of terms exceeds $10^6$, and so it should first evaluate FullSimplify[f[k], Assumptions -> {k \[Element] Integers, k >= 1}] and then Sum the result, which should yield a HarmonicNumber expression. This reverses the order of summation and simplification. Is this what you need. $\endgroup$ Commented Feb 3, 2015 at 18:34
  • $\begingroup$ Perfect! I didn't include my code, because it is far from being self-explanatory and quite long, so I pointed out only the essential facts in this question. Thank you. $\endgroup$
    – Antoine
    Commented Feb 5, 2015 at 10:59
  • $\begingroup$ @DumpsterDoofus Although I suppose that might seem trivially easy to someone with your experience I think it is not so obvious to newer users. I would rather that you posted that in an answer than have this question closed. $\endgroup$
    – Mr.Wizard
    Commented Feb 7, 2015 at 9:58
  • 1
    $\begingroup$ @Mr.Wizard: True; I probably would post an answer if explicit code for f[k] was provided, but at the moment I'm having trouble thinking of an example f[k] to illustrate the property. $\endgroup$ Commented Feb 7, 2015 at 15:54
  • $\begingroup$ @DumpsterDoofus I have added an example of f[k]. $\endgroup$
    – Antoine
    Commented Feb 7, 2015 at 16:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.