ecterrab

14605 Reputation

24 Badges

20 years, 98 days

MaplePrimes Activity


These are answers submitted by ecterrab

First of all: when the defining the algebra rules, use %Dagger, not Dagger, the same way you use %Commutator, not Commutator, because if you use Dagger (or Commutator), it gets executed before you defined a and b as quantum operators, and therefore Dagger(a) just returns the complex conjugate of the commutative variable a (and Commutator will return 0 because before defining these objects as quantum objects, they are supposed to commute).That explains the issues you mentioned.

So the first part of your worksheet only changing Dagger into %Dagger in the call to Setup defining the algebra rules, will look like:

restart:

with(Physics);

[`*`, `.`, Annihilation, AntiCommutator, Antisymmetrize, Assume, Bra, Bracket, Check, Christoffel, Coefficients, Commutator, CompactDisplay, Coordinates, Creation, D_, Dagger, Define, Dgamma, Einstein, EnergyMomentum, Expand, ExteriorDerivative, Factor, FeynmanDiagrams, Fundiff, Geodesics, GrassmannParity, Gtaylor, Intc, Inverse, Ket, KillingVectors, KroneckerDelta, LeviCivita, Library, LieBracket, LieDerivative, Normal, Parameters, PerformOnAnticommutativeSystem, Projector, Psigma, Ricci, Riemann, Setup, Simplify, SpaceTimeVector, SubstituteTensor, SubstituteTensorIndices, SumOverRepeatedIndices, Symmetrize, TensorArray, Tetrads, ToFieldComponents, ToSuperfields, Trace, TransformCoordinates, Vectors, Weyl, `^`, dAlembertian, d_, diff, g_]

(1)

Physics:-Version();

"/Users/ecterrab/Maple/lib/Physics2016.mla", `2016, May 4, 8:14 hours`

(2)

Setup(mathematicalnotation=true,quantumoperators = {a, b}, {%Commutator(%Dagger(a), a) = -1, %Commutator(%Dagger(b), b)=-1, %Commutator(a, b)=0, %Commutator(%Dagger(a), %Dagger(b))=0, %Commutator(a, %Dagger(b))=0, %Commutator(%Dagger(a), b)=0});

[algebrarules = {%Commutator(a, %Dagger(b)) = 0, %Commutator(%Dagger(a), a) = -1, %Commutator(%Dagger(a), b) = 0, %Commutator(%Dagger(a), %Dagger(b)) = 0, %Commutator(%Dagger(b), b) = -1}, mathematicalnotation = true, quantumoperators = {a, b}]

(3)

ad:=Dagger(a);
bd:=Dagger(b);

Physics:-Dagger(a)

 

Physics:-Dagger(b)

(4)

my function (a, b are operators, the rest numbers):

f:=sqrt(1+beta*((ad + c)*(a+conjugate(c)) + k*bd*b))

(1+beta*(Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c))+k*Physics:-`*`(Physics:-Dagger(b), b)))^(1/2)

(5)

want to taylor expand near beta=0

f_approx:=convert(series(f, beta=0, 4),polynom);

1+((1/2)*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c)))*beta-(1/64)*(2*k*Physics:-`*`(Physics:-Dagger(b), b)+2*Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c)))*(4*k*Physics:-`*`(Physics:-Dagger(b), b)+4*Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c)))*beta^2+(1/512)*(2*k*Physics:-`*`(Physics:-Dagger(b), b)+2*Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c)))*(4*k*Physics:-`*`(Physics:-Dagger(b), b)+4*Physics:-`*`(Physics:-Dagger(a)+c, a+conjugate(c)))^2*beta^3

(6)

At this point you say:

  

"Now I want to expand, write all terms in normal order, and collect in terms of beta"

So, expand

expand(f_approx)

1-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)*Physics:-Dagger(a)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*a*c-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*beta^2*conjugate(c)*Physics:-Dagger(a)*a*c-(1/4)*beta^2*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*beta^2*a*c^2*conjugate(c)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*c*conjugate(c)+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)^2*c+(3/16)*beta^3*a*c^3*conjugate(c)^2+(3/16)*beta^3*a^2*c^3*conjugate(c)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)^2+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*Physics:-`*`(Physics:-Dagger(a), a)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)^2*Physics:-Dagger(a)^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*a^2*c^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*conjugate(c)*Physics:-Dagger(a)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*a*c-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*a*c-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*conjugate(c)*Physics:-Dagger(a)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*a*c+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*c*conjugate(c)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)^2*Physics:-Dagger(a)^2+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*a^2*c^2+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)^2*Physics:-Dagger(a)*c+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*a*c^2*conjugate(c)+(3/16)*beta^3*conjugate(c)^2*Physics:-Dagger(a)^2*a*c+(3/16)*beta^3*conjugate(c)*Physics:-Dagger(a)*a^2*c^2+(3/8)*beta^3*conjugate(c)^2*Physics:-Dagger(a)*a*c^2+(1/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^3+(1/2)*beta*Physics:-`*`(Physics:-Dagger(a), a)-(1/8)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)^2+(1/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)^3+(1/16)*beta^3*a^3*c^3+(1/16)*beta^3*c^3*conjugate(c)^3+(1/16)*beta^3*k^3*Physics:-`*`(Physics:-Dagger(b), b)^3-(1/8)*beta^2*c^2*conjugate(c)^2+(1/2)*beta*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*beta*conjugate(c)*Physics:-Dagger(a)+(1/2)*beta*a*c+(1/2)*beta*c*conjugate(c)-(1/8)*beta^2*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2-(1/8)*beta^2*conjugate(c)^2*Physics:-Dagger(a)^2-(1/8)*beta^2*a^2*c^2+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)^2*Physics:-Dagger(a)*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*a*c^2*conjugate(c)+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)*a*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*a*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)*Physics:-Dagger(a)*a*c

