ecterrab

14540 Reputation

24 Badges

20 years, 22 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

in Maple 18, three releases ago, when you input

> D_[2](g_[`~2`, `~2`]),

first g_[`~2`, `~2`] gets evaluated to 1/B(r)^2, then D_[2] gets applied to that scalar function of the coordinates (not a tensor) thus returning the same as d_[2], the noncovariant derivative. Of course what you intended is different: since D_[mu](g_[alpha,beta]) = 0 for all values of mu, alpha and beta, you expect D_[2](g_[`~2`, `~2`]) = 0.

This problem, of premature evaluation of the argument of a covariant derivative when you compute with the components of a tensor (such that D_ receives a scalar, not a tensor) is complicated because computer algebra systems always evaluate the function's arguments before the function is called and because if the tensor has a definition, when you compute its components the tensor character gets lost, you only see the scalar value of the component.

Anyway, this problem got solved in Maple 2015, the release after Maple 18 you are using. The solution involved a way to automatically delay the evaluation of the arguments of D_[mu] until the tensor character could be determined, and so you get D_[2](g_[`~2`, `~2`]) = 0

An alternative workaround in Maple 18 is for you to intentionally delay the evaluation of tensor component sent as argument to D_[mu] by means of quoting it, as in D_[2]( 'g_[`~2`, `~2`]') where you see the '' surrounding g_[`~2`, `~2`], and in this way D_[2] can see what you sent before it gets transformed into 1/B(r)^2 and so it returns 0.

 

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

Hi

Maybe it's me who needs to apologize ... this kind of material has been asked other times and, you know, prioritizing things is a non-trivial task. Anyway: there is some material of the kind you mention in the Mini Course: Computer Algebra For Physicists It has 10 sections, from which the first five are Maple 101 (not related to Physics) but then sections 5 to 10 are all about using the Physics package in physics. I like this course, a lot - I'm the author :) - serious: it has an interesting presentation strategy, small presentations, followed by engaged use of the Physics package. For newer material showing the package in action you may want to check Computer Algebra in TheoreticalPhysics: the IOP webinar, that also includes presentation of new features, ahead of (not present in) the current Maple 2016.

There are as well some posts I made here in Mapleprimes, on the use of the package in more advanced problems in Quantum Mechanics and General Relativity that, depending on your background in those areas, may be interesting ... the Search and Advanced Search can take you to those.

Anyway there are two "books" that are missing badly:

  • one on the use of the Physics package (would be an extended version of the Mini Course mentioned, covering all the package's functionality, including its own programming language specialized for physics - see the help page for ?Physics,Library) 
  • "another" (various) on specific physics courses (currently. for this we only have the different specific sections of the ?Physics,Examples help page)

Developing the package takes time (BTW there is a new very exciting subpackage, StandardModel ...), maintaining Physics takes time (we post updates for everybody several times per week), writing its documentation is a never ending task ... and there are these books/courseware. Too many things. Let's see.

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

Hi
Give a look at the PDEtools symmetry commands, listed in the overview ?PDEtools help page. There you will find commands for reducing the number of independent variables (i.e.: converting PDEs to ODEs) one step at a time or all in one go. Depending on the level of automation you want, InvariantTransformation may be the command you are looking for (check its help page to see how it works), or InvariantSolutions with the option 'onlythetransformation', or for one step at a time see SimilarityTransformation. The transformations returned by these commands can be applied to the PDEs using the PDEtools dchange command, or directly to the symmetry infinitesymal using ChangeSymmetry.

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

@Bachatero 


This one is now fixed, so that in Maple 2016.1 (only), with additionally the latest Physics update available from the Maplesoft R&D Physics webpage, you have

Physics:-Version()[2];

`2016, July 27, 19:39 hours`

(1)

Load the package, set a coordinate system, and use compact display (that actually is just a call to PDEtools:-declare)

with(Physics):

Physics:-Coordinates(X)

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x1, x2, x3, x4)}

 

