Questions tagged [summation]
Questions using the Sum command, especially for series and other algebraic objects, and related functions such as SumConvergence
931
questions
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 ...
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 ...
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 ...
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
...
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
...
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.
...
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, ...
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.
...
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 ...
-1
votes
1
answer
96
views
Summing functions in a Do loop [closed]
I can print these functions like this:
...
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 ...
3
votes
1
answer
214
views
Increase computation and Plot speed
I have the following functions
...
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 ...
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 ...
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:
...
0
votes
1
answer
62
views
Determining the voltage ripple when the transient is over (mistake in result)
Well, I have the following code:
...
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}...
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$ ...
0
votes
0
answers
54
views
Total of only positive (or negative) values in TimeSeries
I've a TimeSeries like the following one:
...
3
votes
1
answer
589
views
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}^{\...
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 ...
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 ...
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:
...
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 ...
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 ...
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 ...
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
...
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
...
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, ...
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 ...
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 ...
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 ...
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 ...
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}$.
...
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.
...
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 ...
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:
...
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:
...
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
...
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 ...
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 ...
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}+...
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
...
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)
...
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.
...
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 ...
0
votes
0
answers
154
views
Invalid integration variable/Raw object ... cannot be used as an iterator
I have a short code:
...
1
vote
1
answer
60
views
ParallelSum issue inside package
I have the following very simple package with only one external function SumSeries[]:
...
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 ...