(7)

Then sort the products as you say, Dagger(U) before U, using the commutator rules you stated (see the SortProducts section of the Physics:-Library help page  )

Library:-SortProducts(1-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)*Physics:-Dagger(a)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*a*c-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*beta^2*conjugate(c)*Physics:-Dagger(a)*a*c-(1/4)*beta^2*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*beta^2*a*c^2*conjugate(c)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*c*conjugate(c)+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)^2*c+(3/16)*beta^3*a*c^3*conjugate(c)^2+(3/16)*beta^3*a^2*c^3*conjugate(c)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)^2+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*Physics:-`*`(Physics:-Dagger(a), a)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)^2*Physics:-Dagger(a)^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*a^2*c^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*conjugate(c)*Physics:-Dagger(a)+(3/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^2*a*c-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*a*c-(1/4)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*conjugate(c)*Physics:-Dagger(a)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*a*c+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2*c*conjugate(c)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)^2*Physics:-Dagger(a)^2+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*a^2*c^2+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)^2*Physics:-Dagger(a)*c+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*a*c^2*conjugate(c)+(3/16)*beta^3*conjugate(c)^2*Physics:-Dagger(a)^2*a*c+(3/16)*beta^3*conjugate(c)*Physics:-Dagger(a)*a^2*c^2+(3/8)*beta^3*conjugate(c)^2*Physics:-Dagger(a)*a*c^2+(1/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)^3+(1/2)*beta*Physics:-`*`(Physics:-Dagger(a), a)-(1/8)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)^2+(1/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)^3+(1/16)*beta^3*a^3*c^3+(1/16)*beta^3*c^3*conjugate(c)^3+(1/16)*beta^3*k^3*Physics:-`*`(Physics:-Dagger(b), b)^3-(1/8)*beta^2*c^2*conjugate(c)^2+(1/2)*beta*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*beta*conjugate(c)*Physics:-Dagger(a)+(1/2)*beta*a*c+(1/2)*beta*c*conjugate(c)-(1/8)*beta^2*k^2*Physics:-`*`(Physics:-Dagger(b), b)^2-(1/8)*beta^2*conjugate(c)^2*Physics:-Dagger(a)^2-(1/8)*beta^2*a^2*c^2+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)^2*Physics:-Dagger(a)*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*a*c^2*conjugate(c)+(3/8)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)*a*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*conjugate(c)*Physics:-Dagger(a)+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*a*c+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/8)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*conjugate(c)*Physics:-Dagger(a)*a*c, [Physics:-Dagger(a), a, Physics:-Dagger(b), b], usecommutator)

1+(9/16)*beta^3*conjugate(c)*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*beta^2*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*beta^2*a*c^2*conjugate(c)+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*beta^3*a*c^3*conjugate(c)^2+(9/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2-(1/2)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/16)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(1/2)*beta*Physics:-`*`(Physics:-Dagger(a), a)+(3/8)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))+(9/16)*beta^3*c^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*c^3*conjugate(c)^3-(1/8)*beta^2*c^2*conjugate(c)^2+(1/2)*beta*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*beta*conjugate(c)*Physics:-Dagger(a)+(1/2)*beta*a*c+(1/2)*beta*c*conjugate(c)+(3/4)*beta^3*k*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(3/16)*beta^3*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a), a)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*c^2*conjugate(c)*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*beta^3*k*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*Physics:-`*`(a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a))-(1/4)*beta^2*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)-(1/4)*beta^2*k*c*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k*c^2*Physics:-`*`(a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*conjugate(c)^3*c*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*beta^3*c^3*conjugate(c)*Physics:-`^`(a, 2)-(1/8)*beta^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(1/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(3/16)*beta^3*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/8)*beta^2*k^2*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(1/16)*beta^3*k^3*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-`^`(Physics:-Dagger(a), 2))+(3/16)*beta^3*c^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 3))-(1/4)*beta^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/4)*beta^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*conjugate(c)^3*Physics:-`^`(Physics:-Dagger(a), 3)-(1/8)*beta^2*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)-(1/8)*beta^2*c^2*Physics:-`^`(a, 2)+(1/16)*beta^3*c^3*Physics:-`^`(a, 3)

(8)

Finally collect with respect to beta,