`Systems of spacetime Coordinates are: `*{X = (x1, x2, x3, x4)}

 

{X}

(2)

Physics:-CompactDisplay(Phi(X))

Phi(x1, x2, x3, x4)*`will now be displayed as`*Phi

(3)

The derivative of Phi(X), displayed indexed, as expected

Physics:-diff(Phi(X), x1)

diff(Phi(X), x1)

(4)

The derivative of the conjugate of Phi(x) is also displayed indexed, and without showing the dependence of Phi

Physics:-diff(conjugate(Phi(X)), x1)

diff(conjugate(Phi(X)), x1)

(5)

``

 


Download Declare_works_fine_with_conjugate.mw

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

Please check the Physics,Examples help page, (enter ?Physics,Examples in your Maple worksheet) section on Mechanics, the last problem: "Inertia tensor for a triatomic molecule". Using that approach in order to compute the MI of a top is straightforward, I think (understanding that you do know how to compute the inertia tensor of a top).

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


PDE := diff(u(x, t), t) = alpha*(diff(u(x, t), x, x))+u(x, t)

PDEtools:-Infinitesimals(PDE)

[_xi[x](x, t, u) = 0, _xi[t](x, t, u) = 1, _eta[u](x, t, u) = 0], [_xi[x](x, t, u) = 1, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = 0], [_xi[x](x, t, u) = 0, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = u], [_xi[x](x, t, u) = (1/2)*x, _xi[t](x, t, u) = t, _eta[u](x, t, u) = t*u], [_xi[x](x, t, u) = t, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = -(1/2)*x*u/alpha], [_xi[x](x, t, u) = 0, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = exp(alpha*t*_c[1])*exp(t)*exp(_c[1]^(1/2)*x)], [_xi[x](x, t, u) = 0, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = exp(alpha*t*_c[1])*exp(t)/exp(_c[1]^(1/2)*x)], [_xi[x](x, t, u) = (1/2)*x*t, _xi[t](x, t, u) = (1/2)*t^2, _eta[u](x, t, u) = (1/8)*(4*alpha*t^2-2*alpha*t-x^2)*u/alpha]

(1)

The corresponding invariant solutions, derived from the infinitesimals above, are

PDEtools:-InvariantSolutions(PDE)

u(x, t) = _C1*exp(t), u(x, t) = _C1*exp(t)/(t^(1/2)*exp((1/4)*x^2/(t*alpha))), u(x, t) = _C1*sin(x/alpha^(1/2))+_C2*cos(x/alpha^(1/2)), u(x, t) = (_C1+erf((1/2)/(alpha^(1/2)*(t/x^2)^(1/2)))*_C2)/exp(-t), u(x, t) = (_C1*x+_C2*t)/(t*(t/x)^(1/2)*x^(1/2)*exp((1/4)*(-4*alpha*t^2+x^2)/(alpha*t)))

(2)

Add the keyword "display" to the call to InvariantSolutions if you want to see the correspondence between each solution and the invariants related to each list of infinitesimals. These commands have many options; for details see the corresponding help pages. For the connection between these infinitesimals and the corresponding differential invariants see PDEtools:-Invariants.

 

Alternatively, if all you wanted is to compute the determining system for the infinitesimals, use

PDEtools:-DeterminingPDE(PDE)

{diff(diff(diff(_xi[t](x, t, u), t), t), t) = 0, diff(diff(_eta[u](x, t, u), t), u) = diff(_xi[t](x, t, u), t)-(1/4)*(diff(diff(_xi[t](x, t, u), t), t)), diff(diff(_eta[u](x, t, u), u), u) = 0, diff(diff(_eta[u](x, t, u), u), x) = -(1/2)*(diff(_xi[x](x, t, u), t))/alpha, diff(diff(_eta[u](x, t, u), x), x) = ((diff(_eta[u](x, t, u), u))*u-(diff(_xi[t](x, t, u), t))*u-_eta[u](x, t, u)+diff(_eta[u](x, t, u), t))/alpha, diff(diff(_xi[x](x, t, u), t), t) = 0, diff(_xi[t](x, t, u), u) = 0, diff(_xi[t](x, t, u), x) = 0, diff(_xi[x](x, t, u), u) = 0, diff(_xi[x](x, t, u), x) = (1/2)*(diff(_xi[t](x, t, u), t))}

