Physics for Maple 2023 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Physics : Updates : Physics for Maple 2023

Physics

Maple provides a state-of-the-art environment for algebraic computations in Physics, with emphasis on ensuring that the computational experience is as natural as possible. The theme of the Physics project for Maple 2023 has been the use of the package in Education, new commands, the consolidation of the functionality introduced in previous releases, also related to the StandardModel package, and several enhancements necessary for producing the new Courseware-Support, Mechanics material.

 

As part of its commitment to providing the best possible computational environment in Physics, Maplesoft launched a Maple Physics: Research and Development website in 2014, which enabled users to download research versions of the package, ask questions, and provide feedback. The results from this accelerated exchange have been incorporated into the Physics package in Maple 2023. The presentation below illustrates both the novelties and the kind of mathematical formulations that can now be performed.

 

Courseware support: Mechanics

New command Lagrange Equations

New command Substitute

New command StandardModel:-Lagrangian

New Physics:-Library commands: FactorSum and RemoveCommonFactors

New coordinates labels

Documentation advanced examples

See Also

Courseware support: Mechanics

The Physics package, with its various subpackages, is now a resourceful, mature project. For Maple 2023, part of the focus has been in its use in Education in Physics, starting with Mechanics. The resulting material is now part of Maple's help system and can be opened to interact with it as a Maple document. The presentation is organized as a hyperlinked syllabus covering typical topics appearing in Mechanics undergrad courses of the first years. For the Maple 2023 release, Part I covers:

 

Position, velocity and acceleration in Cartesian, cylindrical and spherical coordinates

The position rtas a function of time

The velocity vt

The acceleration at

Deriving these formulas

Velocity and acceleration in the case of 2-dimensional motion on the x, y plane

The equations of motion

A single particle

The equations of motion - vectorial form

ii 

The case of constant acceleration

iii 

Motion under gravitational force close to the Earth's surface

iv 

Motion under gravitational force not close to the Earth's surface

Circular motion

Escape velocity

Different acceleration in different regions

ii 

The equations of motion using tensor notation

Cartesian coordinates

Curvilinear coordinates

Many-particle systems

Center of mass

ii 

The equations of motion

iii 

Static: reactions of planes and tensions on cables

Lagrange equations

Motion of a pendulum

Conservation laws

Work

Conservation of the total energy of a closed system or a system in a constant external field

Conservation of the total momentum of a closed system

Conservation of angular momentum

Cyclic coordinates

Integration of the equations of motion

Motion in one dimension

Reduced mass

The two-body problem

ii 

A many-body problem

Motion in a central field

Kepler's problem

Small Oscillations

Free oscillations in one dimension

Forced oscillations

Oscillations of systems with many degrees of freedom

Rigid-body motion

Angular velocity

Inertia tensor

Angular momentum of a rigid body

The equations of motion of a rigid body

Non-inertial coordinate systems

Coriolis force and centripetal force

New command Lagrange Equations

 

There is now a new Physics command, LagrangeEquations, taking advantage of the functional differentiation capabilities. LagrangeEquations receives an expression representing a Lagrangian and returns a sequence of Lagrange equations with as many equations as coordinates are indicated. The formula in the traditional case where the Lagrangian depends on 1st order derivatives of the coordinates and there is only one parameter, t, is

ⅆⅆtviL=riL

  

where riL formally represents the derivative with respect to the coordinates of the ith particle, equal to the Gradient when working in Cartesian coordinates; viL represents the equivalent operation, replacing each coordinate by the corresponding generalized velocity and ⅆⅆt represents the total derivative with respect to t, the parameter parametrizing the coordinates. In more general cases the number of parameters can be many. For example, in electrodynamics, the "coordinate" is a tensor field Aμx,y,z,t, there are then four coordinates, one for each of the values of the index μ, and there are four parameters x,y,z,t. LagrangeEquations can handle tensors and vectors of the Physics package as well as derivatives using vectorial differential operators (see d_ and Nabla), works by performing functional differentiation (see Fundiff), and handles 1st, and higher order derivatives of the coordinates in the Lagrangian automatically.

 

Examples

 

 

 

withPhysics:

Setupmathematicalnotation=true,coordinates=cartesian

coordinatesystems=X,mathematicalnotation=true

(1)

The Lagrangian of a one-dimensional oscillator - small oscillations

L12diffxt,t212kxt2 

Lx.t22kxt22

(2)

The corresponding Lagrange equation gives Newton's second law, a 2nd order linear ODE for xt

LagrangeEquationsL,x 

x..t+xtk=0

(3)

