The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
57 views

Can I regroup terms into a sum?

Is there a way to regroup terms into a sum? I mean, for example, if I have the sequence $\quad \quad S_1 S_2 + S_2 S_3 + S_3 S_4 + S_4 S_5$ I would like to get the form $\quad \quad {\rm ...
1
vote
0answers
37 views

Is there a summation notation for the sum of products made two by two? [migrated]

I have the following expression: $$x_1x_2+x_1x_3+\dots+x_1x_n+x_2x_3+x_2x_4+x_2x_5+\dots+x_2x_n+\dots+x_{n-1}x_n$$
1
vote
1answer
67 views

Derivative of an expression containing a symbolic sum [duplicate]

Is there a general pattern for working with symbolic sums in Mathematica? For example here's a derivative I want to compute: ...
0
votes
0answers
27 views

a complicated Sum [migrated]

I don't know how i can calculate this complicated multivariate sum : $$ S(l,k)=\sum_{|m|=k} s_{l,m}=\sum_{|m|=k} l(l-1)(l-2)\dots(l-m+1) $$ Where $m=(m_1,\dots,m_n)$, $l=(l_1,\dots,l_n)$, and $k$ a ...
5
votes
2answers
54 views

Simplification due to recognition of dummy indices in sums?

Today I noticed something weird concerning implicit sums. Apparently, Mathematica cannot recognize dummy indices as such and simplify accordingly. Consider: ...
3
votes
1answer
65 views

Leave out a term when summing

I'm calculating the Madelung constant $$\alpha = -\sum_{n_1,n_2,n_3}{\frac{(-1)^{n_1+n_2+n_3}}{(n_1^2+n_2^2+n_3^2)^{1/2}}}$$ Where $n_1,n_2,n_3$ are any element in the integer domain and they can't ...
3
votes
1answer
114 views

How do I format Compile[] correctly?

My Mathematica skill is still rusty, so kindly bear with me. I'm having problem formatting expression to compile the function correctly: $\sum _{g=1}^G \sum ...
5
votes
1answer
109 views

Compile nested Sums

I want to compile an expressions that contains nested Sum-expressions. A simple example that gives me problems is: ...
4
votes
1answer
75 views

Understanding Dirichlet regularization in Sum

I've tried to calculate few classic sums using Dirichlet regularization: ...
8
votes
2answers
171 views

Error computing sum of sum of digits

I've defined a function that computes the sum of the base-b digits of n: DigitSum[n_, b_] := Total[IntegerDigits[n, b]] Then I defined a function that computes ...
1
vote
0answers
70 views

How to evaluate sums that have 0^0 = 1

In my code: ...
1
vote
1answer
54 views

How to factorise a variable out of an indefinite sum?

(I should start by saying I'm a total beginner with Mathematica, so if the answer needs code I'll need it spelled out quite clearly, the learning curve for this is proving steep!) Basically what I am ...
2
votes
3answers
265 views

Sum with Levi-Civita [duplicate]

I'm trying to write the expression $$\sum_{\alpha,\beta = 1}^{4}\epsilon_{\mu \nu\alpha\beta}a^{\nu} b^{\alpha} c^{\beta}$$ in Mathematica, where $\epsilon$ is the Levi-Civita symbol and $a$, $b$, $c$ ...
0
votes
2answers
93 views

Collapsing summation

I am trying to write a command to collapse the sum of terms into an expression with summation. Something like ...
8
votes
2answers
178 views

sudden increase in timing when summing over 250 entries

Using math 9.0.1 on a MacBook Air, I see a sudden increase of Timing by a factor of thousands when I sum over 250 elements of a matrix rather than over 249. So for ...
1
vote
1answer
57 views

How would one minimize with respect to an unknown number of variables?

Say I had a function like the following: f[n_] := Sum[a + Subscript[b, k], {k, 0, n}] Such that ...
0
votes
2answers
79 views

How can I speed up this code?

There are 4 variables in this multiple sum, and only 2 are used. This question has the similar scenario as the previous one How can I speed up this code with multiple sum?, but the calculation ...
1
vote
1answer
111 views

Problem with infinite sum

I am facing a problem in evaluating infinite sums of the following form. As a first thing define the following function ...
1
vote
2answers
89 views

Problem evaluating a complicated integral

Apologies for stating my problem poorly in the first instance, thank you for the help in narrowing down the issue. Problem For those interested, it's for the exact unbiased inverse of the ...
1
vote
1answer
103 views

Symbolic evaluation of the sum of KroneckerDelta

I want to evaluate this simple expression $$ \sum_n f(n)\delta_{mn} = f(m) $$ using this: Sum[KroneckerDelta[m, n] f[n], {n, Infinity}] However Mathematica ...
0
votes
0answers
30 views

How to calculate this derivative? [duplicate]

Can Mathematica do the following simple calculation? $$F(x_0, x_1, x_2, ...) \equiv \sum_n x_n^2$$ I want to do the symbolic calculation: $$ \frac{\partial F}{\partial x_m} = \sum_n 2 x_n ...
3
votes
1answer
100 views

Collect terms in a sum

Suppose I have this expression ...
0
votes
2answers
79 views

How do I sum up p items in a sequence?

I have the following sequence list = {p1, p2, p3, p4 ....} I am summing up the p items as follows: p1 + p2 + 2*sqrt (p21*p2) = p12 p12 + p3 + 2*sqrt (p12*p3) = p123 p123 + p4 + 2*sqrt (p123*p4) = ...
0
votes
0answers
49 views

Expectation taking unusually long to evaluate

I am trying to evaluate an expectation, but it is taking an extremely long time although the expression itself should not be too complicated. My code is ...
2
votes
1answer
116 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] = ...
1
vote
1answer
92 views

