Application Center - Maplesoft

# TENSORS OF RELATIVISTIC ELECTRODYNAMICS WITH MAPLE

You can switch back to the summary page by clicking here.

TENSORS OF RELATIVISTIC ELECTRODYNAMICS WITH MAPLE

Alexei V. Tikhonenko

General Physics Department,
State Technical University of Nuclear Power Engineering,
Obninsk, Russia

This work develops algorithms of construction, calculation and transformation of physical vectors and tensors in relativistic electrodynamics with MAPLE.

1. Lorentz transformations

 > restart;

 > with(tensor):with(linalg):

Consider transformations of vectors and tensors with Lorentz transformations in four-dimensional pseudo-Euclidean space-time. We will use "tensor" and "linalg" packages for operations with vectors and tensors in four-dimensional space-time.

The first necessary step is creation of the metric tensor of four-dimensional pseudo-Euclidean space-time:

 > coord:=[t,x,y,z]; g11:=1: g22:=-1: g33:=-1: g44:=-1: g:=create([-1,-1],array(1..4,1..4,symmetric,sparse,[(1,1)=g11(r,theta),(2,2)=g22(r,theta),(3,3)=g33(r,theta),(4,4)=g44(r,theta)]));

 (1.1)

 (1.1)

 > g_matrix:=matrix([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, -1]]); detg:=det(g_matrix);

 (1.2)

 (1.2)

 > `tensor/simp`:= proc(a) simplify(a); end: g_contr := invert(g, 'det_g');

 (1.3)

Lorentz transformations (for two reference frames) are determined as

 > dim:=4; Coord_1:=[t,x,y,z]; Coord_2:=[t,x,y,z];

 (1.4)

 (1.4)

 (1.4)

 > CHANG:=[t=gamma*(t-beta*x),x=gamma*(x-beta*t) ,y=y,z=z];

 (1.5)

 > Jacobian(Coord_2,CHANG,tr,TR); op(tr); op(TR);

 (1.6)

 (1.6)

where

,

and V is relative velocity of reference frames in the line of x-axis.

Components of covariant vector

 > VECT:=create([-1],array([V[1],V[2],V[3], V[4]]));

 (1.7)

will transform with Lorentz transformations as

 > VECT_trans:=create([-1],array([V_trans[1], V_trans[2],V_trans[3],V_trans[4]])); get_compts(VECT_trans)=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma)); get_compts(VECT_trans)[1]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[1]; get_compts(VECT_trans)[2]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[2]; get_compts(VECT_trans)[3]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[3]; get_compts(VECT_trans)[4]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[4];

 (1.8)

 (1.8)

 (1.8)

 (1.8)

 (1.8)

 (1.8)

Components of covariant tensor

 > TENS:=create([-1,-1],array(1..4,1..4,sparse,[[T[1,1],T[1,2],T[1,3],T[1,4]],[T[2,1],T[2,2],T[2,3],T[2,4]],[T[3,1],T[3,2],T[3,3],T[3,4]],[T[4,1],T[4,2],T[4,3],T[4,4]]]));

 (1.9)

will transform with Lorentz transformations as

 > TENS_trans:=create([-1,-1],array(1..4,1..4,sparse,[[T_trans[1,1],T_trans[1,2],T_trans[1,3],T_trans[1,4]],[T_trans[2,1],T_trans[2,2],T_trans[2,3],T_trans[2,4]],[T_trans[3,1],T_trans[3,2],T_trans[3,3],T_trans[3,4]],[T_trans[4,1],T_trans[4,2],T_trans[4,3],T_trans[4,4]]])); get_compts(TENS_trans)=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma)); get_compts(TENS_trans)[1,1]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[1,1]; get_compts(TENS_trans)[1,2]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[1,2]; get_compts(TENS_trans)[2,4]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[2,4];

 (1.10)

 (1.10)

 (1.10)

 (1.10)

 (1.10)

Components of the symmetrical covariant tensor

 > TENS_sym:=create([-1,-1],array(1..4,1..4,sparse,[[T[1,1],T[1,2],T[1,3],T[1,4]],[T[1,2],T[2,2],T[2,3],T[2,4]],[T[1,3],T[2,3], T[3,3],T[3,4]],[T[1,4],T[2,4],T[3,4],T[4,4]]]));

 (1.11)

will transform with Lorentz transformations as

 > TENS_sym_trans:=create([-1,-1],array(1..4,1..4,sparse,[[T_trans[1,1],T_trans[1,2],T_trans[1,3],T_trans[1,4]],[T_trans[2,1],T_trans[2,2],T_trans[2,3],T_trans[2,4]],[T_trans[3,1],T_trans[3,2],T_trans[3,3],T_trans[3,4]],[T_trans[4,1],T_trans[4,2],T_trans[4,3],T_trans[4,4]]])); get_compts(TENS_trans)=get_compts(collect(transform( TENS_sym,CHANG,tr,TR), [gamma,beta]));

 (1.12)

 (1.12)

