The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
102 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
101 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
74 views

Understanding Dirichlet regularization in Sum

I've tried to calculate few classic sums using Dirichlet regularization: ...
7
votes
2answers
165 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
67 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
246 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
88 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
56 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
100 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
88 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
91 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
29 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
96 views

Collect terms in a sum

Suppose I have this expression ...
0
votes
2answers
78 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
47 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 ...
1
vote
1answer
109 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
85 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
32 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
214 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
214 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
112 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: ...
0
votes
1answer
95 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
148 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
144 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
113 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
152 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
102 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
131 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
679 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
100 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
87 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
84 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
117 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
128 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
207 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
99 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 ...
0
votes
2answers
92 views

Sum equation with equation and get an equation

I am trying to get an equation from summing other equations but it doesn't result in a correct answer. Is there another way of doing this? ...
2
votes
0answers
73 views

Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity]

I would like to show that the following (and other similar formulae) tends to zero. Limit[Sum[(2*E*n)^w/(w^(n/2+w)), {w,2,n}],n->Infinity] What's the right ...
1
vote
5answers
95 views

Question about sum and list in a function

I have a list of this form: $ lst =\left\{\left\{q_1,x_1,y_1,z_1\right\},\left\{q_2,x_2,y_2,z_2\right\},\text{...},\left\{q_n,x_n,y_n,z_n\right\}\right\} $ I want to use this list in the function: ...
2
votes
2answers
121 views

How to exclude numbers in a series and still plot the graph? [duplicate]

I want to plot this: $\displaystyle\sum_{n=-{10}\atop n\ne \pm 1}^{10} \dfrac {4i(-1)^{n}n}{(n^2 - 1)^2}e^{inx}$ but have no idea how I can exclude the cases for when $ n = \pm 1 $. I don't wish to ...
1
vote
0answers
52 views

Need to take infinite sum of residues, is there a way to choose the order of operations for ReleaseHold?

I'm computing an infinite sum of residues. I want to do something like this: ...
3
votes
2answers
289 views

Incorrect value of infinite sum

Wolfram Alpha and Mathematica give an incorrect result (numerically) for the following infinite sum: ...