collect(1+(9/16)*beta^3*conjugate(c)*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*beta^2*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*beta^2*a*c^2*conjugate(c)+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*beta^3*a*c^3*conjugate(c)^2+(9/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2-(1/2)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/16)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(1/2)*beta*Physics:-`*`(Physics:-Dagger(a), a)+(3/8)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))+(9/16)*beta^3*c^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*c^3*conjugate(c)^3-(1/8)*beta^2*c^2*conjugate(c)^2+(1/2)*beta*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*beta*conjugate(c)*Physics:-Dagger(a)+(1/2)*beta*a*c+(1/2)*beta*c*conjugate(c)+(3/4)*beta^3*k*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(3/16)*beta^3*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a), a)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*c^2*conjugate(c)*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*beta^3*k*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*Physics:-`*`(a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a))-(1/4)*beta^2*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)-(1/4)*beta^2*k*c*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k*c^2*Physics:-`*`(a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*conjugate(c)^3*c*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*beta^3*c^3*conjugate(c)*Physics:-`^`(a, 2)-(1/8)*beta^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(1/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(3/16)*beta^3*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/8)*beta^2*k^2*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(1/16)*beta^3*k^3*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-`^`(Physics:-Dagger(a), 2))+(3/16)*beta^3*c^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 3))-(1/4)*beta^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/4)*beta^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*conjugate(c)^3*Physics:-`^`(Physics:-Dagger(a), 3)-(1/8)*beta^2*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)-(1/8)*beta^2*c^2*Physics:-`^`(a, 2)+(1/16)*beta^3*c^3*Physics:-`^`(a, 3), beta)

1+((3/16)*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(9/16)*conjugate(c)*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(3/16)*conjugate(c)^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(3/8)*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))+(9/16)*c^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*conjugate(c)^3*c*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*c^3*conjugate(c)*Physics:-`^`(a, 2)+(3/16)*k*c^2*Physics:-`*`(a, Physics:-Dagger(b), b, a)+(3/16)*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*k^2*c*Physics:-`*`(a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*k*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*k*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, a)+(1/16)*c^3*Physics:-`^`(a, 3)+(3/16)*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a), a)+(3/16)*k^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a))+(1/16)*k^3*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(1/16)*conjugate(c)^3*Physics:-`^`(Physics:-Dagger(a), 3)+(3/16)*c^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 3))+(3/16)*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-`^`(Physics:-Dagger(a), 2))+(1/16)*c^3*conjugate(c)^3+(3/16)*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*a*c^3*conjugate(c)^2+(9/16)*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2+(3/4)*k*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*k*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(3/8)*k*c^2*conjugate(c)*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*k^2*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(1/16)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a), a))*beta^3+(-(1/2)*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)-(1/4)*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)-(1/8)*k^2*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)-(1/8)*c^2*conjugate(c)^2-(1/8)*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)-(1/8)*c^2*Physics:-`^`(a, 2)-(1/8)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)-(1/4)*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*a*c^2*conjugate(c)-(1/4)*k*c*Physics:-`*`(a, Physics:-Dagger(b), b)-(1/4)*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)-(1/4)*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/4)*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2)))*beta^2+((1/2)*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*Physics:-`*`(Physics:-Dagger(a), a)+(1/2)*conjugate(c)*Physics:-Dagger(a)+(1/2)*a*c+(1/2)*c*conjugate(c))*beta

(9)

If in addition you wanted to Simplify the coefficients of beta using the commutator rules you introduced, use

collect(1+(9/16)*beta^3*conjugate(c)*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*beta^2*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*beta^2*a*c^2*conjugate(c)+(3/16)*beta^3*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*beta^3*a*c^3*conjugate(c)^2+(9/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2-(1/2)*beta^2*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/16)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(1/2)*beta*Physics:-`*`(Physics:-Dagger(a), a)+(3/8)*beta^3*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))+(9/16)*beta^3*c^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*c^3*conjugate(c)^3-(1/8)*beta^2*c^2*conjugate(c)^2+(1/2)*beta*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*beta*conjugate(c)*Physics:-Dagger(a)+(1/2)*beta*a*c+(1/2)*beta*c*conjugate(c)+(3/4)*beta^3*k*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(3/16)*beta^3*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*beta^3*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a), a)+(3/16)*beta^3*k^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)-(1/4)*beta^2*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*beta^3*k*c^2*conjugate(c)*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/8)*beta^3*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*beta^3*k*c*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k^2*c*Physics:-`*`(a, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*k*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a))-(1/4)*beta^2*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)-(1/4)*beta^2*k*c*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*beta^3*k*c^2*Physics:-`*`(a, Physics:-Dagger(b), b, a)+(3/16)*beta^3*conjugate(c)^3*c*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*beta^3*c^3*conjugate(c)*Physics:-`^`(a, 2)-(1/8)*beta^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(1/16)*beta^3*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a), a)+(3/16)*beta^3*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/8)*beta^2*k^2*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(1/16)*beta^3*k^3*Physics:-`*`(Physics:-Dagger(b), b, Physics:-Dagger(b), b, Physics:-Dagger(b), b)+(3/16)*beta^3*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), a, Physics:-`^`(Physics:-Dagger(a), 2))+(3/16)*beta^3*c^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 3))-(1/4)*beta^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/4)*beta^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*beta^3*conjugate(c)^3*Physics:-`^`(Physics:-Dagger(a), 3)-(1/8)*beta^2*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)-(1/8)*beta^2*c^2*Physics:-`^`(a, 2)+(1/16)*beta^3*c^3*Physics:-`^`(a, 3), beta, Physics:-Simplify)