or

 > TENS_sym_trans:=collect(simplify(subs (gamma =1/sqrt(1-beta^2),matrix([[(T[1,1]-2*beta*T [1,2]+ beta^2*T[2,2])*gamma^2, (beta^2*T[1,2]+(-T[1,1]-T[2,2])*beta+T[1,2])*gamma^2,(T[1,3]-beta*T[2,3])*gamma,(T[1,4]-beta*T[2,4])*gamma],[(beta^2* T[1,2]+(-T[1,1]-T[2,2])*beta +T[1,2])*gamma^2,(beta^2 *T[1,1]-2*beta*T[1,2] +T[2,2])*gamma^2,(-beta*T[1,3] +T[2,3])* gamma, -beta*T[1,4]+T[2,4]*gamma],[(T[1, 3]-beta* T[2,3])*gamma,(-beta*T[1,3] +T[2, 3])*gamma, T[3,3], T[3,4]], [(T[1,4]-beta*T[2,4])*gamma, (-beta*T[1,4]+T[2, 4])*gamma, T[3,4], T[4,4]]]))),beta) assuming (-beta^2+1)>0;

 (1.13)

Components of the asymmetrical covariant tensor

 > TENS_as:=create([-1,-1],array(1..4,1..4 ,sparse ,[[0,T[1,2],T[1,3],T[1,4]],[-T[1, 2],0,T[2,3], T[2,4]],[-T[1,3],-T[2,3],0, T[3,4]],[-T[1,4],-T[2,4],-T[3,4],0]]));

 (1.14)

will transform with Lorentz transformations as

 > TENS_as_trans:=create([-1,-1],array(1..4,1..4,sparse,[[0,T_trans[1,2],T_trans[1,3],T_trans[1,4]],[-T_trans[1,2],0,T_trans[2, 3],T_trans[2,4]],[-T_trans[1,3],-T_trans [2,3],0,T_trans[3,4]],[-T_trans[1,4],-T_trans[2,4],-T_trans[3,4],0]])); get_compts(TENS_trans)=get_compts(simplify(collect(transform(TENS_as,CHANG,tr,TR),[gamma,beta])));

 (1.15)

 (1.15)

or

 > TENS_as_trans:=simplify(subs(gamma=1/sqrt (1-beta^2),matrix([[0, -T[1,2]*(-1+beta^2) *gamma^2,-(-T[1,3]+beta*T[2,3])*gamma,-(-T[1,4]+beta*T[2,4] )*gamma], [T[1,2]*(-1+ beta^2)*gamma^2, 0,-(beta* T[1,3]-T[2,3])* gamma, -(beta*T[1,4]-T[2,4])*gamma], [(-T[1,3]+beta*T[2,3])*gamma, (beta*T[1,3]-T[2,3] )*gamma, 0, T[3,4]], [(-T[1,4]+beta *T[2,4])*gamma, (beta*T[1,4]-T[2,4]) *gamma,-T[3,4], 0]]))) assuming (-beta^2+1)>0;

 (1.16)

2. 4-velocity ? 4-acceleration

Consider 4-radius-vector of particle moving in four-dimensional space-time:

 > R(t):=create([-1],array([x[1](t),x[2](t),x[3] (t),x[4](t)]));

 (2.1)

Consider 4-velocity of particle in four-dimensional space-time:

 > V(t):=create([-1],array([v[1](t),v[2](t), v[3](t),v[4](t)])); V(t):=create([-1],array([1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2)/c*diff(x[1](t),t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2)/c*diff(x[2](t),t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2)/c*diff(x[3](t),t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)/ c*diff(x[4](t),t)])); V(t):=create([-1],array([1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2),1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2)/c*v[2](t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t) ^2)/c^2)/c*v[3](t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+v[4](t)^2)/c^2)/c*v[4](t)]));

 (2.2)

 (2.2)

 (2.2)

 > V[1](t):=get_compts(V(t))[1]; V[2](t):=get_compts(V(t))[2]; V[3](t):=get_compts(V(t))[3]; V[4](t):=get_compts(V(t))[4];

 (2.3)

 (2.3)

 (2.3)

 (2.3)

Square of 4-velocity is

 > V_sqw=simplify(subs(beta=sqrt(v[2](t)^2+ v[3](t)^2 +v[4](t)^2)/c,prod(prod(V(t),V(t)) ,g_contr,[1,1],[2,2])));

 (2.4)

Consider 4-acceleration of particle in four-dimensional space-time:

 > Accl[1](t):=1/sqrt(1-(v[2](t)^2+v[3](t)^2 +v[4](t)^2)/c^2)/c*diff(V[1](t),t); Accl[2](t):=1/sqrt(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)/c*diff(V[2](t),t); Accl[3](t):=1/sqrt(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)/c*diff(V[3](t),t); Accl[4](t):=1/sqrt(1-(v[2](t)^2+v[3](t)^2+v [4](t)^2)/c^2)/c*diff(V[4](t),t);

 (2.5)

 (2.5)

 (2.5)

 (2.5)

 > Accl:=create([-1],array([Accl[1](t),Accl[2](t),Accl[3](t),Accl[4](t)]));

 (2.6)

The scalar product of 4-velocity ? 4-acceleration is equal to

 > prod(prod(V(t),Accl),g_contr,[1,1],[2,2]);

 (2.7)

This value means orthogonality of 4-velocity ? 4-acceleration.

