Tag Info

New answers tagged

1

Here's my approach using replacement rule /. Sum[r^p_. a__, b_] :> r^p Sum[Times[a], b]. I have a hunch that there's a built in function that could accomplish this but I can't seem to find it. I've also made some modifications to your code: 1) Changing the first function to β to avoid clashing with the subscripted symbol α. 2) Changing the upper limit ...


0

I think you may find value in this rule: sequentialQ[x_List] := x == Range[x[[1]], x[[-1]]] rule = HoldPattern[Plus[s : F_[_, j___] ..]] /; sequentialQ @ {s}[[All, 1]] :> (HoldForm[Sum[F[i, j], {i, ##}]] & @@ {Min@#, Max@#} &[{s}[[All, 1]]]); Test: F[1.0, q, r] + F[1.5, q, r] + F[2, q, r] + F[2.7, q, r] + F[3.0, q, r] /. rule



Top 50 recent answers are included