Simplify results further

I have an extremely long result in polynomial form following some matrix operations. However, given the symmetry of the problem, I can safely say that the solution will reduce much further than is ...
3
votes
1answer
34 views

Strange NSum behavior for slightly larger number of terms

For some sums, NSum gives me the result nicely for some number of terms, but if I add one more term, it suddenly becomes much slower. I haven't found the minimum example for which this can be ...
1
vote
2answers
100 views

Assign a Distribution to a group of symbolic variable [closed]

I'm looking to compute this Expectation : "i" represent a individual and h(i) is value. I would like the compute the Expected value of his value times the mean of the groups. Everything is unknown ...
5
votes
3answers
221 views

Numerical evaluation of a sum

I am trying to compute numerically NSum[(-1)^n/n^3, {n, 1, Infinity}]. Of course, using first Sum would work here, but often ...
3
votes
1answer
218 views

How can I speed up this code with multiple sum?

There are 4 variables in this multiple sum, therefore it may take a long time. I have run this program for 12 hours, but no result untill now. I want to know how to speed up this code. Any help or ...
2
votes
0answers
113 views

Computing a sum

I'm trying to make Mathematica compute this sum: Sum[(-1)^k (n - k)^2 Binomial[2 n, k], {k, 0, n}] As is, I get an awful formula: ...
1
vote
1answer
96 views

About doing an sum

I want to explain this summation to Mathematica, For $a >0$ define $n_u, n_d \in \mathbb{Z}$ such that if $\{ a \} \leq 0.5$ then $n_u = [a]-1$ and $n_d = - [a]$ and if $\{ a \} > 0.5$ then ...
4
votes
2answers
151 views

Solve a system of M equations without specifying M

This post has been edited heavily in response to the comments: my initial question was very confusing. I am trying to write my game-theoretic model in Wolfram Language. There is only one remaining ...
4
votes
1answer
157 views

Variable number of nested variable-range sums

I would like to express the following nested sum in Mathematica: $$ S(m,j,N) = \sum_{k_1=m+j-1}^{N-1} f(N,k_1) \sum_{k_2=m+j-2}^{k_1-1} f(k_1,k_2) \cdots \sum_{k_m=j}^{k_{m-1}-1} f(k_{m-1},k_m) $$ ...
1
vote
0answers
62 views