Another form of 4-acceleration is:

 > Accl[1]:=1/((1-beta^2)^2)/(c^3)*(v[2] (t)*w[2](t) +v[3](t)*w[3](t)+v[4](t)* w[4](t)); Accl[2]:=1/(1-beta^2)^2/c^4*v[2](t)*(v[2](t) *w[2](t)+v[3](t)*w[3](t)+v[4](t)*w[4](t))+1/(1-beta^2)/c^2*w[2](t); Accl[3]:=1/(1-beta^2)^2/c^4*v[3](t)*(v[2](t) *w[2](t)+v[3](t)*w[3](t)+v[4](t)*w[4](t))+1/(1-beta^2)/c^2*w[3](t); Accl[4]:=1/(1-beta^2)^2/c^4*v[4](t)*(v[2](t)* w[2](t)+v[3](t)*w[3](t)+v[4](t)*w[4](t))+1/(1-beta^2)/c^2*w[4](t); Accl:=create([-1],array([Accl[1],Accl[2], Accl[3],Accl[4]]));

 (2.8)

 (2.8)

 (2.8)

 (2.8)

 (2.8)

3. energy-momentum vector

Consider 4-velocity

 > V[1](t):=1/((1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)^(1/2)); V[2](t):=1/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)^(1/2)/c*v[2](t); V[3](t):=1/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)^(1/2)/c*v[3](t); V[4](t):=1/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)^(1/2)/c*v[4](t); V(t):=create([-1],array([V[1](t),V[2](t), V[3](t),V[4](t)]));

 (3.1)

 (3.1)

 (3.1)

 (3.1)

 (3.1)

and define 4-energy-momentum vector as

 > P[1](t):=c*m*V[1](t); P[2](t):=c*m*V[2](t); P[3](t):=c*m*V[3](t); P[4](t):=c*m*V[4](t); P(t):=create([-1],array([P[1](t),P[2](t),P[3](t), P[4](t)]));

 (3.2)

 (3.2)

 (3.2)

 (3.2)

 (3.2)

Square of 4-energy-momentum vector is:

 > P_sqw=prod(prod(P(t),P(t)),g_contr,[1,1], [2,2]);

 (3.3)

As another form of 4-energy-momentum vector is

 > P_:=create([-1],array([E/c,p[2],p[3], p[4]]));

 (3.4)

we have

 > prod(prod(P_,P_),g_contr,[1,1],[2,2])= prod(prod(P(t),P(t)),g_contr,[1,1],[2,2]);

 (3.5)

4-energy-momentum vectorwill transform with Lorentz transformations as

 > P:=create([-1],array([E/c,p[2],p[3],p[4]])); P_trans_:=create([-1],array([E_trans/c,p_trans[2], p_trans[3],p_trans[4]])); P_trans:=collect(transform(P,CHANG,tr,TR),gamma);

 (3.6)

 (3.6)

 (3.6)

or

 > get_compts(P_trans_)[1]=get_compts (P_trans)[1]; get_compts(P_trans_)[2]=get_compts (P_trans)[2]; get_compts(P_trans_)[3]=get_compts (P_trans)[3]; get_compts(P_trans_)[4]=get_compts (P_trans)[4];

 (3.7)

 (3.7)

 (3.7)

 (3.7)

Make sure that square of 4-energy-momentum vector is invariant relatively to Lorentz transformations:

 > P_sqw:=get_compts(prod(prod(P,P),g_contr, [1,1],[2,2]));

 (3.8)

 > P_trans_sqw:=get_compts(prod(prod(P_trans,P_trans),g_contr,[1,1],[2,2])); P_trans_sqw:=simplify(subs(gamma=1/sqrt (1-beta^2),(gamma^2*E^2+gamma^2*beta^2* p[2]^2*c^2-gamma^2*beta^2*E^2-gamma^2 *p[2]^2*c^2-p[3]^2*c^2-p[4]^2*c^2)/c^2));

 (3.9)

 (3.9)

and

=.

Differentiate 4-energy-momentum vector by interval:

 > P[1](t):=c*m/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2) /c^2)^(1/2): P[2](t):=m/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2) /c^2)^(1/2)*v[2](t): P[3](t):=m/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2) /c^2)^(1/2)*v[3](t): P[4](t):=m/(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2) /c^2)^(1/2)*v[4](t): Dif_P(t):=create([-1],array([1/sqrt(1-(v[2](t)^ 2+v[3](t)^2+v[4](t)^2)/c^2)/c *diff(P[1](t),t),1/sqrt(1-(v[2](t)^2+ v[3](t)^2+v[4](t)^2)/c^2)/c* diff(P[2] (t),t),1/sqrt(1-(v[2](t)^2+v[3](t) ^2+v[4](t)^2)/c^2 )/c*diff(P[3](t), t),1/sqrt(1-(v[2](t)^2+v[3](t)^2+ v[4](t)^2)/c^2)/c* diff(P[4](t),t)]));

 (3.10)

or

 > DP[1]:=get_compts(Dif_P(t))[1]; DP[2]:=get_compts(Dif_P(t))[2]; DP[3]:=get_compts(Dif_P(t))[3]; DP[4]:=get_compts(Dif_P(t))[4];

 (3.11)

 (3.11)

 (3.11)

 (3.11)

These formulas can be rewritten as:

 > DP[1]:=m/(1-beta^2)^2/c^2*(v[2](t)*w[2] (t)+v[3] (t)*w[3](t)+v[4](t)*w[4](t)); DP[2]:=m/(1-beta^2)^2/c^3*v[2](t)*(v[2] (t)*w[2](t)+v[3](t)*w[3](t)+v[4](t)* w[4](t))+1/(1-beta^2)/c*w[2](t); DP[3]:=m/(1-beta^2)^2/c^3*v[3](t)*(v[2](t)*w[2] (t)+v[3](t)*w[3](t)+v[4] (t)*w[4](t))+1/(1-beta^2)/c*w[3](t); DP[4]:=m/(1-beta^2)^2/c^3*v[4](t)*(v[2](t)*w[2] (t)+v[3](t)*w[3](t)+v[4] (t)*w[4](t))+1/(1-beta^2)/c*w[4](t);

 (3.12)

 (3.12)

 (3.12)

 (3.12)

