Question: Maxwell Equations in Potential Fields

I wish to express the Maxwell equations in potential fields deriving from a Lagrangian in cartesian coordinates, but expressed in vectorial form; But I am receiving an message error that I do not understand.

Field_A-MaplePrimes.mw
 

 

Initial Definitions:

 

``

I wish in this work to express the Maxwell equations deriving from the Lagrangian in the fields phiand "A,"

phi

(1.1)

but expressed in vectorial form;

 

restart; clear; with(Physics); with(Physics[Vectors]); with(Library)interface(imaginaryunit = I)

clear

 

I

(1.2)

Physics:-Coordinates(X = [t, x, y, z])

`Detected \`t\`, the time variable, in position 1. Changing the signature of the spacetime metric accordingly, to: + - - - `

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (t, x, y, z)}

 

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

 

{X}

(1.3)

Physics:-Vectors:-Setup(math = true, Physics:-Vectors:-diff = X)

`* Partial match of  'math' against keyword 'mathematicalnotation'`

 

`* Partial match of  'Physics:-Vectors:-diff' against keyword 'differentiationvariables'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (t, x, y, z)}

 

[differentiationvariables = [X], mathematicalnotation = true]

(1.4)

``

Some definitions

 

 

Defining the Maxwell tensor

 

Physics:-Define(F):``

`Defined objects with tensor properties`

(2.1)

 

Defining the field A with their components:

 

A[mu] = Vector(4, [phi(X), A__1(X), A__2(X), A__3(X)]); Define(%)

A[mu] = Vector[column](%id = 18446744074366759750)

 

`Defined objects with tensor properties`

 

{F, A[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2.2)

Physics:-CompactDisplay(phi(X), A__1(X), A__2(X), A__3(X))

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

 

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

 

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

 

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

(2.3)

 

Applying:

 

 

``

F[alpha, beta] := Physics:-Vectors:-`+`(Physics:-d_[beta](A[alpha]), -Physics:-d_[alpha](A[beta]));

Physics:-d_[beta](A[alpha], [X])-Physics:-d_[alpha](A[beta], [X])

(3.1)

``

 

NULL

NULL

Term 1:

 

 

eq1 := Physics:-d_[alpha](F[alpha, beta])

Physics:-d_[alpha](Physics:-d_[beta](A[`~alpha`], [X]), [X])-Physics:-dAlembertian(A[beta], [X])

(4.1)

Physics:-SumOverRepeatedIndices(Physics:-d_[alpha](Physics:-d_[beta](A[`~alpha`], [X]), [X])-Physics:-dAlembertian(A[beta], [X]))

Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X])

(4.2)

Physics:-SubstituteTensorIndices(beta = 4, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), z)-(diff(diff(A__1(X), x), z))-(diff(diff(A__2(X), y), z))-(diff(diff(A__3(X), z), z))-Physics:-dAlembertian(A__3(X), [X])

(4.3)

``

Physics:-SubstituteTensorIndices(beta = 1, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), t)-(diff(diff(A__1(X), t), x))-(diff(diff(A__2(X), t), y))-(diff(diff(A__3(X), t), z))-Physics:-dAlembertian(phi(X), [X])

(4.4)

SubstituteTensorIndices(beta = 2, Physics[d_][beta](diff(phi(X), t), [X])-Physics[d_][beta](diff(A__1(X), x), [X])-Physics[d_][beta](diff(A__2(X), y), [X])-Physics[d_][beta](diff(A__3(X), z), [X])-Physics[dAlembertian](A[beta], [X]))

Error, (in dchange/info) the number of new and old independent variables must be the same. Found {x, y} as new, while {} as old

 

SubstituteTensorIndices(beta = 3, Physics[d_][beta](diff(phi(X), t), [X])-Physics[d_][beta](diff(A__1(X), x), [X])-Physics[d_][beta](diff(A__2(X), y), [X])-Physics[d_][beta](diff(A__3(X), z), [X])-Physics[dAlembertian](A[beta], [X]))

Error, (in dchange/info) the number of new and old independent variables must be the same. Found {x, y} as new, while {} as old

 

Physics:-SubstituteTensorIndices(beta = 4, Physics:-d_[beta](diff(phi(X), t), [X])-Physics:-d_[beta](diff(A__1(X), x), [X])-Physics:-d_[beta](diff(A__2(X), y), [X])-Physics:-d_[beta](diff(A__3(X), z), [X])-Physics:-dAlembertian(A[beta], [X]))

diff(diff(phi(X), t), z)-(diff(diff(A__1(X), x), z))-(diff(diff(A__2(X), y), z))-(diff(diff(A__3(X), z), z))-Physics:-dAlembertian(A__3(X), [X])

(4.5)

``

What is the origin of the two error messages above? I did some wrong definition? Why this works in t and z but not in x and y?

 

NULL


 

Download Field_A-MaplePrimes.mw

 

 

 

Please Wait...