Tag Info

New answers tagged

0

When defining piecewise functions in Mathematica, If etc. is often less robust compared to Piecewise, and your problem is exactly the case. With PiecewiseExpand, one can easily translate If into Piecewise: With[{mid = PiecewiseExpand@If[k != m, x^k/((k - m) k!), 0], mid2 = Rationalize[0.5772156649, 0]}, EI[m_, x_] := x^m/m! (mid2 + Log[x] - ...


4

With infinite sums, the summand is evaluated. Since Q functions always return True or False, EvenQ[x] evaluates to False since x is not an even integer. You can use Mod instead and everything works fine for your examples. Sum[x/x! Boole[Mod[x,2] == 0], {x, 1, Infinity}] // FullSimplify Sinh[1]


2

look at: Sum[(x/x!) Boole[EvenQ[x]], {x, 1, Infinity}] // Trace the function Sum (in the case of infinity Sum) try to organize its argument which result in some evaluation. in this case, Boole[EvenQ[x]] evaluated to 0 because EvenQ[x] evaluated to False.


1

You are most likely hitting this problem because choose is not defined to be a numerical quantity. NSum requires a summation where each part evaluates to something numerical, not algebraic. Deleting the choose gives a result: In[1]:= NSum[((50000 - x) x)*(1/3^15)^ x*((3^15 - x)/3^15)^(50000 - x), {x, 1, 4}] Out[1]= 0.0034724 EDIT Based on the ...


0

Sum[f[n, m], {n, 3}, {m, n + 1, 3}] + Sum[f[n, m], {n, 3}, {m, 1, n - 1}]


2

Try also this: Sum[f[n, m] /. f[__] /; m == n -> 0, {n, 1, 3}, {m, 1, 3}] (* f[1, 2] + f[1, 3] + f[2, 1] + f[2, 3] + f[3, 1] + f[3, 2] *) The advantage is that if f[n,n]is divergent, Mma does not complain.


0

if the expression is not evaluated inside the Sum then you can try: DeleteCases[Sum[f[n, m], {n, 1, 3}, {m, 1, 3}], f[i_, i_]] (*f[1, 2] + f[1, 3] + f[2, 1] + f[2, 3] + f[3, 1] + f[3, 2]*) if the expression is evaluated then try: ind = DeleteCases[Tuples[Range[3], 2], {i_, i_}]; Total[f[#, #2] & @@@ ind] (*f[1, 2] + f[1, 3] + f[2, 1] + f[2, 3] + f[3, ...


1

I compared this with Maple 18.02, both on windows 7, 64 bit. Maple symbolic and numerical both give the same result, which is 65.23200003. Maple symbolic result does not appear the same as Mathematica symbolic only result. Maple uses special function LegendreP in its symbolic result. Compare: Maple symbolic only result: restart; r:=sum(binomial(n, 2*k - ...


3

The problem is the symbolic Sum is assuming n/2 ∈ Integers && n >= 2. We can see this with the option GenerateConditions -> True: Sum[Binomial[n, 2 k - 1] a^(n - 2 k + 1) b^(2 k - 1), {k, 1, n/2}, GenerateConditions -> True] ConditionalExpression[1/2 a^n (((a + b)/a)^n - (-1 + b/a)^n), n/2 ∈ Integers && n >= 2] A fix ...


2

comment with figures.. The issue can be illustrated more simply looking at this: Sum[ i , {i, 1, n/2}] Sum[ i , {i, 1, 3/2}] Sum[ i , {i, 1, Floor[n/2]}] /. n -> 3 Sum[ i , {i, 1, Ceiling[n/2]}] /. n -> 3 Sum[ i , {i, 1, n/2}] /. n -> 3 1/8 n (2 + n) 1 1 3 15/8 Show[{ ListPlot[ Table[ {n, Sum[ i , {i, 1, ...



Top 50 recent answers are included