# Solving PDEs In Tensor Form

I have a set of field equations (PDEs) expressed tensor form that I derived using xAct and xTensor. Is there any function that would allow me to put the full tensor form of the field equations as an input (possibly along with initial conditions) and get the equations for field dynamics as an output?

I don't think that entering each equation and term into DSolve would be feasible here as there are a very large number of terms and indices. I am very new to using Mathematica, so any help would be greatly appreciated! Thanks!

• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Commented Jun 11 at 13:37

You need the unknow tensor in explicit form like e.g.: {{e1[t],e2[t]},{e3[t],e4[t]}}. Here is an example for a nxn tensor:

n = 2;
m1[t_] = Array[Subscript[e, #1, #2][t] &, {n, n}];
m2 = Array[Subscript[a, #1, #2] &, {n, n}];
m0 = IdentityMatrix[n];

sol = m1[t] /.
DSolve[{m1'[t] == m2 . m1[t], m1[0] == m0}, Flatten@m1[t], t][[1]]


For e.g. nxnxn tensors you would write:

m1[t_] = Array[Subscript[e, #1, #2, #3][t] &, {n,n,n}];
m2 = Array[Subscript[a, #1, #2, #3] &, {n,n,n}];