(3)

``


Download StrangePDESymmetries.mw

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

restart; with(Physics)

 

Set automatic simplification to true

Setup(simplification = true)

`* Partial match of  'simplification' against keyword 'automaticsimplification'`

 

[automaticsimplification = true]

(1)

Suppose you want to define a perturbation around the Schwarzschild metric

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]

 

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

(2)

Define now the perturbation. Suppose Delta[mu, nu] is constant, i.e. it does not depend on the coordinates, and diagonal, but if you prefer otherwise, change delta[mu, nu] by delta[mu, nu](X) in the next line:

Delta[mu, nu] = Matrix(4, symbol = delta, shape = diagonal)

Delta[mu, nu] = Matrix(%id = 18446744078395846894)

(3)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Delta[mu, nu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], 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)

Define now the "new metric" as a perturbation over the existing metric

g_[mu, nu] = g_[mu, nu]+Delta[mu, nu]

Physics:-g_[mu, nu] = Physics:-g_[mu, nu]+Delta[mu, nu]

(5)

Define(Physics[g_][mu, nu] = Physics[g_][mu, nu]+Delta[mu, nu])

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Delta[mu, nu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], 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)}

(6)

Check the components of the new metric

g_[]

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

(7)

Compute the Ricci tensor by entering Ricci[], the expression is large, just for illustration purposes compute only the component 11

Ricci[1, 1]

