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

learn more… | top users | synonyms

8
votes
1answer
96 views

evaluation of the sum of KroneckerDelta

I need help. I need to know why the next code doesn't simplify in Mathematica 10 but it does in Mathematica 8. I need some similar in version 10. What can I do? ...
3
votes
2answers
159 views

How do I solve for a variable inside a sum but independent of the summation index?

How would I go about solving the following for c? Solve[0 == Sum[(t[i]*m[i] - c*t[i]^2)/s[i]^2, {i, 1, n}], c, Reals] I get ...
0
votes
1answer
94 views

Solve equation with sum in it

Have trouble to solve this equation. Anybody knows where're the problems? ...
0
votes
1answer
130 views

Follow up: how to evaluate this double sum quickly

This question is a follow-up to my previous question. The code I use at the moment is the following: ...
13
votes
3answers
257 views

Symbolic sum of Stirling numbers gives wrong answer

Bug introduced in 9.0.1 or earlier and persisting through 10.3.0.0 or later This issue originated from my attempt to answer a question on MathOverflow: ...
4
votes
2answers
171 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 ...
3
votes
1answer
128 views

Programming a MaxMin Linear Optimization

I want to program a function for a two-player game. Basically it's like this: . Each player has an array of options, and the result of the game is based on both players choices. So heres my most ...
7
votes
1answer
165 views

Why does this simple sum function fail to compile?

Consider the following compiled function, which takes a $12 \times 5$ array $x_{ij}$ of real numbers and computes the triple sum $$ \sum_{k=1}^5 \sum_{i=1}^{12} \sum_{j=i+1}^{12} x_{ik} x_{jk}. $$ ...
6
votes
2answers
381 views

Bug in splitting sum

I was trying to evaluate the following sum. $$ \frac{2}{m}\sum_{\substack{\text{odd }k\\1\leq k\leq m-1}} f(\frac{m+2+\sqrt{m^2-4k+4}}{2})+f(\frac{m+2-\sqrt{m^2-4k+4}}{2}). $$ And I wrote the ...
6
votes
1answer
233 views

Is there an easy way to speed up this double summation in Mathematica

I would like to make an intensity plot of Bosons in a harmonic trapping potential. Hence, I would like to execute the following double summation (everything made dimensionless) for as many terms as ...
0
votes
1answer
58 views

Problem with precision of fraction numbers

I have tried to take a series of harmonic numbers using Mathematica and its precision but there has been an issue. So far when I computed the sums at a whole numbers using a precision of 100 digits I ...
1
vote
0answers
71 views

Problem with calculating Harmonic Numbers

I have tried to take a series of Harmonic Numbers using mathematica but there have been issues in calculations. So far when I computed the sums at a small value range such as ...
0
votes
1answer
81 views

Plotting a partial sum (Fourier Series) [closed]

This is what I'd like to plot: ...
3
votes
1answer
76 views

How to make x^0 be 1 as x->0 in a power series?

I'm trying to so this: s[x_] := Sum[a[j]*Sum[a[k]*k*x^(k - 1), {k, 1, Infinity}]^j, {j, 1, Infinity}]; s[0] It returns a 0^0 indeterminacy warning. But a human ...
1
vote
1answer
205 views

Plotting a Taylor series of Partial sum

Hi people, I want to plot the partial sum from n=0 to n =6 with the given function f about the point a=0 (just the maclaurin series). Unfortunately, I am unable to make sense of the issue M'tica is ...
4
votes
1answer
233 views

Is this a bug of NSum?

Check this: NSum[Log[Abs[m]],{m,1,24}] (*54.7847*) NSum[Log[Abs[m]],{m,1,25}] NSum::nsnum: Summand (or its derivative) (Abs^[Prime])[m]/Abs[m] is not ...
3
votes
1answer
73 views

WorkingPrecision in a sum

If I am interested in getting a fairly precise plot of f2 below, can I use WorkingPrecision to do this? ...
4
votes
0answers
103 views

Multiple Constrained Sum

I need to perform a multiple summation, that obeys some conditions. This arises in the study of a statistical physics model. q=Exp[-β]. I would like to ask if ...
2
votes
1answer
115 views

Plotting a partial sum

