Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
121 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
141 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
237 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
114 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
94 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
75 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
130 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
58 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
303 views

Incorrect value of infinite sum

Wolfram Alpha and Mathematica give an incorrect result (numerically) for the following infinite sum: ...
2
votes
2answers
198 views

Triple series - evaluation delayed

Trying to figure out if the infinite triple series has a nice closed form. It seems Mathematica is unable to help us here. Numerically, things remain the same, no response. Could you help? ...
1
vote
1answer
117 views

Module that finds the sum of digits of any given positive integer

How can I make a module that finds the sum of digits of any given positive integer? I use this command F[x_]:= Apply[ Plus, IntegerDigits[x] ] Is there another ...
4
votes
1answer
214 views

Summation with jump indices like 1,4,6,9?

I is easy to enter $ \sum_{s=1}^{n}k(s) $ But how can I enter $ \sum_{s=1,3}k(s) $ ? When I try it, Mathematica says ...
2
votes
2answers
115 views

Plot with sum and binomial command

A few days ago I asked about a problem with plotting a sum. You advise me to use Evaluate option, and that helped me very. But now I have a very similar problem, but i can't find the mistake. I have a ...
2
votes
1answer
139 views

Reproducing a Plot done with WolframAlpha [duplicate]

I have problem to draw in Mathematica a plot like this: Plot[{Sum[a^10*(-1)^(x-a), {a, 1, x}]}, {x, 1, 10}] The problem is that on the plot there is no graph. As ...
2
votes
1answer
94 views

Evaluating terms in series

I'm trying to evaluate a simple expression: Subscript[λ, n] = (2 n - 1) π/(2 L); And then sum it up: ...
1
vote
2answers
196 views
1
vote
1answer
89 views

Plotting a sum as a function of its upper bound

Apologies if this is easy to find in the documentation, but is there a quick way of doing the following up to any given 'n'? ...
1
vote
1answer
440 views

Solving a nonlinear system of recurrence equations

I am having two problems regarding Mathematica, and both of them are happening because it does not accept such inputs: ...
3
votes
1answer
251 views

Von Mangoldt function

Can anybody evaluate the following sum for me $$ \sum\limits_{n=2}^\infty(-1)^n\left(\frac{\psi(n)}{n}-\frac{\Lambda(n)}{2n}\right) $$ where $\psi(n)$ is the Chebyshev function and $\Lambda(n)$ is ...
0
votes
0answers
230 views

Hurwitz-Lerch transcendent

I want to compute the following sum over primes: $$\sum\limits_{p \text{ prime}}\sum\limits_{k=1}^\infty(\log(p^k))\left(\frac{1}{2p^k} - \Phi[-1,1,p^k]\right),$$ where $\Phi[z,s,a]$ is the ...
4
votes
2answers
430 views

Problems with Symbolic summation over unknown values

I'm having some real trouble with Mathematica wrongly evaluating various symbolic sums at the moment. I have this function: $$h_{ij}(x) = ...
2
votes
0answers
111 views

Double sum over primes [duplicate]

Can anyone tell me the value of the sum $$\sum_{p\in \mathcal{P}}\sum_{n=1}^{\infty}\frac{\log (p^n)}{2}\left[\,p^{-n}-\psi\left(\frac{p^n+2}{2}\right)+\psi\left(\frac{p^n+1}{2}\right)\right].$$ ...
0
votes
1answer
180 views

Why does Mathematica find a form for this general sum, but not for some special cases?

Today I found a Sum which Mathematica will simplify for a general parameter value $\nu$, but which will not simplify fully for special cases $\nu = 1, 3, ...$ despite the fact that the general answer ...
0
votes
1answer
151 views

Constraint on variables in summation

Is it possible to have a constraint on variables in summation of series just similar to pattern constraint e.g. ...
4
votes
3answers
170 views

Long waiting time for computing a summation

