Tag Info

New answers tagged

2

Using the Zeta function you can calculate arbitrary expression like in your example. g = 24 Zeta [-1 ] + 12 Zeta [-2] (* -2 *)


4

From solution provided by kirma to your previous question Sum[24 n + 12 n^2, {n, 1, Infinity}, Regularization -> "Dirichlet"] (* -2 *) From solution provided by xzczd to your previous question ramanujanSum[f_] := Block[{x, n}, FullSimplify[-Sum[ BernoulliB[n, 1]/n SeriesCoefficient[ f[x], {x, 0, n - 1}], {n, \[Infinity]}], n >= ...


3

As noted, what you want is to use a Gröbner basis to eliminate the parameter: curve = 2 {t (3 t^4 + 50 t^2 - 33), 7 t^6 - 60 t^4 + 15 t^2 + 2}/(t^2 + 1)^3; implicit = GroebnerBasis[Thread[{x, y} == curve], {x, y}, t] // First 550731776 - 41620992 x^2 + 585816 x^4 + 625 x^6 - 182250 x^4 y - 41620992 y^2 + 1171632 x^2 y^2 + 1875 x^4 y^2 + 364500 x^2 y^3 ...


3

Okay, sometimes you get so involved in an idea that you don't realize how foolish it is. I was fooled or seduced by the simplicity of the Chebyshev expansion. Basically, my original answer was a complicated way to do this: cosEq = 64 x^7 - 112 x^5 - 8 x^4 + 56 x^3 + 8 x^2 - 7 x - 1 /. x -> Cos[Pi t] //TrigToExp; t /. Solve[cosEq == 0 && 0 <= ...


1

As a recurrence: ComputePoly[{}] := 1; ComputePoly[{0}] := x1 ComputePoly[{1}] := x2 ComputePoly[l_List] := ComputePoly[l[[1 ;; 1]]]*ComputePoly[Rest@l] ComputePoly[{0, 1, 0, 1, 1, 1, 1}] (* x1^2 x2^5 *) Of course different recurrence relationships need different implementations. As you don't mention your actual one it's very difficult to provide more ...


0

The Need I found a solution for the problem, but first since people here asked why would there be a need I'll elaborate about my need. In my case I defined and inner product which is supposed to work act both on vectors and scalars (scalars are just coteries with unit length). Since I wanted the definition to general for other cases as well I didn't want ...


1

I slightly modified the set partition code from the book Computational Discrete Mathematics by Pemmaraju and Skiena. kSetPartitions[{}, 0] := {{}} kSetPartitions[s_List, 0] := {} kSetPartitions[s_List, k_Integer] := {} /; (k > Length[s]) kSetPartitions[s_List, k_Integer] := {Map[{#} &, s]} /; (k === Length[s]) kSetPartitions[s_List, k_Integer] := ...


0

Some people (see The ubiquitous Kronecker product by Van Loan) have worked on finding two matrices $A, B$ of specified size whose tensor product $A \otimes B$ is closest (in a norm) to a given (larger) matrix $C$. That is, find $A, B$ which minimize $||C-A \otimes B||$. The algorithm is based on the SVD. There is a matlab implementation somewhere. It would ...


9

There is another option, using the relatively new tensor capabilities of Mathematica. This is pretty much copied from another answer by jose, but I don't need any assumptions here: TensorExpand[KroneckerProduct[X, X] + KroneckerProduct[-X, X]] (* ==> 0 *) TensorExpand[KroneckerProduct[2 X, 3 Y]] (* ==> 6 KroneckerProduct[X, Y] *) There is a ...


3

How about: av = Array[Subscript[a, ##] &, {2}]; bv = Array[Subscript[b, ##] &, {2}]; KroneckerProduct[av, bv] + KroneckerProduct[-av, bv] {{0, 0}, {0, 0}}


1

Second update -- I should state in simplest terms the issue the OP is facing. The set-up. The equations for a given a are eqs = Table[Power[Sqrt[λ2/(μ2 c2)], n] p[0, n + 1] == β[n] p[0, 0] + Sum[α[n, k] p[0, k], {k, 0, a}] /. NumVal, {n, 0, a - 1}]; All the variables involved in eqs are given by vars = Table[p[0, n], {n, 0, a}]; (* starts ...


5

We will go by solving one equation at a time and generating the corresponding replacement rules. Beware of possible numerical instabilities. The following is the equivalence between the code in your edited example and my code on the previous incarnation of this answer. I think this is enough for you to use it. Please note that the only claim on the ...


1

Just another way to calculate volume of hypersphere and then relevant probability using recursion: vs[n_] := Most@Nest[{#[[2]]/(#[[3]] + 1), 2 Pi #[[1]], #[[3]] + 1} &, {1, 2, 0}, n] v[n_] := vs[n][[1]] The probabilities: Grid[Prepend[{#1, #2, N@#2} & @@@ ({#, v[#]/2^#} & /@ Range[10]), Style[#, Bold] & /@ {"n", ...


2

If I understand the question properly, you would like to differentiate the expression f = Sum[c[k] Exp[-(a - t[k])^2], {k, kmax}] with respect to t[n], where n is an integer between 1 and kmax, to obtain (* 2 E^-(a - t[n])^2 c[n] (a - t[n]) *) Almost certainly, a similar question has been raised before, but I cannot find it now. In any case, the ...


3

Perhaps what you are looking for is: A = {{2, -1, 0}, {-1, 2, -1}, {0, -1, 1}}; Integrate[Exp[(-x . A . x)/2], x ∈ FullRegion[3]] 2 Sqrt[2] π^(3/2)



Top 50 recent answers are included