Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [summation]

Questions using the Sum command, especially for series and other algebraic objects, and related functions such as SumConvergence

1
vote
1answer
57 views

Plotting double series

I am new and hoping a warm welcome from this platform. I am trying to plot the graph of double series in one variable $$ \sum_{k=0}^{\infty} \sum_{j=0}^{\infty} C_{k,j} \exp(- 3^k 1.5^{j} x)$$ ...
0
votes
1answer
46 views

Replace constant in summation function using replace or If or /

Hi i how do i replace constant for k in this summation. For following: Even 2*n Even replace k by a Even 2*n+1 Odd replace k by b Here is the code ...
1
vote
0answers
71 views

Finding general forms of sums in Mathematica

A general form can be obtained for some sums with binomial coefficients. Mathematica is able to find these general forms for some of the simplest sums. For others the output contains for instance ...
2
votes
2answers
44 views

Is it possible to make a series read a separately defined set of values?

I would like to plot a function with a sum in it. Here is the function: $$v(k) = \sum_{j=1}^k \frac{v_E \cdot m_j \cdot c}{m_j(1-c)+\sum_{i=j+1}^n m_i} $$ As you can see, the problem is that I have ...
0
votes
1answer
38 views

using Apply to get iterated Sum

Suppose I want to sum a function, $f(\{m_a\})$, of several variables, $m_a$, $a=1,..,n$, which run over ranges, $1,...,k[[a]]$, however, I do not know $n$ in advance. I thought I could do this using `...
0
votes
3answers
79 views

Subscripted variables with changing subscript

When I want to sum over indexed variables, indices being subscripts, the result works as expected, however, upon loading the Notation package, it doesn't. See below As one might have expected from ...
0
votes
0answers
49 views

Summation involving 2F2 hypergeometric function

Trying to simplify the following sum: $$ \sum_{i=0}^n\frac{z^i}{(n-i)!}\,\frac{1}{(1+a)_i\,(1-a)_i}\sum_{j=0}^i(-1+a)_j\,(-1-a)_j\frac{(-z)^j}{j!}, $$ where $n=1,2,\ldots$, $z>0$, $0<a<1$, ...
2
votes
3answers
146 views

Force a sum to be simplified

I want to force this sum to be simplified to 1 Sum[Cos[(Pi*l*(2*m + 1))/(n + 1)], {l, 0, n}] Only DiscretePlot3D gives the correct result showing all point to 1
2
votes
1answer
124 views

Einstein summation convention for symbolic vector calculus

I am trying to do some vector calculus in Mathematica in index notation form because it gives a clear result that can be compared to pen and paper calculations. Since there is no built in Einstein ...
-4
votes
2answers
75 views

Wolfram|Alpha not able to graph sum_(n=0)^∞ (-(ExpIntegralE[-n, (-1 + n) Log[x]] Log[x]^(1 + n))"? [closed]

I know for a fact that nothing in my expression is wrong, then why cant Wolfram|Alph graph: sum_(n=0)^∞ (-(ExpIntegralE[-n, (-1 + n) Log[x]] Log[x]^(1 + n))) ? ...
2
votes
5answers
145 views

Calculating the Dottie number using an infinite series

The Dottie number is the solution to the equation $\cos(x) = x$ It is approximately equal to $0.739085133215160641655312.$ This number can be expressed analytically in the following form (see this ...
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
31 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
47 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 ...
6
votes
2answers
735 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: ...
1
vote
3answers
109 views

Handling cases of cross terms for multi-sums

I have expressions consisting of many multi-sums and I would like to extract cross terms out of them. Consider a simple example: $$ \sum_{m_1=1}^M \sum_{m_2=1}^M \sum_{m_3=1}^M \sum_{m_4=1}^M (x_{m_1}...
2
votes
1answer
99 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
59 views

Evaluating a summation while suppressing zero raised to a negative power

I want to compute the following multiple summation. ...
1
vote
2answers
55 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. ...
0
votes
2answers
232 views
1
vote
3answers
128 views

Simplify Kronecker Delta expression

How to obtain Kronecker delta summation rule using Wolfram Mathematica: $$ \delta_{ij}\delta_{jk}=\delta_{ik} $$ The following code does not produce the result. ...
0
votes
0answers
63 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
28 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 ...
4
votes
1answer
91 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
205 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 ...
1
vote
1answer
64 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
66 views

Product within a sum [closed]

How would I input the following sum into Mathematica?
0
votes
2answers
49 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 = ...
3
votes
0answers
33 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 ...
2
votes
2answers
129 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
55 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
62 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
75 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
136 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)}$$ ...
0
votes
0answers
28 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
33 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
66 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
44 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. ...
0
votes
2answers
63 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: ...
0
votes
0answers
47 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
255 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
64 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
103 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 ...
11
votes
0answers
92 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 ...
1
vote
2answers
73 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 ...
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
128 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 ...