1
$\begingroup$

I am performing a complicated summation in which fa is a Sum of a[j] over j, and terms in fa end up containing a BesselJ, a Hypergeometric0F1, or neither.

t[j_] := ((-1)^j)*(j - 1)!/(2*v^j);
DD[i_, j_] := t[i]*t[j]*F + (i + j)*G/v;
h[j_] := t[j]*(H + j*K/v);
m2[j_] = 4*W*(Z^(j - 1))*(v^(3*j - 1))/((j - 1)!^3);
a = Expand[h[i]*m2[i]*DD[i, j]*m2[j]*h[j] /. {i -> i + 1, j -> j + 1}];
fa = Sum[a, {j, 0, Infinity}];

I would like to create three separate functions a1, a2, and a3 respectively contain the terms from a that sum to BesselJ, Hypergeometric0F1, or neither. In the end, a1+a2+a3 should equal a. How can I do this?

$\endgroup$
  • $\begingroup$ Unless you know a priori the coefficients of BesselJ and Hypergeometric0F1, it seems unlikely that you can find a unique decomposition. $\endgroup$ – bbgodfrey Feb 27 '15 at 0:47
  • $\begingroup$ @bbgodfrey It should certainly be possible to take one term at a time, Sum it, see what the result was, and add the term to the correct working function accordingly. $\endgroup$ – Jerry Guern Feb 27 '15 at 0:57
1
$\begingroup$
fa = Sum[#, {j, 0, Infinity}] & /@ (List @@ a);
{bssTerms, hyperTerms} = (Position[fa, #] & /@ {_BesselJ, _Hypergeometric0F1})[[All, All, 1]]
indepTerms = Complement[Range@Length@fa, Join @@ {bssTerms, hyperTerms}]

For example:

Sum[a[[#]], {j, 0, Infinity}] & /@ hyperTerms

Mathematica graphics

$\endgroup$
  • $\begingroup$ Perfect! And I learned some new syntax too. Thanks! $\endgroup$ – Jerry Guern Feb 27 '15 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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