Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [summation]

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

1
vote
0answers
121 views
+50

How to approximate the partial sum formula of a summation to all real numbers using Mathematica?

I am sure one has to use indefinite sums and the Euler-Maclaurin formula. $$\sum_{x=0}^{n} f(x)=\sum_{x}f(n+1)-\sum_{x}f(0)=\int_{0}^{n+1}f(t) \ dt -\frac{1}{2}f(n+1)+\left(\sum_{k=1}^{\infty}\frac{...
1
vote
2answers
81 views

Sum not recognized as a linear operator by Solve

When I try to solve an equation with a constant under the summation sign, Mathematica does not factor the constant out of the summation and fails to solve a simple equation. How do I make ...
3
votes
1answer
173 views

How to evaluate sum with one million summands?

For a research project I am working on currently, I need to do a very simple and straightforward calculation. Unfortunately, I do not know how to include Mathematica code here, but it is very short ...
4
votes
3answers
785 views

How to speed up large double sums in a table?

I am calculating a 3-by-3 matrix whose elements are given as follows: $$ M_{mn} = \frac{1}{N}\sum_{i=1}^N \sum_{j=1}^N (r^i_m - r^j_m)(r^i_n - r^j_n) \tag{1} $$ where $N$ is the total number of ...
0
votes
1answer
156 views

Why is the result of a Cesaro regularized sum dependant on a mathematically redundant parameter?

I am trying to determine the series $\qquad \sum_{k=0}^\infty {\rm myCsc}(x,\,\epsilon)\,{\sin(k\,m_C + a_C+\frac\pi 4)}$ where $\qquad myCsc(x,\epsilon))= \begin{cases}i\,\epsilon & 0 \...
3
votes
2answers
136 views

How to sum elements of a list of lists?

I know, the title may seem complicated. I have this list: myList = { {1, 0},{2, 3},{4, 1} } I want to sum all the sublists (element by element) to obtain this ...
1
vote
1answer
55 views

Using the Sum function square the sums of numbers

How do I use the Sum function for adding and squaring consecutive terms? It's an exercise from Wolfram Challenges. I want to write my own function that uses the Sum function to get the sum of (1+2)^2 ...
1
vote
1answer
79 views

Efficiently define a function as the numerical result of infinite sums

I want to approximate the solution to the following sum, in such a way that I can plot the function for the variable $\phi$, for a fixed value of $\mu$. \begin{equation} f(r(\phi), \mu)=4 e^{-\mu ...
2
votes
2answers
109 views

FullSimplify a trigonometric expression doesn't work as expected

I know this kind of question is frequent asked, yet each case has its own particularities. I will show my problem. I define the following: ...
1
vote
0answers
52 views

Flaky pattern-matching for Mittag-Leffler sums?

This sum correctly gives the Mittag-Leffler function: Sum[z^k/Gamma[α*k + α], {k, 0, ∞}] MittagLefflerE[α, α, z] Simply factoring the argument of ...
0
votes
5answers
79 views

Sum Over Solutions to an Equation

Two Related Questions Is there any general built-in functionality for computing a sum over solutions to an equation? This is common in number theory. For example, computing sums of the following form....
2
votes
1answer
32 views

Clarification on how Total[] can be used on multi-dimensional array

I have a rank 5 tensor that ultimately I want to modify so that for the first 3 dimensions, each element is summed together. The result will be a rank 2 tensor whose elements are the summed totals ...
2
votes
1answer
62 views

How to speed up summations with many list callings?

I am trying something similar to the following code with NN as large as a few hundred (at least 100). Now it's very slow and most time is spent on calculating the ...
0
votes
0answers
60 views

Clebsch Gordan coefficients

I'm trying to compute various sums which contain some CG coefficients, where the sum runs over the indexes m1,m2,m corresponding to each of the three angular momenta j1,j2,j. The thing is that when I ...
2
votes
1answer
245 views

The sum of digits of Mersenne primes

I have problem to calculate the sum of digits of the mersenne primes $M_{57885161}$ , $M_{74207281}$ , and $M_{77232917}$. I'm not a 'computer guy', but I know that the sum of digits of $M_{82589933}$ ...
0
votes
1answer
39 views

Handling Errors in Slowly Converging Dirichlet Beta Infinite Sum

I have tried to calculate the following slowly converging double sum in Mathematica 11.3 $$\sum _{k=1}^{\infty } \left(\frac{ 1}{(2 k-1) (2 k+1)} \left(\sum _{n=1}^{\infty } \frac{(-1)^{n-1}}{(2 n-1)...
1
vote
1answer
48 views

Plotting a series

I'm trying to find a way to plot the sum of a series from n to nmax. Here is the code for the series: ...
0
votes
2answers
94 views

Summation over an index and a set

I have an index CC and a set of values CM, and c is an element of CM and ...
1
vote
0answers
55 views

Sum over cyclic permutation of indices

To define the Schouten bracket I need to be able to sum over a cyclic permutation of the indices: $$ [\Phi,\Xi]_S=\mathfrak S_{i,j,k} \left(\Phi^{is}\partial_s\Xi^{jk}+ \Xi^{is}\partial_s\Phi^{jk}\...
1
vote
1answer
67 views

Plotting double series

I am new and hoping a warm welcome from this platform. I am trying to plot the graph of double series in one variable $$ \sum_{k=0}^{\infty} \sum_{j=0}^{\infty} C_{k,j} \exp(- 3^k 1.5^{j} x)$$ ...
0
votes
1answer
51 views

Replace constant in summation function using replace or If or /

Hi i how do i replace constant for k in this summation. For following: Even 2*n Even replace k by a Even 2*n+1 Odd replace k by b Here is the code ...
1
vote
0answers
76 views

Finding general forms of sums in Mathematica

A general form can be obtained for some sums with binomial coefficients. Mathematica is able to find these general forms for some of the simplest sums. For others the output contains for instance ...
2
votes
2answers
48 views

Is it possible to make a series read a separately defined set of values?

I would like to plot a function with a sum in it. Here is the function: $$v(k) = \sum_{j=1}^k \frac{v_E \cdot m_j \cdot c}{m_j(1-c)+\sum_{i=j+1}^n m_i} $$ As you can see, the problem is that I have ...
0
votes
1answer
49 views

using Apply to get iterated Sum

Suppose I want to sum a function, $f(\{m_a\})$, of several variables, $m_a$, $a=1,..,n$, which run over ranges, $1,...,k[[a]]$, however, I do not know $n$ in advance. I thought I could do this using `...
0
votes
3answers
117 views

Subscripted variables with changing subscript

When I want to sum over indexed variables, indices being subscripts, the result works as expected, however, upon loading the Notation package, it doesn't. See below As one might have expected from ...
0
votes
0answers
53 views

Summation involving 2F2 hypergeometric function

Trying to simplify the following sum: $$ \sum_{i=0}^n\frac{z^i}{(n-i)!}\,\frac{1}{(1+a)_i\,(1-a)_i}\sum_{j=0}^i(-1+a)_j\,(-1-a)_j\frac{(-z)^j}{j!}, $$ where $n=1,2,\ldots$, $z>0$, $0<a<1$, ...
2
votes
3answers
151 views

Force a sum to be simplified

I want to force this sum to be simplified to 1 Sum[Cos[(Pi*l*(2*m + 1))/(n + 1)], {l, 0, n}] Only DiscretePlot3D gives the correct result showing all point to 1
2
votes
1answer
146 views

Einstein summation convention for symbolic vector calculus

I am trying to do some vector calculus in Mathematica in index notation form because it gives a clear result that can be compared to pen and paper calculations. Since there is no built in Einstein ...
-4
votes
2answers
78 views

Wolfram|Alpha not able to graph sum_(n=0)^∞ (-(ExpIntegralE[-n, (-1 + n) Log[x]] Log[x]^(1 + n))"? [closed]

I know for a fact that nothing in my expression is wrong, then why cant Wolfram|Alph graph: sum_(n=0)^∞ (-(ExpIntegralE[-n, (-1 + n) Log[x]] Log[x]^(1 + n))) ? ...
3
votes
5answers
204 views

Calculating the Dottie number using an infinite series

The Dottie number is the solution to the equation $\cos(x) = x$ It is approximately equal to $0.739085133215160641655312.$ This number can be expressed analytically in the following form (see this ...
0
votes
0answers
41 views

Not getting a solution to my maximization problem

I want to solve the following problem: For $0.5<q<1$, $q<r<1$, $0\leq n$, $0\leq n_1<=\lfloor{n/2}\rfloor$, and $n_1,n\in\mathbb{N}$ calculate $\arg max_{n_1} S(q,r,n,n_1) $ as a ...
2
votes
1answer
36 views

Performance Tuning: Construction of Matrix with Summations

I am trying to solve an eigenvalue problem of a large matrix. The issue is that it takes too much time to construct this large matrix. This is the code that I built: ...
0
votes
0answers
47 views

How do I make this summation work faster?

Is there any way to make this summation be faster? I previously had spherical harmonics integration which was taking forever to run How can I do a faster integration? Using math, I tried to use ...
7
votes
2answers
747 views

How to optimize Mathematica code that depends on eigenvalues of big matrices and big sums?

I've been using Mathematica recently to generate some plots of a few functions. I've been able to get it right after a few questions here. The resulting code, which works, is this: ...
1
vote
3answers
114 views

Handling cases of cross terms for multi-sums

I have expressions consisting of many multi-sums and I would like to extract cross terms out of them. Consider a simple example: $$ \sum_{m_1=1}^M \sum_{m_2=1}^M \sum_{m_3=1}^M \sum_{m_4=1}^M (x_{m_1}...
2
votes
1answer
102 views

What am I doing wrong when trying to plot this function?

I'm trying to reproduce the computations of this paper and I'm running into some troubles because I'm rather new to Mathematica. In the paper's page 4, in figure 2 the authors show a plot of a ...
2
votes
2answers
61 views

Evaluating a summation while suppressing zero raised to a negative power

I want to compute the following multiple summation. ...
1
vote
2answers
59 views

Why does Sum[Length[Divisors[a]], {a, 1 ,x}] return x?

I am summing the number of divisors and I am getting the strange answer below even where there is no input to this function. ...
0
votes
2answers
269 views
1
vote
3answers
172 views

Simplify Kronecker Delta expression

How to obtain Kronecker delta summation rule using Wolfram Mathematica: $$ \delta_{ij}\delta_{jk}=\delta_{ik} $$ The following code does not produce the result. ...
0
votes
0answers
68 views

How to sum over the variable in partial derivative operator?

I need to use the partial derivative operator in Wolfram Mathematica within a summation, specifically to define the D'Alembertian operator of scalar fields. I am having trouble summing over the D ...
1
vote
1answer
30 views

Evaluation of Extract and use the result in a Sum

I am experiencing a problem in the evaluation of a sum. I hope that someone can help me, I am not an expert Mathematica programmer. I'm posting just the portion of code that gives problems, I know ...
5
votes
1answer
102 views

Strange result with an indefinite double sum

Bug introduced in V10.0.2 or earlier and persists through V11.3 (Simplified version - courtesy Lukas Lang - reported [CASE:4208776]) I try to compute ...
5
votes
2answers
208 views

If and summation: why do I have the index of the summation in the final result?

Consider the following code: Sum[If[b != 0, a[m], 0], {m, 1, 4}] (* 4 If[b != 0, a[m], 0] *) Why does it return me a[m]? m ...
1
vote
1answer
66 views

Why is the function assuming not taken in consideration?

In the following code, I assume that my variables are strictly positive. However, mathematica doesn't take this in consideration when it evaluates the If : the If is still in a non simplified form. ...
0
votes
2answers
66 views

Product within a sum [closed]

How would I input the following sum into Mathematica?
0
votes
2answers
50 views

Sum over integer partition with variable function argument

Define $$\hat{X}(Y) = [X,Y] $$ I have known matrices $S_i$ and $V$. I am trying to use Mathematica to define a function which calculates $$ \sum_{\substack{n_1, \ldots, n_k>1\\ n_1+\ldots n_k = ...
3
votes
0answers
34 views

Why does this sum return unevaluated when testing for convergence?

Why does Mathematica return unevaluated for SumConvergence[Sin[\[Pi]/n^2], n]? I tried looking at the documentation, but I can't find any possible issues. The ...
2
votes
2answers
135 views

Sums of products with $ n $ variables

I want to be able to compute a function of $ n $ indices which looks as follows if $ n>2 $: $$ \sum_{(i=1,j=1,k=1,l=1,...), (i\neq j\neq k \neq l \neq ...)}^{n} x_{i}x_{j}(x_{k}^2+y_{k}^2)(x_{l}^...