I am given the Legendre expansion of the first kind. $$f(x)=\sum_{n=0}^{\infty}A_{n}P_{n}(x).$$ I have worked the coefficient to be $$A_{n}=\frac{1}{\left \| P_{n}(x) \right \|^{2}} ...
3
votes
1answer
124 views

Calculate sum of probabilities in multinomial model

The question at hand: On average in every 7th chocoloate egg there is a figure to be drawn from a known list of special figures (e.g 15 distinct pieces) the other draws are on average fails. With ...
3
votes
2answers
110 views

How to deduce the Ramanujan's summation of this series?

I have already asked a similar question about Ramanujan's summation in general but received no good answers. Now I am interested in this exact series: $$\sum _{n\ge1}^\Re (24 n + 12 n^2)$$
3
votes
1answer
108 views

Range of summation in simple Plot seems off

I was trying to reproduce a picture in a book by Havil of the sum, $$s = \sum_{r=1}^{\infty}\frac{\mu(r)}{r}\left(Li(x^{\rho_k/r})+Li(x^{\rho_k*/r})\right) $$ using ...
1
vote
1answer
107 views

How to simplify the equation and speed up the codes for four 100*100 matrices

I have to make a sum over 4 variables. Each variable corresponds to a 100*100 matrix. I want to know how to speed up this code. This problem is related to the previous problem 1 and 2. But now I need ...
1
vote
2answers
101 views

How can I speed up this code with 4 variables sum

I have to make a sum over 4 variables. My code is very very slow. I want to know how to speed up this code. This problem is related to but different from one previous problem. Any help or suggestion ...
4
votes
4answers
267 views

How to stop a summation when a variable is small enough?

I meet with a problem. I hope to get an infinite summation of $f1(x)/f2(x)$ which converges to zero. So my code is Sum[f1[x]/f2[x],{x,Infinity}] or ...
4
votes
2answers
245 views

Determine the coefficient of expansion of the product of two sumations?

I would like to determine the coefficient of a desired term in the product of two summation where the powers of $x$ are not necessarily integers. For example $$ \sum_{i=1}^N x^{1/i}\sum_{j=1}^N ...
0
votes
1answer
48 views

Sum of hypergeometric functions, variable number of arguments

How can I write in Mathematica an expression like this? $$\sum_{k=1}^n {_{k}F_{k}} (1,1,\dots,1; \,2,2,\dots,2; \,z) ~,$$ where ${_{p}F_{q}}$ is the generalized hypergeometric function. My problem ...
14
votes
2answers
245 views

Fastest way to sum the upper triangle

I feel like this is an recurring question: if there's a symmetric matrix whose diagonal is not all 0, how could I get the sum of the part of it that's above the diagonal as fast as possible? Small ...
1
vote
2answers
94 views

What can I use as an equivalent of python zip in mathematica inside of Sum[]? [closed]

I want to take two lists of the same length: widths and weights, and sum a function (of 3 variables) over a single index using the elements from both lists that have that index. Then I want to plot ...
5
votes
2answers
136 views

The fastest way of raising indices of high rank tensor

I have some high dimensional high rank tensors, let's say $$F_{ijkl}$$ and I need to find $$F^{abcd}=g^{ai}g^{bj}g^{ck}g^{dl}F_{ijkl}.$$ Here $g^{ij}$ is the contravariant metric. Simple summation ...
2
votes
1answer
89 views

How should I enter indexed terms? For example, constants $n_k$ for $k\in\{1,\,\ldots,\,N\}$

How should I enter $\quad \quad \sum^{N}_{k=0}{f(n_k)}$ into Mathematica? More generally, how should I work with the indices? Take the following as an example. I know how the ...
3
votes
1answer
109 views

Simplify a huge expression with limited memory

I would like to perform some analytical sums such as the following ...
1
vote
0answers
56 views

How can I get the exact value of this infinite series? [duplicate]

I want to compute the exact value of this infinite series $$\sum_{n=1}^\infty\arcsin{\left(\dfrac{2}{\sqrt{n(n+1)}(\sqrt{n}+\sqrt{n-1})}\right)}$$ I tried to implement something like this ...
2
votes
1answer
55 views

Sum of Products [closed]