1+((3/16)*k^2*c*conjugate(c)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(b), 2), Physics:-`^`(b, 2))+(3/16)*k*c^2*Physics:-`*`(Physics:-Dagger(b), Physics:-`^`(a, 2), b)+(3/8)*k*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), Physics:-`^`(a, 2), b)+(3/16)*k^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(b), 2), a, Physics:-`^`(b, 2))+(9/16)*conjugate(c)*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), Physics:-`^`(a, 2))+(3/16)*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(Physics:-Dagger(b), 2), Physics:-`^`(b, 2))+(3/16)*k*Physics:-`*`(Physics:-Dagger(b), b)*c^2*conjugate(c)^2+(3/16)*k^2*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(b), b)+(9/16)*conjugate(c)^2*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(9/16)*c^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*conjugate(c)^3*c*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*c^3*conjugate(c)*Physics:-`^`(a, 2)+(3/16)*k*conjugate(c)^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a))+(3/8)*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(1/16)*c^3*Physics:-`^`(a, 3)+(1/16)*conjugate(c)^3*Physics:-`^`(Physics:-Dagger(a), 3)+(3/16)*c^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 3))+(3/8)*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)+(3/16)*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2))+(1/16)*c^3*conjugate(c)^3+(1/16)*Physics:-`*`(Physics:-Dagger(a), a)+(3/16)*conjugate(c)*Physics:-Dagger(a)+(3/16)*conjugate(c)^3*Physics:-Dagger(a)*c^2+(3/16)*a*c^3*conjugate(c)^2+(9/16)*Physics:-`*`(Physics:-Dagger(a), a)*c^2*conjugate(c)^2+(9/16)*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)+(3/8)*conjugate(c)^2*Physics:-Dagger(a)*c+(1/16)*k^3*Physics:-`*`(Physics:-`^`(Physics:-Dagger(b), 3), Physics:-`^`(b, 3))+(3/16)*conjugate(c)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 3), Physics:-`^`(a, 2))+(3/16)*c*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), Physics:-`^`(a, 3))+(3/16)*k*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a), Physics:-`^`(a, 2))+(3/16)*k^2*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(Physics:-Dagger(b), 2), a, Physics:-`^`(b, 2))+(3/16)*k^3*Physics:-`*`(Physics:-`^`(Physics:-Dagger(b), 2), Physics:-`^`(b, 2))+(9/16)*conjugate(c)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)+(3/16)*conjugate(c)^2*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 3), a)+(3/4)*k*c*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)+(3/8)*k*conjugate(c)^2*c*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(3/8)*k*c^2*conjugate(c)*Physics:-`*`(a, Physics:-Dagger(b), b)+(3/16)*k^2*c*Physics:-`*`(Physics:-Dagger(b), a, b)+(3/16)*k*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), a, b)+(3/16)*k^2*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), a, b)+(1/16)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 3), Physics:-`^`(a, 3))+(3/16)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), Physics:-`^`(a, 2))+(3/8)*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b, Physics:-Dagger(a), a)+(3/16)*k^2*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)+(1/16)*k^3*Physics:-`*`(Physics:-Dagger(b), b))*beta^3+(-(1/2)*Physics:-`*`(Physics:-Dagger(a), a)*c*conjugate(c)-(1/4)*k*Physics:-`*`(Physics:-Dagger(a), a, Physics:-Dagger(b), b)-(1/8)*k^2*Physics:-`*`(Physics:-Dagger(b), b)-(1/8)*k^2*Physics:-`*`(Physics:-`^`(Physics:-Dagger(b), 2), Physics:-`^`(b, 2))-(1/8)*c^2*conjugate(c)^2-(1/8)*conjugate(c)^2*Physics:-`^`(Physics:-Dagger(a), 2)-(1/8)*c^2*Physics:-`^`(a, 2)-(1/8)*Physics:-`*`(Physics:-Dagger(a), a)-(1/8)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), Physics:-`^`(a, 2))-(1/4)*conjugate(c)^2*Physics:-Dagger(a)*c-(1/4)*a*c^2*conjugate(c)-(1/4)*k*c*Physics:-`*`(a, Physics:-Dagger(b), b)-(1/4)*k*conjugate(c)*Physics:-`*`(Physics:-Dagger(a), Physics:-Dagger(b), b)-(1/4)*k*Physics:-`*`(Physics:-Dagger(b), b)*c*conjugate(c)-(1/4)*conjugate(c)*Physics:-Dagger(a)-(1/4)*conjugate(c)*Physics:-`*`(Physics:-`^`(Physics:-Dagger(a), 2), a)-(1/4)*c*Physics:-`*`(Physics:-Dagger(a), Physics:-`^`(a, 2)))*beta^2+((1/2)*k*Physics:-`*`(Physics:-Dagger(b), b)+(1/2)*Physics:-`*`(Physics:-Dagger(a), a)+(1/2)*conjugate(c)*Physics:-Dagger(a)+(1/2)*a*c+(1/2)*c*conjugate(c))*beta

(10)

Depending on your purpose, sort again the products

By the way, instead of defining your annihilation and creation operators, you may prefer to use the ones returned by the Physics:-Annihilation  and Physics:-Creation  commands: all the commutation rules come automatically and the package knows well about them.

``


Download commutator_stuff_(reviewed).mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

No, there is in this moment no command in the Physics package to compute Feynman integrals. The computation of these integrals is, however, part of the Physics project - the reference we have in mind is "Feynman integral calculus" by V. A. Smirnov, and the technique I have in mind is dimensional regularization. Regarding "when?", unfortunately, I am not in a position to answer that, but I can tell you that we are still considering having part of this functionality in place by the end of 2016.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

The issue you are experiencing is due to the redefinition of assumed variables done by the lowercase `assume` (old) command. You can workaround this using the more modern Physics:-Assume command, that places the assumption without redefining the variables, and therefore, save and read are compatible with the assumptions placed (do not interfer with subsequent computations).

