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
0
votes
0answers
48 views

Evaluate parameters before function uses them

I want to construct a power series: LP[s_] := With[{x = 1, R = 10, n = 1}, Sum[cc[i + n, n, x, R] s^i, {i, 0, 20}]] but it kinda takes a long time to compute the ...
5
votes
2answers
396 views

huge difference in memory usage

I have two pieces of code that do exactly the same thing. However, the memory consumption is very different in the two approaches, and I cannot figure out the reason. Here is the code: ...
2
votes
1answer
40 views

Summation over specific tuples

I would like to write a function that would, given a positive integer $n$, compute the following: $S_n = \sum_{(x,y,z)} a_{(x,y,z)} f(x,y,z)$, where the sum runs over all tuples $(x,y,z)$ such that $...
0
votes
0answers
24 views

How to use the summation symbol to express this expression?

How to use the summation symbol to express this expression? $$d_{ij}=\sum_{k=1}^{40}a_{ki}a_{kj}\qquad i\ne j,\;i,j=1,2,\dots,14$$ I don't have any simple ideas, of course I can't write them one by ...
0
votes
1answer
63 views

Plotting a sum of Bessel functions

I would like to plot the Nth partial sum, given τ for different values of "n". I'm really new at this so i don't even know how to begin. I have to make a graph of ξ vs ϕ and find the minimum of n so i ...
0
votes
1answer
59 views

Resolving a sum after making a substitution

Consider the following sum as expressed by $s3$: ...
3
votes
1answer
43 views

Replacing an indexed term

Consider the expression: s[i_, n_] := Sum[(e[c[j]] + e[z[j]])*(l[i, j] + m[i, j]), {j, 1, n}] I'm trying to replace e[c[3]] by c[3] and have attempted ...
2
votes
0answers
36 views

Summing with assumptions provides unexpected output

I am computing a closed form of a number of sums having generally the following form: $$ \sum_{i = 0}^{m/2}\sum_{\substack{0\leq k \leq i \\ 2k \equiv i + m \, \text{mod } 3}} k $$ It looks like ...
1
vote
1answer
50 views

Collecting terms from an indexed sum

How can I get Mathematica to collect terms from an indexed sum? My application is somewhat convoluted, but this minimum code captures the idea: ...
4
votes
1answer
59 views

How to Force the PolyGamma[0, x] function or the HarmonicNumber[ x ] function

I'm crunching some infinite summations, and sometimes Mathematica generates results that have the PolyGamma[0, x] function (which is the Digamma) and sometimes the <...
5
votes
3answers
291 views

DSolve fails to handle summation involving DiracDelta

