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
2 answers
250 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 ...
honeybadger's user avatar
1 vote
1 answer
61 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 ...
Epsilon's user avatar
  • 1,092
3 votes
2 answers
316 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 ...
spaceman's user avatar
  • 323
1 vote
0 answers
64 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 ...
Seyhmus Güngören's user avatar
0 votes
2 answers
79 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 ...
მამუკა ჯიბლაძე's user avatar
0 votes
1 answer
31 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. ...
vini's user avatar
  • 83
1 vote
1 answer
62 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, ...
Roland Salz's user avatar
0 votes
0 answers
56 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. ...
Christian's user avatar
0 votes
0 answers
46 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 ...
azerbajdzan's user avatar
  • 5,935
-1 votes
1 answer
96 views

Summing functions in a Do loop [closed]

I can print these functions like this: ...
Amirhossein Rezaei's user avatar
2 votes
3 answers
367 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 ...
math2021's user avatar
  • 659
3 votes
1 answer
214 views

Increase computation and Plot speed

I have the following functions ...
ghost's user avatar
  • 351
0 votes
0 answers
133 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 ...
Jie Zhu's user avatar
  • 503
2 votes
0 answers
75 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 ...
Chris's user avatar
  • 973
1 vote
1 answer
64 views

Write code that finds the ripple of a function (existing code finds the wrong answer)

I have the following code: ...
Jan Eerland's user avatar
  • 1,941
0 votes
1 answer
62 views

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

Well, I have the following code: ...
Jan Eerland's user avatar
  • 1,941
0 votes
1 answer
101 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}...
Malessa's user avatar
2 votes
2 answers
265 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$ ...
user2723984's user avatar
0 votes
0 answers
54 views

Total of only positive (or negative) values in TimeSeries

I've a TimeSeries like the following one: ...
Jepessen's user avatar
  • 930
3 votes
1 answer
589 views

Einstein Summation convention in mathematica

...
Jasmine's user avatar
  • 1,225