(-12*(-(1/6)*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^7+(((11/12+(2/3)*delta[4, 4])*delta[1, 1]+(1/4)*delta[4, 4])*m^2-(1/12)*delta[2, 2]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^6-(2/3)*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*delta[2, 2])*m*r^5+(m^2*delta[1, 1]-(1/3)*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*delta[2, 2])*m^2*r^4+(8/3)*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*m^2-(1/16)*(delta[4, 4]+1)*delta[2, 2]*((1/2)*delta[4, 4]+delta[1, 1]-1/2))*delta[2, 2]*m*r^3-(10/3)*(m^2*delta[1, 1]-(1/5)*((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2)*delta[2, 2])*delta[2, 2]*m^2*r^2-(2/3)*(-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]^2*m^3*r+m^4*delta[1, 1]*delta[2, 2]^2)*r^4*cos(theta)^4+24*(-(1/6)*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^9+(((11/12+(2/3)*delta[4, 4])*delta[1, 1]+(1/4)*delta[4, 4])*m^2-(1/12)*(delta[4, 4]+1)^2*(delta[2, 2]+(1/2)*delta[3, 3])*(delta[1, 1]-1))*r^8-(2/3)*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*(delta[2, 2]+(1/2)*delta[3, 3]))*m*r^7+(m^4*delta[1, 1]-(1/3)*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*(delta[2, 2]+(1/2)*delta[3, 3])*m^2+(1/6)*delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^6+(8/3)*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+(1/2)*delta[3, 3])*m^2-(1/16)*(((1/2)*delta[4, 4]+delta[1, 1]-1/2)*delta[2, 2]+4*delta[3, 3]*(delta[1, 1]*(delta[4, 4]+5/2)-(1/4)*delta[4, 4]-7/4))*(delta[4, 4]+1)*delta[2, 2])*m*r^5+(-(10/3)*delta[1, 1]*(delta[2, 2]+(1/2)*delta[3, 3])*m^4+(2/3)*(((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2)*delta[2, 2]+((delta[4, 4]^2+8*delta[4, 4]+35/4)*delta[1, 1]-(9/4)*delta[4, 4]-4)*delta[3, 3])*delta[2, 2]*m^2-(1/24)*delta[2, 2]^2*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^4-(2/3)*(((-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]+delta[3, 3]*(6*delta[4, 4]+13)*delta[1, 1]-3*delta[3, 3])*m^2-(1/4)*delta[3, 3]*(delta[4, 4]+1)*((delta[4, 4]+3)*delta[1, 1]-(1/4)*delta[4, 4]-9/4)*delta[2, 2])*delta[2, 2]*m*r^3+(delta[1, 1]*(delta[2, 2]+(14/3)*delta[3, 3])*m^2-(1/6)*delta[3, 3]*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(7/2)*delta[4, 4]-6)*delta[2, 2])*delta[2, 2]*m^2*r^2+(4/3)*(-5/8+(delta[4, 4]+9/4)*delta[1, 1])*delta[3, 3]*delta[2, 2]^2*m^3*r-(5/3)*m^4*delta[1, 1]*delta[2, 2]^2*delta[3, 3])*r^2*cos(theta)^2+2*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^11+(((-8*delta[4, 4]-11)*delta[1, 1]-3*delta[4, 4])*m^2+(delta[4, 4]+1)^2*(delta[2, 2]+delta[3, 3])*(delta[1, 1]-1))*r^10+8*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*(delta[2, 2]+delta[3, 3]))*m*r^9+(-12*m^4*delta[1, 1]+4*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*(delta[2, 2]+delta[3, 3])*m^2-4*delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^8-32*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+delta[3, 3])*m^2-(1/16)*(delta[4, 4]+1)*(((1/2)*delta[4, 4]+delta[1, 1]-1/2)*delta[2, 2]^2+8*delta[3, 3]*(delta[1, 1]*(delta[4, 4]+5/2)-(1/4)*delta[4, 4]-7/4)*delta[2, 2]+delta[3, 3]^2*((1/2)*delta[4, 4]+delta[1, 1]-1/2)))*m*r^7+(40*delta[1, 1]*(delta[2, 2]+delta[3, 3])*m^4+(((-8*delta[4, 4]-11)*delta[1, 1]+delta[4, 4]+4)*delta[2, 2]^2-16*((delta[4, 4]^2+8*delta[4, 4]+35/4)*delta[1, 1]-(9/4)*delta[4, 4]-4)*delta[3, 3]*delta[2, 2]-8*delta[3, 3]^2*((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2))*m^2+delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[2, 2]+delta[3, 3])*(delta[1, 1]-1))*r^6+8*(((-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]^2+((12*delta[4, 4]+26)*delta[3, 3]*delta[1, 1]-6*delta[3, 3])*delta[2, 2]+delta[3, 3]^2*(-1/2+delta[1, 1]*(delta[4, 4]+5/2)))*m^2-(1/2)*delta[3, 3]*(delta[4, 4]+1)*((delta[4, 4]+3)*delta[1, 1]-(1/4)*delta[4, 4]-9/4)*(delta[2, 2]+delta[3, 3])*delta[2, 2])*m*r^5-12*(delta[1, 1]*(delta[2, 2]^2+(28/3)*delta[2, 2]*delta[3, 3]+delta[3, 3]^2)*m^2-(1/3)*delta[3, 3]*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(7/2)*delta[4, 4]-6)*(delta[2, 2]+delta[3, 3])*delta[2, 2])*m^2*r^4-32*((-5/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+delta[3, 3])*m^2-(1/16)*(delta[1, 1]-1)*delta[2, 2]*(delta[4, 4]+1)*delta[3, 3])*delta[3, 3]*delta[2, 2]*m*r^3+40*(delta[1, 1]*(delta[2, 2]+delta[3, 3])*m^2-(1/5)*((delta[4, 4]+11/8)*delta[1, 1]-(5/8)*delta[4, 4]-1)*delta[3, 3]*delta[2, 2])*delta[3, 3]*delta[2, 2]*m^2*r^2+8*(-1+delta[1, 1]*(delta[4, 4]+5/2))*delta[3, 3]^2*delta[2, 2]^2*m^3*r-12*m^4*delta[1, 1]*delta[2, 2]^2*delta[3, 3]^2)/((2*m*delta[1, 1]-r*delta[1, 1]+r)*(-r+2*m)*(-r*delta[4, 4]+2*m-r)^2*r^2*(cos(theta)^2*r^2-r^2+delta[3, 3])^2*(r^2-delta[2, 2])^2)