So one way of solving this issue is to simply use 

> Physics:-Assume(n::real);

instead of assume(n::real).

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

Although some people prefer to avoid 2D input mode, I really like it: just type as in 1D, but you have the option to express everything with typesetting in the input via context menus, as well as having powers and literally indexed objects displayed with typesetting.

The problem you experienced, thus, is not a 2D input mode problem: you only need to enter (D@@2)(g)(0), as noted by vv, instead of D[2](g)(0). The problem with what you entered is that D[2](g) means "the partial derivative of g with respect to the second variable, but then you only gave one argument (the number 0) instead of two, therefore you received the error message pointing to that.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

Yes, it is possible to calculate the energy momentum in the Physics package. Incidentally I showed this in the IOP webinar on the Physics package, Below I am reproducing from there, then showing a new command Physics:-EnergyMoment

 

So suppose, for instance, that you have the Tolman metric loaded,

restart; with(Physics); g_[tol]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Tolman metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[R(t, r), E(r)]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = -(diff(R(t, r), r))^2/(1+2*E(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -R(t, r)^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -R(t, r)^2*sin(theta)^2, (3, 4) = 0, (4, 4) = 1}, storage = triangular[upper], shape = [symmetric]))

(1)

Here CompactDisplay is a new Physics faciliity command  (for now just forwarding to PDEtools:-declare)

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

E(r)*`will now be displayed as`*E

 

R(t, r)*`will now be displayed as`*R

(2)

and now you want to compute the energy momentum tensor. You know, it is eq

T[mu, nu] = Physics:-`*`(Einstein[mu, nu], Physics:-`^`(Physics:-`*`(8, Pi), -1))

T[mu, nu] = (1/8)*Physics:-Einstein[mu, nu]/Pi

(3)

where the right-hand side is a tensor, but the left-hand side is just some indexed object.

OK, tell the system the left-hand side is also a tensor whose components are given by the right-hand side:

