Questions tagged [summation]
Questions using the Sum command, especially for series and other algebraic objects, and related functions such as SumConvergence
1,027 questions
39
votes
7
answers
6k
views
How to differentiate formally?
I have been wrapping my head around this for a while now and I have not found a solution so far. I want to work with an arbitrary number of variables in Mathematica and use some built in functions. To ...
37
votes
2
answers
1k
views
$\sum_{k=1}^{\infty }\left\lfloor\frac{5}{5^k}\right\rfloor$ giving wrong answer?
Bug introduced in 7.0 or earlier and fixed in 11.0.1
When I try to evaluate the following:
$$\sum_{k=1}^{\infty }\Bigg\lfloor\frac{5}{5^k}\Bigg\rfloor$$
using
...
30
votes
2
answers
23k
views
How do you put conditions on indices in a sum?
I'm relatively inexperienced with mathematica, so I apologize if this is a trivial question. I want to take a double sum over a function $f(i,j)$ of two indices, of the form
$$
\sum_{i = -\infty}^\...
25
votes
3
answers
830
views
Sudden increase in timing when summing over 250 entries
I see a sudden increase of Timing by a factor of thousands when I sum over 250 elements of a matrix rather than over 249.
So for instance, this table contains sums ...
21
votes
2
answers
6k
views
Sum or Product with Exclusions
Is there a built-in feature for handling things like:
$$\sum_{\substack{i=0\\i\ne j}}^n\frac{a-a_i}{a_i-a_j}$$
and
$$\prod_{\substack{i=0\\i\ne j}}^n\frac{a-a_i}{a_i-a_j}$$
or should I work out some ...
20
votes
1
answer
463
views
Why is "k" in the output of Sum[Log[k]/k^k, {k,1,Infinity}]?
Fixed in 11.3
NSum[Log[k]/k^k, {k,1,Infinity}, WorkingPrecision->50]
(* 0.219947267975228664843531307905860703797097130 *)
But
...
18
votes
5
answers
5k
views
Ways to compute inner products of tensors
One way to evaluate the following sums is combining Table and Sum:
$u_{abcd} = \sum_{e=1}^3 v_{aeb}w_{ced}$
$q_{ab} = \sum_{d,e=1}^3 v_{d e a}w_{deb}$
It will look like
...
17
votes
3
answers
3k
views
Mathematica thinks (-1)^n is non-real
When I ask Mathematica to evaluate
NSum[((-1)^n)/n, {n, 1, 100}]
it returns -0.688172 + 2.11297*10^-16 i
Why is this? (-1)^n is either 1 or -1. I don't know why ...
17
votes
2
answers
749
views
Bug in splitting sum
Bug introduced in 9.0, persisting through 12.3.1
I was trying to evaluate the following sum.
$$
\frac{2}{m}\sum_{\substack{\text{odd }k\\1\leq k\leq m-1}} f\left(\frac{m+2+\sqrt{m^2-4k+4}}{2}\right)+...
16
votes
5
answers
21k
views
How to sum over a List
list = {11.5575, 11.397, 5.52734, 4.0878, 2.54815, 1.86652, 2.55028,
2.14952, 1.6242, 1.34117}
I have a list of numbers. How do I make a function that creates a ...
15
votes
2
answers
4k
views
Simplifying expressions involving Sum
I am trying to use Mathematica to simplify a symbolic expression involving Sum. The expression is defined as follows:
...
15
votes
1
answer
614
views
Why does Mathematica think this series doesn't converge?
Bug introduced in 10.0 and fixed in 11.1
(reported as CASE:3790525)
Here's a simple series:
Sum[t^k DiscreteDelta[k]/k!,{k,0,Infinity}]
Mathematica says that it ...
15
votes
3
answers
606
views
Symbolic sum of Stirling numbers gives wrong answer
Bug introduced in 9.0.1 or earlier and fixed in 10.4.1
This issue originated from my attempt to answer a question on MathOverflow:
...
14
votes
7
answers
3k
views
Numerical evaluation of a sum
I am trying to compute numerically NSum[(-1)^n/n^3, {n, 1, Infinity}]. Of course, using first Sum would work here, but often it'...
14
votes
3
answers
809
views
The speed of Sum[] varies strangely
I was curious about the difference in speed between Total and Sum. I found out Total was ...