Questions tagged [summation]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

How to speed up this code with DensityPlot and Table?

I need to obtain a matrix and DensityPlot it, then perform a SingularValueList on a 200*200 matrix. But my code is slow, more than 50 seconds. I need the running time to be less than 10 seconds, ...
0
votes
0answers
38 views

Are these 3 divergent integrals regularization methods equivalent?

I implemented in Mathematica 3 methods for regularizing divergent integrals, and wonder if they are equivalent. Code: ...
1
vote
1answer
127 views

How can I get mathematica to prove $\sum_{k=0}^{n-1}\tan\left(\theta+\frac{k\pi}{n}\right)=−n\cot\left(\frac{n\pi}{2}+n\theta\right)$?

How can I get Mathematica to prove $\sum_{k=0}^{n-1}\tan\left(\theta+\frac{k\pi}{n}\right)=−n\cot\left(\frac{n\pi}{2}+n\theta\right)$ (1)? ...
3
votes
2answers
116 views

How to integrate a symbolic sum?

I'm trying to integrate a function that involves a finite sum: $$\int_{-\infty}^{\infty}\sum_{j=1}^n (e^{-b t^2}r_j) \,dt$$ I think it should be possible to take the exponent outside the sum: $$\int_{-...
0
votes
0answers
58 views

How can I find the following series sum? [closed]

Can someone please help me with the syntax for finding the series sum: $\sum _{n=1}^{\infty } (x+9)^n$ I know it's a geometric series related to power series. Thanks.
0
votes
1answer
65 views

Series development of laurent in a defined domain

I am trying to correct some bills for laurent series with mathematica, but the output I am getting at the moment is not the best. For example, I have this function $$\frac{1}{z^2 + 9}$$ to develop at ...
4
votes
3answers
518 views

Infinite sum bug

Why: Limit[Sum[Sqrt[-i^2 + n^2]/n^2, {i, 1, n}], n -> Infinity] (* 0 *) but: Integrate[Sqrt[1 - x^2], {x, 0, 1}] (* Pi/4 *) ...
1
vote
0answers
59 views

Sum of list elements in a range

I have a list, for example: data = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; and I wanted to sum every element in range of five, i. e ranges ...
0
votes
3answers
88 views

How can I represent a series with a summary?

As the title suggests, I'm trying to represent a series through a simple summation. For example, the function Series[Exp[x], {x, 0, 10}] obviously gives me the ...
6
votes
4answers
333 views

Sum over two independent variables [closed]

I have a function f[x,y] and try to generate a sum of it where x and y vary predictably but ...
0
votes
1answer
38 views

Dynamic multiple ordered nested sum

I have a function f[r,n] dependening on two tables $r=\{r_1,...,r_j\},n=\{n_1,...,n_j\}$ which have the same variable size $j$. For given $j$ and given $R$ I want to sum f[r,n] over the range $0< ...
0
votes
1answer
79 views

Conditional summation in mathematica