Physics:-Define(T[mu, nu] = (1/8)*Physics:-Einstein[mu, nu]/Pi)

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], T[mu, nu], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-EnergyMomentum[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(4)

So now `T__μ,ν` is a tensor, and so all the facilites for working with tensors are there:

T[definition]

T[mu, nu] = (1/8)*Physics:-Einstein[mu, nu]/Pi

(5)

and these give you the covariant and contravariant components (derivatives of R and E appear indexed because of using CompactDisplay)

T[]

T[mu, nu] = Matrix(%id = 18446744078380085366)

(6)

"T[~]"

T[`~mu`, `~nu`] = Matrix(%id = 18446744078380064150)

(7)

And in that way you can set not just the EnergyMomentum tensor but actually any tensor that passes through your mind: right an equation with the tensor's definition on the right-hand side and call Physics:-Define. Everything else follows automatically.

 

But as said I added a new command, EnergyMomentum, so that when you load Physics the command is there:

EnergyMomentum[definition]

Physics:-EnergyMomentum[mu, nu] = (1/8)*Physics:-Einstein[mu, nu]/Pi

(8)

(Note the display, it is visually slightly different than the letter T used above to define the same tensor manually.)

 

Now: because EnergyMomentum is part of the Physics package, its conversion routines know about it:

EnergyMomentum[mu, nu]

Physics:-EnergyMomentum[mu, nu]

(9)

Physics:-EnergyMomentum[mu, nu] = convert(Physics:-EnergyMomentum[mu, nu], Einstein, evaluatetrace = false)

Physics:-EnergyMomentum[mu, nu] = (1/8)*Physics:-Einstein[mu, nu]/Pi

(10)

Physics:-EnergyMomentum[mu, nu] = convert(Physics:-EnergyMomentum[mu, nu], Ricci, evaluatetrace = false)

Physics:-EnergyMomentum[mu, nu] = (1/8)*(Physics:-Ricci[mu, nu]-(1/2)*Physics:-g_[mu, nu]*Physics:-Ricci[alpha, `~alpha`])/Pi

(11)

Physics:-EnergyMomentum[mu, nu] = convert(Physics:-EnergyMomentum[mu, nu], Christoffel, evaluatetrace = false)

Physics:-EnergyMomentum[mu, nu] = (1/8)*(Physics:-d_[beta](Physics:-Christoffel[`~beta`, mu, nu], [X])-Physics:-d_[nu](Physics:-Christoffel[`~beta`, beta, mu], [X])+Physics:-Christoffel[`~kappa`, mu, nu]*Physics:-Christoffel[`~beta`, beta, kappa]-Physics:-Christoffel[`~kappa`, beta, mu]*Physics:-Christoffel[`~beta`, kappa, nu]-(1/2)*Physics:-g_[mu, nu]*Physics:-Ricci[alpha, `~alpha`])/Pi

(12)

Physics:-EnergyMomentum[mu, nu] = convert(Physics:-EnergyMomentum[mu, nu], g_, evaluatetrace = false)

Physics:-EnergyMomentum[mu, nu] = (1/8)*((1/2)*Physics:-d_[beta](Physics:-g_[`~beta`, `~upsilon`], [X])*(Physics:-d_[nu](Physics:-g_[mu, upsilon], [X])+Physics:-d_[mu](Physics:-g_[nu, upsilon], [X])-Physics:-d_[upsilon](Physics:-g_[mu, nu], [X]))+(1/2)*Physics:-g_[`~beta`, `~upsilon`]*(Physics:-d_[beta](Physics:-d_[nu](Physics:-g_[mu, upsilon], [X]), [X])+Physics:-d_[beta](Physics:-d_[mu](Physics:-g_[nu, upsilon], [X]), [X])-Physics:-d_[beta](Physics:-d_[upsilon](Physics:-g_[mu, nu], [X]), [X]))-(1/2)*Physics:-d_[nu](Physics:-g_[`~beta`, `~sigma`], [X])*Physics:-d_[mu](Physics:-g_[beta, sigma], [X])-(1/2)*Physics:-g_[`~beta`, `~sigma`]*Physics:-d_[nu](Physics:-d_[mu](Physics:-g_[beta, sigma], [X]), [X])+(1/4)*Physics:-g_[`~kappa`, `~psi`]*(Physics:-d_[nu](Physics:-g_[mu, psi], [X])+Physics:-d_[mu](Physics:-g_[nu, psi], [X])-Physics:-d_[psi](Physics:-g_[mu, nu], [X]))*Physics:-g_[`~beta`, `~lambda`]*Physics:-d_[kappa](Physics:-g_[beta, lambda], [X])-(1/4)*Physics:-g_[`~chi`, `~kappa`]*(Physics:-d_[mu](Physics:-g_[beta, chi], [X])+Physics:-d_[beta](Physics:-g_[chi, mu], [X])-Physics:-d_[chi](Physics:-g_[beta, mu], [X]))*Physics:-g_[`~beta`, `~tau`]*(Physics:-d_[nu](Physics:-g_[kappa, tau], [X])+Physics:-d_[kappa](Physics:-g_[nu, tau], [X])-Physics:-d_[tau](Physics:-g_[kappa, nu], [X]))-(1/2)*Physics:-g_[mu, nu]*Physics:-Ricci[alpha, `~alpha`])/Pi

(13)

Also, you know this definition depends on the value of the cosmological constant, that in Physics by default it is set to 0, but one may want to use a value different from zero. You can set that using Setup. Check first the current value

Physics:-Setup(cosmo)

`* Partial match of  'cosmo' against keyword 'cosmologicalconstant'`

 

[cosmologicalconstant = 0]

(14)

Set it to - say - Lambda (could be any algebraic expression)

Physics:-Setup(cosmo = Lambda)

`* Partial match of  'cosmo' against keyword 'cosmologicalconstant'`

 

[cosmologicalconstant = Lambda]

(15)

Try again the definition and conversions:

EnergyMomentum[definition]

Physics:-EnergyMomentum[mu, nu] = (1/8)*(Lambda*Physics:-g_[mu, nu]+Physics:-Einstein[mu, nu])/Pi

(16)

Physics:-EnergyMomentum[mu, nu] = convert(Physics:-EnergyMomentum[mu, nu], Ricci, evaluatetrace = false)

Physics:-EnergyMomentum[mu, nu] = (1/8)*(Lambda*Physics:-g_[mu, nu]+Physics:-Ricci[mu, nu]-(1/2)*Physics:-g_[mu, nu]*Physics:-Ricci[alpha, `~alpha`])/Pi

(17)

``


Download EnergyMomentum.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

Without further details, yes, you can formulate and perform the simulations you are mentioning. The question is then what would be an easy entry point for someone who has not used computer algebra before. Such an entry point could be the "Mini-Course: Computer Algebra for Physicists", where the first 5 sections are about Maple 101, and the last 5 about Physics and examples in different physics areas.

Edgardo S. Cheb-Terrab 
Physics, Differential Equations and Mathematical Functions, Maplesoft

This gives you the indeterminates

> du := indets(pd2, specindex(u));

This gives you the coefficients you are asking

> coeffs(expand(pd2[1]), du);

If what you intended to do is actually "collecting" the coefficients, as in using the collect command, then

> collect(pd2[1], du);

If you want u(x, t), represented by u after your call to Tojet, to also be considered a collecting variabile (say as the derivative of order 0), so to be included in du, then when you construct pd2 by calling ToJet, use the optional argument notation = jetvariableswithbrackets.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi Suresh

Maple R5 is from 1997 ... it does not run in current machines (not in the macs I use).

The only solution I could see to your problem is for you to update to current Maple: the latest Maple 2016 or closer - and also update the package: the old 'tensor' you are using is deprecated, not maintained since years, and its functionality superseded by both the Physics and DifferentialGeometry packages, the latter including the spinor formalism you are interested in.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


Example with the `Schwarzschild metric`

with(Physics)

Set the metric and coordinates in one go (you could use Setup, but this is just faster)

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))

(1)

The Weyl scalars are there

Weyl[scalars]

psi__0 = 0, psi__1 = 0, psi__2 = -m/r^3, psi__3 = 0, psi__4 = 0

(2)

The definition

Weyl[scalarsdefinition]

psi__0 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-l_[alpha]*Physics:-Tetrads:-m_[beta], psi__1 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]*Physics:-Tetrads:-l_[alpha]*Physics:-Tetrads:-m_[beta], psi__2 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[alpha]*Physics:-Tetrads:-n_[beta], psi__3 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]*Physics:-Tetrads:-mb_[alpha]*Physics:-Tetrads:-n_[beta], psi__4 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-n_[mu]*Physics:-Tetrads:-mb_[nu]*Physics:-Tetrads:-n_[alpha]*Physics:-Tetrads:-mb_[beta]

(3)

