Questions using the Sum command, especially for series and other algebraic objects, and related functions such as SumConvergence

learn more… | top users | synonyms

-6
votes
1answer
67 views

A Complicate sum with Mathematica, need Help! [on hold]

I found the sum shown below in a scientific paper. I need to calculate it. $$\sum_{k_1+k_2+...+k_n=m}{m \choose k_1,\,k_2,\,\ldots,\,k_n}\ f_{k_1}(x)\,f_{k_2}(x)\,...\,f_{k_n}(x),\qquad k_i \in \...
6
votes
4answers
190 views

Why does Mathematica return Indeterminate for this converging infinite sum?

Limit[Sum[k/(n^2 - k + 1), {k, 1, n}], n -> Infinity] This should converge to 1/2, but ...
4
votes
2answers
125 views

Infinite summation with absolute value

Recently I need to compute the summation like the following form: Sum[t^Abs[n - m], {n, -∞, ∞}, Assumptions -> m ∈ Integers] But Mathematica cannot figure it ...
1
vote
1answer
50 views

Error “Summand (or its derivative)…is not numerical at point m = -85.” on a simple sum

I'm a beginner on mathematica.. I'm trying to calculate a simple sum of a function, ...
1
vote
0answers
24 views

Error with Parallel Calculation on Large Multiple Sums [closed]

I am attempting to complete the following quadruple sum: ...
9
votes
2answers
132 views

Evaluating summations involving Fibonacci numbers in terms of Fibonacci numbers

There are many summations involving Fibonacci numbers which Mathematica 10.4 is able to evaluate directly in terms of Fibonacci numbers. For example, Mathematica evaluates the summation given below as ...
0
votes
1answer
69 views

How to code the partial trace of a matrix

I want to compute a partial trace using formula $\rho_A=\sum\langle B|\rho_{AB}|B\rangle$ . Example, $\rho_{AB}= $$ \begin{pmatrix} a & b & c & d\\ e & f & g & h\\ i &...
3
votes
0answers
91 views

How to get this terrible summation/product to run in Mathematica?

I've come across this formula and have no idea where to even start. (My assumption here is that $m,n$ are known and input into the expression to arrive at an answer.) $$f(m,n) = \sum_{\substack{0 \...
2
votes
1answer
61 views

Antrisymmetrized product of matrices

Let $X_{1},...,X_{N}$ be $N$ matrices. I want to compute an antisymmetrized product of $X_{i}$'s in mathematica: $X_{[a_{1}...a_{N}]} \equiv \tfrac{1}{N!}\sum_{\sigma}(-1)^{P}X_{\sigma(a_{1})}X_{\...
2
votes
2answers
366 views

How can I evaluate a certain kind of summation?

I have the following sum P0, P1 and P2 are constants. The problem is to assign all ...
0
votes
0answers
51 views

Symbolic series

Mathematica realises, of course, how to deal with symbolic series: Sum[g[x]^k, {k, 0, ∞}] (*Out: 1/(1 - g[x]) *) I.e. it does not worry about values of ...
0
votes
1answer
45 views

How to sum over half integers? [closed]

I have an expression of the form Sum[1 + x^n + x^(n^2/2), {n, 0, 10}] but I want to sum over half integers, that is, I require that $n \in \mathbb{Z}+\frac{1}{2}$ ...
1
vote
1answer
57 views

sums over partitions and sums with variable indices

Is there neat way to implement following sums in mathematica? $$s(l,k)=\sum\limits_{p_1+p_2+...+p_l=k} f_l(p_1,p_2,...,p_l) $$ and $$t(l)=\sum\limits_{i_1,i_2,...,i_l=1}^n f_l(i_1,i_2,...,i_l)$$ Where ...
4
votes
1answer
92 views

Calculating sum of BesselJ[n, x]

My friend has a sum in his research paper that looks like this $$ \sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa}. $$ He was able to calculate this sum analytically, by substituting the denominator ...
11
votes
2answers
164 views

How to correctly implement in a new function the scoping behavior of Table, Sum and other commands that use Block to localize iterators?

It is documented that "Block is automatically used to localize values of iterators in iteration constructs such as Do, Sum, and Table." Therefore the dummy index (iterator) in a Sum is shielded ...
0
votes
0answers
35 views

Creating a non-zeta-ified sum

