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
9
votes
2answers
119 views

Problem with simplification KroneckerDelta

Bug introduced in 8.0 or earlier and fixed in 9.0 I have: ...
2
votes
1answer
464 views

Compute symbolic Expectation of a summation

I am required to computed following Expectations : $E[\displaystyle\sum\limits_{i=1}^N \frac{X_{i}}{N}] = \bar{x}_{0}$ & $E[\displaystyle(\sum\limits_{i=1}^N \frac{X_{i}}{N})^2] = \frac{(N\bar{x}...
2
votes
2answers
201 views

How to make lists the same size?

I want to add 19 lists together and then average over them but they are of unequal length. How do I make then all the same length? i.e. make them all the length of the smallest one. My lists are ...
2
votes
1answer
167 views

How to plot this double sum? [duplicate]

I want to plot solution of some physics problem that I solved (for r between 1 and 2 and for f between 0 and Pi). I tried it myself but since I am beginner in using Wolfram Mathematica I have not ...
1
vote
3answers
575 views

Plotting Solution to Heat Equation

By hand, I've solved the heat equation and looking to 3D plot the solution. My function is $$2\sum_{n=1}^{\infty}\frac{(-1)^n}{n}\sin(nx)e^{-111n^2t}$$ The code I've been trying to use to far is <...
0
votes
2answers
148 views

A simple code for conditional double summation?

I wrote a code as follows ...
1
vote
3answers
133 views

Improving the sum over dummy indexes

I have the following tensor ...
2
votes
3answers
187 views

A restricted summation over a function of integer n-tuple

I want to sum over a function of n-tuple like so: $\sum\limits_{a\leq k_1+k_2+...+k_n\leq b}f(\{k_i\}_{i=1}^{n})$ where each $k_i$ is non-negative, i.e. $k_i\geq0 \;\forall\;i $ An Example: Say, ...
3
votes
2answers
152 views

Symbolic representation of a Bézier curve

The Bézier curve is defined by: $$C(t)=\sum_{i=0}^{n} {{n}\choose{i}} t^i (1-t)^{n-i} P_i$$ where the $P_i$ are the control points. I am trying to write it down in Mathematica. What I have is: <...
4
votes
1answer
87 views

sum simplification

I have this sum Sum[-E^(-j (x kx[p] + y ky[q] + z kz[r])) j g w ky[q] Ux[p, q, r], {p, -∞, ∞}, {q, -∞, ∞}, {r, -∞, ∞}] and I would like to pull constants ...
3
votes
2answers
277 views

Sum over partitions of a number

I know only some basics about mathematica. However I need to write down the following sum: $\sum_{\{m_k\}_N}\prod_{k=1}^N\frac{1}{m_k}[T_k(Z(\tau))]^{m_k}$. Where $\{m_k\}_N$ denotes partitions of ...
0
votes
1answer
95 views

Hecke Operator- sum over divisors of a number

I am trying to write out the Hecke Operator; however, I don't know how to sum over all divisors of an integer. Could someone please give me some advice how to do that. Below is the Hecke Operator ...
20
votes
1answer
297 views

Why is “k” in the output of Sum[Log[k]/k^k, {k,1,Infinity}]?

Fixed in 11.3 NSum[Log[k]/k^k, {k,1,Infinity}, WorkingPrecision->50] (* 0.219947267975228664843531307905860703797097130 *) But ...
1
vote
1answer
343 views

How effectively Mathematica calculates Sum[Sum[a_k k^m, {m, 0, n}], {k, 1, p}] as a function of n?

Suppose that I have a polynomial of order $n$ $$ f_n(k)=\sum_{m=0}^n a_k k^m, $$ where $k$ is an integer and $a_k$ are arbitrary real numbers. Now I want to use Mathemtica to calculate $$ \sum_{k=1}^p ...
12
votes
3answers
847 views

Double Sum Involving Condition

I would like to compute the dimensions of some small free nilpotent Lie algebras. However, I am totally new to this and I could not figure out how to write the double sum which gives the dimension of ...
8
votes
3answers
313 views

How to represent integers using Egyptian fractions?

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions: $$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$ I want ...
4
votes
1answer
134 views

NSum not able to sum Abs[Sin[n]]

Is it a bug? ...
1
vote
1answer
138 views

A hypergeometric sum that fails

Input: Sum[Binomial[k+n-1, n]*Binomial[k, n-k]/k, {k, 1, n}] Output: ...
2
votes
2answers
111 views

Problem when defining a function as a finite sum

I am using Mathematica 8.0.1.0. I defined the following function for use in an answer on math.SE: f[j_] := Sum[1/(j-2k+1)/4^k, {k, 0, Floor[j/2]}] I then used ...
0
votes
3answers
275 views

Gravitational potential of a cube

I want to write code that calculates the gravitational potential of an arbitrarily shaped celestial body. To understand the calculation, I started with an easy shape: a rectangle (or a cube). I ...
2
votes
1answer
72 views

Abs[.] breaks my infinite sum

The following evaluates correctly to pi^2/4: Sum[n^2 (Sin[n π]/(-1 + n^2))^2, {n, 1, ∞}] The following gives a 1/0 error: ...
2
votes
1answer
100 views

Multiplying into an infinite sum

Suppose I define y = Sum[Subscript[a, k] x^k, {k, 0, Infinity}] which is a power series representation for y. Now if I multiply <...
17
votes
3answers
3k views

Mathematica thinks (-1)^n is non-real

When I ask Mathematica to evaluate NSum[((-1)^n)/n, {n, 1, 100}] it returns -0.688172 + 2.11297*10^-16 i Why is this? (-1)^n is either 1 or -1. I don't know why ...
1
vote
1answer
28 views

Sums involving KroneckerDelta and multi-term functions

I'm having trouble getting Mathematica (11.0.1.0, OSX High Sierra) to evaluate the following sum: $\sum_{i=0}^{\infty} f(i) \, g(i) \, \delta_{i,j}$ My code is ...
2
votes
2answers
74 views

Nested sum in replacement rule of unknown size

I have a function which takes a list as its argument, and I want to transform it by multiplying by a matrix for each element of a list. To be specific, I want the following transformation: $$\hat{f}_i ...
3
votes
0answers
128 views

How to find the closed form of a relatively simple sum?

I'm trying to find the sum $ \sum_{n=1,3,5}^\infty \frac{8}{n \sinh (n \pi)} $ Sum[8/(Sinh[n*Pi]*n), {n, 1, Infinity, 2}] which I know is ln(2), but Mathematica ...
5
votes
2answers
170 views

Why does SumConvergence return unevaluated?

I am trying to confirm that the series $$\sum_{n=1}^{\infty}\frac{\cos^2(n)}{\sqrt{n}}$$ diverges. However, when I try to use SumConvergence or ...
1
vote
1answer
259 views

Pass a list of tuples into Sum

I have a function of two arguments, f[x_,y_], and I want to sum the value of this function for a number of input tuples {x,y} ...
1
vote
2answers
515 views

How to solve for all coefficients in a sum

The statement of the problem: In the following formula, $$g(u,v) - \sum_{\Delta,l} c_{\Delta,l} u^{\frac{1}{2}} G^{(l)}\Bigg(\frac{1}{2} (\Delta-l),\frac{1}{2} (\Delta-l),\Delta,u,v \Bigg) = 0$$ ...
2
votes
2answers
83 views

Infinite sum for all valid triangles triples (a, b, c)

Find the infinite sum of f(a, b, c) = ((2 / 5) ^ a) * ((11) ^ (-c)) * ((7 ^ (-a - b)) for ordered triples(a, b, c) such that a, b, c satisfy the triangle inequality. I simplified the input to a ...
0
votes
2answers
117 views

Code to calculate the partial theta function

The version of the partial theta function I want to compute is $O(z) = \sum\limits^\infty_{n=0}\exp(-(z+n\pi)^2)$ Does anyone have or know of code to efficiently compute $O(z)$? There are two papers ...
1
vote
1answer
66 views

How to perform this indefinite sum?

The following indefinite sum with (CC[n]=1 for even n and CC[n]=i for odd n) ...
1
vote
1answer
266 views

Sum of kronecker delta

What else is needed to make Mathematica to simplify the following expression to $z[j]$? Code: ...
7
votes
2answers
259 views

How to represent $f(x) = (y-x)^k \log(y-x)$ as a summation of the form $f(x) = \sum\limits_{j=0}^\infty \cdots$?

I am having a lot of trouble working with summations in Mathematica, and this is unfortunate as it is my main use case for the application My latest summation issue is the following. I am trying to ...
1
vote
0answers
109 views

Sum involving hypergeometric function $\mbox{}_1 F_2$

Trying to simplify the sum $$ \sum\limits_{n=0}^{\infty}\dfrac{z_1^n}{n!} {}_{1}F_{2}(1;a+n,1-a+n;z_2), $$ where $a\in(0,1)$, $z_1,z_2>0$, and ${}_{1}F_{2}$ denotes the appropriate version of the ...
1
vote
1answer
82 views

Summation and production using hold

Let's take a sum and an example production $z_{1}=\sum_{k=1}^{3}(k!+(k+1)!)$ and $z_{2}=\prod_{k=1}^{3}(k!+(k+1)!)$ I wish to get in z1 a result like that $...
4
votes
1answer
109 views

How to find all methods available to SumConvergence?

Looking into this question made me suspect that SumConvergence might have more Methods available than the four listed in its ...
7
votes
1answer
175 views

SumConvergence difficulty

Backslide introduced in 9, persisting through 11.2. Consider the series $\sum_{n=1}^\infty\sin\frac{50}{n^2}$. The terms are eventually positive. ...
5
votes
4answers
463 views

Summation over integers satisfying some conditions

$n$ is a fixed positive integer and $p$ is the largest prime $\le n$: p = Prime[PrimePi[n]] For each subset $L$ of positive composite integers less than or ...
7
votes
1answer
484 views

SumConvergence and Interval of Convergence

Consider the series: $$\sum_{n=1}^\infty\frac{(x-3)^n}{n}$$ Doing hand-calculations, I applied the Ratio Test and found that it converges if $|x-3|<1$, making the radius of convergence $R=1$. ...
3
votes
0answers
70 views

Wrong computation of a series with `FactorialPower`?

I wanted to compute the series defined by $$\sum_{k=1}^\infty\frac{(-1)^{k+1}}k x^\underline k$$ where $x^\underline k:=\prod_{j=0}^{k-1}(x-j)$ is a falling factorial. Thus I write ...
0
votes
2answers
58 views

Sum elemets of an array

I am not sure this is something that is possible to implement in mathematica, but my question is the following. I have a system three linear equation where the coefficients in front of each variable ...
4
votes
2answers
196 views

How do I deal with the summations correctly whose upper or lower bounds are symbolic?

I'm new to Wolfram Mathematica and I want to calculate the expression of s (with respect to n) to get the same result as this ...
1
vote
1answer
64 views

How can I plot a solution obtained from Stats.SE? [closed]

I am trying to implement a solution I got from stats.stackexchange.com in Mathematica, but I must be doing something wrong, because the output I am getting and the accepted answer from stats....
5
votes
1answer
313 views

Wilf-Zeilberger simplification

I am working my way through the book "A=B" and doing some of the problems. One of them was to prove that: $$ \frac{1}{{n+x \choose n+r}} \sum_{k=0}^n{n \choose k}{x\choose k+r}=1 $$ I am able to ...
3
votes
3answers
648 views

Solving a system of diophantine equations from a mathematical competition

There is a problem from the $66th$ Putnam Mathematical Competition, $B2$ Find all positive integers $n,k_1,k_2,...,k_n$ such that $$k_1+\cdots+k_n=5n-4$$ and $$\frac{1}{k_1}+\cdots+\frac{1}{...
0
votes
0answers
46 views

Speeding up multiple conditional summations

I have situation where I have a matrix H, and want to build a set of ODEs dependent on the values of the eigenvalues, let me illustrate: ...
3
votes
2answers
3k views

How to compute the partial trace of a 4x4 matrix?

I want to compute a partial trace using formula $\rho_A=\sum\langle B|\rho_{AB}|B\rangle$ . Example, $\rho_{AB}= $$ \begin{pmatrix} a & b & c & d\\ e & f & g & h\\ i &...
4
votes
3answers
106 views

Using list specification in NSum

The below gives the right answer for summing values from a list (as opposed to a mathematical function) but throws out a warning stating that "k cannot be used for list specification". ...
1
vote
0answers
54 views

Summation with skipping a term

how do i sum the following in Mathematica: the m-th term is 1/(m^2 - n^2), the sum is over odd m and m <> n. i know the answer is -1/(4*n^2) or something like that. thanks !!