(8)

Check what happens if delta[mu,nu] = 0

eval((-12*(-(1/6)*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^7+(((11/12+(2/3)*delta[4, 4])*delta[1, 1]+(1/4)*delta[4, 4])*m^2-(1/12)*delta[2, 2]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^6-(2/3)*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*delta[2, 2])*m*r^5+(m^2*delta[1, 1]-(1/3)*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*delta[2, 2])*m^2*r^4+(8/3)*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*m^2-(1/16)*(delta[4, 4]+1)*delta[2, 2]*((1/2)*delta[4, 4]+delta[1, 1]-1/2))*delta[2, 2]*m*r^3-(10/3)*(m^2*delta[1, 1]-(1/5)*((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2)*delta[2, 2])*delta[2, 2]*m^2*r^2-(2/3)*(-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]^2*m^3*r+m^4*delta[1, 1]*delta[2, 2]^2)*r^4*cos(theta)^4+24*(-(1/6)*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^9+(((11/12+(2/3)*delta[4, 4])*delta[1, 1]+(1/4)*delta[4, 4])*m^2-(1/12)*(delta[4, 4]+1)^2*(delta[2, 2]+(1/2)*delta[3, 3])*(delta[1, 1]-1))*r^8-(2/3)*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*(delta[2, 2]+(1/2)*delta[3, 3]))*m*r^7+(m^4*delta[1, 1]-(1/3)*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*(delta[2, 2]+(1/2)*delta[3, 3])*m^2+(1/6)*delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^6+(8/3)*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+(1/2)*delta[3, 3])*m^2-(1/16)*(((1/2)*delta[4, 4]+delta[1, 1]-1/2)*delta[2, 2]+4*delta[3, 3]*(delta[1, 1]*(delta[4, 4]+5/2)-(1/4)*delta[4, 4]-7/4))*(delta[4, 4]+1)*delta[2, 2])*m*r^5+(-(10/3)*delta[1, 1]*(delta[2, 2]+(1/2)*delta[3, 3])*m^4+(2/3)*(((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2)*delta[2, 2]+((delta[4, 4]^2+8*delta[4, 4]+35/4)*delta[1, 1]-(9/4)*delta[4, 4]-4)*delta[3, 3])*delta[2, 2]*m^2-(1/24)*delta[2, 2]^2*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^4-(2/3)*(((-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]+delta[3, 3]*(6*delta[4, 4]+13)*delta[1, 1]-3*delta[3, 3])*m^2-(1/4)*delta[3, 3]*(delta[4, 4]+1)*((delta[4, 4]+3)*delta[1, 1]-(1/4)*delta[4, 4]-9/4)*delta[2, 2])*delta[2, 2]*m*r^3+(delta[1, 1]*(delta[2, 2]+(14/3)*delta[3, 3])*m^2-(1/6)*delta[3, 3]*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(7/2)*delta[4, 4]-6)*delta[2, 2])*delta[2, 2]*m^2*r^2+(4/3)*(-5/8+(delta[4, 4]+9/4)*delta[1, 1])*delta[3, 3]*delta[2, 2]^2*m^3*r-(5/3)*m^4*delta[1, 1]*delta[2, 2]^2*delta[3, 3])*r^2*cos(theta)^2+2*m*(delta[4, 4]+1)*(delta[4, 4]+delta[1, 1])*r^11+(((-8*delta[4, 4]-11)*delta[1, 1]-3*delta[4, 4])*m^2+(delta[4, 4]+1)^2*(delta[2, 2]+delta[3, 3])*(delta[1, 1]-1))*r^10+8*(delta[1, 1]*(delta[4, 4]+5/2)*m^2-(1/2)*((delta[4, 4]+3)*delta[1, 1]+(1/4)*delta[4, 4]-7/4)*(delta[4, 4]+1)*(delta[2, 2]+delta[3, 3]))*m*r^9+(-12*m^4*delta[1, 1]+4*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(3/2)*delta[4, 4]-4)*(delta[2, 2]+delta[3, 3])*m^2-4*delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[1, 1]-1))*r^8-32*((-3/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+delta[3, 3])*m^2-(1/16)*(delta[4, 4]+1)*(((1/2)*delta[4, 4]+delta[1, 1]-1/2)*delta[2, 2]^2+8*delta[3, 3]*(delta[1, 1]*(delta[4, 4]+5/2)-(1/4)*delta[4, 4]-7/4)*delta[2, 2]+delta[3, 3]^2*((1/2)*delta[4, 4]+delta[1, 1]-1/2)))*m*r^7+(40*delta[1, 1]*(delta[2, 2]+delta[3, 3])*m^4+(((-8*delta[4, 4]-11)*delta[1, 1]+delta[4, 4]+4)*delta[2, 2]^2-16*((delta[4, 4]^2+8*delta[4, 4]+35/4)*delta[1, 1]-(9/4)*delta[4, 4]-4)*delta[3, 3]*delta[2, 2]-8*delta[3, 3]^2*((delta[4, 4]+11/8)*delta[1, 1]-(1/8)*delta[4, 4]-1/2))*m^2+delta[2, 2]*delta[3, 3]*(delta[4, 4]+1)^2*(delta[2, 2]+delta[3, 3])*(delta[1, 1]-1))*r^6+8*(((-1/2+delta[1, 1]*(delta[4, 4]+5/2))*delta[2, 2]^2+((12*delta[4, 4]+26)*delta[3, 3]*delta[1, 1]-6*delta[3, 3])*delta[2, 2]+delta[3, 3]^2*(-1/2+delta[1, 1]*(delta[4, 4]+5/2)))*m^2-(1/2)*delta[3, 3]*(delta[4, 4]+1)*((delta[4, 4]+3)*delta[1, 1]-(1/4)*delta[4, 4]-9/4)*(delta[2, 2]+delta[3, 3])*delta[2, 2])*m*r^5-12*(delta[1, 1]*(delta[2, 2]^2+(28/3)*delta[2, 2]*delta[3, 3]+delta[3, 3]^2)*m^2-(1/3)*delta[3, 3]*((delta[4, 4]^2+10*delta[4, 4]+23/2)*delta[1, 1]-(7/2)*delta[4, 4]-6)*(delta[2, 2]+delta[3, 3])*delta[2, 2])*m^2*r^4-32*((-5/8+(delta[4, 4]+9/4)*delta[1, 1])*(delta[2, 2]+delta[3, 3])*m^2-(1/16)*(delta[1, 1]-1)*delta[2, 2]*(delta[4, 4]+1)*delta[3, 3])*delta[3, 3]*delta[2, 2]*m*r^3+40*(delta[1, 1]*(delta[2, 2]+delta[3, 3])*m^2-(1/5)*((delta[4, 4]+11/8)*delta[1, 1]-(5/8)*delta[4, 4]-1)*delta[3, 3]*delta[2, 2])*delta[3, 3]*delta[2, 2]*m^2*r^2+8*(-1+delta[1, 1]*(delta[4, 4]+5/2))*delta[3, 3]^2*delta[2, 2]^2*m^3*r-12*m^4*delta[1, 1]*delta[2, 2]^2*delta[3, 3]^2)/((2*m*delta[1, 1]-r*delta[1, 1]+r)*(-r+2*m)*(-r*delta[4, 4]+2*m-r)^2*r^2*(cos(theta)^2*r^2-r^2+delta[3, 3])^2*(r^2-delta[2, 2])^2), delta = 0)

