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

learn more… | top users | synonyms

11
votes
2answers
145 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
40 views

Rotation of basis system [on hold]

I have a 16x16 matrix HCF hamiltonian with symbolic entries depending on 8 parameters Bxx. Now I add anoter hamiltonian which is a zeeman hamiltonian HZ with a symbolic angle [\theta] entry .But if i ...
4
votes
0answers
62 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
87 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
34 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
277 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
56 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
26 views
0
votes
0answers
33 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
67 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) ...
2
votes
2answers
306 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 ...
1
vote
2answers
78 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
54 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
555 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
131 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*} ...
0
votes
1answer
38 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
97 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
56 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
83 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
285 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
53 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
56 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
136 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
179 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
87 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
3answers
605 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
40 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: ...
12
votes
3answers
357 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 ...
1
vote
1answer
118 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
255 views

Sum with IntegerQ does not converge

Why does Mathematica return: Sum::div: Sum does not converge. >> when I input: ...
27
votes
5answers
2k 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
244 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
104 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 ...
5
votes
2answers
122 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 ...
0
votes
1answer
71 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
67 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 ...
0
votes
1answer
147 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: ...
5
votes
3answers
139 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 ...
12
votes
7answers
695 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 ...
5
votes
3answers
227 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
88 views

Euler-Maclaurin summation

I want to compute asymptotic approximations to partial sum of harmonic series in Mathematica, using Euler-Maclaurin summation formula. ...
4
votes
2answers
177 views

symbolic summation involving kronecker delta

I have to perform symbolically summations of this kind $\sum_{ijkl} V_{ijkl} c_i c_j c_k \delta_{l,m}$ where $V_{ijkl}$ are quantities which depend on 4 indices and $\delta_{l,m}$ is the kronecker ...
5
votes
3answers
240 views
0
votes
0answers
21 views

Adding a list up to a starting value [duplicate]

The code that i need has a starting value of 5. From this starting value on a list of numbers is added consecutively like this list {-0.1,-0,3,-0.1,0.1,-0.1} ...
4
votes
2answers
62 views

Controlling evaluation in a custom summation function

I'm doing some computations that involve summations with many indices over the same range - consider the simplified example Sum[a[i,j],{i,1,2},{j,1,2}]. To prettify ...