Executing s = DSolve[{y''[x] + y[x]==Sum[DiracDelta[x-2^n]/2^n,{n,0,Infinity}],y[-Pi/2]==-1,y'[-Pi/2]== 0}, y[x], x] , I obtained ...
3
votes
2answers
148 views

Permutations with Repetition Symbol

I am trying to compute this formula in Mathematica: $$ a = \sum_{n=0}^A P_A^{A-n,n} $$ Where A can be any positive number The problem is that I am unable to find the symbol for permutations with ...
0
votes
1answer
34 views

Substitution rules not working

I have this summation, $S$,... $$ \begin{alignat}{2}% & P(0) = (1 - A) \notag \\ & P(1) = (1 - A)(e^A - 1) \\ & P(i + 1) = \frac{1}{P(0,A)}\Bigl\{P(i) - [P(0) + P(1)] ...
0
votes
0answers
27 views

Using different functions in summation

I am trying to evaluate the sum $$c(k_1,k_2) = \sum_{a,b}{\Phi^{(2)}_{a,b} w_a(k_1) w_b(k_2)},$$ where $\Phi_{a,b}^{(2)}$ is the second derivative of $\Phi$ with respect to $a$ and $b$ respectively, ...
12
votes
5answers
315 views

Possible bug in finite sum over inverse squares $\sum\limits_{i=1}^n \frac{1}{(x (n-i)+i)^2}$

Revisiting the problem Limit of partial sums involving inverse squares I found another difficulty with Sum[] Consider this sum ...
8
votes
1answer
72 views

Local variables in sums and tables - best practices?

Stumbled on Local variables when defining function in Mathematica in math.SE and decided to ask it here. Apologies if it is a duplicate - the only really relevant question with a detailed answer I ...
-1
votes
0answers
30 views

How to visualize and solve this riemman-like sum?

This is not the same as How to visualize and solve Darboux-like sum taking the average of function P defined on domain dense in its’ infinite limit points?. The new definition I entered here is ...
0
votes
0answers
22 views

Help with approach to Darboux-like sum

Consider $P:A\to[0,1]$ where $A\subseteq[0,1]$. Suppose $P(x)=x$ and $$A=\left\{\frac{1}{2^x}+\frac{1}{2^y}+\frac{1}{2^z}:x,y,z\in\mathbb{Z}\right\}\cap[0,1]$$ , the partition of $[0,1]$ is sequence ...
1
vote
1answer
177 views

How to visualize and solve darboux-like sum taking average of function $P$ defined on domain dense in its’ infinite limit points?

Consider $P:A\to[0,1]$ where $A\subseteq[0,1]$. Suppose $$A=\left\{\frac{1}{2^x}+\frac{1}{2^y}+\frac{1}{2^z}:x,y,z\in\mathbb{Z}\right\}\cap[0,1]$$ and the partition of $[0,1]$ is a sequence $x_i$ ...
1
vote
1answer
70 views

How do I get the same results using Mathematica?

According to this answer For each $n\ge 1$ let $l_{n,i}$ and $r_{n,i}$ be the left and the right endpoints of the segment $C_{n,i}$. Since the function $x^2$ increases on $[0,1]$ and $ l_{n,i}\...
5
votes
2answers
230 views

How to Calculate Factorial when Overflow/Underflow occurs

I'm trying to compute this function, which sums to 1 for $0 < \alpha < 1$ and $k \rightarrow \infty$ ...
2
votes
0answers
57 views

Why is the sum of the series calculated using the integral

I tried to calculate the sum the Harmonic series via NSum up to a huge limit and got an error: NIntegrate: Numerical integration converging too slowly; suspect one of the following: singularity, ...
0
votes
0answers
21 views

FactorSquareFree::lrgexp: Exponent is out of bounds for function FactorSquareFree. Error

I'm trying to make a two-dimensional contour plot of the temperature of a plate. This is my initial function: ...
2
votes
2answers
78 views

Conditional statement in function

It seems the equality condition does not work as expected. ...
1
vote
0answers
16 views

Summing Kronecker Deltas: Sharp slowdowns for simple sums

I'm using Mathematica 12.0 Student Edition. I'm a little confused by the length of time Mathematica takes to evaluate certain sums of Kronecker Deltas or Discrete Deltas. Here's a simple example below:...
1
vote
1answer
49 views

Calculating a sum indexed by $t|gcd(m,n)$

I would like to know how to implement the sum $$f(m,n)=\frac{1}{n}\left(\sum_{t|gcd(m,n)}{\frac{m}{t}+\frac{n}{t}-1 \choose \frac{m}{t}}\phi(t)\right)$$ for two given positive entires $m, n$. Here, $\...
0
votes
0answers
33 views

Issues with computing a finite sum

I'd like to evaluate in Mathematica the following sum: $$\sum_{n=1}^N4\left(1-2\cos\left(\frac{\pi n}{N}\right)+\cos\left(\frac{\pi n}{N}\right)^2\right)\left(\cos\left(\frac{2\pi n}{N}\left(i/2-1/4\...
0
votes
0answers
46 views

Plot an infinite sum

I want to plot the following equation (w-$\delta$ graph) Ty Tx and ly are constant and I will assign a value for them. I am a new one on the Mathematica and can not handle this.
0
votes
0answers
63 views

Double summation taking forever to complete

I am trying to compute this double summation. Here is the code... ...
0
votes
1answer
84 views

Double Sum Computation Issue

I'm trying to compute a double sum... For scalars, it seems to be working fine. Here is an example: ...
5
votes
1answer
181 views

Summation with inequalities

How can I perform this function with Mathematica? $$\sum_{1\le j<k\le N}\frac1{\left(r_{jk}\right)^\alpha}$$ where n = 5.
1
vote
2answers
76 views

How to sum like this

I want to sum as follows, where j is from 1 to n in each sum (if s is added to 2 when j is not added to n, then j does not need to be n): $$Table[\sum_{s=k,j=1}^{n}(s+j),\lbrace{k,0,n\rbrace}]$$ We ...
5
votes
1answer
280 views

An efficient way to evaluate this expression with deeply nested Do loops

Is there an efficient way to evaluate something like this? ...
1
vote
1answer
59 views

Can I force `NSum` to sum exactly for many terms? [closed]

Is there a way to have NSum perform an exact term-by-term summation, when the number of terms is finite? I have a complicated infinite sum in which each term ...
0
votes
1answer
66 views

Simple nested sum giving ridiculous answer [closed]

I have produced a minimum working example of the issue I'm facing. I would like to evaluate the following symbol sum, with $n\geq0$: $$\sum_{k=0}^n \sum_{m=0}^{2(n-k)} x^m$$ If I evaluate this sum ...
0
votes
0answers
25 views

Variant on `PrimeZetaP`

Mathematica has PrimeZetaP for the prime zeta function $\sum_p \frac{1}{p^s}$ where the sum is taken over all primes. How do I use Mathematica to make an ...
5
votes
1answer
132 views

Wolfram Language 12 says this absolutely convergent series does not converge. Is there any similar example?

I am reading "Lectures on complex function theory" by Takaaki Nomura. In this book, there is the following example: $\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converges absolutely. But ...
4
votes
1answer
257 views

How to use Mathematica to simplify this kind of trig sum?

$$ S=\sum_{k=0}^{10}\sin\left(\frac{(2+4k)\pi}{23}\right) =\sum_{k=0}^{10}e^\left(i\frac{(2+4k)\pi}{23}\right) =e^{i\frac{2\pi}{23}}\sum_{k=0}^{10}e^{i\frac{4k\pi}{23}} =e^{iu}\sum_{k=0}^{10}\left(e^{...
0
votes
0answers
40 views

Plotting Interpretation

...
5
votes
2answers
116 views

How to simplify Sum's and Product's of arbitrary length?

I would expect Sum[Subscript[x,i], {i, 1, n}] + Sum[-Subscript[x,i], {i, 1, n}] and ...
0
votes
0answers
44 views

How to add a number, say, 1 to a random real number in Mathematica? [duplicate]

I wish to add, say, 1 to a random real number, say between 1/3 and 1/6. I have used the following code in Mathematica, but it does not answer properly. code: p := RandomReal[1/6,1/3] q:=p+1 p ...
2
votes
1answer
64 views

Strange behaviour of infinite sum (H[n]- Series[H[n]])

Bug report filed 14.01.2020 A support case was created with the ID [CASE:4371991] EDIT It is easy to show that the workaround "limit of finite sum" proposed in the solution by user64494 leads to ...
0
votes
1answer
40 views

Transforming a sum of products of binomial coefficients gives only partially determined expression

On 11.0.1.0, Sum[Binomial[n + 3, i] Binomial[n, k - i] 2^i, {i, 0, k}] gives ...
0
votes
1answer
75 views

Finding ODE series solution coefficients

I am trying to solve an ODE by subbing in a series form and then looking individually at the coefficients of different powers of the variable. I'm looking at a general form of equation: $$\frac{\...
0
votes
1answer
70 views

Programatically generating variables and sum

Given a set of variables, say s1through sn, and a way to generate an expression expr ...
6
votes
1answer
216 views

Strange result for sum $\sum _{k=1}^{\infty } \frac{\sin (k (k-1))}{k}$

In this sum over $k$ Sum[Sin[k (k - 1)]/k, {k, 1, ∞}] the result still containes the summation index $k$. ...
1
vote
0answers
57 views

Getting NSum to go to the right depth in recursive definitions

I wanted to produce some plots of the action of the Gauss shift map on cumulative distribution functions. This means I wanted to plot functions $F_n(x)$, for $0 \leq x \leq 1$, defined by $F_1(x) = x$ ...
4
votes
1answer
64 views

Symbolic double summation vs nested summations

Take the following code: ...
0
votes
1answer
38 views

Continuing summation till the magnitude of the terms become smaller than a value

I've tried to plot the below density plot. But since there is a summation inside the plot and the term inside the summation goes to zero differently for different values of $a$ and $t$, I need to tell ...
1
vote
0answers
64 views

Evaluating another symbolic sum

Here I asked about a symbolic sum, and received three very insightful replies (from: მამუკა ჯიბლაძე, Carl Woll and Dr. Wolfgang Hintze) which did the trick. (Thank you again!) Currently I am trying ...

1
2 3 4 5
14