Therefore, we have that derivatives of components of 4-energy-momentum vector differ from accel-eration components by the factor m/c.

Now we denote derivatives of components of 4-energy-momentum vector by

 > f[1]:=m/(1-beta^2)^2/c^3*(v[2]*w[2]+v[3]*w[3]+v[4]*w[4]); f[2]:=m/(1-beta^2)^2/c^4*v[2]*(v[2]*w[2]+v[3]*w[3]+v[4]*w[4])+m/(1-beta^2)/c^2* w[2]; f[3]:=m/(1-beta^2)^2/c^4*v[3]*(v[2]*w[2]+v[3]*w[3]+v[4]*w[4])+m/(1-beta^2) /c^2*w[3]; f[4]:=m/(1-beta^2)^2/c^4*v[4]*(v[2]*w[2]+v[3]*w[3]+v[4]*w[4])+m/(1-beta^2 )/c^2*w[4];

 (3.13)

 (3.13)

 (3.13)

 (3.13)

whence

and 4-force vector is:

 > F:=create([-1],array([f[1],f[2],f[3],f[4]]));

 (3.14)

or

 > F:=create([-1],array([(v[2]*f[2]+v[3]*f[3]+v[4]*f[4])/c,f[2],f[3],f[4]])):

4. Tensor of electromagnetic field

Consider covariant 4-tensor of electromagnetic field:

 > T[1,2]:=E[1]; T[1,3]:=E[2]; T[1,4]:=E[3]; T[2,3]:=-H[3]; T[2,4]:=H[2]; T[3,4]:=-H[1]; F:=create([-1,-1],array(1..4,1..4,sparse,[[0,T[1,2],T[1,3],T[1,4]],[-T[1,2],0,T[2,3],T[2,4]],[-T[1,3],-T[2,3],0,T[3,4]],[-T[1,4],-T[2,4],-T[3,4],0]]));

 (4.1)

 (4.1)

 (4.1)

 (4.1)

 (4.1)

 (4.1)

 (4.1)

Contravariant tensor of electromagnetic field is:

 > F_contr:=raise(g_contr,raise(g_contr,F,1),2);

 (4.2)

Dual tensor to covariant tensor of electromagnetic field is:

 > Levi_Civita (detg,4,cov_LC,con_LC); F_star:=dual(con_LC,F,[1,2]);

 (4.3)

Dual tensor to contravariant tensor of electromagnetic field is:

 > F_star_cov:=lower(g,lower(g,F_star,1),2);

 (4.4)

Calculate invariants of electromagnetic field:

 > INV[1]:=get_compts(prod(F,F_contr,[1,1], [2,2]));

 (4.5)

 > INV[2]:=get_compts(prod(F,F_star,[1,1], [2,2]));

 (4.6)

Components of  tensor of electromagnetic field will transform with Lorentz transformations as

 > dim:=4: Coord_1:=[t,x,y,z]; Coord_2:=[t,x,y,z]; CHANG:=[t=gamma*(t-beta*x),x=gamma*(x-beta*t),y=y,z=z]; Jacobian(Coord_2,CHANG,tr,TR);op(tr):op(TR);

 (4.7)

 (4.7)

 (4.7)

 (4.7)

 > F_trans:=transform(F,CHANG,tr,TR);

 (4.8)

or

 > matrix([[0,E_trans[1],E_trans[2],E_trans[3]],[-E_trans[1],0,-H_trans[3],H_trans[2]],[-E_trans[2],H[3],0,-H_trans[1]],[-E_trans[3],-H_trans[2],H_trans[1],0]])=simplify(subs(gamma=1/sqrt(1-beta^2),matrix([[0,-gamma^2*beta^2*E[1]+gamma^2*E[1],gamma*E[2]+gamma*beta*H[3],gamma*E[3]-gamma*beta*H[2]],[-gamma^2*E[1]+gamma^2*beta^2*E[1],0,-gamma*beta*E[2]-gamma*H[3],-gamma*beta*E[3]+gamma*H[2]],[-gamma*E[2] -gamma*beta*H[3],gamma*beta*E[2]+gamma*H [3],0,-H[1]],[-gamma*E[3]+gamma*beta*H[2], gamma*beta*E[3]-gamma*H[2],H[1],0]])));

 (4.9)

5. Energy-momentum tensor of electromagnetic field

Consider covariant 4-tensor of electromagnetic field:

 > T[1,2]:=E[1]; T[1,3]:=E[2]; T[1,4]:=E[3]; T[2,3]:=-H[3]; T[2,4]:=H[2]; T[3,4]:=-H[1]; F:=create([-1,-1],array(1..4,1..4,sparse, [[0,T[1,2],T[1,3],T[1,4]],[-T[1,2],0,T[2, 3],T[2,4]],[-T[1,3],-T[2,3],0,T[3,4]],[-T[1,4],-T[2,4],-T[3,4],0]]));

 (5.1)

 (5.1)

 (5.1)

 (5.1)

 (5.1)

 (5.1)

 (5.1)

