# How to speed up the multiple sums and integration?

I want to numerically calculate a sum with multiple variables and then integrate the whole expression. Any solutions to speed up the process?

NIntegrate[Sum[f[k1, k2, k3, k4, k5, k6, k7, t1], {k1, 1, n}, {k2, 1, n}, {k3, 1, n}, {k4, 1, n}, {k5, 1, n}, {k6, 1, n}, {k7, 1, n}], {t1, 0, t}]

Here n is positive integer, and t is a given time. For large n, there are so many terms......

• It really depends on the form of f. Generally, summation and integration can be interchanged, and so you could try to integrate each term f[...] analytically or numerically (with memoization) before summing. Oct 21 '21 at 9:04