The expression Sum[i^(-s), {i, 1, ∞}] evaluates to Zeta[s] But, of course, this is not strictly correct as ...
0
votes
1answer
91 views

Accessing the elements in a table is slower than calculating each time?

This is a follow-up of How to accelerate combinations and sum calculations here? I have tried all tricks but when N reaches 35 the time is still intimidating in a 16-core server, which is far better ...
4
votes
0answers
67 views

Can a single Sum with multiple iterators be different from nested Sums?

Multiple sums are documented with two or more iterators, for example: Sum[1/(j^2 (i + 1)^2), {i, 1, Infinity}, {j, 1, i}] however the same answer can be ...
2
votes
1answer
62 views

How to accelerate combinations and sum calculations here?

I have a 4d matrix H defined as below (embedded with combinations and sums) ...
0
votes
2answers
52 views

How do I add the nth element for every line in a text file?

Suppose I have a text file, in this format: ...
1
vote
0answers
27 views

Partial Sum of Binary Sequence not Working

I have the following code: ...
0
votes
0answers
36 views

Problem of Summation

I want to calculate something like this: $$w_t = \sum_{i+j=t}c_{5-i,4-j}.$$ for $t=0,1\cdots8$. How I can write the code? I assume that $i$, $j$ and $t$ are all positive integers. Thank you very ...
2
votes
1answer
77 views

Working with tensor algebra