Mixed and contravariant 4-tensors of electromagnetic field are:

 > F_:=raise(g_contr,F,1); F_contr:=raise(g_contr,raise(g_contr,F,1),2);

 (5.2)

 (5.2)

Calculate miscellaneous functions:

 > T1:=prod(F_contr,F_,[2,2]); T2:=prod(F,F_contr,[1,1],[2,2]);

 (5.3)

 (5.3)

or

 > T2:=-2*E[1]^2-2*E[2]^2-2*E[3]^2+2*H[3]^2+2*H[2]^2+2*H[1]^2;

 (5.4)

So contravariant energy-momentum tensor of electromagnetic field is

 > T[1,1]:=simplify(1/4/Pi*(-get_compts(T1) [1,1]+ 1/4*get_compts(g_contr)[1,1]*T2)); T[1,2]:=simplify(1/4/Pi*(-get_compts(T1) [1,2]+ 1/4*get_compts(g_contr)[1,2]*T2)); T[1,3]:=simplify(1/4/Pi*(-get_compts(T1) [1,3]+1/4*get_compts(g_contr)[1,3]*T2)); T[1,4]:=simplify(1/4/Pi*(-get_compts(T1) [1,4]+1/4*get_compts(g_contr)[1,4]*T2)); T[2,2]:=simplify(1/4/Pi*(-get_compts(T1) [2,2]+1/4*get_compts(g_contr)[2,2]*T2)); T[2,3]:=simplify(1/4/Pi*(-get_compts(T1) [2,3] +1/4*get_compts(g_contr)[2,3]*T2)); T[2,4]:=simplify(1/4/Pi*(-get_compts(T1) [2,4]+ 1/4*get_compts(g_contr)[2,4]*T2)); T[3,3]:=simplify(1/4/Pi*(-get_compts(T1) [3,3]+ 1/4*get_compts(g_contr)[3,3]*T2)); T[3,4]:=simplify(1/4/Pi*(-get_compts(T1) [3,4]+ 1/4*get_compts(g_contr)[3,4]*T2)); T[4,4]:=simplify(1/4/Pi*(-get_compts(T1) [4,4]+ 1/4*get_compts(g_contr)[4,4]*T2));

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 (5.5)

 > T_EP_contr:=create([1,1],array(1..4,1..4,sparse,[[T[1,1],T[1,2],T[1,3],T[1,4]],[T[1,2],T[2,2],T[2,3],T[2,4]],[T[1,3],T[2,3],T[3,3],T[3,4]],[T[1,4],T[2,4],T[3,4],T[4,4]]]));

 (5.6)

or in standart denotes

 > w=1/8*(E[1]^2+E[2]^2+E[3]^2+H[3]^2+H[2]^2+H[1]^2)/Pi; T[1,1]:=w; S[1]=c*1/4*1/Pi*(E[2]*H[3]-E[3]*H[2]); T[1,2]:=S[1]/c; S[2]=-1/4*(E[1]*H[3]-E[3]*H[1])/Pi; T[1,3]:=S[2]/c; S[3]=1/4*1/Pi*(E[1]*H[2]-E[2]*H[1]); T[1,4]:=S[3]/c; sigma[2,2]=-1/8*(E[1]^2-H[3]^2-H[2]^2-E[2]^2-E[3]^2+H[1]^2)/Pi; T[2,2]:=sigma[2,2]; sigma[2,3]=-1/4*(E[1]*E[2]+H[2]*H[1])/Pi; T[2,3]:=sigma[2,3]; sigma[2,4]=-1/4*(E[1]*E[3]+H[3]*H[1])/Pi; T[2,4]:=sigma[2,4]; sigma[3,3]=1/8*(-E[2]^2+H[3]^2+H[1] ^2+E[1]^2+E[3]^2-H[2]^2)/Pi; T[3,3]:=sigma[3,3]; sigma[3,4]=-1/4*(E[2]*E[3]+H[3]*H[2])/Pi; T[3,4]:=sigma[3,4]; sigma[4,4]=1/8*(-E[3]^2+H[2]^2+H[1] ^2+E[1]^2 +E[2]^2-H[3]^2)/Pi; T[4,4]:=sigma[4,4];

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 (5.7)

 > T_EP_contr:=create([1,1],array(1..4,1..4,sparse,[[T[1,1],T[1,2],T[1,3],T[1,4]],[T[1,2],T[2,2],T[2,3],T[2,4]],[T[1,3],T[2,3],T[3,3],T[3,4]],[T[1,4],T[2,4],T[3,4],T[4,4]]]));

 (5.8)

Covariant energy-momentum tensor of electromagnetic field is

 > T_EP:=lower(g,lower(g,T_EP_contr,1),2);

 (5.9)

Components of  energy-momentum tensor will transform with Lorentz transformations as

 > dim:=4: Coord_1:=[t,x,y,z]; Coord_2:=[t,x,y,z]; CHANG:=[t=gamma*(t-beta*x),x=gamma*(x-beta*t),y=y,z=z]; Jacobian(Coord_2,CHANG,tr,TR);op(tr):op(TR);

 (5.10)

 (5.10)

 (5.10)

 (5.10)

 > T_EP_trans:=collect(transform(T_EP,CHANG, tr, TR),[gamma,beta,c]);

 (5.11)