Summing a trig series

I am trying to sum the following expression: (Cos[(2 π m)/N]^2 Cos[(2 π n)/ N])/(2 (Cos[(2 m π)/N] - Cos[(2 n π)/N])) from ...
1
vote
2answers
115 views

Sum does not converge, but I think it should

Why does Mathematica return Sum::div: Sum does not converge. >> When I input Sum[Boole[!IntegerQ[x]], {x, 1, Infinity}] The sum is obviously 0.
6
votes
0answers
153 views

Incorrect evaluation for Thue-Morse signed harmonic series

I would like to evaluate $$s = 1 - \frac{1}{2} - \frac{1}{3} + \frac{1}{4} - \frac{1}{5} + \frac{1}{6}+\frac{1}{7}-\frac{1}{8} - ... + \frac{(-1)^{\textrm{binary digit sum}(n-1)}}{n} + ... $$ where ...
0
votes
2answers
110 views

What is wrong in my calculation with clebsch-gordan coefficients?

According to theory of angular momentum here must equal one. What's wrong? ...
2
votes
0answers
136 views

Faster Ways to compute recursive summation

It takes a long time to compute the summation below, and I'd like to know if there are some better ways to compute things faster. I have used $3$ ways to calculate, but they are very unsatisfactory. I ...
8
votes
6answers
684 views

Alternating sum

A frog is at the bottom of a 30 metre well. Each day it climbs 5 metres up the side, but it then slips back 3 metres each night. How long does it take to reach the top of the well? Is there an easier ...
0
votes
0answers
106 views

HypergeometricPFQ

I am trying to get a simple but relatively ugly result out of the following summation, however, mathematica gives me an expression which includes HypergeometricPFQ. Obviously, I am doing something ...
1
vote
1answer
90 views

Summation for a function having singularity

I need to do summation of this function with Mathematica. For[t=0,t<500,t++;Sum[-Q*Log[Q],{k,-Infinity,Infinity},{n,-Infinity,Infinity}]] Q= Q1+Q2+Q3 where ...
0
votes
0answers
56 views

Manipulating infinite series

If I type Sum[f[x],{x,m,Infinity}]-Sum[f[x],{x,m+3,Infinity}] I would like Mathematica to return something like ...
1
vote
1answer
86 views

How to assign Subscript[C, i] to a Sum?

What I want to show is: Plot3D[ Sum[1000*Subscript[C, i]^2/(1000*Subscript[C, i] - 600)^r, {i, 1, k}], {k, 1, 30}, {r, 0.1, 1.5}] And, I want the list of ...
1
vote
0answers
34 views

How do I define a tensor from another tensor with summations? [duplicate]

Let's say we have a rank 2 tensor $g_{ij}$. This is basically a list with a Depth of 2. Now I'd like to calculate another tensor ...
2
votes
1answer
118 views

Deriving least-squares equations in Mathematica

I define $Y = a + b*x + e$, and I want to find values for $a,b,$ by least squares, so I minimize $RSS = sum((Y_i - a - b*x_i)^2)$ I then take derivatives, ${d RSS \over da} = 0$ and ${d RSS \over db} ...
1
vote
1answer
131 views

How to define a summation with function calling itself?

I am new to Mathematica. I want to do this f(x)=summation f(t), summation is over t, where 1<=t<=x-1 and mod(x+1,t+1)=1, i.e. when x+1 is divided by t+1, remainder is 1 and f(1)=1. Should i use ...
-5
votes
1answer
217 views

How can I plot a function that is the sum of another function?

I plotted m[t], but actually what I want to plot is g[t], which is a summation of m[t] from ...
-3
votes
2answers
105 views

Find the value by using FindRoot command [closed]

The equation x^4-3 x^3 = cos(3x)+3 has two real solutions on the interval from -10 to 10. Lets call these two solutions r and s. Use Mathematica's FindRoot command to find r and s. Now let M equal the ...