The Lagrangian of a pendulum of mass m and length l where the suspension point moves uniformly over a vertical circumference centered at the origin, with a constant frequency ω

CompactDisplayφt 

φtwill now be displayed asφ

(4)

L12m2diffφt,talωsinωtφt+diffφt,t2l2+2cosφtgl 

Lm2φ.alωsinωtφ+φ.2l2+2cosφgl2

(5)

The Lagrange equations

LagrangeEquationsL,φ 

mlaω2cosωtφ+φ..l+sinφg=0

(6)

The Maxwell equations can be derived as Lagrange equations as follows. For simplicity, consider Maxwell equations in vacuum. Define first a tensor representing the 4D electromagnetic field potential

DefineAμ 

Aμ,γμ,σμ,μ,gμ,ν,εα,β,μ,ν,Xμ

(7)

The electromagnetic field tensor

Fμ,νd_μAνXd_νAμX

Fμ,νμAνXνAμX

(8)

The Lagrangian

LFμ,ν2 

LμAνXνAμXμμAννXννAμμX

(9)

Maxwell equations in 4D tensorial notation

LagrangeEquationsL,A 

4AααX+4μααAμμX=0

(10)

New command Substitute

 

The command for doing syntactical exact-match substitutions is subs. Frequently, however, what we intend to accomplish with a substitution is more of a mathematical substitution. For different kinds of mathematical substitutions Maple has the commands algsubs, Physics:-SubstituteTensor, Physics:-SubstituteTensorIndices, Physics:-Library:-SubstituteOperator and Physics:-Library:-SubstituteMatrix, resulting in a myriad of commands, useful, however difficult to remember. A new single command, Physics:-Substitute, unifies all of those so that one does not need to remember which one to use.

 

Examples

 

restart;withPhysics:

 

• 

Substitutions of sub-products and sub-sums, possibly involving noncommutative objects

 

eqF+ABx=Ej

eqF+ABx=Ej

(11)

eeABxC

eeABxC

(12)

Substituteeq,ee

CFEj

(13)
• 

Substitution of matrices and vectors taking mathematical equality into account

eqalpha + Matrix2,symbol=a=β+Matrix2,symbol=b 

eqα+a1,1a1,2a2,1a2,2=β+b1,1b1,2b2,1b2,2

(14)

eeMatrix2,symbol=a 

eea1,1a1,2a2,1a2,2

(15)

Substituteeq,ee

α+β+b1,1b1,2b2,1b2,2

(16)
• 

Set up some non-commutative operands for substitution

 

Setupquantumoperators=A,B,C,E,F: 

 

Some typical examples not handled by subs, eval or algsubs

eqF+AB=E

eqF+AB=E

(17)

eeexpλABCBexpλ A B C 

eeⅇλABCBⅇλABC

(18)

Substituteeq,ee

ⅇλEFCBⅇλEFC

(19)
• 

Substituting tensorial sub-expressions

 

DefineA,B,C,F,G: 

Defined objects with tensor properties

(20)

 eqAμ=Gν,αAαFμ,ν

eqAμ=AαFμ,νGν,αν,α

(21)

eeAνAν

eeAνAνν

(22)

Substituteeq,ee 

AαFν,βGβ,αβ,αAκFνλνλGλ,κλ,κ

(23)

Setupspinorindices=lowercaselatin_is 

spinorindices=lowercaselatin_is

(24)

DefineTμ,i,j 

A,B,C,F,G,γμ,σμ,Tμ,i,j,μ,gμ,ν,εα,β,μ,ν

(25)

SubstituteDgammaμi,j=Tμ,i,j,Dgamma~alpha~k,m, disregardfreeindices 

Tα,kmα,km

(26)
• 

Substitutions of tensor indices

g_α,μA~mug_~alpha,~nuBν,σ,~rho

gα,μgα,να,νAμμBν,σρν,σρ

(27)

Check,all 

α,μ,ν,σ,~rho

(28)

 Substituteα=β,mu=delta, sigma=rho, 

gβ,δgβ,νβ,νAδδBν,ρρν,ρρ

(29)

 

New command StandardModel:-Lagrangian

 

One of the distinctive aspects of the Standard Model is the complexity of its Lagrangian. In this context, the new StandardModel:-Lagrangian returns the Lagrangian of the model after symmetry breaking, optionally restricted to only the interaction terms, or only one of its QED, QCD or electroweak sectors, or only one of the different sub-terms involved in the electroweak part; all of that with the covariant derivatives, and sums over leptons and quarks optionally expanded.

 