or

 > T_EP_trans[1,1]=get_compts(T_EP_trans)[1,1]; T_EP_trans[1,2]=get_compts(T_EP_trans)[1,2]; T_EP_trans[1,3]=get_compts(T_EP_trans)[1,3]; T_EP_trans[1,4]=get_compts(T_EP_trans)[1,4]; T_EP_trans[2,2]=get_compts(T_EP_trans)[2,2]; T_EP_trans[2,3]=get_compts(T_EP_trans)[2,3]; T_EP_trans[2,4]=get_compts(T_EP_trans)[2,4]; T_EP_trans[3,3]=get_compts(T_EP_trans)[3,3]; T_EP_trans[3,4]=get_compts(T_EP_trans)[3,4]; T_EP_trans[4,4]=get_compts(T_EP_trans)[4,4];

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

 (5.12)

So energy density (w), components of energy flux density vector (S) and components of Maxwell stress tensor () will transform as

 > w_trans=(sigma[2,2]*beta^2+2*S[1]/c*beta+ w)*gamma^2; S_trans[1]=(-S[1]/c*beta^2+(-w-sigma[2,2]) *beta-S[1]/c)*gamma^2; S_trans[2]=(-sigma[2,3]*beta-S[2]/c)*gamma; S_trans[3]=(-sigma[2,4]*beta-S[3]/c)*gamma; sigma_trans[2,2]=(w*beta^2+2*S[1]/c*beta+sigma[2,2])*gamma^2; sigma_trans[2,3]=(S[2]/c*beta+sigma[2,3])*gamma; sigma_trans[2,4]=(S[3]/c*beta+sigma[2,4])*gamma; sigma_trans[3,3]=sigma[3,3]; sigma_trans[3,4]=sigma[3,4]; sigma_trans[4,4]=sigma[4,4];

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

 (5.13)

6. Energy-momentum tensor of macroscopic particles

Consider energy-momentum tensor of macroscopic particles:

 > w:=epsilon; S[1]:=0; S[2]:=0; S[3]:=0; sigma[2,2]:=p; sigma[2,3]:=0; sigma[2,4]:=0; sigma[3,3]:=p; sigma[3,4]:=0; sigma[4,4]:=p;

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

 (6.1)

Components of  energy-momentum tensor of macroscopic particleswill transform with Lorentz transformations as

 > T_EP_trans[1,1]=get_compts(T_EP_trans)[1,1]; T_EP_trans[1,2]=get_compts(T_EP_trans)[1,2]; T_EP_trans[1,3]=get_compts(T_EP_trans)[1,3]; T_EP_trans[1,4]=get_compts(T_EP_trans)[1,4]; T_EP_trans[2,2]=get_compts(T_EP_trans)[2,2]; T_EP_trans[2,3]=get_compts(T_EP_trans)[2,3]; T_EP_trans[2,4]=get_compts(T_EP_trans)[2,4]; T_EP_trans[3,3]=get_compts(T_EP_trans)[3,3]; T_EP_trans[3,4]=get_compts(T_EP_trans)[3,4]; T_EP_trans[4,4]=get_compts(T_EP_trans)[4,4];

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

 (6.2)

or in standart denotes

 > w_trans=(sigma[2,2]*beta^2+2*S[1]/c*beta+w)*gamma^2; S_trans[2]=(-S[1]/c*beta^2+(-w-sigma[2,2]) *beta-S[1]/c)*gamma^2; S_trans[3]=(-sigma[2,3]*beta-S[2]/c)*gamma; S_trans[4]=(-sigma[2,4]*beta-S[3]/c)*gamma; sigma_trans[2,2]=(w*beta^2+2*S[1]/c*beta+sigma[2,2])*gamma^2; sigma_trans[2,3]=(S[2]/c*beta+sigma[2,3])*gamma; sigma_trans[2,4]=(S[3]/c*beta+sigma[2,4])*gamma; sigma_trans[3,3]=sigma[3,3]; sigma_trans[3,4]=sigma[3,4]; sigma_trans[4,4]=sigma[4,4];

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

 (6.3)

7. Energy-momentum tensor of plane electromagnetic wave

Consider plane electromagnetic wave with filed vectors:

 > H[1]:=0; E[1]:=0; H[2]:=-E[3]; H[3]:=E[2];

 (7.1)

 (7.1)

 (7.1)

 (7.1)

So energy-momentum tensor of plane electromagnetic wave is

 > T_EP_contr:=TABLE([compts=matrix([[1/8*(E[1]^2+E[2]^2+E[3]^2+H[3]^2+H[2]^2+H[1]^2)/Pi,1/4*1/Pi*(E[2]*H[3]-E[3]*H[2]),-1/4*(E[1]*H[3]-E[3]*H[1])/Pi,1/4*1/Pi*(E[1]*H[2]-E[2]*H[1])],[1/4*1/Pi*(E[2]*H[3]-E[3]*H[2]),-1/8*(E[1]^2-H[3]^2-H[2]^2-E[2]^2-E[3]^2+H[1]^2)/Pi,-1/4*(E[1]*E[2]+H[2]*H[1])/Pi,-1/4*(E[1]*E[3]+H[3]*H[1])/Pi],[-1/4*(E[1]*H[3]-E[3]*H[1])/Pi,-1/4*(E[1]*E[2]+H[2]*H[1])/Pi,1/8*(-E[2]^2+H[3]^2+H[1]^2+E[1]^2+E[3]^2-H[2]^2)/Pi,-1/4*(E[2]*E[3]+H[3]*H[2])/Pi],[1/4*1/Pi*(E[1]*H[2]-E[2]*H[1]),-1/4*(E[1]*E[3]+H[3]*H[1])/Pi,-1/4*(E[2]*E[3]+H[3]*H[2])/Pi,1/8*(-E[3]^2+H[2]^2+H[1]^2+E[1]^2+E[2]^2-H[3]^2)/Pi]]), index_char=[1,1]]);

 (7.2)