What is a way to nest a product in a sum: $$\sum_{i=2}^{N}\cos\theta_i\cos\theta_i^\prime\prod_{j=i+1}^{M}\sin\theta_j\theta_j^\prime$$ where $N$ and $M$ are two numbers? Thank you.
1
vote
0answers
62 views

Does Sum calculate all terms before summing them?

After calculating the sum of a large number of large objects, using B = Sum[RandomInteger[{0, 1}, {10^6}], {100}]; I find that ...
1
vote
0answers
86 views

Improve speed of evaluating a sum over four indices

I am trying to implement the Fox-H function with several variables as sum of residues. I have arrived at the following function; ...
2
votes
1answer
79 views

The Summation of a Summation in Mathematica

I am trying to input $\sum_{a_1=1}^{n-1}$$\sum_{a_2=1}^{{a_1}-1}$$\sum_{a_3=1}^{{a_2}-1}$$\sum_{a_4=1}^{{a_3}-1}$$...f({{a_1},{a_2},{a_3},{a_4}...})$ into Mathematica. The number of sums should be a ...
0
votes
0answers
91 views

Replacing function in Sum

I have this expression, which, after execution, gives these $F[s,r]$ in output. $$ S_{1,1}=\sum _{s=1}^{16} \sum _{r=1}^{16} F(s,r) \text{Tr}\left[G_r.G_1.G_s.G_1\right] $$ Here is a piece of ...
1
vote
1answer
75 views

Weird sum regularization? [duplicate]

I noticed some weird behavior in "Dirichlet" regularization of infinite sums. Let us first compute ...
10
votes
2answers
317 views

Asymptotics of $\frac{\sum _{i=0}^{\lfloor n/2 \rfloor} {2(n-2i) \choose n-2i} {n \choose 2i} {4i \choose 2i}}{2^{3n - 1}}$

I am fairly sure that asymptotically $$\frac{\sum _{i=0}^{\lfloor n/2 \rfloor} {2(n-2i) \choose n-2i} {n \choose 2i} {4i \choose 2i}}{2^{3n - 1}} \sim \frac{2}{\pi n}.$$ I tried ...
1
vote
1answer
81 views

Problem in minimizing expression

I am trying to implement bootstrapping (https://en.wikipedia.org/wiki/Bootstrapping_(finance)) of CDS curve. To implement it I am trying to minimize a series of expression. The minimum value of ...
0
votes
2answers
96 views

Solving two variable using two expressions each involving summation

I am trying to solve for h1 and h2 using function solve as in below code, Expression in solve has two equation each equates sum ...
2
votes
1answer
132 views

Sum over multiple indices that take specific values

Pretty simple question: how do I sum over multiple indices that can only take specific values all together? To clarify: let's say I have the following sum: $\sum p_{a,b,c} f(a,b,c)$ where $f$ is a ...
1
vote
1answer
95 views

Solve for a variable using expression involving sum of quantities

I am trying to solve for h1 using function solve as in below code, Expression in solve equates sum of two expression. Both left hand and right hand side of expression is the sum of four quantities ...
2
votes
1answer
46 views

Indeterminant expression encountered in Summation

I have a function that I'm trying to find an explicit form for the coefficients in its power series expansion. On paper, it is a long calculation so I decided to write up the formula in mathematica. ...
1
vote
1answer
111 views

Summation notation

I have the current setup for calculating Allan Deviation: which was coded as: Sqrt[Total[Differences[y]^2]/(2 (M - 1))] However, after doing some research, ...
1
vote
1answer
132 views

How to evaluate sum with different coefficient in each term?

I would like to know if there is a syntax that allows me to enter a sum that has coefficients that vary for every term? I have no interest in evaluating them numerically, but rather to keep them as ...
1
vote
1answer
55 views

series combinations

is there any possibility of displaying all possible series of the form: "1+/-2^2+/-3^2+/-...+/-n^2", where one can choose the sign before the each term and knows the numbers of the terms in the ...
1
vote
1answer
108 views

Work around bugs in Summation, Hypergeometric function?

I'm so confused I don't even know how to phrase the question, so here's what's happening: I need an analytic form for this: ...
0
votes
1answer
64 views

Problem with double sum on the calculation of Ricci tensor

I wrote a program in Mathematica to calculate the Riemann and Ricci tensors (obviously, passing trought Christoffel symbols first), however just later I thought of calculating Ricci tensor directily ...