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

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

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

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

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

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

The problem here is the combination of a) the definitions for t1 and t2 give the seconds as machine precision numbers, and b) the internal computations are performed in AbsoluteTime form (i.e. number ...

Rather than starting with the "vector of coordinates", which is not really a vector, it is better to start with the velocity components, which do form a vector. Define the same structures you had: &...

Try something like this: << xActxTensor DefManifold[M, 4, {i, j, k, l}] DefTensor[b[i], M] DefTensor[c[i], M] Then define a[i_] := 2 b[i] + 3 c[i] Finally you can compute VarD[c[j]][a[i]...

There are multiple ways in which this could be done in xAct, and perhaps there is even a function to do something like this in one of the xAct packages SymManipulator or xTras (you could ask in the ...

A completely different answer, this time ignoring Geo methods and focusing on Graph connectivity: just place the Graph object on the map. Take your entity pairs: ents = { {Entity["Country", "...

An expression like p[a, -a]^2 is strictly incorrect in xTensor, because in WL this is p[a, -a]*p[a, -a], which has repeated indices. The way to avoid this problem is to hide internal scalar indices ...

What you call the "linear independent permutations" are the permutations that do not belong to the symmetry group of the tensor. Hence a possible way to compute them is by finding the complement of ...

What about something like this? I think that if the countries have to be semi-transparent, so that some of them are highlighted, then that semi-transparency will let the geo grid lines be visible... ...

You need the datum "OGB7" and the projection proj = {"TransverseMercator", "Centering" -> {49., -2.}, "GridOrigin" -> {400000, -100000}, "CentralScaleFactor" -> 0.9996012717, "ReferenceModel"...

For instance: varD[f1_ f2_, x_] := varD[f1, x] f2 + f1 varD[f2, x]; varD[f1_ + f2_, x_] := varD[f1, x] + varD[f2, x]; varD[c_?NumericQ, x_] := 0; varD[delta[a_, b_], x_] := 0; varD[S[a_, b_], S[c_, ...

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

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

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

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

Covariant derivatives with upper indices do not make sense before introducing a metric. So this works: In[7]:= CD[-c]@CD[-b]@T[a] - CD[-b]@CD[-c]@T[a] // Simplification Out[7]= 0 Instead of ...