It takes a long time to compute the summation below, and I'd like to know if there are alternative ways to compute things faster. When replacing $15$ by $\infty$, then I should get $3^{1/3}$. I need ...
1
vote
1answer
203 views

function returning 0

Why is my function returning 0? ...
-2
votes
1answer
38 views

a basic question about getting the value of a parameter [closed]

i am new with Mathematica. i am trying to write a simple code. for example: phiu = 2 Yfu = (phi_u/(phi_u + 17.18)) but when i run it, it gives me (phi_u/(phi_u ...
7
votes
2answers
296 views

Find asymptotics of Sum[2^i*Binomial[n-i-1,2*n/3-1],{i,0,n/3}]

I have an expression 2^n / Sum[ 2^i Binomial[ n - i - 1, 2n/3 - 1], { i, 0, n/3}] ...
0
votes
2answers
110 views

Summation limits [closed]

The Sum is a built-in function in Mathematica, so the summation limits must be assigned. What I need to know is how to use a value computed in a separate ...
8
votes
5answers
2k views

Sum all numbers from 1 to 1000 divided by either 2,3,5 or 7

How do I find the sum all numbers from 1 to 1000 divided by atleast one of 2,3,5 or 7? EDIT: I am sorry for complicating this, but I need it to work for 10^11. So anything that requires too much heap ...
10
votes
5answers
540 views

Double series over primes

I'm very curious if the following double series over primes has a closed form: $$\sum_{k \in \mathcal{P}}\sum_{n \in \mathcal{P}}\frac{1}{k\;n(k+n)^2}$$ where $\mathcal{P}$ denotes the set of all ...
2
votes
2answers
430 views

A faster way to do sums?

I found out that,it is INCREDIBLY(like 100 times) faster to use Dot instead of Sum,to perform long sums. But I have not been ...
7
votes
1answer
92 views

Bug in GeneratingFunction?

According to the documentation GeneratingFunction[a[n],n,x]==Sum[a[n]x^n,{n,0,Infinity}] However, for $a_n=1/(n+2)$ I obtain ...
6
votes
1answer
226 views

Summa package problem

I need to use the features of the Summa package but it doesn't work in Mathematica 9. It gives the error Cannot open Utilities`FilterOptions` My question is: ...
3
votes
2answers
249 views

Simplifying expressions involving Sum

I am trying to use Mathematica to simplify a symbolic expression involving Sum. Particularly, I define a sum via ...
0
votes
1answer
213 views

Why does the evaluation of this series fail?

The following series expression holds: ...
2
votes
2answers
108 views

Automatically generated summation region

In a multiple Sum I need to put an automatically generated summation region. But when I generate the summation region automatically I get a list whose elements are ...
4
votes
2answers
568 views

Can I define a function for vectors of arbitrary dimension?

Is it possible to do analytic calculations with Mathematica? For example, I want to compute: $$\partial \frac{\sum_{j=1}^n G_{j} \prod_{k=1}^{j-1} (1 - G_{k})}{\partial G_l}=-\prod_{k\neq l} ...
3
votes
2answers
771 views

Sum over all permutations

I have n variables and a function that has all of them as variables. n-3 of them in terms of the entries of two lists. The possible entries in the lists $\alpha$ and $\beta$ range from {2,...n-2}. Now ...
9
votes
6answers
405 views

Performing Computations on Sets

I would like to find a permutation of $\quad S=\{\frac{1}{10}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{2}{3} \}\quad$ that maximizes the sum of theses elements raised to unique powers: ...
4
votes
3answers
355 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 ...
13
votes
1answer
242 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 ...
7
votes
2answers
2k 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 = ...
4
votes
2answers
183 views

Numerical sum does not give consistent results

Consider the function ...
4
votes
3answers
381 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 ...
5
votes
5answers
1k 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 ...
5
votes
2answers
152 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: ...
-5
votes
1answer
301 views

plotting an equation with double summations

Thank you so much for the helpful comments. Now able to manage to plot all the functions. ...
3
votes
1answer
318 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 ...