The algebraic expressions returned by Lagrangian are fully computable, so you can use them as starting point to construct other Lagrangians (add or subtract terms), or the Action and related field equations (see d_, D_ for covariant derivatives, diff and Fundiff for functional differentiation), or to compute scattering amplitudes (see FeynmanDiagrams and FeynmanIntegral).

 

Examples

 

restart;withPhysics:withStandardModel

 

_______________________________________________________

Setting lowercaselatin_is letters to represent Dirac spinor indices

Setting lowercaselatin_ah letters to represent SU(3) adjoint representation, (1..8) indices

Setting uppercaselatin_ah letters to represent SU(3) fundamental representation, (1..3) indices

Setting uppercaselatin_is letters to represent SU(2) adjoint representation, (1..3) indices

Setting uppercasegreek letters to represent SU(2) fundamental representation, (1..2) indices

_______________________________________________________

Defined as the electron, muon and tau leptons and corresponding neutrinos: ej , μj , τj , νej , νμj , ντj

Defined as the up, charm, top, down, strange and bottom quarks: uA,j , cA,j , tA,j , dA,j , sA,j , bA,j

Defined as gauge tensors: Bμ , 𝔹μ,ν , Aμ , 𝔽μ,ν , Wμ,J , 𝕎μ,ν,J , W+μ , 𝕎+μ,ν , Wμ , 𝕎μ,ν , Zμ , μ,ν , Gμ,a , 𝔾μ,ν,a

Defined as Gell-Mann (Glambda), Pauli (Psigma) and Dirac (Dgamma) matrices: λa , σJ , γμ

Defined as the electric, weak and strong coupling constants: g__e, g__w, g__s

Defined as the charge in units of |g__e| for 1) the electron, muon and tauon, 2) the up, charm and top, and 3) the down, strange and bottom: q__e = −1, q__u = 23, q__d = 13

Defined as the weak isospin for 1) the electron, muon and tauon, 2) the up, charm and top, 3) the down, strange and bottom, and 4) all the neutrinos: I__e = 12, I__u = 12, I__d = 12, I__n = 12

You can use the active form without the % prefix, or the 'value' command to give the corresponding value to any of the inert representations q__e, q__u, q__d, I__e, I__u, I__d, I__n

_______________________________________________________

Default differentiation variables for d_, D_ and dAlembertian are:X=x,y,z,t

Minkowski spacetime with signatre - - - +

_______________________________________________________

I__d,I__e,I__n,I__u,q__d,q__e,q__u,BField,BFieldStrength,Bottom,CKM,Charm,Down,ElectromagneticField,ElectromagneticFieldStrength,Electron,ElectronNeutrino,FSU3,Glambda,GluonField,GluonFieldStrength,HiggsBoson,Lagrangian,Muon,MuonNeutrino,Strange,Tauon,TauonNeutrino,Top,Up,WField,WFieldStrength,WMinusField,WMinusFieldStrength,WPlusField,WPlusFieldStrength,WeinbergAngle,ZField,ZFieldStrength,g__e,g__s,g__w

(30)

The massless fields of the model are the electromagnetic and gluon fields and the three neutrinos

Setupmassless 

masslessfields=G,νμ,ντ,A,νe

(31)

The Leptons and Quarks of the model are

StandardModel:-Leptons 

e,μ,τ,νe,νμ,ντ

(32)

StandardModel:-Quarks 

u,c,t,d,s,b

(33)

The Gauge fields, and their related field strengths displayed with Open Face type fonts

StandardModel:-GaugeFields 

A,𝔽,B,𝔹,W,𝕎,G,𝔾,W,𝕎,W+,𝕎+,Z,

(34)

To represent the interaction Lagrangians for the QCD and electroweak sectors as sums over leptons and quarks, all of them fermions, it is useful to introduce four anticommutative prefixes, used below as summation indices in the formulas

Setupanticommutativeprefix=f__D,f__L,f__Q,f__U 

anticommutativeprefix=f__D,f__L,f__Q,f__U

(35)

For readability, omit from the display of formulas the functionality of all the fields entering the Standard Model (see CompactDisplay) and use the lowercase i instead of the uppercase I to represent the imaginary unit

CompactDisplayStandardModel:-Leptons,StandardModel:-Quarks,StandardModel:-GaugeFields,HiggsBoson,f__L,f__Q,f__U,f__DX,quiet: interfaceimaginaryunit=i:

 

The Lagrangian of the whole Standard Model after symmetry breaking, in its most compact form:

Lagrangian

