Tag Info

New answers tagged

2

Is it not just this? g[r_,θ_,ϕ_] := Sum[Sum[f[l, m] r^l SphericalHarmonicY[l, m, θ, ϕ], {m, -l, l}], {l, 0, ∞}]


0

Is this what you are looking for? Sum[Product[Sum[f@x, {x, 0, n}], {j, 1, i}], {i, 0, m}]


1

Here's the answer to your question, how Mathematica can give you a function wich calculates the sum for all combination of the parameters n, m, and z. And you almost have found it! Simply define the function a[n_, m_, z_] := Sum[(j + n - 2)!^2/((j + n - m - 1)!*(j - 1)!), {j, 1, z - n}] Now you can calculate the correct result of your example a[7, 4, ...


6

For n terms there are $2^{n-1}$ arrangements of signs of terms after first term. If the aim (for small n) is to display some examples of all sign arrangements for n-1 terms after first term then here is a way. There are doubtless much better ways. f[n_?Positive] := With[{t = Tuples[{-1, 1}, n - 1], s = Tuples[{"-", "+"}, n - 1], sq = HoldForm[#^2] ...


1

The first two sums should not be summed over $\lambda$; but since you've put them inside the double sum, Mathematica throws four copies of them in. Corrected code: RicciTensor[alpha_, beta_] := Sum[D[Γ[rho, beta, alpha], var[[rho]]] - D[Γ[rho, rho, alpha], var[[beta]]], {rho, 1, 4, 1}] + Sum[Γ[rho, rho, lambda] Γ[lambda, beta, alpha] - Γ[rho, ...


4

OK, with your new formula I'm able to give an incomplete answer now. The difficulty in implementing the forumla $$-\sum _{n=1}^{\infty } \frac{B_n(1) f^{(n-1)}(0)}{n!}$$ is how to symbolically compute the n-th derivative, which is discussed here. Use the solution in that post, we can easily obtain this: ramanujanSum[f_] := Block[{x, n}, FullSimplify[ ...


1

If you want to add formatting: Format[A[x_, y_]] := Subscript[A, ToString[x] <> ToString[y]] Sum[A[i, j], {i, 1, imax}, {j, 1, jmax}]


2

It happens quite often that compilation of a correctly running Mathematica function for some or other reason fails. The reason for that is not always easy to trace. After some testing I feel that the problem you ran into is close to a bug. First let us further simplify your problem, showing the same warnings: fc=Compile[{}, Block[{mat}, mat=Array[1&, ...


0

Try to read this. I used the package some time ago and it works quite nicely.



Top 50 recent answers are included