Tag Info

Hot answers tagged

11

Having experienced similar problematic issues with Mathematica I instantly thought that expanding the fraction in the integrand i.e. applying Appart could resolve the problem, and indeed it does: Integrate[ Apart[(1 - x)(1 + 2x)^6/Sqrt[1 - x^2]], {x, -1, 1}]/Pi 15 These arguments apply to this case as well Bug in mathematica analytic integration? i.e. ...


7

You don't need to use TagSetDelayed for the definition of the derivative because Derivative doesn't have attribute Protected. I'll extend add the derivative definition to arbitrary order n: ClearAll[ln]; Derivative[n_, 0][ln][x_, a_] := Derivative[n][Log][x] ln[x_, a_?NumericQ] := Piecewise[{{Log[x], Re[a] > 0}, {-Log[1/x], True}}] ln[x, -1/2] ...


6

If I understand the goal of the question correctly, this is a possible application for the new Inactivate and Activate. Looking in particular at the documentation for Inactive, under "Applications," you'll find many situations that look similar to the one in this question. For example, you can enter a valid expression in the form Inactivate[(x y)^2] ...


5

The sorting (ordering) done by Union is different for different forms of expressions, e.g., analytic versus numeric expressions for a number. Union[{2., (Sqrt[5] + 1)/2}] {2., 1/2 (1 + Sqrt[5])} % // N {2., 1.61803} Union[{2., (Sqrt[5] + 1.0)/2}] {1.61803, 2.} SortBy[{2., (Sqrt[5] + 1)/2}, N] {1/2 (1 + Sqrt[5]), 2.}


3

I agree that it's a bit odd that Mathematica doesn't simplify these expressions with its built-in functions, especially in the symbolic tensor language (i.e. using TensorContract and TensorReduce). Nonetheless, we can teach it how to simplify the identity matrix ourselves. I've chosen to implement this for Dot, since that is what you initially asked. I do ...


2

Using the identity: $$\Phi (z,s,a)=\frac{\Phi (z,s,a-1)-\left((a-1)^2\right)^{-s/2}}{z}$$ First we define two recursive functions: rGexp[0] = -1/4 (Pi^2 - 6 Log[2]^2)/3; rGexp[n_] := 1/2 rGexp[n - 1] rlp[0] = LerchPhi[1/2, 2, 0]; rlp[n_] := 1/2 rlp[n + 1] + 1/(n)^2 Then we add them: rSeq[n_] := rlp[-n] + rGexp[n] Simplify@Table[rSeq[n], {n, 1, 10}] ...


1

Thanks for updating your Question. With the new, clearer example I believe I can see the issue. Analysis The first method uses evenper on Symbolic values that are in canonical order: r1 = evenper[{a, b, c, d}] {{a, b, c, d}, {a, c, d, b}, {a, d, b, c}, {b, a, d, c}, {b, c, a, d}, {b, d, c, a}, {c, a, b, d}, {c, b, d, a}, {c, d, a, b}, {d, a, c, b}, ...


1

Main The bug cannot only be attributed to the Sqrt in the integrand. It is trickier. In fact, define for t=0,1,2,... f[t_] := Integrate[(1 - x)*(1 + 2*x)^t/Sqrt[1 - x^2], {x, -1, 1}]/Pi Then {#, f[#]} & /@ {0, 1, 2, 3, 4, 5, 6, 7, 8} (* Out[33]= {{0, 1}, {1, 0}, {2, 1}, {3, 1}, {4, 3}, {5, 6}, {6, ( 1 + (29 \[Pi])/2)/\[Pi]}, {7, (1 + (71 ...



Only top voted, non community-wiki answers of a minimum length are eligible