# Questions tagged [tensors]

Use this tag for questions that involve tensors. Tensors are fundamental tools for linear computations, generalizing vectors and matrices to higher ranks. Mathematica 9 introduces powerful methods to algebraically manipulate tensors with any rank and symmetry.

446 questions
Filter by
Sorted by
Tagged with
62 views

• 199
109 views

### Create a tensor with a well defined symmetry

I want to create a symmetric rank four tensor with this kind of symmetry: {1,2} and {3,4}. How can I implement this using "Array"? ...
• 153
1 vote
80 views

### How to compute the divergence of a four-vector?

I have a quadri-vector which is given by u = {(E^(-φ0[r]))*(1 - ε δφ[t, r]), (E^(-φ0[r])) D[ε ξ[t, r], t], 0, 0} and a quantity n which is given by <...
73 views

### Mathematica: Partial derivative with respect to tensors

Anyone know how to do the partial derivative of a tensor in d dimensions on Mathematica ? I want to implement something which will calculate directly like that :
50 views

### How to compute the covariant derivative of a vector? [duplicate]

I want to compute a derivative of a vector, but I'm new to mathematica (I programmed in other languages). I was advised to work with the diffgeo.m package. What I want to do is calculate using ...
67 views

### How to sum over a two tensor with a simple constraint of the form $i<j$?

I am trying to write a sum of the form $$\sum_{i<j}f_{ij}$$ where $i,j\in \{1,2,3,4\}.$ I want to write something like Sum[f[[i,j]], {j,1,4},{i,1,j}] but then ...
• 81
56 views

### Manipulating tensorial terms with xAct, ToCanonical is not perfoming well

I am trying to calculate perturbations of some complicated Lagrangians. Using xAct and more specifically VarD to perform the perturbations the expressions become ...
• 21
93 views

1 vote
52 views

### Differential not returning the answer

I have the following set of rules for differentiation. ...
• 1,163
87 views

### Simplifying the Summation

I have to sum: $$\frac{1}{2} x_{i,k} x_{j,\nu } g_{i,j,k,\mu }+\frac{1}{2} x_{i,k} x_{j,\mu } g_{i,j,k,\nu }+x_{i,l} x_{j,\nu } g_{i,j,l,\mu }+x_{i,\mu } x_{k,l} g_{i,k,l,\nu }$$ g and x are real ...
• 1,163
Is there a way to perform the below summation in Mathematica? $$\frac{\left(\hat{X}_{ij}+\mathbb i\delta_{ij}\right)}{\mathbb{i}}\frac{\left(\hat{X}_{kl}+\mathbb i\delta_{kl}\right)}{\mathbb{i}}$$ I ...