f__Q=u,c,t,d,s,bf__QA,j&conjugate0;γμj,kμmf__Qδj,kf__QA,k𝔾μ,ν,a24𝔽μ,ν24𝕎+μ,ν𝕎μ,ν2+mW2W+μWμμ,ν24+mZ2Zμ22+μΦ22mΦ2Φ22+f__L=e,μ,τf__Lj&conjugate0;γμj,kμf__Lkmf__Lf__Lj+f__L=νe,νμ,ντγμj,kf__Lj&conjugate0;μf__Lk+f__Q=u,c,t,d,s,bf__QA,j&conjugate0;γμj,kμf__QA,kmf__Qf__QA,j+g__eγμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kAμ+g__wγμj,kδk,l+γ5k,lI__ef__L=e,μ,τf__Lj&conjugate0;f__Ll+I__nf__L=νe,νμ,ντf__Lj&conjugate0;f__Ll+I__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,l+I__df__Q=d,s,bf__QA,j&conjugate0;f__QA,lsinθw2γμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kZμcosθwg__w2γμj,kδk,l+γ5k,lf__D=d,s,bf__U=u,c,t𝕄f__U,f__Df__UA,j&conjugate0;f__DA,l+f__L=νe,e,νμ,μ,ντ,τf__L1jX&conjugate0;f__L2lXW+μ+f__D=d,s,bf__U=u,c,t𝕄f__U,f__D&conjugate0;f__DA,j&conjugate0;f__UA,l+f__L=νe,e,νμ,μ,ντ,τf__L2jX&conjugate0;f__L1lXWμ2g__wmΦ2Φ3+Φ48mW4mW+g__wΦmW+g__w2Φ24mW2mW2W+μWμ+Zμ2mZ22g__w𝕎+μ,νWμW+μ𝕎μ,νAνsinθwZνcosθw+WνW+μ𝔽μ,νsinθwμ,νcosθwg__w22W+μWμ+AμsinθwZμcosθw22W+νWν+AνsinθwZνcosθw2+W+μWν+W+νWμ+AμsinθwZμcosθwAνsinθwZνcosθw24g__wf__L=e,μ,τ,νe,νμ,ντmf__Lf__Lj&conjugate0;f__Lj+f__Q=u,c,t,d,s,bmf__Qf__QA,j&conjugate0;f__QA,jΦ2mW

(36)

In the output above we see, among other things, the γ5 Dirac matrix, and the Cabibbo - Kobayashi - Maskawa matrix 𝕄, and the tensor indices of different kinds all explicit. See StandardModel for the notational conventions used, which are standard in the literature but for a few things, like a sign in the definition of γ5, that depend on the reference.

The Quantum Electrodynamics (QED) Lagrangian

 

The simplest sector of this Lagrangian (8) is the QED one

LagrangianQED 

ej&conjugate0;γμj,kμμmeδj,kek𝔽μ,ν𝔽μ,νμ,ν4

(37)

The applied form can be obtained using the Library command ApplyProductsOfDifferentialOperators over the output (9) or passing the optional argument applied

LagrangianQED,applied 

ej&conjugate0;μekγμμj,kmeδj,kek𝔽μ,ν𝔽μ,νμ,ν4

(38)

Only the interaction part of this Lagrangian is relevant when computing scattering amplitudes. To get that part, you can either expand the covariant derivative operator or or pass the optional keyword expanded, in which case also the trace of 𝔽__μ,ν gets expanded

LagrangianQED,expanded

ej&conjugate0;μekγμμj,kg__eej&conjugate0;ekAμγμμj,kmeej&conjugate0;ejμAννAμμμAννννAμμ4

(39)

then discard the non-interaction terms

removehas,,d_,m

γμμj,kg__eej&conjugate0;ekAμ

(40)

or simpler: pass the keyword interaction

LagrangianQED,interaction 

γμμj,kg__eej&conjugate0;ekAμ

(41)

All the algebraic expressions returned by Lagrangian are fully computable in that further calculations can proceed starting from them. For example (see FeynmanDiagrams), this is the self-energy of the electron

FeynmanDiagrams,incoming=Electron,outgoing=Electron,numberofloops=1,diagrams 

uelP1uemP2&conjugate0;g__e2γααm,nγννp,lP__1β+p__2βγββn,p+meδn,pgα,νδP__2+P__18π3P__1+p__22me2+εp__22+εⅆp__2 4

(42)

The Quantum Chromodynamics (QCD) Lagrangian

 

Next in complexity is the QCD Lagrangian

LagrangianQCD 

f__Q=u,c,t,d,s,bf__QA,j&conjugate0;γμj,kμμmf__Qδj,kf__QA,k𝔾μ,ν,a𝔾μ,νaμ,νa4