My question is really easy for experienced users. In my tensor equations I have an unknown tensor Q (symmetric and traceless): $Q=\begin{pmatrix} n1(x,y) & n2(x,y) \\ n2(x,y) & -n1(x,y) \end{...
1
vote
2answers
83 views

Double sum in mathematica

It may look like a stupid question, but I was really confused by how double sums works in mathematica: After simplification, the function actually has nothing to do with n2? Also, when I manually ...
2
votes
0answers
61 views

Why can Mathematica compute numerical sums more efficiently when they are written as matrix operations?

Let $f(n)$ and $K(n,m)$ be functions such that the double sum, which we wish to evaluate numerically, $$ \sum_{n=1}^a \sum_{m=1}^a f(n) f(m) K(n,m) $$ exists when $a$ is some large positive number. I ...
0
votes
1answer
45 views

Sums with index expressions instead of variables

Often I replace $k$ with, say, $m-k^2$ in a sum, obtaining something like this: $$\sum_{0\leq m-k^2\leq n} f(k)$$ Is there a way to input these without manually solving the inequalities?
3
votes
1answer
103 views

Speed up computation of sum from large matrix

I have a 3x3 matrix (252^3) of data (densities) and I want to compute a correlation xi from nearest neighbours as well as a sum involving a check whether the density is in a certain bin. The ...
1
vote
0answers
61 views

Assumptions aren't working in this sum

I have a sum that should be real: FullSimplify@Sum[1/(α n^4 + β), {n, 1, ∞}, Assumptions -> α > 0 && β > 0] But the result have involved even ...
3
votes
1answer
54 views

Equivalent (?) definitions of function gives different answers

I have a function as follows: ...
4
votes
1answer
93 views

double sum with condition

I was trying to compute the following sum: $$\phi(x,y)=\frac{1}{4\pi^2}\sum_{(n,m)\neq(0,0)}\frac{1}{n^2+m^2}\exp(i(nx+my))$$ where the range of indices is, say, $-10\leq n, \,m\leq 10$. But I don't ...
7
votes
1answer
288 views

Differing answers when comparing Wolfram Alpha and Mathematica v.10.2

Out of curiousity, please consider following expression: Sum[(-1)^(n + 1)/n, {n, 1, 100000}] When evaluated using Wolfram Alpha: Result: ...
0
votes
0answers
60 views

Sum of Infinite convergent series

I have a series as Sum[(x^1 - (x - 1)^1) (b^Log[(1 + (x))]), {x, 1, Infinity}] which is convergent when b=0.3 and ...
2
votes
2answers
62 views

Why does ExpandAll not work within a symbolic sum?

If I evaluate Sum[(x + Subscript[y, n])^2, n] + (y + z)^2 // ExpandAll then the expression within the Sum is not expanded, yet ...
8
votes
3answers
188 views

Expand series unevaluated

I'm newbie in Mathematica. I'd like to obtain nice and verbose output for any series calculation. For example, given a simple sequence n*(-1)^(n-1) and ...
3
votes
2answers
143 views

Summing matrix products

I need to compute a double sum over a weighted matrix product: $L[M]=\sum_{i,j}^{N}\Lambda[[i]]\;\omega[[i]].M.\omega^{\dagger}[[j]]$. $\Lambda$ is a list of with N complex values(weights) and $\...
9
votes
1answer
166 views

SumConvergence[((-1)^n)/(Sqrt[n] + (-1)^n), n] returns True in Version 10.2?

Bug persisting through 10.4.1 I claim that the series $\sum_{n=2}^{\infty}\frac{(-1)^n}{\sqrt{n}+(-1)^n}$ diverges. To see this, rewrite the $n^{th}$ term as follows: \begin{equation*} \frac{(-1)^n}...
3
votes
2answers
98 views

DifferenceRoot question

I was doing the following sum: $$\sum_{i=2}^k \frac{(-1)^i}{i-1} \binom{2k-i-1}{k-1}x^i$$ First, Mathematica simplifies it to some DifferenceRoot function: ...
0
votes
0answers
66 views

Wolfram Mathematica: Sum of a function over a list [duplicate]

I have the function: $I_q(n)=\frac{1}{n}\sum_{d|n}\mu(d)q^{n/d}$, where $\mu(d)$ is the Möbius function. How do I get it in Wolfram Mathematica? It should be something like that: ...
1
vote
1answer
119 views

Summing infinite series that converge only for some parameter values

The input Sum[d^t,{t,0,Infinity}] produces output 1/(1-d) which is correct for $|d|<1$. But for $|d|\geq1$ the sum does ...
0
votes
1answer
52 views

combining function and plotting

How do i merge these 3 function onto 1 set of function to plot? Construct the series representation of a function $f(x)$ using up to $N0$ terms: ...
0
votes
0answers
30 views

Simplify expression?

Suppose I have expressions that involve terms like: p1.p1+p2.p2+p3.p3+p4.p4 p1, p2, p3, and p4 are all elements of an array: ...
5
votes
2answers
251 views

Speed-up the computation of this sum of small matrices

Given a matrix mat with a large number of rows (a few thousands) and a few columns (between 2 and 10), I'd like to compute the sum of the "small" matrices obtained ...
5
votes
2answers
129 views

Problem summing an infinite series

Calculating this sum on Mathematica 10.3 Sum[(-1)^(r - 1)/((a^2 + r^2)r), {r, 1, Infinity}] gives the answer $$-\frac{1}{2a^4}+\frac{\pi^2}{12a^2}+\frac{\pi\;\...
12
votes
3answers
413 views

Double Sum Involving Condition

I would like to compute the dimensions of some small free nilpotent Lie algebras. However, I am totally new to this and I could not figure out how to write the double sum which gives the dimension of ...
5
votes
3answers
233 views

sum involving binomial coefficient

To evaluate $ \sum_{\substack{\text{even }k\\ 2\leq k\leq m-2}} \binom{m-2}{k-1}(k-1) $, where $m$ is an even integer. Running the following in Mathematica 10.3.0 (October 9, 2015) ...
3
votes
1answer
93 views

Euler-Maclaurin summation

I want to compute asymptotic approximations to partial sum of harmonic series in Mathematica, using Euler-Maclaurin summation formula. ...
0
votes
1answer
156 views

Plotting a Double Sum

I am attempting to plot a graph of a function that is the absolute value of the double sum of an exponential function, and I keep getting errors. Here is the code: ...
0
votes
1answer
85 views

Slow sum computation

I'm doing a simple OLS regression and I strikes my attention that this very simple computation takes several seconds to perform in Mathematica ...
5
votes
3answers
143 views

incorrect exact sum of a series

Sum[(-1)^m*(1/Binomial[2*m + 2, 2] + 1/Binomial[2*m + 3, 2]), {m, 0, Infinity}] gives the right value -2 + π but the same ...
1
vote
2answers
84 views

Engel expansion

How do I do an Engel expansion in Mathematica? And find the unique non-decreasing sequence of positive integers $ \{ a_1 ,a_2,a_3,\dots \}$ , such $$\frac{e}{\pi}=\frac{1}{a_1}+\frac{1}{a_1 a_2}+\...