0

(9)

``


Download perturbed_metric.mw

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

Hi

After loading Physics, enter Setup(mathematicalnotation = true) and Christoffel symbols will display as an upper case gamma. Regarding KroneckerDelta, it always displays with a lowercase delta greek letter.

You can set the Schwarzschild metric in different ways, among which the simplest one is to just enter g_[sc]. To see the corresponding line element, say to compare with the one you want, enter g_[lineelement].

Now, you can set the metric to anything you want (provided that it is symmetric, of course). If what you have at hands is the line element, just input Setup(metric = your_line_element) (note please that the one you posted is missing dr^2).

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

> (D[1]@D[1])(f)-D[1, 1](f);

                                     @@(D[1], 2)(f) - D[1, 1](f)
> expand(%);
                                                       0

 

Yes, simplify should be able to do that, there is a weakness there, that you have to use expand.

Regarding your question in some other text you wrote in this thread: the @ operator is expected to work. The D operator has its own syntax to represent the same thing. It is a good feature that there is more than one context you can use to represent this operation. One could have implemented that D[1]@D[1] automatically maps into D[1, 1] but perhaps losing the ability to compute with the @ representation is worse than not having the automatic mapping ... debatable. 

Whether this makes you dislike or not computer algebra, John, you know, every cup has its filled and empty parts. For me, this is a minor thing (the weakness mentioned, that you need to use expand). For other people, this could be very irritating.