(43)

LagrangianQCD,expanded 

uA,j&conjugate0;μuA,kg__sλaA,BuB,kGμ,a2γμμj,kmuδj,kuA,k+cA,j&conjugate0;μcA,kg__sλaA,BcB,kGμ,a2γμμj,kmcδj,kcA,k+tA,j&conjugate0;μtA,kg__sλaA,BtB,kGμ,a2γμμj,kmtδj,ktA,k+dA,j&conjugate0;μdA,kg__sλaA,BdB,kGμ,a2γμμj,kmdδj,kdA,k+sA,j&conjugate0;μsA,kg__sλaA,BsB,kGμ,a2γμμj,kmsδj,ksA,k+bA,j&conjugate0;μbA,kg__sλaA,BbB,kGμ,a2γμμj,kmbδj,kbA,kμGν,aνGμ,a+g__sfsu3a,b,cGμ,bGν,cμμGνaνaννGμaμa+g__sfsu3a,d,eGμdμdGνeνe4

(44)

For computing scattering amplitudes, only the interaction part of this Lagrangian is relevant

LagrangianQCD,interaction 

g__sλaA,Bf__Q=u,c,t,d,s,bf__QA,j&conjugate0;f__QB,kGμ,aγμμj,k2g__sfsu3a,b,cμGν,aGμbμbGνcνcg__sfsu3c,d,eGμ,aGα,bGμeμeGαdαd4

(45)

LagrangianQCD,interaction,expanded 

g__sλaA,BuA,j&conjugate0;uB,k+cA,j&conjugate0;cB,k+tA,j&conjugate0;tB,k+dA,j&conjugate0;dB,k+sA,j&conjugate0;sB,k+bA,j&conjugate0;bB,kGμ,aγμμj,k2g__sfsu3a,b,cμGν,aGμbμbGνcνcg__sfsu3c,d,eGμ,aGα,bGμeμeGαdαd4

(46)

The amplitude at tree level for the process with two incoming and two outgoing Up quarks (particle and antiparticle) exchanging a gluon

FeynmanDiagrams,incomingparticles=Up,conjugateUp,outgoingparticles=Up,conjugateUp,numberofloops=0,diagrams 

uuC,lP1vuE,mP2&conjugate0;uuF,nP3&conjugate0;vuG,pP4g__s2λgF,Gγκκn,pλfE,Cγββm,lgβ,κδf,gδP__3λλP__4λλ+P__1λλ+P__2λλ16π2P__1σ+P__2σP__1σσ+P__2σσ+ε+uuC,lP1vuE,mP2&conjugate0;uuF,nP3&conjugate0;vuG,pP4g__s2λgE,Gγκκm,pλfF,Cγββn,lgβ,κδf,gδP__3λλP__4λλ+P__1λλ+P__2λλ16π2P__1σP__3σP__1σσP__3σσ+ε

(47)

 

The Electro-Weak Lagrangian

 

The electroweak sector of the Standard Model Lagrangian is significantly more complicated

Lagrangianelectroweak 

𝔽μ,ν24𝕎+μ,ν𝕎μ,ν2+mW2W+μWμμ,ν24+mZ2Zμ22+μΦ22mΦ2Φ22+f__L=e,μ,τf__Lj&conjugate0;γμj,kμf__Lkmf__Lf__Lj+f__L=νe,νμ,ντγμj,kf__Lj&conjugate0;μf__Lk+f__Q=u,c,t,d,s,bf__QA,j&conjugate0;γμj,kμf__QA,kmf__Qf__QA,j+g__eγμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kAμ+g__wγμj,kδk,l+γ5k,lI__ef__L=e,μ,τf__Lj&conjugate0;f__Ll+I__nf__L=νe,νμ,ντf__Lj&conjugate0;f__Ll+I__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,l+I__df__Q=d,s,bf__QA,j&conjugate0;f__QA,lsinθw2γμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kZμcosθwg__w2γμj,kδk,l+γ5k,lf__D=d,s,bf__U=u,c,t𝕄f__U,f__Df__UA,j&conjugate0;f__DA,l+f__L=νe,e,νμ,μ,ντ,τf__L1jX&conjugate0;f__L2lXW+μ+f__D=d,s,bf__U=u,c,t𝕄f__U,f__D&conjugate0;f__DA,j&conjugate0;f__UA,l+f__L=νe,e,νμ,μ,ντ,τf__L2jX&conjugate0;f__L1lXWμ2g__wmΦ2Φ3+Φ48mW4mW+g__wΦmW+g__w2Φ24mW2mW2W+μWμ+Zμ2mZ22g__w𝕎+μ,νWμW+μ𝕎μ,νAνsinθwZνcosθw+WνW+μ𝔽μ,νsinθwμ,νcosθwg__w22W+μWμ+AμsinθwZμcosθw22W+νWν+AνsinθwZνcosθw2+W+μWν+W+νWμ+AμsinθwZμcosθwAνsinθwZνcosθw24g__wf__L=e,μ,τ,νe,νμ,ντmf__Lf__Lj&conjugate0;f__Lj+f__Q=u,c,t,d,s,bmf__Qf__QA,j&conjugate0;f__QA,jΦ2mW

