The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
61 views

Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
0
votes
0answers
40 views

Regarding Cycles and Lists of Functions

So, I'm trying to determine the Normal Matrix of a Least Squares Aproximation; I have a basis constituted by 8 functions f1,f2...f8; I have 9 points which constitute Datax = {x1,x2...x9} Now, I ...
1
vote
2answers
65 views

Infinite sums with Boole and EvenQ

Suppose I am interested in a sum across a set of even numbers, such as: Sum[x, {x, 2, 20, 2}] 110 or ...
0
votes
1answer
22 views

Error with numerical summation - how to specify “n choose r”?

I'm trying to do the following sum: NSum[((50000 - x) choose x)*(1/3^15)^x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}] But I keep getting an error saying: ...
0
votes
3answers
63 views

how to remove the divergent term from the summation?

I am doing the summation over two indices: m and n Suppose I want to remove those terms from the summation which has m==n, what ...
1
vote
0answers
71 views

Summing the probability distribution to 1 to convince myself

I have worked out a probability distribution and want to check its sum which is necessarily 1. First we write $$ r \triangleq \frac{(2 \lambda + \mu)^2}{2(\mu + \lambda)^2}, \quad s \triangleq ...
3
votes
5answers
106 views

Symbolic versus numeric sum (is there an inconsistency?)

Something seems to have gone awry with the analytic sum (v9.0.1). Here I insert specific values: ...
0
votes
0answers
47 views

More on performance of Sum[]

There is an interesting discussion on performance of Sum[] in this question. I actually wanted to reproduce findings from this answer. So, I entered: ...
0
votes
2answers
43 views

Dynamic nested sum

I would like to dynamically create nested sums with a dynamic number of parameters aswell. We do know the number of variables. Lets say we have 3 Variables with S being an array: $$ i=(1,\dots,m), ...
5
votes
3answers
237 views

The speed of Sum[] varies strangely

I was curious about the difference in speed between Total and Sum. I found out Total was ...
2
votes
3answers
114 views

Skip certain values in a sum

How can I evaluate such a sum: $$ \sum_{j=0, j\neq10}^{J} f(j) $$ Since I am trying to do some symbolic calculations, solutions such as the one below are undesirable: $$ -f(10) + \sum_{j=0}^{J} ...
1
vote
2answers
32 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 ...
5
votes
3answers
147 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
1answer
88 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: ...
5
votes
2answers
65 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
66 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
123 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
123 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
100 views

Understanding Dirichlet regularization in Sum

I've tried to calculate few classic sums using Dirichlet regularization: ...
8
votes
2answers
180 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
75 views

How to evaluate sums that have 0^0 = 1

In my code: ...
1
vote
1answer
65 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
324 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
97 views

Collapsing summation

I am trying to write a command to collapse the sum of terms into an expression with summation. Something like ...
9
votes
2answers
182 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
61 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
90 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 ...
2
votes
1answer
146 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
93 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
117 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
114 views

Collect terms in a sum

Suppose I have this expression ...
0
votes
2answers
87 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
54 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
122 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
113 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
39 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
1answer
104 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
262 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
240 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
120 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
99 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
153 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
205 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
68 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
122 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
159 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
136 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
158 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
688 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 ...