Question: I dont know how to set up this Tensor.

I am trying to set up a new tensor expression (r^hat is my unit vector):  

Can someone show me how to do it and/or point me to the right help page? 

The first part of the equation works but the rest does not. How do I get around the problem with the different indices? Another problem I have is that KroneckerDelta is no longer a tensor. Is there a way to define it as such?

with(Physics); Setup(mathematicalnotation = true)

with(Vectors)NULL

Setup(spacetimeindices = greek, spaceindices = lowercaselatin, su2indices = uppercaselatin, signature = `- - - +`, coordinates = cartesian)

[coordinatesystems = {X}, signature = `- - - +`, spaceindices = lowercaselatin, spacetimeindices = greek, su2indices = uppercaselatin]
````

(1)

Define(A[mu, a] = (1-fA(r))/(g*r)*(LeviCivita[a, nu, mu, 4]*X[nu]/r))

{R, A[mu, a], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-gamma_[a, b], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2)

A[]

A[mu, a] = Matrix(%id = 36893490522608139428)

(3)

Define(V[mu, a] = (1-fA(r))/(g*r)*(LeviCivita[a, nu, mu, 4]*X[nu]/r)-fB(r)*(KroneckerDelta[i, j]-X[i]*X[j]/r^2)/gr+fC(r)*X[i]*X[j]/(gr*r^2))

Error, (in Physics:-Define) found different free indices in different operands of a sum; in operand 1: [], in operand 2: [i, j], in `+`(Physics:-KroneckerDelta[i,j],-Physics:-SpaceTimeVector[i](x,y,z,t)*Physics:-SpaceTimeVector[j](x,y,z,t)/r^2)

 

NULL

Download V_Tensor.mw

Please Wait...