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.

learn more… | top users | synonyms

18
votes
0answers
492 views

Proving the hairy ball theorem using xAct

I would like to formally prove the hairy ball theorem in Mathematica, initially just for $S^2$, and then see about generalizing. An approach I thought about to use the xAct package to define $S^2$ ...
5
votes
0answers
95 views

Can I use symbolic tensors for simple linear algebra and calculus?

As an example, I'd like to calculate this symbolic derivative: $\frac{\partial}{\partial b}(x-A.b)^{\mathsf{T}}.(x-A.b)$ where $x$ and $b$ are vectors and $A$ is a matrix. What I tried is this: ...
2
votes
0answers
33 views

Nested `TensorContract` bug

When nesting TensorContract the result I get is wrong. Input: TensorContract[TensorContract[A, {{1, 3}, {2, 4}}], {{1, 2}}] ...
2
votes
0answers
44 views

SymmetrizedArray of stiffness/compliance tensor

The stiffness and compliance tensors of a material are 3x3x3x3 tensors relating stress and strain. ...
2
votes
0answers
100 views

How to solve system of differential equations of arbitrary order (symbolic tensors)?

I am interested in solving systems of ODEs symbolicly, keeping things with arbitrary dimensions for clarity. For example, assume that $x, f(x) \in R^N$ and $A \in R^{N \times N}$, how do I solve ...
2
votes
0answers
109 views

Prevent Suppression of Superscript 1 in Print

I'm trying to print Christoffel symbols of the second kind for a surface in $\mathbb R^3$. I currently am using something along the lines of ...
2
votes
0answers
121 views

Smooth Max and Abs

I'm trying to implement smooth approximations of Max and Abs functions. Moreover I want the functions to map element-wise on tensors. Here's my code. ...
2
votes
0answers
430 views

how to associate a metric for tensor contraction operations?

I see that Version 9 now has some built in tensor support (which was missing back when previously asked How to represent and manipulate abstract indexed vector (or tensor) expressions?). The docs ...
1
vote
0answers
75 views

How does TensorReduce use assumptions?

I would like to use TensorReduce by assuming that certain patterns of functions are tensors. From documentation of TensorReduce: ...
0
votes
0answers
26 views

How to implement a tensor system using indices and Einstein notation?

There are several function like TensorProduct and TensorContract doing basic tensor operations by regarding tensors as lists ...
0
votes
0answers
15 views

Assign a symbolic tensor with determinant greater than zero in Mathematica

I can create a symbolic tensor in Mathematica: $Assumptions = F \[Element] Arrays[{3, 3}, Reals] Is there anyway that I can tell Mathematica, that the ...
0
votes
0answers
25 views

Derivative with respect to a tensor

I am trying to differentiate a tensor with respect to another one in Mathematica, but I can't do it. Down below is the code I am using: ...
0
votes
0answers
20 views

Permute indices of a large sparse array

I'm starting with a very large rank 3 tensor, F, that is stored as a SparseArray, and I need to permute its indices. I first tried using ArrayRules to get the positions of the non-zero elements, to ...
0
votes
0answers
41 views

Get rid of external library dependency

I am trying to generate C code for some functions, which I do not post in full because they are a few hundred lines long. The functions do nothing too fancy: a bunch of dot products, powers and roots. ...
0
votes
0answers
132 views

Symbolic tensor product calculation

I am trying to calculate the symbolic tensor product $\langle \nabla f\otimes f,\nabla g\otimes g\rangle ^2+(\langle \nabla f\otimes g,\nabla f\otimes g\rangle +\langle \nabla g\otimes f,\nabla ...
0
votes
0answers
76 views

g00 (metric tensor) not explicitly evaluated in FeynCalc

I am learning Mathematica and FeynCalc by doing some basic cross section calculations. I have an issue with trace calculations: When I plug in for instance the ...