jose
• Member for 8 years, 2 months
• Last seen this week
• Champaign, IL, United States

First of all, let's discuss why the answers are different: V[a] is a vector field, but V[{0, ch}] is a scalar field. Hence the operation cd[-b][V[{0, ch}]] is computing the covariant derivative of a ...

You have a product of a Basis[-c, {1, B}], for some basis B, and a CTensor[comps, {B}][c] object. You can use ContractBasis to force the contraction of a Basis[...] object with anything. Or you can ...

The different typesetting forms of Around are controlled via internal thresholds. The 0.123456(78) notation is only appropriate for cases in which the uncertainty is smaller than the (absolute value ...

An alternative to using SortBy[..., f] is to create a dedicated ordering function, which then can be used in any sorting operation. For example, let us write a WeekOrder function, from Monday to ...

I'd recommend to do the following. Keep this part of your code: << xActxTras ddim = 4; coords = {\[Tau][], r[], \[Theta][], \[Phi][]}; DefManifold[M4, ddim, {\[Alpha], \[Beta], \[Gamma], \[...

Does something like this work? expr /. cd[_][cd[_][phi[]]] -> 0 for your covariant derivative cd and scalar field phi. This will remove second-order derivatives, but third-order and higher-order ...

Here is a suggestion from group theory: We need to define an action on squares for the eight elements of DihedralGroup[4]. In general, it would be enough to define it for the two generators and then ...

Along the same lines of the answer by Daniel Huber, I think what you need here is this combination: RandomSymmetrizedArray[dims_, sym_, dist_] := Normal@ SymmetrizedArray[_ :> RandomVariate[dist], ...

There are a few things that can be improved here: Don't call {"Latitude", "Longitude"} separately in EntityValue. It's better to use the "Position" property, that ...

A possible way to rotate a map is to use the freedom provided by an oblique projection. Obliqueness adds the three degrees of freedom of a general 3D rotation, namely the {lat, lon} coordinates of the ...

GeoDistance is computing minimal distances between the polygons of the cities, and some cities are contiguous, i.e. their polygons are touching, so the result is zero. See the non-diagonal zeros in ...

xAct contains a full package dedicated to converting tensor expressions into LaTeX, called TexAct, and I'd recommend using that instead of the general TeXForm. For example, in your case: << xAct`...

Tensor simplification can be an expensive computation, so it is not performed automatically. You need to use TensorReduce on symbolic tensor expressions, like you would use Simplify in more general ...

A simple solution here is be to use the Geo functionality, in particular GeoArea, which can compute the area of any polygon on the surface of the sphere (or of an ellipsoid of revolution). There is ...

I'm not sure I'm interpreting correctly the question, but here is what I would do. This is for an arbitrary matrix $\Lambda$. First, construct the tensor product of the $\Lambda$ matrix and the \$\...

I think some of the rotations must be corrected: rot1 = Cycles[{{1, 2, 4, 3}, {5, 24, 9, 7}, {6, 23, 10, 8}}]; rot2 = Cycles[{{21, 22, 24, 23}, {1, 11, 20, 10}, {2, 5, 19, 16}}]; rot3 = Cycles[{{11, ...

Dataset was restructured in the 12.1 release in order to support expanded formatting options and interactivity such as hiding and sorting. As a result, some Dataset outputs showed a slowdown due to ...

There are multiple ways of implementing something like this, and the comments above give you good suggestions. Let me suggest another simple method, which is valid for arrays of any depth, not just 4. ...

The area-preserving projections are listed in GeoProjectionData["EqualArea"]. Most of these projections have formulas for the sphere only, but some of them, like "Albers" or "LambertAzimuthal" in WL ...

The pattern T[γ_, -δ_, -ζ_] only accepts abstract indices in the second and third indices, because something like {1, -ℬ} does not match a pattern like -δ_. Hence use something like T[γ, -δ, -ζ] ...

Symmetric[{1,2,3}] means that all six permutations of {1,2,3} are symmetries of the tensor: Equal[tensor, Transpose[tensor, #]] & /@ Permutations[{1, 2, 3}] (* {True, True, True, True, True, True}...

You do not really need CTensor for this. You need to replace \[Phi][] by \[Phi]0[r[]]. There are multiple ways to implement that replacement/assignment. If you want to use CTensor, then you need the ...

In my opinion it only makes sense to take variational derivatives of scalar actions, that is, of the integral of a scalar Lagrangian times a volume form. Hence, xTensor complains if you try to ...

I would try something like this: point1 = {Around[72.85, 60.6242], Around[210.26, 136.593]}; point2 = {Around[-25.17, 10.23], Around[104.70, 32.47]}; point3 = {Around[25.17, 10.22], Around[284.70, 48....

The LeviCivitaTensor symbol is a WL function that returns an array of 0's, 1's and -1's. It is not a xTensor function. The Levi-Civita tensor is called epsilon in xTensor, and there is one for each ...

You can do this with the Geo functionality, which knows the "Hammer" projection: GeoImage["World", GeoStyling[{Import["..."], "Projection" -> "Hammer"}], GeoProjection -> "Equirectangular"]

Let me give a GroupOrbits approach, imitating many aspects of the accepted solution. Start again with all permutations of the elements: list = {a, a, a, a, b, b, b, c, c}; perms = Permutations[list]; ...

I think you should define the tensor Omega[-a, -b] and its inverse, say iOmega[a, b], as separate antisymmetric tensors, and use them systematically with those index configurations. Because there is ...