Tag Info

New answers tagged

0

There is this package from MathSource, which contains a number of similar packages. Various packages dealing with Lie groups have also been proposed over the years. Your mileage may vary.


0

$Version "10.0 for Mac OS X x86 (64-bit) (September 10, 2014)" $Assumptions = {a > 1}; Integrate[1/Sqrt[-1 + a^2*Sech[x]^2], {x, 0, ArcCosh[a]}] Pi/2 f[a_?NumericQ] := Module[ {ar = Rationalize[a, 0]}, NIntegrate[ 1/Sqrt[-1 + ar^2*Sech[x]^2], {x, 0, ArcCosh[ar]}, WorkingPrecision -> 20] // Chop] ...


2

It seems to be a branch cut issue. It depends when the substitution is done, that causes the integrator to go one way vs. the other. This below shows difference ClearAll[x, a]; sol = Integrate[1/Sqrt[-1 + a^2*Sech[x]^2], x] The integrand at x=0 is always zero, so we can ignore this, The issue is with the upper limit low = Limit[sol, x -> 0] (*0*) ...


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}, ...


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.}


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] ...


2

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 ...


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] ...


12

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. ...


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}] ...


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 ...



Top 50 recent answers are included