Question: Why does the d'Alembert operator give the wrong result when expanded?

I am looking at the d'Almbert operator for the Minkowski metric in cartesian coordinates. When using the dAlmbertian command and converting to partial derivatives it gets the coefficients wrong, the negatives are not in the correct place based on the metric. But when I manually write the operator with the metric and derivative operator it returns the correct answer. Any thoughts on this? 

See attached, thank you. 

restart;

with(Physics):

Setup(coordinatesystems=cartesian,signature=`-+++`,metric=Minkowski)

 

`Systems of spacetime coordinates are:`*{X = (t, x, y, z)}

 

_______________________________________________________

 

`The Minkowski metric in coordinates `*[t, x, y, z]

 

`Signature: `(`- + + +`)

 

_______________________________________________________

 

Physics:-g_[mu, nu] = Matrix(%id = 36893488152289591652)

 

[coordinatesystems = {X}, metric = {(1, 1) = -1, (2, 2) = 1, (3, 3) = 1, (4, 4) = 1}, signature = `- + + +`]

(1)

g_[lineelement]

-Physics:-d_(t)^2+Physics:-d_(x)^2+Physics:-d_(y)^2+Physics:-d_(z)^2

(2)

CompactDisplay(phi(t,x,y,z))

phi(t, x, y, z)*`will now be displayed as`*phi

(3)

dAlembertian(phi(X))

Physics:-dAlembertian(phi(X), [X])

(4)

convert(%,diff)

-(diff(diff(phi(X), t), t))-(diff(diff(phi(X), x), x))-(diff(diff(phi(X), y), y))+diff(diff(phi(X), z), z)

(5)

g_[~mu,~nu]*d_[nu](d_[mu](phi(X)))

Physics:-g_[`~mu`, `~nu`]*Physics:-d_[mu](Physics:-d_[nu](phi(X), [X]), [X])

(6)

SumOverRepeatedIndices((6))

-(diff(diff(phi(X), t), t))+diff(diff(phi(X), x), x)+diff(diff(phi(X), y), y)+diff(diff(phi(X), z), z)

(7)
 

 

dAlmbert.mw

Please Wait...