0 votes
0 answers
54 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}^{\...
Noam's user avatar
  • 1
8 votes
4 answers
240 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 ...
Yaroslav Bulatov's user avatar
10 votes
1 answer
225 views

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

Bug introduced sometime between 10.0.2 and 11.2 and persisting through 13.2.0 or later Having just discovered Sum's ...
Chris K's user avatar
  • 19.1k
1 vote
2 answers
171 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: ...
Greg82's user avatar
  • 113
2 votes
2 answers
142 views

Using `FindRoot` to solve over positive integers?

I need to solve for the smallest positive integer $s$ such that the following is satisfied for $p>1, n\approx \infty, \epsilon>0$ $$\frac{\sum_{i=1}^n \left(1-i^{-p}\right)^si^{-p}}{\sum_{i=1}^n ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
152 views

How can I speed up this pdf path integration calculation with a slow recursive function with 40^4 summed terms in each iteration?

I am writing a path integration code for a numerical approximation to a probability density function. I essentially take some initial continuous probability density function p0 and then perform a ...
JAC's user avatar
  • 21
2 votes
1 answer
137 views

Slow Sum with Subscripts

Edit: My original question implicated D in the problem, but it seems unrelated, so I've removed that part of the question. I am writing a function that uses ...
Chris K's user avatar
  • 19.1k
0 votes
1 answer
87 views

Why does summation over list elements are very slow compared to direct numbers?

Here I will provide a simple example of what I mean. Using ParallelSum with direct numbers is very fast as here ...
valar morghulis's user avatar
2 votes
3 answers
166 views

Limit of empty sum

Why MMA delivers this result and how to interpret or reformulate it? Limit[k Sum[1/i, {i, 1, k - 1}], k -> 0] I would expect 0 as it is an empty sum. MMA 12.1 ...
granular bastard's user avatar
0 votes
1 answer
149 views

Symbolic partial differentiation of a Lagrangian function including a summation

I'm using Mathematica to double-check that I correctly derived first order conditions for the models I'm researching. Before I get started, I wanted to actually teach myself how to use Mathematica, ...
ssingleton's user avatar
4 votes
2 answers
110 views

RSolve solves only one of two equivalent recurrences

I am having an issue with the RSolveValue/RSolve function. Specifically, Mathematica is able to correctly evaluate ...
B. Freeman's user avatar
0 votes
1 answer
88 views

How to evaluate Sum with Singularities?

I derived equation of sum from the following problem, $\int_{a}^{b}\sum_{n=0}^{\infty} cos^n(x)dx$. Using the following definitions, $cos(x)=\frac{e^{ix}+e^{-ix}}{2}$ and $(a+b)^n=\sum_{m=0}^{n}\binom ...
Aschoolar's user avatar
  • 883
3 votes
1 answer
135 views

Quickly compute inverse summation

I'd like to look at behavior of $f(n)$ for the following $f$ $$\begin{array}{lll} g(s,n)&=&\frac{1}{n}\sum_i^n \left(1-\frac{1}{i}\right)^s\\ f(n)&=&\text{smallest } s \text{ such that ...
Yaroslav Bulatov's user avatar
2 votes
0 answers
84 views

How to intelligently use FullSimplify and FunctionExpand to simplify complex sums

I am trying to find a compact form of some sums which is related with some Bayesian probability factor (not so relevant, if required further explanation please ask). The point is that I know that the ...
Eurabio's user avatar
  • 33
3 votes
2 answers
207 views

How to FInd the sum of odd divisor of a number in Mathematica?

So I want to find the sum of odd divisors of a number raised to some power. $i.e.$ I want to find $\sum_{n=1}^\infty\sigma'_{-2k-1}(n)$ where $\sigma'_{-2k-1}(n) = \sum_{d|n, \text{d odd}} d^{-2k-1}$. ...
Kashif's user avatar
  • 195
2 votes
1 answer
214 views

Symbolic Mean and Variance Calculations

I need a tutorial that gets me started on basic symbolic calculations with random variables. My naive attempts did not get me far. ...
ivo Welch's user avatar
  • 123
0 votes
1 answer
49 views

Simple expression involing Sum[] Mathematica fails to simplify [duplicate]

I have been trying to coax Mathematica to solve some equations involving expressions like Sum[A[t],t], with mixed success. One thing that really surprised me though ...
toth's user avatar
  • 103
0 votes
1 answer
140 views

Plot3d plots an empty graph [closed]

So I'm trying to graph a wave-type function using the following code: ...
Cameran Neumann's user avatar
3 votes
1 answer
79 views

Summing list elements for given index tuple

Is there a more compact way of summing certain elements of lists together when given a tuple of which elements to sum. For example if I am given the list of size 8: ...
John Doe's user avatar
  • 295
1 vote
1 answer
106 views

Summation without writing term by term

https://mathematica.stackexchange.com/a/222410/73364 I have obtained the following code from the above link ...
Jasmine's user avatar
  • 1,225
1 vote
3 answers
70 views

How to ask Mathematica to do the given operation for a set of parameters?

I have a set of numbers like this s = {a, b, c, d, e, f, ..., g, h} and I would like to ask Mathematica to do the following operation (to sum the subtractions of ...
user avatar
0 votes
1 answer
441 views

How to get Sum of array of integers?

This question seems easy but I am struggling with it now, I tried a few ways and check this solution as well but couldn't help me, please check and help if you are able: So I need to save the sum of ...
Azzurro94's user avatar
  • 499
1 vote
3 answers
126 views

Infinite double sum with exclusion

I would like to evaluate the following sum (numerically will suffice): $$ \sum_{m,n=-\infty,(m,n)\neq(0,0)}^{\infty}\frac{1}{m^{4}+n^{4}} $$ I first tried to do $$ \sum_{m,n=1}^{\infty}\frac{1}{m^{4}+...
Chris's user avatar
  • 973
3 votes
0 answers
135 views

Summation variables aren't recognised as dummy variables

I'm trying to write this expression in Mathematica, and calculate the following quantity However, when I tried the following ...
Our's user avatar
  • 229
1 vote
0 answers
50 views

Large and infinite sums evaluated numerically

I am interested to learn when and how Mathematica is able to evaluate large/infinite sums numerically in reasonable time. I have found that it can evaluate $$ \sum_{l=1}^{\infty}e^{il/2}H_{0}^{(1)}(l) ...
Chris's user avatar
  • 973
0 votes
0 answers
32 views

Inequality programming involving sum compositions

$n=3$, $m=3$, $B$ - identity matrix $3 \times 3$ Trying to implement it in Mathematica, but can't figure out how to program the second term. The result is an error. ...
dtn's user avatar
  • 2,344
0 votes
1 answer
158 views

How to plot a Sum function with Bessel function of the first kind [closed]

I have looked around for a code that can help to plot the magnitude and phase of the following sum Sum[(BesselJ[n, r] e^(I n ϕ))/I^n, {n, -N, N}] But I am not able ...
user287546's user avatar
0 votes
0 answers
154 views

Invalid integration variable/Raw object ... cannot be used as an iterator

I have a short code: ...
Josef Bobek's user avatar
1 vote
1 answer
60 views

ParallelSum issue inside package

I have the following very simple package with only one external function SumSeries[]: ...
Epsilon's user avatar
  • 1,092
1 vote
3 answers
209 views

How to approximate the harmonic sum $\sum_{n=1}^\infty\frac{{4n\choose 2n}\overline{H}_{2n}}{n 2^{4n}} ?$

How to approximate $$\sum_{n=1}^\infty\frac{{4n\choose 2n}\overline{H}_{2n}}{n 2^{4n}} ?$$ Where $\overline{H}_n=\sum_{k=1}^n \frac{(-1)^{k-1}}{k}$ is the skew harmonic number. The mathematica ...
Ali Shadhar's user avatar

1 2
3
4 5
19