How to write following conditional sum? $F(\theta1,\theta2)=\sum_{m1,m2} a^*_{m1}a_{m2} A_{m2,m1}(\theta1) \exp[i(m1-m2)\theta2]$, where $A_{m2,m1}(\theta1)$ is a conditional function, such that $A_{...
4
votes
1answer
148 views

Evaluation of formula reduces domain and FullSimplify is wrong

I would like a closed form for the formula Sum[Binomial[k - b, n] Binomial[n + b, a], {n, 0, k}] where variables k, a, b are ...
0
votes
0answers
69 views

Fully expanding and distributing a symbolic sum

I have quite a large expression I want to simplify. For example, this can be generated by a recursive definition: ...
0
votes
0answers
32 views

Calculation of integral involving Sum

My code is the following: ...
0
votes
1answer
156 views

Computing an infinite sum

I wish to compute $$\sum_{n=1}^{\infty} f(n)e^{-nz}$$ where $f(n)= |\{(a,b,c)| abc=n\}|$ and $z>0$. Its easy to compute that if $n = \prod p_{i}^{\alpha_i}$ where $p_i$ are distinct primes then $$f(...
3
votes
2answers
91 views

Faster way to compute a sum within a sum?

I would like a time efficient way to calculate a sum of the following form: ...
0
votes
1answer
84 views

Simplifying multiplies of sums into a single double sum

I have the following expression: Sum[x^n, {n, 1, Infinity}]*Sum[Log[m, x], {m, 2, Infinity}] How can I Force Mathematica to write this expression in the following ...
1
vote
1answer
72 views

I need to speed up this summation

I tried solving this problem on my own but I cant find a proper solution. I need to evaluate the following equation: $\sum\limits_{m=1\\m\neq i}^n{\left(\dfrac{v_m~(\lambda_i\cdot B-A)~u_i}{(\lambda_m-...
7
votes
1answer
324 views

Help with Double Sum (lattice sum) over all integers m,n of 1/(a+m^2+n^2)

Im researching electric fields in periodic arrays of charges, and encountered this summation that I can't find any published work on. Has anybody encountered a solution to $\sum_{m,n=-\infty,\infty}\...
2
votes
1answer
47 views

Partial sum of Legendre polynomials and numerical error

I am trying to compute the partial sums of the Legendre polynomials: $\sum_{l \geq 0} P_l(cos \gamma)$ of the first kind. The full sum are known to converge and I wanted to check that the error goes ...
2
votes
1answer
75 views

Symbolic derivative over summations

How to take the symbolic derivative of an expression over two summations? Below is the expression: ...
5
votes
2answers
217 views

How to handle excluded values in a summation or product in Mathematica

I want help to writ that on Wolfram Mathematica : How can I handle the $i \ne j$ part?
4
votes
1answer
225 views

Using Mathematica to derive analytic form of single variable function

I am interested in finding an analytical form of the following function $f(n)$ defined as: $$f(n):=\sum_{\{\bar{K}\}}\prod_{l<j}^{n}e^{ik_lk_j},$$ where $\{\bar{K}\}$ is the full set of binary ...
1
vote
1answer
100 views

Expression cannot begin with "$\sum_{j=0}^{\floor*\frac{a}{b}} j$"

This is my first time using Wolfram Mathematica and writing in TeX. I'm on the free trial version of Mathematica, and I'm writing in a notebook, using the "Inline TeX Input" option on the &...
0
votes
0answers
47 views

How to speed up the multiple sums and integration?

I want to numerically calculate a sum with multiple variables and then integrate the whole expression. Any solutions to speed up the process? ...
1
vote
2answers
200 views

Check the convergence of double sum

I have the following double summations: Sum 1 : $\sum _{p=0}^{k-1} \left(\frac{\sqrt{\frac{(p+1) \Gamma \left(p+\frac{11}{4}\right)}{\Gamma (p+2)}}}{(p+2) \sqrt{\Gamma \left(\frac{11}{4}\right)}}-\sum ...
1
vote
1answer
55 views

How to check two summands give same summation value without evaluating the sum?

It is easier for me to explain the question with the following toy example. Suppose I have two summands, Summand1 = n1 + 2 n2; Summand2 = 2 n1 + n2; Now, it is ...
3
votes
2answers
245 views

Double Summation over Lattice

I have a double lattice sum and I was wondering how I could calculate this with Mathematica. In particular, I have a function $F:\mathbb{R}^2 \times \mathbb{R}^2 \to \mathbb{R}$ which takes as ...
1
vote
0answers
44 views

How to calculate generalized discrete convolution without using DiscreteConvolve

I want to find the discrete convolution of two functions which potentially do not share a common domain. For example I have ...
0
votes
2answers
69 views

Kernel dies when trying to compute coefficients in a linear sum involving expressions like b[1,2][3,4]

The following happens on 11.0.1.0: Have ...
0
votes
1answer
29 views

How to resolve problem during summation of functions?

I am trying to find out the output of this basic problem but getting an error. If anyone can resolve this will be helpful. ...
1
vote
1answer
54 views

How to symbolically manipulate the closed form series output from the easyFourier package?

EasyFourier by @xzczd is a nice package to obtain a Fourier series in closed form, e.g. f = x^2 easyFourierTrigSeries[f, {x, -\[Pi], \[Pi]}, \[Infinity]] However, ...
0
votes
0answers
33 views

How To Define Indexed Vectors

I have to define two 2-D vectors to be multiplied by a matrix and multiplied by several Clebsch-Gordan coefficients. Below are my definitions and my attempt at computing the sum. ...
0
votes
0answers
45 views

Weird (erroneous) behavior in evaluating particular infinite sum

What is the cause of this behavior? Notice that in the result there is n which is the index of summation, so n should never ...
-1
votes
1answer
54 views

Summing functions in a Do loop [closed]

I can print these functions like this: ...
2
votes
3answers
305 views

How to ask Mathematica to subtract each adjacent pair in a list, and then, sum them?

If I have a list of numbers as (the number of elements in this list is even) list={1,23,32,54,65,76,87,98,109,110,...} How can I ask Mathematica to subtract each ...
3
votes
1answer
169 views

Increase computation and Plot speed

I have the following functions ...
0
votes
0answers
78 views

How to calculate this summation numerically?

I want to calculate this summation numerically: $\sum_{n=1}^{10^{10}}\frac{1}{n^3\sin(n)^2}$ First I try NSum[1/(n^3 Sin[n]^2), {n, 1, 10^10}] however it gives a ...
2
votes
0answers
68 views

NSum complaining of being non-numerical

I am trying to evaluate the sum $\sum_{k,l=1}^{30}\frac{1}{(k^2+l^2+1)^{5/4}}$ so I write NSum[1/(1 + k^2 + l^2)^(5/4), {k, 1, 30}, {l, 1, 30}] but I get a message ...
1
vote
1answer
51 views
0
votes
1answer
59 views

Determining the voltage ripple when the transient is over (mistake in result)

Well, I have the following code: ...
0
votes
1answer
75 views

Automatic summing of dummy indices [closed]

I have: $$test1=t_{1,2} \delta _{1,a} x_{2,b} \left(-\frac{\partial L}{\partial x_{a,b}}\right)-t_{1,2} x_{1,a} \delta _{2,b} \frac{\partial L}{\partial x_{a,b}}$$ $$test2=t_{1,2} x_{2,a} \delta _{1,b}...
2
votes
2answers
61 views

Sum over a list of indices

Suppose I have a sum like $$ \sum_{i_1,i_2,\dots,i_n\geq 0} f(i_1,\dots,i_n)$$ How can I write this with Mathematica? In other words, is there a way of generalizing something like the following to $n$ ...
0
votes
0answers
34 views

Total of only positive (or negative) values in TimeSeries

I've a TimeSeries like the following one: ...
3
votes
1answer
307 views

Einstein Summation convention in mathematica

...
0
votes
0answers
34 views

Issues in expanding expressions with formal sums

I have a very long expression involving formal sums to infinity, unfixed functions and several variables. In this very long expression, I need a typical term, like $\frac{6 A \sigma \sum _{n=0}^{\...
7
votes
3answers
183 views

Accurately computing $\sum_{j=2}^\infty \frac{(-x)^j}{j!} \zeta(j)$

I'm doing a sanity check of the following equation: $$\sum_{j=2}^\infty \frac{(-x)^j}{j!}\zeta(j) \approx x(\log x + 2 \gamma -1)$$ Naive comparison of the two shows a bad match but I suspect one of ...
8
votes
1answer
171 views

Hessian matrix with D and Sum Method->"Procedural"

Bug introduced sometime between 10.0.2 and 11.2 and persisting through 12.3.1 or later Having just discovered Sum's ...
1
vote
2answers
118 views

Mathematica's evaluation of nested summations

As suggested there, here is a copy of the question I've posted on Math.Stackexchange. Suppose we want to count the number of instructions executed by the following Python code: ...

1
2 3 4 5
18