or

 > w:=1/4*(E[2]^2+E[3]^2)/Pi; S[2]:=c*w; S[3]:=0; S[4]:=0; sigma[2,2]:=w; sigma[2,3]:=0; sigma[2,4]:=0; sigma[3,3]:=0; sigma[3,4]:=0; sigma[4,4]:=0; p:=0; T_EP := TABLE([index_char = [-1, -1], compts = matrix([[w, -S[1]/c, -S[2]/c, -S[3]/c], [-S[1]/c, sigma[2,2], sigma[2,3], sigma[2,4]], [-S[2]/c, sigma[2,3], sigma[3,3], sigma[3,4]], [-S[3]/c, sigma[2,4], sigma[3,4], sigma[4,4]]])]);

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

 (7.3)

8. General Lorentz transformations

Consider general Lorentz transformations.

 > restart;

 > with(tensor):with(linalg):

 > g11:=1: g22:=-1: g33:=-1: g44:=-1: g:=create([-1,-1],array(1..4,1..4,symmetric,sparse,[(1,1)=g11(r,theta),(2,2)=g22(r,theta),(3,3)=g33(r,theta),(4,4)=g44(r,theta)])); g_matrix:=matrix([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, -1]]); detg:=det(g_matrix); `tensor/simp`:= proc(a) simplify(a); end: g_contr := invert(g, 'det_g');

 (8.1)

 (8.1)

 (8.1)

 (8.1)

 > dim:=4: Coord_1:=[t,x,y,z]; Coord_2:=[t,x,y,z];

 (8.2)

 (8.2)

 > gamma=1/sqrt(1-(beta[1]^2+beta[2]^2 +beta [3]^2)); CHANG:=[t=gamma*(t-(beta[1]*x+beta[2]*y+ beta[3]*z)),x=x+(gamma-1)*beta[1]*(beta[1]*x+beta[2]*y+beta[3]*z)/(beta[1]^2+beta [2]^2+beta[3]^2)+gamma*beta[1]*t,y=y+(gamma-1)*beta[2]*(beta[1]*x+beta[2]*y+beta[3]*z)/(beta[1]^2+beta[2]^2+beta[3]^2)+gamma*beta[2]*t,z=z+(gamma-1)*beta[3]*(beta[1]*x+beta[2]*y+beta[3]*z)/(beta[1]^2+beta[2]^2+beta[3]^2)+gamma*beta[3]*t];

 (8.3)

 (8.3)

 > Jacobian(Coord_2,CHANG,tr,TR); op(tr): op(TR);

 (8.4)

Components of covariant vector will transform with Lorentz transformations as

 > VECT:=create([-1],array([V[1],V[2],V[3], V[4]]));

 (8.5)

 > VECT_trans:=create([-1],array([V_trans [1], V_trans[2],V_trans[3],V_trans[4]])); get_compts(VECT_trans)=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma)): get_compts(VECT_trans)[1]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[1]; get_compts(VECT_trans)[2]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[2]; get_compts(VECT_trans)[3]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[3]; get_compts(VECT_trans)[4]=get_compts(collect(transform(VECT,CHANG,tr,TR),gamma))[4];

 (8.6)

 (8.6)

 (8.6)

 (8.6)

 (8.6)

Components of covariant tensor will transform with Lorentz transformations as

 > TENS:=create([-1,-1],array(1..4,1..4,sparse,[[T[1,1],T[1,2],T[1,3],T[1,4]],[T[2,1],T[2,2],T[2,3],T[2,4]],[T[3,1],T[3,2],T[3,3],T[3,4]],[T[4,1],T[4,2],T[4,3],T[4,4]]]));

 (8.7)

 > TENS_trans:=create([-1,-1],array(1..4,1.. 4,sparse,[[T_trans[1,1],T_trans[1,2],T_trans[1,3],T_trans[1,4]],[T_trans[2,1],T_trans[2,2],T_trans[2,3],T_trans[2,4]],[T_trans[3,1],T_trans[3,2],T_trans[3,3],T_trans[3,4]],[T_trans[4,1],T_trans[4,2],T_trans[4,3],T_trans[4,4]]])); get_compts(TENS_trans)=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma)): get_compts(TENS_trans)[1,1]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[1,1]; get_compts(TENS_trans)[1,2]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[1,2]; get_compts(TENS_trans)[2,4]=get_compts(collect(transform(TENS,CHANG,tr,TR),gamma))[2,4];

 (8.8)

 (8.8)

 (8.8)

 (8.8)

