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{&}$
s = Sum[FullSimplify[f[k], Assumptions -> {k \[Element] Integers, k >= 1}], {k, 0, # - 1}] &
and then callings[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 evaluateFullSimplify[f[k], Assumptions -> {k \[Element] Integers, k >= 1}]
and thenSum
the result, which should yield aHarmonicNumber
expression. This reverses the order of summation and simplification. Is this what you need. $\endgroup$f[k]
was provided, but at the moment I'm having trouble thinking of an examplef[k]
to illustrate the property. $\endgroup$f[k]
. $\endgroup$