Anyway Maple is a nice system not just because of what it does, but also because you can read its programs (not so in the competition) and because in that way you can use the Maple language to adjust things with ease; here is for instance what I would use if this were critical for me, say until this gets fixed at the company:

> `simplify/D` := e ->
    if has(e, 'D') then
        evalindets(evalindets(e, 'And(function, satisfies(f -> op(0, f)::'`@@`(specindex(D), nonnegint)'))', expand), 'specfunc([diff, %diff, Diff])', `convert/D`)
    else
        e
    fi;

And now you have simplify returning 0, and still working with was working before.

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

Hi John

You are using Maple 17, from 2013. Unfortunately, I can't help you with that. Regarding Physics, Maple 17 is too old. Physics is nowadays approx 4x its size in 2013.

I also know, updating your Maple is something you may or not want to do for different reasons. I note anyway one distinctive, unusual, thing: since the release of Maple 18, we are posting fixes and also new developments on the fly, every week, for a whole year. These updates are found in the Maplesoft R&D Physics webpage.

That means two things: a) when you find a problem (like this one you mention now in Maple of 2013), you have a solution in typically 48 hours, and available to everybody, so without having to really disrupt your use of the software; and b) you have mostly all the developments of the new release working for you in the current release. As said the window of "new updates" is of approx 1 year.

You may still prefer to stay with an older version of Maple but the reasons for updating, especially if you work with the Maple Physics environment, are compelling.

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

Joel's Collect, but for using a real inert dot operator, represented by `%.` as everything else inert in Maple. Recalling: %foo is the inert foo, and generally speaking this is valid for just everything in the system:

 

Collect := proc (exs::list, vars::listlist) local dot, ex, v; ex := add(`%.`(LinearAlgebra:-GenerateMatrix(exs, v)[1], Vector(v)), v = vars); subs(dot = ':-`.`', ex) end proc

proc (exs::list, vars::listlist) local dot, ex, v; ex := add(`%.`(LinearAlgebra:-GenerateMatrix(exs, v)[1], Vector(v)), v = vars); subs(dot = ':-`.`', ex) end proc

(1)

To have the correct typesetting for inert objects, you need to use extended typesetting (either enter this at the Maple prompt, or set it in the preferences, that is what the way I have it; here I input at the prompt anyway):

interface(typesetting = extended)

extended

(2)

Check it out:

A, B := Matrix(2, symbol = a), Matrix(2, symbol = b)

Matrix(%id = 18446744078180630886), Matrix(%id = 18446744078180631006)