For symmetrical tensor we have transformations:

 > TENS_sym:=create([-1,-1],array(1..4,1..4,sparse,[[Tau[1,1],Tau[1,2],Tau[1,3],Tau[1,4]],[Tau[1,2],Tau[2,2],Tau[2,3],Tau[2,4]],[Tau[1,3],Tau[2,3],Tau[3,3],Tau[3,4]],[Tau[1,4],Tau[2,4],Tau[3,4],Tau[4,4]]]));

 (8.9)

 > TENS_sym_trans:=create([-1,-1],array(1..4,1..4,sparse,[[T_trans[1,1],T_trans[1,2],T_trans[1,3],T_trans[1,4]],[T_trans[2,1],T_trans[2,2],T_trans[2,3],T_trans[2,4]],[T_trans[3,1],T_trans[3,2],T_trans[3,3],T_trans[3,4]],[T_trans[4,1],T_trans[4,2],T_trans[4,3],T_trans[4,4]]])); get_compts(TENS_trans)=get_compts(collect(transform(TENS_sym,CHANG,tr,TR),[gamma,beta])):

 (8.10)

For asymmetrical tensor we have transformations:

 > TENS_as:=create([-1,-1],array(1..4, 1..4,sparse, [[0,Tau[1,2],Tau[1,3], Tau[1,4]],[-Tau[1,2],0,Tau [2,3],Tau[2, 4]],[-Tau[1,3],-Tau[2,3],0,Tau[3,4]],[-Tau[1,4],-Tau[2,4],-Tau[3,4],0]]));

 (8.11)

 > TENS_as_trans:=create([-1,-1],array(1..4, 1..4, sparse,[[0,T_trans[1,2],T_trans [1,3],T_trans[1,4]],[-T_trans[1,2],0, T_trans[2,3], T_trans[2,4]],[-T_trans[1,3] ,-T_trans[2,3],0, T_trans[3,4]],[-T_trans [1,4],-T_trans[2,4],-T_trans[3,4],0]])); get_compts(TENS_trans)=get_compts(simplify(collect(transform(TENS_as,CHANG,tr,TR), [gamma,beta]))):

 (8.12)

9. Tensor of moment of momentum

Define antisymmetric tensor of moment of momentum. We need to determine 4-radius-vector of particle and 4-energy-momentum vector:

 > R4(t):=create([-1],array([x[1],x[2],x[3], x[4]])); gamma=1/sqrt(1-(beta[1]^2+beta[2]^2+beta[3]^2)); P4(t):=create([-1],array([m*c*gamma,m*gamma *v[2],m*gamma*v[3],m*gamma*v[4]]));

 (9.1)

 (9.1)

 (9.1)

Define miscellaneous functions

 > MOM1:=prod(R4(t),P4(t)); MOM2:=prod(P4(t),R4(t));

 (9.2)

 (9.2)

and create covariant antisymmetric tensor of moment of momentum:

 > T[1,2]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[1,2],[gamma,m]); T[1,3]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[1,3],[gamma,m]); T[1,4]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[1,4],[gamma,m]); T[2,3]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[2,3],[gamma,m]); T[2,4]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[2,4],[gamma,m]); T[3,4]:=collect(get_compts(MOM1)[1,2]-get_compts(MOM2)[3,4],[gamma,m]);

 (9.3)

 (9.3)

 (9.3)

 (9.3)

 (9.3)

 (9.3)

 > MOM:=create([-1,-1],array(1..4,1..4,sparse, [[0,T[1,2],T[1,3],T[1,4]],[-T[1,2],0,T[2,3], T[2,4]],[-T[1,3],-T[2,3],0,T[3,4]],[-T[1,4],-T[2,4],-T[3,4],0]])); get_char(MOM); get_rank(MOM);

 (9.4)

 (9.4)

 (9.4)

Contravariant  antisymmetric tensor of moment of momentum is:

 > MOM_contr:=raise(g_contr,raise(g_contr, MOM, 1),2); get_char(MOM_contr); get_rank(MOM_contr);

 (9.5)

 (9.5)

 (9.5)

We can rewrite these relations in standart denotes:

 > R4(t):=create([-1],array([c*t,x,y,z])); P4(t):=create([-1],array([En/c,P[2],P[3],P[4]])); MOM1:=prod(R4(t),P4(t)); MOM2:=prod(P4(t),R4(t));

 (9.6)

 (9.6)

 (9.6)

 (9.6)

 > T[1,2]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[1,2],gamma); T[1,3]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[1,3],gamma); T[1,4]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[1,4],gamma); T[2,3]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[2,3],gamma); T[2,4]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[2,4],gamma); T[3,4]:=collect(get_compts(MOM1)[1,2]-get_compts (MOM2)[3,4],gamma);

 (9.7)

 (9.7)

 (9.7)

 (9.7)

 (9.7)

 (9.7)

 > MOM_:=create([-1,-1],array(1..4,1..4, sparse ,[[0,T[1,2],T[1,3],T[1,4]],[-T[1,2] ,0,T[2,3], T[2,4]],[-T[1,3],-T[2,3],0, T[3,4]],[-T[1,4],-T[2,4],-T[3,4],0]])); get_char(MOM_): get_rank(MOM_):

 (9.8)

 > MOM_contr:=raise(g_contr,raise(g_contr, MOM_, 1),2); get_char(MOM_contr): get_rank(MOM_contr):

 (9.9)

References

1. Landau L.D., Lifshits E.V. Theoretical physics. V. 2. Field theory. - Moscow. Fizmatlit. 2003.

2. Tikhonenko A.V. Calculus of tensors and applications in applied mathematical packets. Obninsk. IATE. 2007

Legal Notice: The copyright for this application is owned by the author(s). Neither Maplesoft nor the author are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact the author for permission if you wish to use this application in for-profit activities.