Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
41 views

Not getting a solution to my maximization problem

I want to solve the following problem: For $0.5<q<1$, $q<r<1$, $0\leq n$, $0\leq n_1<=\lfloor{n/2}\rfloor$, and $n_1,n\in\mathbb{N}$ calculate $\arg max_{n_1} S(q,r,n,n_1) $ as a ...
2
votes
1answer
41 views

Performance Tuning: Construction of Matrix with Summations

I am trying to solve an eigenvalue problem of a large matrix. The issue is that it takes too much time to construct this large matrix. This is the code that I built: ...
0
votes
0answers
52 views

How do I make this summation work faster?

Is there any way to make this summation be faster? I previously had spherical harmonics integration which was taking forever to run How can I do a faster integration? Using math, I tried to use ...
7
votes
2answers
753 views

How to optimize Mathematica code that depends on eigenvalues of big matrices and big sums?

I've been using Mathematica recently to generate some plots of a few functions. I've been able to get it right after a few questions here. The resulting code, which works, is this: ...
2
votes
1answer
111 views

What am I doing wrong when trying to plot this function?

I'm trying to reproduce the computations of this paper and I'm running into some troubles because I'm rather new to Mathematica. In the paper's page 4, in figure 2 the authors show a plot of a ...
2
votes
2answers
67 views

Evaluating a summation while suppressing zero raised to a negative power

I want to compute the following multiple summation. ...
1
vote
2answers
63 views

Why does Sum[Length[Divisors[a]], {a, 1 ,x}] return x?

I am summing the number of divisors and I am getting the strange answer below even where there is no input to this function. ...
1
vote
0answers
102 views

How to sum over the variable in partial derivative operator?

I need to use the partial derivative operator in Wolfram Mathematica within a summation, specifically to define the D'Alembertian operator of scalar fields. I am having trouble summing over the D ...
1
vote
1answer
33 views

Evaluation of Extract and use the result in a Sum

I am experiencing a problem in the evaluation of a sum. I hope that someone can help me, I am not an expert Mathematica programmer. I'm posting just the portion of code that gives problems, I know ...
5
votes
1answer
112 views

Strange result with an indefinite double sum

Bug introduced in V10.0.2 or earlier and persists through V11.3 (Simplified version - courtesy Lukas Lang - reported [CASE:4208776]) I try to compute ...
5
votes
2answers
212 views

If and summation: why do I have the index of the summation in the final result?

Consider the following code: Sum[If[b != 0, a[m], 0], {m, 1, 4}] (* 4 If[b != 0, a[m], 0] *) Why does it return me a[m]? m ...
0
votes
2answers
63 views

Sum over integer partition with variable function argument