(48)

To decipher this result it is useful to see the structure of physically recognizable terms. For that purpose, you can use the keyword showterms

Lagrangianelectroweak,showterms 

L__K+L__N+L__C+L__H+L__HV+L__WWV+L__WWVV+L__YwhereL__K=𝔽μ,ν24𝕎+μ,ν𝕎μ,ν2+mW2W+μWμμ,ν24+mZ2Zμ22+μΦ22mΦ2Φ22+f__L=e,μ,τf__Lj&conjugate0;γμj,kμf__Lkmf__Lf__Lj+f__L=νe,νμ,ντγμj,kf__Lj&conjugate0;μf__Lk+f__Q=u,c,t,d,s,bf__QA,j&conjugate0;γμj,kμf__QA,kmf__Qf__QA,j,L__N=g__eγμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kAμ+g__wγμj,kδk,l+γ5k,lI__ef__L=e,μ,τf__Lj&conjugate0;f__Ll+I__nf__L=νe,νμ,ντf__Lj&conjugate0;f__Ll+I__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,l+I__df__Q=d,s,bf__QA,j&conjugate0;f__QA,lsinθw2γμj,kq__ef__L=e,μ,τf__Lj&conjugate0;f__Lk+q__uf__Q=u,c,tf__QA,j&conjugate0;f__QA,k+q__df__Q=d,s,bf__QA,j&conjugate0;f__QA,kZμcosθw,L__C=g__w2γμj,kδk,l+γ5k,lf__D=d,s,bf__U=u,c,t𝕄f__U,f__Df__UA,j&conjugate0;f__DA,l+f__L=νe,e,νμ,μ,ντ,τf__L1jX&conjugate0;f__L2lXW+μ+f__D=d,s,bf__U=u,c,t𝕄f__U,f__D&conjugate0;f__DA,j&conjugate0;f__UA,l+f__L=νe,e,νμ,μ,ντ,τf__L2jX&conjugate0;f__L1lXWμ2,L__H=g__wmΦ2Φ3+Φ48mW4mW,L__HV=g__wΦmW+g__w2Φ24mW2mW2W+μWμ+Zμ2mZ22,L__WWV=−ⅈg__w𝕎+μ,νWμW+μ𝕎μ,νAνsinθwZνcosθw+WνW+μ𝔽μ,νsinθwμ,νcosθw,L__WWVV=g__w22W+μWμ+AμsinθwZμcosθw22W+νWν+AνsinθwZνcosθw2+W+μWν+W+νWμ+AμsinθwZμcosθwAνsinθwZνcosθw24,L__Y=g__wf__L=e,μ,τ,νe,νμ,ντmf__Lf__Lj&conjugate0;f__Lj+f__Q=u,c,t,d,s,bmf__Qf__QA,j&conjugate0;f__QA,jΦ2mW

(49)

In this result we see a sum of Lterms, and after 'where' there is a list of equations with the formulas represented by each Lterm. Take from the above, for instance, only the charged current LC term that involves interaction between the leptons and the corresponding neutrinos: you can do that with the mouse, copy and paste, or using the term= ... option of Lagrangian

Lagrangianelectroweak,term=LC 

L__C=g__w2δk,l+γ5k,lf__D=d,s,bf__U=u,c,t𝕄f__U,f__Df__UA,j&conjugate0;f__DA,l+f__L=νe,e,νμ,μ,ντ,τf__L1jX&conjugate0;f__L2lXW+μ+f__D=d,s,bf__U=u,c,t𝕄f__U,f__D&conjugate0;f__DA,j&conjugate0;f__UA,l+f__L=νe,e,νμ,μ,ντ,τf__L2jX&conjugate0;f__L1lXWμγμμj,k2

(50)

The same term in expanded form, useful for computing scattering amplitudes

Lagrangianelectroweak,term=LC,expanded 

