Tag Info

Hot answers tagged

2

Perhaps this will work for you: MakeBoxes[Superscript[b_, x_, y__], form_] ^:= ToBoxes[Superscript[b, Row[{x, y}]], form] Example: Sum[Superscript[G, a, b], {a, 1, 2}, {b, 1, 2}] $G^{11}+G^{12}+G^{21}+G^{22}$


2

Update In a comment Oleksandr pointed out that the number of iterations may be having an effect. This is evident from running the following code: max = 10; qp = Table[Unique[{q, p}], {max}]; qpFlat = Flatten[qp]; eqn = totalenergy[qp, max]; ceqn = Compile[Evaluate[{#, _Real} & /@ qpFlat], Evaluate[eqn], "RuntimeOptions" -> ...


1

First of all correcting the sign in the exponential we get f2 = Integrate[ Exp[r^2/(2 M^2)] (b^2 - 3 r^2)^2 (Abs[b^2 + r^2] - (b^2 - r^2))/( r (r^2 - b^2)), {r, 0, I \[Infinity]}, Assumptions -> {M > 0, b > 0] (* Out[278]= 18 b^2 M^2 + 4 b^4 E^(b^2/(2 M^2)) ExpIntegralEi[-(b^2/(2 M^2))] *) Taking the pricipal value has no influence as ...


1

This can be a start: ClearAll[fun, $opsPatt]; $opsPatt = Alternatives @@ {Less, Greater, LessEqual, GreaterEqual, Equal, Unequal}; SetAttributes[fun, HoldAll]; fun[code_] := ReleaseHold[ Hold[code] //. { (head : $opsPatt)[x_, y_] :> COperator[head, {x, y}], HoldPattern[Set[lhs_, rhs_]] :> CAssign[lhs, rhs], ...



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