Supose you change the metric, say change r in 1/r in (1)

simplify(subs(r = 1/r, g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))))

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

(4)

Set this as the new metric

"Setup(?)"

[metric = {(1, 1) = 1/(2*m*r-1), (2, 2) = -1/r^2, (3, 3) = -sin(theta)^2/r^2, (4, 4) = -2*m*r+1}]

(5)

The Weyl scalars for this new metric

Weyl[scalars]

psi__0 = 0, psi__1 = 0, psi__2 = (1/6)*(-r^4-1)/r^2, psi__3 = 0, psi__4 = 0

(6)

``

For the spin formalism you may want to give a look at the DifferentialGeometry[Tensor][NPSpinCoefficients]  command


Download WeylScalars.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

This question is already answered ; as explained there this issue is resolved in Maple 2016 (without further updates) and also Maple 215 (installing the update mentioned in that answer given),

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Both the DifferentialGeometry and Physics packages have commands for computing Lie derivatives, check for instance the help pages for Physics:-LieDerivative and DifferentialGeometry:-LieDerivative.

Edgardo S. Cheb-Terrab 

Physics, Differential Equations and Mathematical Functions, Maplesoft

Dear Ogilvie
This new feature, FunctionAdvisor(plot, ...), as any other Maple feature, is part of an alive project, in this case, the one of bringing visualization to the mathematical functions.

My approach for these visualizations - plots -  was/is

  1. have in Maple 2016 all those shown in the Digital Library of Mathematical Functions (NIST-DLMF) for functions that do exist in Maple;
  2. add to that plots showing branch cuts when it is the case and are not present in 1.;
  3. add to that when appropriate for other reasons (mainly periodicity or symmetry).

For Maple 2016 we finished 1. for functions that do exist in Maple. And I am very happy with the result, a really nice step forward. Incidentally, regarding your actual question, note that there are no plots for the Heun functions in the NIST-DLMF.

Independent of that, we already started moving with 2. and 3. and, as usual, these further developments are posted every week to everybody in the Maplesoft R&D webpage for Mathematical Functions and Differential Equations, together with the updates for Physics.

In brief, then, update your library with the one available in that web page and you will see your Maple 2016 FunctionAdvisor(plot, ...) displaying plots for all the Heun functions, including the HeunPrime ones, among other new developments.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

This issue, related to the display of products, is resolved in Maple 2016, also in the update distributed on the web for Maple 2015, available from the Maplesoft R&D Physics webpage.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


restart; with(PDEtools)

DepVars := [u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

[u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), r[1] = r[1](t), r[2] = r[2](t), s[1] = s[1](t), s[2] = s[2](t), p[1] = p[1](t), p[2] = p[2](t), alpha[1] = alpha[1](x, t), beta[1] = beta[1](x, t), beta[2] = beta[2](x, t), delta[1] = delta[1](x, t), delta[2] = delta[2](x, t))

FA, `y'''''''`, `y''''''`, `y'''''`, `y''''`, `y'''`, `y''`, `y'`, u, v, r[1], r[2], s[1], s[2], p[1], p[2], alpha[1], beta[1], beta[2], delta[1], delta[2]

(2)

As you noticed, dcoeffs works with one variable. You can still use it in the case of many variables as follows: enclose your system between square brackets, to form a list of equations (even then there is only one of them) and remove dependent variables from denominators

map(numer, [(diff(r[1], t))*(-s[1]*u*(diff(u, x))-p[1]*((diff(u, x))*v+u*(diff(v, x)))-alpha[1]*(diff(u, x))-beta[1]*u-delta[1])/r[1]+r[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x, x))+(diff(s[1], t))*u*(diff(u, x))+s[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(u, x))+s[1]*u*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(p[1], t))*((diff(u, x))*v+u*(diff(v, x)))+p[1]*((diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))*v+(diff(u, x))*(alpha[1]*(diff(v, x))+beta[2]*v+delta[2])+(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(v, x))+u*(diff(alpha[1]*(diff(v, x))+beta[2]*v+delta[2], x)))+(diff(alpha[1], t))*(diff(u, x))+alpha[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(beta[1], t))*u+beta[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])+diff(delta[1], t)])

[u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))]

(3)

Now initialize 'L', the list of coefficients, to be the system itself, and loop mapping dcoeffs with respect to each F in DepVars. To avoid long output, end the lop with `:`

L := [u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]]

for F in DepVars do L := map(dcoeffs, L, F) end do

This is the result

L

[1, 1, 1, 2, 1, 1, 1, -1, 1, 1, 2, 2, -1, 1, 1, 1, 1, -1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1]

(4)

Alternatively, you can convert to Jet notation and use the standard coeffs Maple command

ToJet([u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]][1], DepVars)