L__C=g__w2δk,l+γ5k,l𝕄u,duA,j&conjugate0;dA,l+𝕄c,dcA,j&conjugate0;dA,l+𝕄t,dtA,j&conjugate0;dA,l+𝕄u,suA,j&conjugate0;sA,l+𝕄c,scA,j&conjugate0;sA,l+𝕄t,stA,j&conjugate0;sA,l+𝕄u,buA,j&conjugate0;bA,l+𝕄c,bcA,j&conjugate0;bA,l+𝕄t,btA,j&conjugate0;bA,l+νej&conjugate0;el+νμj&conjugate0;μl+ντj&conjugate0;τlW+μ+𝕄u,d&conjugate0;dA,j&conjugate0;uA,l+𝕄c,d&conjugate0;dA,j&conjugate0;cA,l+𝕄t,d&conjugate0;dA,j&conjugate0;tA,l+𝕄u,s&conjugate0;sA,j&conjugate0;uA,l+𝕄c,s&conjugate0;sA,j&conjugate0;cA,l+𝕄t,s&conjugate0;sA,j&conjugate0;tA,l+𝕄u,b&conjugate0;bA,j&conjugate0;uA,l+𝕄c,b&conjugate0;bA,j&conjugate0;cA,l+𝕄t,b&conjugate0;bA,j&conjugate0;tA,l+ej&conjugate0;νel+μj&conjugate0;νμl+τj&conjugate0;ντlWμγμμj,k2

(51)

A process at tree level with a positron and electronic neutrino incoming and the antiparticle of the muon and a muon neutrino outgoing after exchanging a W boson

FeynmanDiagramsrhs,incoming=conjugateElectron,ElectronNeutrino,outgoing=conjugateMuon,MuonNeutrino,numberofloops=0,diagrams 

4vemP1&conjugate0;uνenP2vμpP3uνμqP4&conjugate0;2g__wγ5r,pγααq,r22g__wγααq,p22g__wγ5s,nγννm,s22g__wγννm,n2gα,ν+P__1ν+P__2νP__1α+P__2αmW2δP__3ββP__4ββ+P__1ββ+P__2ββπ2P__1κ+P__2κP__1κκ+P__2κκmW2+ε

(52)

The term LHV of the electroweak Lagrangian contains the interaction between the Higgs and the Z and W bosons

Lagrangianelectroweak,term=LHV,interaction 

L__HV=g__wΦmW+g__w2Φ24mW2mW2W+μWμμ+mZ2ZμZμμ2

(53)

The probability density at one loop for a process with three Higgs incoming and outgoing: to omit the large - two pages - algebraic result containing Feynman integrals, end the input line with ":", or remove that ending to see and manipulate the integrals. Note this result involves Feynman diagrams with two, three, four, five and six vertices. New in Maple 2023 are the diagrams with more than four vertices.

 

FeynmanDiagramsrhs,incoming=HiggsBoson,HiggsBoson,HiggsBoson,outgoing=HiggsBoson,HiggsBoson,HiggsBoson,numberofloops=1,diagrams,output=probabilitydensity:

 

New Physics:-Library commands: FactorSum and RemoveCommonFactors

 

It is sometimes the case that one needs to factor out something without changing or complicating the algebraic structure of each factor​​​​​​​. For this purpose, there is a new Physics:-Library command, FactorSum.

 

Examples

 

restart;

f  A sinxθxkAsinxθxmω2B+C 

fAsinxθxkAsinxθxmω2B+C

(54)

We want to extract the factors Asinxθx. The standard approach is to use factor or simplify

factorf

Asinxθxmω2+kB+kCB+C

(55)

simplifyf,size

AsinxθxkB+Cmω2B+C

(56)

Both performed the operation requested, but, in addition, performed additional undesired operations or normalizations. An alternative to accomplish this without changing the algebraic structure of each factor, is

Physics:-Library:-FactorSumf

kmω2B+CAsinxθx

(57)

The relevance of this is in that more often than not, textbooks write this expression as in (57), not (56), not (55), and when studying a book or trying to follow its computations getting exact match to what we see on paper, Physics:-Library:-FactorSum is of help in a way that the other commands are not.

 

Similarly, when we have equations with both sides having a common factor and therefore we want to just cancel out that factor without changing anything else, the routine to use is the new Physics:-Library:-RemoveCommonFactors. For example, in

 =  Asinxθx

kmω2B+CAsinxθx=Asinxθx

(58)

we see, on the left-hand and right-hand sides, the common factors Asinxθx. One simple way of performing this cancellation of common factors on the left and right hand sides, sufficiently identical to what we do with paper and pencil, is

Physics:-Library:-RemoveCommonFactors

kmω2B+C=1

(59)