(3)

As everything inert, the display has same grey to distinguish it from the active operation; here the dot is grey:

`%.`(A, B)

`%.`(Matrix(%id = 18446744078180630886), Matrix(%id = 18446744078180631006))

(4)

(To the side of this thread: we need to improve the parser, i.e. to be able to enter using infix operatorial form "A %. B" instead of  the functional form "`%.`(A, B)" . We are looking into this.)

 

Now that we have a representation of the product "for real" (all the properties of %foo known by the system, derived from the properties of foo), we can operate with this representation, for instance:

"value(?)"

Matrix(%id = 18446744078180679798)

(5)

 

Having all set, let's move now with Joel's formulation of your (spalinowy) kind of problem

Sys := [m1*(diff(x1(t), t, t))+cv1*(diff(x1(t), t))+(k1+k2+k4)*x1(t)-k2*x2(t)-k4*x3(t) = f1(t), m2*(diff(x2(t), t, t))+cv2*(diff(x2(t), t))-cv2*(diff(x3(t), t))+(k2+k3)*x2(t)-k2*x1(t)-k3*x3(t) = f2(t), m3*(diff(x3(t), t, t))+cv2*(diff(x3(t), t))-cv2*(diff(x2(t), t))+(k3+k4)*x3(t)-k3*x2(t)-k4*x1(t) = f1(t)]

[m1*(diff(diff(x1(t), t), t))+cv1*(diff(x1(t), t))+(k1+k2+k4)*x1(t)-k2*x2(t)-k4*x3(t) = f1(t), m2*(diff(diff(x2(t), t), t))+cv2*(diff(x2(t), t))-cv2*(diff(x3(t), t))+(k2+k3)*x2(t)-k2*x1(t)-k3*x3(t) = f2(t), m3*(diff(diff(x3(t), t), t))+cv2*(diff(x3(t), t))-cv2*(diff(x2(t), t))+(k3+k4)*x3(t)-k3*x2(t)-k4*x1(t) = f1(t)]

(6)

X := ([x1, x2, x3])(t); dX := diff(X, t); ddX := diff(X, t, t)

[x1(t), x2(t), x3(t)]

 

[diff(x1(t), t), diff(x2(t), t), diff(x3(t), t)]

 

[diff(diff(x1(t), t), t), diff(diff(x2(t), t), t), diff(diff(x3(t), t), t)]

(7)

Joel's input:

Collect(`~`[lhs](Sys), [ddX, dX, X]) = Vector(`~`[rhs](Sys))

`%.`(Matrix(%id = 18446744078237959822), Vector[column](%id = 18446744078237959942))+`%.`(Matrix(%id = 18446744078237960902), Vector[column](%id = 18446744078237961022))+`%.`(Matrix(%id = 18446744078237961982), Vector[column](%id = 18446744078237962102)) = Vector[column](%id = 18446744078237954046)

(8)

"value(?)"

Vector[column](%id = 18446744078237951270) = Vector[column](%id = 18446744078237954046)

(9)

By the way, to go back:

"convert(?,setofequations)"

{m1*(diff(diff(x1(t), t), t))+cv1*(diff(x1(t), t))+(k1+k2+k4)*x1(t)-k2*x2(t)-k4*x3(t) = f1(t), m2*(diff(diff(x2(t), t), t))+cv2*(diff(x2(t), t))-cv2*(diff(x3(t), t))+(k2+k3)*x2(t)-k2*x1(t)-k3*x3(t) = f2(t), m3*(diff(diff(x3(t), t), t))+cv2*(diff(x3(t), t))-cv2*(diff(x2(t), t))+(k3+k4)*x3(t)-k3*x2(t)-k4*x1(t) = f1(t)}

(10)

To the side: clearly we need the inverse conversion; i.e. something that automatically gets (10) and returns something of the form (8) )

``


Download MatrixFormOfEquationSystem.mw

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

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

First 37 38 39 40 41 42 43 Last Page 39 of 59