Define $$\hat{X}(Y) = [X,Y] $$ I have known matrices $S_i$ and $V$. I am trying to use Mathematica to define a function which calculates $$ \sum_{\substack{n_1, \ldots, n_k>1\\ n_1+\ldots n_k = ...
1
vote
1answer
76 views

Why is the function assuming not taken in consideration?

In the following code, I assume that my variables are strictly positive. However, mathematica doesn't take this in consideration when it evaluates the If : the If is still in a non simplified form. ...
0
votes
2answers
69 views

Product within a sum [closed]

How would I input the following sum into Mathematica?
3
votes
0answers
34 views

Why does this sum return unevaluated when testing for convergence?

Why does Mathematica return unevaluated for SumConvergence[Sin[\[Pi]/n^2], n]? I tried looking at the documentation, but I can't find any possible issues. The ...
0
votes
2answers
111 views

Create and manipulate list with variable length?

Is there a way to create and manipulate a function of a sum of arbitrary length? Specifically, I'd like to create a function like the following: ...
2
votes
2answers
146 views

Sums of products with $ n $ variables

I want to be able to compute a function of $ n $ indices which looks as follows if $ n>2 $: $$ \sum_{(i=1,j=1,k=1,l=1,...), (i\neq j\neq k \neq l \neq ...)}^{n} x_{i}x_{j}(x_{k}^2+y_{k}^2)(x_{l}^...
1
vote
0answers
60 views

How to study the behavior of this series in Mathematica? [closed]

I need to compute the Von-Neumman entropy of a density matrix in Quantum Mechanics. The density matrix is $$\rho=\sum_{n=0}^\infty \dfrac{\tanh^{2n-2}r}{2\cosh^2r}\left[\tanh^2r + \dfrac{n}{\cosh^2r}\...
1
vote
1answer
70 views

Harmonic number of $r$ with order $r$ [closed]

Mathematica recently offered me this expression as the result of an evaluation: HarmonicNumber[r, -r]. I initially thought this must be equivalent to ...
1
vote
1answer
107 views

fast sum computation

I would like to compute sum. How is it possible to compute the sum fast? May be with the help of replacing Sum with NSum or <...
1
vote
1answer
159 views

On double summation with Mathematica

Today I wanted to evaluate this sum using Mathematica: $$f(a,b):=\sum_{(k,l)\in\mathbb{Z}^2,\ l\ne0}\frac{1}{(2 i k a \pi + l b) (2 i (k - l) a \pi + l b)}$$ ...
2
votes
0answers
119 views

Why do these sums return the same result when the results should be different?

Sum[1, {k, 1, Infinity}, Regularization -> Dirichlet] gives -1/2, which is right. ...
1
vote
2answers
622 views

Summing over n variables [duplicate]

I am currently trying to create a function taht will sum over n variables, but I don't really know how ot implement it. It should look like this: $$f[n]=\left(\frac{1}{6}\right)^n \sum _{x_1=1}^6\sum ...
0
votes
0answers
33 views

Rearrange Summation and change duplicated indices

I try to transform $$\left(\sum _{j=1}^J A(j)\right) \sum _{j=1}^J \sum _{k=1}^K B(j,k)$$ to $$\sum _{j=1}^J \sum _{k=1}^K \sum _{j_{2}=1}^J A(j_{2})B(j,k)$$ The rule would add subscript to ...
0
votes
1answer
44 views

Sums of binomial expressions returns different and sometimes indeterminate expressions

A problem that I encountered multiple times when taking sums over expressions involving binomials, factorials, etc. is that Mathematica (version 11.2) returns indeterminate expressions when it should ...
-1
votes
1answer
134 views

How to extract a coefficient from a sum

Let us consider a sum of specified functions multiplied by coefficients, for example f[x_]:= Sum[Exp[j*x]*p[j],{j,1,n}] I want to extract the coefficient ...
0
votes
1answer
83 views

Derivative of sum of elements of array [closed]

I try to get derivative of sum of an array with respect to an element of the array. $$s = \sum_{i = 1}^{3}A_{i, 1}$$ Evaluate $\frac{\partial s}{\partial A_{1,1}}$ Below is the code. ...
13
votes
3answers
491 views

Find asymptotics of $\sum\limits_{i=0}^{n/3} 2^i \binom{n-i-1}{\frac{2n}{3}-1}$

I have an expression 2^n / Sum[ 2^i Binomial[ n - i - 1, 2n/3 - 1], { i, 0, n/3}] ...
1
vote
2answers
85 views

Summations of Lists

I'm trying to find how many numbers between 1 and 1000, which are not either prime or the sum of successive primes. I've managed to create the list of all the primes between 1 and 1000: ...
7
votes
1answer
784 views

Compile nested Sums

I want to compile an expressions that contains nested Sum-expressions. A simple example that gives me problems is: ...
0
votes
0answers
61 views

NSum: Summand (or its derivative) is not numerical at point

I am experiencing a problem in evaluating the maximum of a function that is defined as a sum ...
11
votes
4answers
374 views

Finite sum not evaluating

Mathematica refuses to evaluate this summation. Sum[2^(k + 1)^3 - 2^(k - 1)^3, {k, 0, n}] It just returns the form unevaluated. $\sum _{k=0}^n \left(2^{(k+1)^...
1
vote
2answers
74 views

Sum of all the n-th numerical evaluation of an integral and its cumulative sum of the square of the n-th value

I wish to compute the expansion coefficient of a wavefunction(i.e. in quantum mechanics) which in itself is an integral, given by $$b_{n00} = \int^{\infty}_{u = 0} \frac{1}{(n)^{3/2}} L^{1}_{n-1}\left(...
0
votes
1answer
59 views

Sum was simplified and I don't know how it was done

I want to compute the sum $\qquad \sum_{i=1}^{n+r}(i+1)n^{i-1}(n+1)^{n+r-i}$ However, when I input the expression ...
8
votes
2answers
2k views

Wolfram says sum diverges, but Mathematica gives a numerical value for infinite sum [closed]

Take this sum for example: $$\sum_{n=2}^\infty\frac1{\log(n!)}$$ Wolfram says that this does not converge by the comparison test. However, when I use Mathematica's ...
1
vote
4answers
109 views

Summation exercise — how can I translate the problem statement into the Wolfram Language? [closed]

I'm new to both Mathematica and this forum, so this will be my first post here. I just got into Mathematica today, and I've been doing some exercises. Up to now things have been going well, but I've ...
1
vote
2answers
77 views

Evaluating a formula that uses summations and products of vectors

Could someone tell me how to find beta1? I have the following data: I don't know how to write beta1, and I don't find ...
11
votes
0answers
98 views

What does that output of Sum mean?

I made the computation ClearAll["Global`*"]; r = Sum[1/2^(k*n/(k + n)), {k, 1, 2*n}, Assumptions -> n ∈ Integers && n > 0] and got ...
6
votes
3answers
461 views

How can I make Mathematica return a series expansion in the form $\sum_{j=0}^\infty \dots$ instead of $a_0 + a_1x^1 + \dots + a_{n-1}x^{n-1}+ O(x^n)$

I have a function $$\phi(x) = \sqrt{(x-t)^2 + c^2},$$ and I want an asymptotic expression for it as $x \to \infty$. Using the following code I can calculated such an expression: ...
0
votes
1answer
38 views

summation syntax for defining conditions and solving

I am trying to generate datasets for which specific conditions related to the grand mean, group means, and differences among these values hold. I had tried in R, but was hoping that using Mathematica ...
5
votes
2answers
155 views

Why is $\sum\limits_{k=1}^{100} 0.01 $ different than $\sum\limits_{k=1}^{100} \frac{1}{100}$?

Why does evalutating $\sum\limits_{k=1}^{100} 0.01$ not result in 1? What I get is 1.0000000000000007. I know that the number 0.01 in binary results in an infinite sequence of zeros and ones, which ...
3
votes
3answers
332 views

Speeding up the calculation of a binomial sum

Is it possible to speed up this calculation? A[j_, p_, n_] := Sum[Binomial[n, k] p^k (1 - p)^(n - k), {k, 0, j}] Plot[{A[j, 0.5, 12000]}, {j, 0, 12000}] Thanks!
4
votes
2answers
554 views

Indeterminate expression. Where?

Consider the following: ...
1
vote
1answer
163 views

Simplifying a Sum of Fractions by Removing Fractions in Denominators

I have a sum of fractions of the form $x1 - \frac{(x2 + x3)}{(x4 + x5)} - \frac{(x6 + \frac{x7}{x13})}{(x8 - x9 - \frac{x10}{(x11 + x12)})}.$ How might I simplify it to remove fractions from the ...
-1
votes
1answer
65 views

Why i get “Infinite expression 1/0.^5 encountered” in summation?

this is my code the file https://drive.google.com/open?id=1foOFbyAnn4buPgHq_LvF5eGjZYm4SEM- ...
3
votes
1answer
122 views

Computing numerically infinite sum of some double series

Let's consider the series: $$ F(t) = \sum\limits_{n=0}^{\infty}\sum\limits_{k=0}^{\infty} \frac{(-b)^k(-a)^n\binom{n+k}{k} t^{2n+k(2-\alpha)}}{\Gamma(2n+k(2-\alpha)+2)} $$ where $a,b$ are ...
3
votes
0answers
114 views

Summation of the multipole expansions [closed]

Let $ \vec\Omega, \vec\Omega' $ be two unit vectors in $ \mathbb R^3 $ such that $ \vec\Omega\cdot\vec\Omega' = t $ and let $ r > 0 $. The multipole expansion for the exponential reads: $$ \...
1
vote
1answer
62 views

Create list of values with arbitrary index and the use it in a function

I have the following generating functions: $l_{2i-1}=l_{1}-(i-2)(w+s)$ with $i\geq 2$ and $l_{2i}=l_{2}-(i-1)(w+s)$ with $i\geq 2$, so the first one is for odd index and the second for even index. ...
3
votes
0answers
172 views

On Ж, and the fine-structure constant

I'm trying to reproduce the results from a certain infamous paper that has been moving around the web for the last few days. The details are irrelevant. This paper claims to have a closed-form ...
-1
votes
2answers
61 views

Please help me get the ratio of x to y [closed]

I need the ratio of x to y in this equation: sum [n*(x/10)^n/10^(n-2)] == y from n=1 to ∞ Thank you!