u^2*r[1]*s[1]*beta[1][x]+u*v*p[1]*r[1]*beta[1][x]+u*v*p[1]*r[1]*beta[2][x]+u*alpha[1]*p[1]*r[1]*v[x, x]+u*alpha[1]*r[1]*s[1]*u[x, x]+u*beta[1]*p[1]*r[1]*v[x]+2*u*beta[1]*r[1]*s[1]*u[x]+u*beta[2]*p[1]*r[1]*v[x]+u*p[1]*r[1]*v[x]*alpha[1][x]+u*r[1]*s[1]*u[x]*alpha[1][x]+v*alpha[1]*p[1]*r[1]*u[x, x]+v*beta[1]*p[1]*r[1]*u[x]+v*beta[2]*p[1]*r[1]*u[x]+v*p[1]*r[1]*u[x]*alpha[1][x]+2*alpha[1]*p[1]*r[1]*u[x]*v[x]+alpha[1]*r[1]*s[1]*u[x]^2+u*alpha[1]*r[1]*beta[1][x]+u*beta[1]^2*r[1]+u*p[1]*r[1]*delta[2][x]-u*p[1]*v[x]*r[1][t]+u*r[1]^2*beta[1][x, x]+u*r[1]*s[1]*delta[1][x]+u*r[1]*u[x]*s[1][t]+u*r[1]*v[x]*p[1][t]-u*s[1]*u[x]*r[1][t]+v*p[1]*r[1]*delta[1][x]-v*p[1]*u[x]*r[1][t]+v*r[1]*u[x]*p[1][t]+alpha[1]^2*r[1]*u[x, x]+2*alpha[1]*beta[1]*r[1]*u[x]+alpha[1]*r[1]^2*u[x, x, x]+alpha[1]*r[1]*u[x]*alpha[1][x]+beta[1]*r[1]^2*u[x, x]+delta[1]*p[1]*r[1]*v[x]+delta[1]*r[1]*s[1]*u[x]+delta[2]*p[1]*r[1]*u[x]+r[1]^2*u[x]*alpha[1][x, x]+2*r[1]^2*u[x]*beta[1][x]+2*r[1]^2*u[x, x]*alpha[1][x]-u*beta[1]*r[1][t]+u*r[1]*beta[1][t]+alpha[1]*r[1]*delta[1][x]-alpha[1]*u[x]*r[1][t]+beta[1]*delta[1]*r[1]+r[1]^2*delta[1][x, x]+r[1]*u[x]*alpha[1][t]-delta[1]*r[1][t]+r[1]*delta[1][t]

(5)

coeffs(beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+r[1]^2*delta[1][x, x]-delta[1]*r[1][t]+r[1]*delta[1][t]+u*v*p[1]*r[1]*beta[1][x]+u*v*p[1]*r[1]*beta[2][x]+u*alpha[1]*p[1]*r[1]*v[x, x]+u*alpha[1]*r[1]*s[1]*u[x, x]+u*beta[1]*p[1]*r[1]*v[x]+u*beta[2]*p[1]*r[1]*v[x]+u*p[1]*r[1]*v[x]*alpha[1][x]+u*r[1]*s[1]*u[x]*alpha[1][x]+v*alpha[1]*p[1]*r[1]*u[x, x]+v*beta[1]*p[1]*r[1]*u[x]+v*beta[2]*p[1]*r[1]*u[x]+v*p[1]*r[1]*u[x]*alpha[1][x]+2*u*beta[1]*r[1]*s[1]*u[x]+2*alpha[1]*p[1]*r[1]*u[x]*v[x]-u*p[1]*v[x]*r[1][t]+u*r[1]*s[1]*delta[1][x]+u*r[1]*u[x]*s[1][t]+u*r[1]*v[x]*p[1][t]-u*s[1]*u[x]*r[1][t]+v*p[1]*r[1]*delta[1][x]-v*p[1]*u[x]*r[1][t]+v*r[1]*u[x]*p[1][t]+alpha[1]*r[1]*u[x]*alpha[1][x]+delta[1]*p[1]*r[1]*v[x]+delta[1]*r[1]*s[1]*u[x]+delta[2]*p[1]*r[1]*u[x]+2*alpha[1]*beta[1]*r[1]*u[x]+u^2*r[1]*s[1]*beta[1][x]+alpha[1]*r[1]*s[1]*u[x]^2+u*alpha[1]*r[1]*beta[1][x]+u*p[1]*r[1]*delta[2][x]+u*r[1]^2*beta[1][x, x]+alpha[1]^2*r[1]*u[x, x]+alpha[1]*r[1]^2*u[x, x, x]+beta[1]*r[1]^2*u[x, x]+r[1]^2*u[x]*alpha[1][x, x]-u*beta[1]*r[1][t]+u*r[1]*beta[1][t]+alpha[1]*r[1]*delta[1][x]-alpha[1]*u[x]*r[1][t]+r[1]*u[x]*alpha[1][t]+2*r[1]^2*u[x]*beta[1][x]+2*r[1]^2*u[x, x]*alpha[1][x])

1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 2, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, -1, 1, -1, 1, 1, 1, 1, 1

(6)

NULL


Download Coefficients_in_differential_expression_(reviewed).mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi wgraf

First and foremost, why are you using GRTensor in Maple 18? Note please that the functionality installed in the Physics and DifferentialGeometry packages of Maple 18 - and in the case of Physics you can also updated it using the large number of improvements that went into Physics of Maple 2015 by (see the Maplesoft R&D Physics webpage) - superseed in various ways the functionality offered by GRTensor (a great package, but by now old and incomplete).

Besides that, if sqrt(5) does not terminate after you load GRTensor as you say, it can only be that some internal Maple routines are being redefined by the version of GRTensor you are loading (and this should really not be done, but as it happens with any package that is not built by Maplesoft, the company has no way to assure that people won't build a package in inappropriate ways).

In summary, why don't you post here more about the problem you are tackling using GRTensor and perhaps we can help you showing how you could do the same with the existing Maple packages mentioned above.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

First 38 39 40 41 42 43 44 Last Page 40 of 60