The summation tag has no wiki summary.
13
votes
1answer
191 views
Baffling increase in runtime
Background of my question
I discovered Project Euler today, and decided I would work through the problems in Mathematica. I became obsessed with the first problem, which is essentially "sum all the ...
12
votes
2answers
286 views
Sum or Product with Exclusions
Is there a built-in feature for handling things like:
$$\sum_{i=0}_{i\ne j}^n\frac{a-a_i}{a_i-a_j}$$
and
$$\prod_{i=0}_{i\ne j}^n\frac{a-a_i}{a_i-a_j}$$
or should I work out some sort of ...
10
votes
4answers
379 views
how to differentiate formally?
I have been wrapping my head around this for a while now and I have not found a solution so far.
I want to work with an arbitrary number of variables in mathematica and use some built in functions.
...
6
votes
2answers
142 views
How do you put conditions on indices in a sum?
I'm relatively inexperienced with mathematica, so I apologize if this is a trivial question. I want to take a double sum over a function $f(i,j)$ of two indices, of the form
$$
\sum_{i = ...
5
votes
5answers
188 views
Performing Computations on Sets
I would like to find the permutation of $S=\{\frac{1}{10}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{2}{3} \}$ that maximizes the sum of theses elements raised to unique powers $\{0,1,2,3,4\}$. I ...
5
votes
3answers
358 views
Ways to compute inner products of tensors
One way to evaluate the following sums is combining Table and Sum:
$u_{abcd} = \sum_{e=1}^3 v_{aeb}w_{ced}$
$q_{ab} = \sum_{d,e=1}^3 v_{d e a}w_{deb}$
It will look like
...
5
votes
1answer
160 views
Problem with creating a large list of tuples
This is a follow-up question from Sum of Multinomial Coefficients
I have thought about the meaning of the formula I mentioned and, with help, I implemented the following code:
...
5
votes
1answer
111 views
Summing tensors in mathematica
How do I perform the following summation in mathematica?
\begin{equation}
\Sigma_{m=1}^5 e_{ijklm}A^{mn}
\end{equation}
I have the $e_{ijklm}$ tensor of rank 5 in 5 dimension as a array and $A^{mn}$ ...
4
votes
2answers
188 views
What causes this strange convergent sum?
N[Sum[1/(x^2 + 1), {x, 1, Infinity}], 5]
N[Sum[1/(x^2 + x + 1), {x, 1, Infinity}], 5]
1.0767
0.79815 + 0.*10^-6 I
What causes the strange number?
4
votes
3answers
302 views
Why the difference?
When I do the double sum using the sigma notation I get
$$1 + \sum_{n=0}^{\infty}\sum_{k = n}^{\infty} \frac{1}{(k+2)k!}$$
$1 + e - \cosh[1]$
When I do the sums as below, I get the expected ...
4
votes
2answers
109 views
4
votes
2answers
122 views
Speed up plot of $\sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$
I'm a beginner at Mathematica. I would like to plot the following function:
$${n\over2} \sum_{j\ge1} 2^{-j}(1-2^{-j})^{n-1}$$
However the following code is just too slow:
...
3
votes
3answers
219 views
How to sum over a List
list = {11.5575, 11.397, 5.52734, 4.0878, 2.54815, 1.86652, 2.55028,
2.14952, 1.6242, 1.34117}
I have a list of numbers. How do I make a function that creates a ...
3
votes
3answers
213 views
Sum of Multinomial Coefficients
Basically, I want to write a function to compute the following sum
$f(m,L):=\sum_{0\leq k_1,\cdots, k_n\leq m} \binom{m}{k_1,k_2,\cdots k_n}$ and $\mathrm{supp}(k)=L \subseteq \left \{ 1,...,n \right ...
3
votes
2answers
113 views
Summation with constraints
I am trying to do the summation shown below,
$\sum_{i_1=0}^{imax_1} \sum_{i_2=0}^{imax_2} \dots \sum_{i_k=0}^{imax_k} f(i_1,\dots,i_k)$
$k$ is a variable. Therefore $i$ and $imax$ are defined as ...
3
votes
1answer
133 views
Sum of positive terms gives negative answer
Mathematica evaluates Sum[((n - y - 1)*(n - y)^2*n^y)/y!, {y, 0, n - 2}] as -2 e^n n. This should not be a negative value. ...
2
votes
2answers
214 views
Efficiently compute double sum
Is there a "Mathematica Way", like Map or Apply to compute the following double sum?
$\sum_{i=1}^{N_1}\sum_{j=1}^{N_2} m_i n_j \, f(\tau_{i} \gamma_{j})$
I have already stored the lists ...
2
votes
1answer
118 views
Sum and NSum gives different solutions
I'm working on a Mathematica lab for Calc. 2, and I ran into a problem last night. I was trying to calculate the midpoint approximation of the definite integral of ...
2
votes
1answer
94 views
How to evaluate the sum over a hyperplane
I have difficulties in evaluating the following expression:
$$\sum_{\small n_1+...+n_{k}=m-k}\; \prod_{i=1}^{k}\frac{1}{(n_i+1)(n_i+2)}$$
I have tried the function ...
2
votes
1answer
275 views
Mathematica 9 behavior with derivative of a sum
In:
D[Sum[Sin[x],x],x]
D[Sum[f[x],x],x]
Out:
1/2 Cos[1/2 (-1 - Pi + 2 x)] Csc[1/2]
0
Function f is undefined, but Mathematica 9 counts it as constant?
...
2
votes
1answer
145 views
Can we give Mathematica hints for symbolic sums and products?
I have this question at MO and I would like to know if we can give hints to get the symbolic sums and products to come out as $\frac{6}{\pi^{2}}\pm\epsilon$ instead of $0.60792710...$ accurate to ...
1
vote
1answer
113 views
Summation of If statements
The following made me curious. Suppose you want to sum the if statement If[x[i] < 1., x[i]^2, 0.] over i=1,2, i.e.
...
1
vote
2answers
174 views
Adding multiple Complex Numbers in Euler form
Say I have a series of $n$ complex numbers of the form $A_k e^{(I \ \theta_k x)} $ where $A_k$ is a real number and so is $\theta_k$ and $k$ runs from $1$ to $n$. $x$ is an algebraic symbol.
...
0
votes
0answers
112 views
Why wolframalpha.com can be more powerful than Mathematica sometimes? [closed]
I wanted to determine whether the infinite series of $u_n=(\sqrt{n+1}-\sqrt{n})^{\frac{1}{2}}\ln{\frac{n-1}{n+1}}$ converges.
...
0
votes
0answers
57 views
Why this Wolfram summation gives indeterminate answer on their online interpreter? [closed]
summation([//math:(n^n+n*n)//],[//math:-1//],[//math:2//]) Shouldn't it be 11?
See:
...
0
votes
0answers
144 views
Collapse a Sum / factor an element out of a sum
I am trying to get something in the form of a $\Sigma (\dots) * \alpha_i = (\dots)$ from the output of the code below. The thing is that I cannot figure out how to tell Mathematica to "collapse" down ...
-5
votes
1answer
204 views
plotting an equation with double summations
Thank you so much for the helpful comments. Now able to manage to plot all the functions.
...