Note that, as shown above, you don't need to load the Physics to use its Library commands

 

New coordinates labels

 

Notation is one of the most important things to communicate with others in science. In the context of the Physics package, strong emphasis is put on using textbook notation as much as possible regarding input and output. Still, for historical reasons, when using the Physics package, the labels used to refer to a coordinate system had been a single Capital Letter, as in X, Y, ...It was not possible to use, e.g. X ', or x.

 

That has changed in Maple 2023: any symbol can be used as a coordinate system label.

 

Examples

 

withPhysics:

 

A lowercase letter can be used as a coordinate's label

Setupcoordinates=x

coordinatesystems=x

(60)

In these cases where the coordinate's system label is not a single Capital Letter, say X, the default coordinates automatically associated to the label, instead of x1,x2, ...,  are now literal subscripts x__1,x__2, ..., that is: symbols with a root, in this example x, followed by the double underscore __, then a number. The automatic mapping x0  x4 is in these cases x__0  x__4, also using literal subscripts x__0 and x__4.

 

Hence

x__0

x__4

(61)

Everything else works as with the traditional Capital Letter coordinate-system labels. So xμμ is a tensor because it is the 4-vector related to the system of coordinates x=x__1,x__2,x__3,x__4

typexmu,Library:-PhysicsType:-Tensor

true

(62)

Consequently, xmu2 also receives the automatic reformatting of repeated indices making one of then contravariant

xmu2

xμxμμ

(63)

SumOverRepeatedIndices

x__12x__22x__32+x__42

(64)

A typical textbook case example: the label has a prime using the new feature of Maple 2023 that allows for primed variables. For example,

CoordinatesX'

X',x

(65)

Note that the coordinates automatically associated to X ' also have a prime; that is also as in textbooks. One can as well use x and x' at the same time to describe transformations of coordinates between two reference systems

Coordinatesx'

x,x'

(66)

(in the above, the previous label X' is automatically removed to reuse the coordinates x'__1,x'__2,x'__3,x'__4 with the new label x' )

 

The case of a coordinate system where the label has a prime is also special. For example, suppose you set a coordinate system without a prime, as in

CoordinatesX=cartesian

X,x,x'

(67)

If you now set the label X ', because the label X is already set, the coordinates associated to X ' are those of X with a prime

CoordinatesX'

X,X',x,x'

(68)

Finally, it is now also possible to use literalsubscripts with any label. For example, for a Capital Letter label, say instead of  Y=y1,y2,y3,y4, you can set Y with literal subscripts:

CoordinatesY,literalsubscripts

X,X',Y,x,x'

(69)

Summarizing:

1. The label can now be any symbol; particularly useful is the case of a lowercase letter as a label: we can now represent position vectors in tensorial notation using a more natural textbook-notation (lowercase).

2. We can now use the traditional x and x', or X and X' notations, at the same time, as frequently seen in textbooks when presenting transformations of coordinates

3. The coordinates automatically associated to these new coordinate labels use literal subscripted letters as in x1,x__2, ..., a textbook-like typesetting, instead of the old, not so good looking, x1,x2, ... 

4. It is now possible (optional) to use literal subscripts also with Capital Letter coordinate-system labels

5. Coordinate-system labels with a prime are treated in a special way when the same label without a prime already exists, by just concatenating a prime to the coordinates of the label without prime.

 

Documentation advanced examples

One of the most important parts of the Physics project is its documentation; the illustration of the use of the package in different scenarios. The three relevant help pages for that are

• 

The Physics,Examples

• 

The Physics,Tensors

• 

The Physics,Updates

 

For Maple 2021, the first of these pages got extended with four sections covering new material in Vector Analysis, Mechanics and Classical Field Theory.
1. Vectors in Spherical Coordinates using Tensor Notation 
2. The equations of motion in curvilinear coordinates, tensor notation and Coriolis force

3. The EnergyMomentum tensor for the Proca Lagrangian

4. The Gross-Pitaevskii field equations for a quantum system of identical particles"


For Maple 2022, the first of these pages got extended with three new sections:
1. Parametrization of Curves, Surfaces and Volumes
2. Integral Vector Calculus
3. The StandardModel in Particle Physics

 

For Maple 2023, the first of these pages got extended with three new sections:

. Moving charges: the retarded and Liénard-Wiechert potentials, electric and magnetic fields E and H 

. Deriving the mathematical form of 4D relativistic Lorentz transformations

. Einstein's principle of relativity

See Also

Index of New Maple 2023 Features, Physics , Computer Algebra for Theoretical Physics, The Physics project, The Physics Updates