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

learn more… | top users | synonyms

0
votes
1answer
61 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
89 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
59 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
365 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
49 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
44 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}$ ...
8
votes
1answer
517 views

RootSum result manipulation/simplification

Consider the sum sum1 = Sum[ k/( k^7 - 2 k + 3), {k, Infinity}] ...
1
vote
1answer
53 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 ...
12
votes
3answers
397 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 ...
2
votes
2answers
311 views

Simplify results further

I have an extremely long result in polynomial form following some matrix operations. However, given the symmetry of the problem, I can safely say that the solution will reduce much further than is ...
4
votes
1answer
91 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
163 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 ...
4
votes
0answers
65 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 ...
0
votes
1answer
88 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 ...
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 ...
14
votes
3answers
284 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: ...
2
votes
1answer
59 views

How to accelerate combinations and sum calculations here?

I have a 4d matrix H defined as below (embedded with combinations and sums) ...
1
vote
0answers
27 views
0
votes
0answers
35 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
73 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
80 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
56 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 ...
4
votes
2answers
584 views

Simplifying expressions involving Sum

I am trying to use Mathematica to simplify a symbolic expression involving Sum. The expression is defined as follows: ...
9
votes
1answer
146 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}...
0
votes
1answer
42 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
99 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
59 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 ...
4
votes
1answer
90 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
287 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
60 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 ...
3
votes
2answers
137 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 $\...
8
votes
3answers
185 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
92 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: ...
33
votes
2answers
611 views

$\sum_{k=1}^{\infty }\left\lfloor\frac{5}{5^k}\right\rfloor$ giving wrong answer?

Bug introduced in 7.0 or earlier and persisting through 10.4 or later When I try to evaluate the following: $$\sum_{k=1}^{\infty }\Bigg\lfloor\frac{5}{5^k}\Bigg\rfloor$$ using ...
0
votes
0answers
61 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
2answers
77 views

Failed to use SetPrecision

I am calculating the below formula: $$ \text{ER2}(\alpha,\text{K},\text{q})\text{:=}1+\sum _{m=0}^{K-1} \binom{K+\alpha }{m} \sum _{r=0}^m \frac{(-1)^r \binom{m}{r}}{\left(\frac{1}{q}\right)^{\alpha +...
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: ...
2
votes
2answers
257 views

Sum with IntegerQ does not converge

Why does Mathematica return: Sum::div: Sum does not converge. >> when I input: ...
27
votes
5answers
3k 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. ...
5
votes
2answers
248 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 ...
1
vote
1answer
106 views

Asymptotics of sum of binomials

I would like to find the asymptotics of Sum[Binomial[n,i]*1/i^((n+1)/2),{i,1,n}] I saw Find asymptotics of Sum[2^i*Binomial[n-i-1,2*n/3-1],{i,0,n/3}] but I can'...
5
votes
2answers
128 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\;\...
0
votes
1answer
82 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 ...
1
vote
2answers
68 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}+\...
0
votes
1answer
153 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: ...