ecterrab

13633 Reputation

24 Badges

18 years, 320 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi Fred

This issue is now fixed; the fix available within today's update in the usual Maplesoft's Physics R&D (updates) webpage. I am in Brazil giving a mini-course on "computer algebra for physicits" - on return I will add to the zip a new Maple 18 PhysicsUpdates.mw worksheet to tell the things that have been updated already.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
This is explained in the help page for ?Physics,Define, see the 4th paragraph. In brief, use = instead of an assignment :=, then pass that equation as an argument to Define. Also, to avoid the possible ambiguous meaning for KroneckerDelta[i,j] when the spacetime metric is of Minkowsky type, use the metric itself, g_[i,j] instead. So your input/output would look like

restart; with(Physics); Setup(mathematicalnotation = true, spacetimeindices = lowercaselatin)

L[i, j, k, l] = Physics:-`*`(Physics:-`*`(lambda, g_[i, j]), g_[k, l])+Physics:-`*`(mu, Physics:-`*`(g_[i, k], g_[j, l])+Physics:-`*`(g_[i, l], g_[j, k]));

L[i, j, k, l] = lambda*Physics:-g_[i, j]*Physics:-g_[k, l]+mu*(Physics:-g_[i, k]*Physics:-g_[j, l]+Physics:-g_[i, l]*Physics:-g_[j, k])

(1)

Define(L[i, j, k, l] = lambda*Physics:-g_[i, j]*Physics:-g_[k, l]+mu*(Physics:-g_[i, k]*Physics:-g_[j, l]+Physics:-g_[i, l]*Physics:-g_[j, k]))

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], L[i, j, k, l], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu]}

(2)

Now you can use indices with L;  this is the covariant component of L where all the indices are equal to 1

L[1, 1, 1, 1]

lambda+2*mu

(3)

This other one has three indices contravariant

'L[1, `~1`, `~1`, `~1`]' = L[1, `~1`, `~1`, `~1`]

L[1, `~1`, `~1`, `~1`] = -lambda-2*mu

(4)

The mixed covariant, contravariant

"'L[1,~1,1,~1]' = L[1,~1,1,~1]"

L[1, `~1`, 1, `~1`] = lambda+2*mu

(5)

You can also compute without attributing values to the indices while taking into account the symmetries under permutation of the indices that are implicit in the definition (1)

L[i, j, k, l]

L[i, j, k, l]

(6)

Swap for instance the first two indices: you receive the same expression

L[j, i, k, l]

L[i, j, k, l]

(7)

And the same if in addition you swap the positions in the second pair of indices

L[j, i, l, k]

L[i, j, k, l]

(8)

All the covariant nonzero components

L[nonzero]

L[a, b, c, d] = {(1, 1, 1, 1) = lambda+2*mu, (1, 1, 2, 2) = lambda, (1, 1, 3, 3) = lambda, (1, 1, 4, 4) = -lambda, (1, 2, 1, 2) = mu, (1, 2, 2, 1) = mu, (1, 3, 1, 3) = mu, (1, 3, 3, 1) = mu, (1, 4, 1, 4) = -mu, (1, 4, 4, 1) = -mu, (2, 1, 1, 2) = mu, (2, 1, 2, 1) = mu, (2, 2, 1, 1) = lambda, (2, 2, 2, 2) = lambda+2*mu, (2, 2, 3, 3) = lambda, (2, 2, 4, 4) = -lambda, (2, 3, 2, 3) = mu, (2, 3, 3, 2) = mu, (2, 4, 2, 4) = -mu, (2, 4, 4, 2) = -mu, (3, 1, 1, 3) = mu, (3, 1, 3, 1) = mu, (3, 2, 2, 3) = mu, (3, 2, 3, 2) = mu, (3, 3, 1, 1) = lambda, (3, 3, 2, 2) = lambda, (3, 3, 3, 3) = lambda+2*mu, (3, 3, 4, 4) = -lambda, (3, 4, 3, 4) = -mu, (3, 4, 4, 3) = -mu, (4, 1, 1, 4) = -mu, (4, 1, 4, 1) = -mu, (4, 2, 2, 4) = -mu, (4, 2, 4, 2) = -mu, (4, 3, 3, 4) = -mu, (4, 3, 4, 3) = -mu, (4, 4, 1, 1) = -lambda, (4, 4, 2, 2) = -lambda, (4, 4, 3, 3) = -lambda, (4, 4, 4, 4) = lambda+2*mu}

(9)

These are the five different values found in this set

map(rhs, rhs(L[a, b, c, d] = {(1, 1, 1, 1) = lambda+2*mu, (1, 1, 2, 2) = lambda, (1, 1, 3, 3) = lambda, (1, 1, 4, 4) = -lambda, (1, 2, 1, 2) = mu, (1, 2, 2, 1) = mu, (1, 3, 1, 3) = mu, (1, 3, 3, 1) = mu, (1, 4, 1, 4) = -mu, (1, 4, 4, 1) = -mu, (2, 1, 1, 2) = mu, (2, 1, 2, 1) = mu, (2, 2, 1, 1) = lambda, (2, 2, 2, 2) = lambda+2*mu, (2, 2, 3, 3) = lambda, (2, 2, 4, 4) = -lambda, (2, 3, 2, 3) = mu, (2, 3, 3, 2) = mu, (2, 4, 2, 4) = -mu, (2, 4, 4, 2) = -mu, (3, 1, 1, 3) = mu, (3, 1, 3, 1) = mu, (3, 2, 2, 3) = mu, (3, 2, 3, 2) = mu, (3, 3, 1, 1) = lambda, (3, 3, 2, 2) = lambda, (3, 3, 3, 3) = lambda+2*mu, (3, 3, 4, 4) = -lambda, (3, 4, 3, 4) = -mu, (3, 4, 4, 3) = -mu, (4, 1, 1, 4) = -mu, (4, 1, 4, 1) = -mu, (4, 2, 2, 4) = -mu, (4, 2, 4, 2) = -mu, (4, 3, 3, 4) = -mu, (4, 3, 4, 3) = -mu, (4, 4, 1, 1) = -lambda, (4, 4, 2, 2) = -lambda, (4, 4, 3, 3) = -lambda, (4, 4, 4, 4) = lambda+2*mu}))

{lambda, mu, -lambda, -mu, lambda+2*mu}

(10)

nops({lambda, mu, -lambda, -mu, lambda+2*mu})

5

(11)

 

Download TensorDefinition.mw

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

Hi
You indicate bosonic and fermionic operators, respectively noncommutative and anticommutative, using the Physics:-Setup command (see ?Physics,Setup). Any operator set, say as in Setup(operator = A), is assumed to be noncommutative. If in addition this operator is constructed with an anticommutative prefix, that you set, say as in Setup(anticommutativeprefix = Q), so for example if you enter Setup(operator = Q), then Q is a fermionic (anticommutative) operator. You can construct annihilation and creation operators to increase the occupation numbers of bosonic and fermionic quantum states by using the Annihilation and Creation operators. Details about all this are found in the help pages ?Physics,Example (section on Quantum Mechanics), ?Physics,Conventions (section on Space of quantum states and Dirac notation) and ?Physics,Annihilation. For projectos onto bosonic and fermionic states see ?Physics,Projector.

Regarding your other question, tensors can have their indices covariant, these are displayed as subscripts, or contravariant, displayed as superscripts.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@josephap83 and @tsunamiBTP


Hi

Although you could do these computations using DifferentialGeometry, I believe in cases like this one it is simpler using the tensor capabilities of the Physics package.

 

Independent of that, there is an issue with your post about the Divergence of a Tensor. You show a tensor 'tau' defined as an equation with a matrix on the right-hand side, but you do not show the indices of tau: is this the all contravariant tau, as in tau[`~i`, `~j`] or the all covariant tau[i, j] or just the "physical" components frequently denotated tau[i, j] that are not covariant nor contravariant? For the relationship between convariant, contravariant and "physical" components, see for instance A Primer on Tensor Calculus, page 12, formulas (32) and (33).

 

Here I will assume that you are describing tau[i, j]

 

restart; with(Physics)

 

Set the dimension to 3 and work with the coordiantes you indicated

Physics:-Setup(spacetimeindices = lowercaselatin, dimension = 3, coordinates = (X = [r, theta, z]), quiet)

[coordinatesystems = {X}, dimension = 3, spacetimeindices = lowercaselatin]

(1)

To set the metric, the simplest way is to indicate the line element

`#msup(mi("ds"),mn("2"))` := Physics:-`^`(Physics:-d_(r), 2)+Physics:-`*`(Physics:-`^`(r, 2), Physics:-`^`(Physics:-d_(theta), 2))+Physics:-`^`(Physics:-d_(z), 2)

Physics:-d_(r)^2+r^2*Physics:-d_(theta)^2+Physics:-d_(z)^2

(2)

Physics:-Setup(metric = Physics:-d_(r)^2+r^2*Physics:-d_(theta)^2+Physics:-d_(z)^2)

[metric = {(1, 1) = 1, (2, 2) = r^2, (3, 3) = 1}]

(3)

Visual check on the metric

g_[]

g[a, b] = (Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 2) = r^2, (2, 3) = 0, (3, 3) = 1}, storage = triangular[upper], shape = [symmetric]))

(4)

Define now the stress tensor tau[i, j]

Physics:-Define(tau[mu, nu], symmetric)

`Defined objects with tensor properties`

 

{Physics:-D_[mu], 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], tau[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(5)

And that is all. You do not need to define anything else, basis, Christoffel symbols, nothing.

Just compute the (covariant) divergence using standard tensorial notation.

Moreover: to avoid repetitive display of (r,theta,z) everywhere, use PDEtools:-declare

PDEtools:-declare(tau(X))

tau(r, theta, z)*`will now be displayed as`*tau

(6)

Physics:-D_[`~i`](tau[i, j](X))

Physics:-D_[`~i`](tau[i, j](X), [X])

(7)

The components of this Divergence are

Library:-TensorComponents(Physics:-D_[`~i`](tau[i, j](X), [X]))

[diff(tau[1, 1](X), r)+(diff(tau[2, 1](X), theta)+r*tau[1, 1](X)-tau[2, 2](X)/r)/r^2+diff(tau[3, 1](X), z), diff(tau[1, 2](X), r)-tau[1, 2](X)/r+(diff(tau[2, 2](X), theta)+r*tau[1, 2](X)+r*tau[2, 1](X))/r^2+diff(tau[3, 2](X), z), diff(tau[1, 3](X), r)+(diff(tau[2, 3](X), theta)+r*tau[1, 3](X))/r^2+diff(tau[3, 3](X), z)]

(8)

If what you need is this expression in terms of the "physical components" tau[i, j], from the formulas (32) and (33) of the reference mentioned in the first paragraph, you have:

h := proc (i) options operator, arrow; if i::(Or(1, 2, 3)) then [1, r, 1][i] else 'h(i)' end if end proc;

proc (i) options operator, arrow; if i::(Or(1, 2, 3)) then [1, r, 1][i] else 'h(i)' end if end proc

(9)

tau[i, j](X) = Physics:-`*`(Physics:-`*`(h(i), h(j)), tau[``(i, j)](X))

tau[i, j](X) = h(i)*h(j)*tau[``(i, j)](X)

(10)

[seq(seq(tau[i, j](X) = h(i)*h(j)*tau[``(i, j)](X), i = 1 .. 3), j = 1 .. 3)]

[tau[1, 1](X) = tau[``(1, 1)](X), tau[2, 1](X) = r*tau[``(2, 1)](X), tau[3, 1](X) = tau[``(3, 1)](X), tau[1, 2](X) = r*tau[``(1, 2)](X), tau[2, 2](X) = r^2*tau[``(2, 2)](X), tau[3, 2](X) = r*tau[``(3, 2)](X), tau[1, 3](X) = tau[``(1, 3)](X), tau[2, 3](X) = r*tau[``(2, 3)](X), tau[3, 3](X) = tau[``(3, 3)](X)]

(11)

eval([diff(tau[1, 1](X), r)+(diff(tau[2, 1](X), theta)+r*tau[1, 1](X)-tau[2, 2](X)/r)/r^2+diff(tau[3, 1](X), z), diff(tau[1, 2](X), r)-tau[1, 2](X)/r+(diff(tau[2, 2](X), theta)+r*tau[1, 2](X)+r*tau[2, 1](X))/r^2+diff(tau[3, 2](X), z), diff(tau[1, 3](X), r)+(diff(tau[2, 3](X), theta)+r*tau[1, 3](X))/r^2+diff(tau[3, 3](X), z)], [tau[1, 1](X) = tau[``(1, 1)](X), tau[2, 1](X) = r*tau[``(2, 1)](X), tau[3, 1](X) = tau[``(3, 1)](X), tau[1, 2](X) = r*tau[``(1, 2)](X), tau[2, 2](X) = r^2*tau[``(2, 2)](X), tau[3, 2](X) = r*tau[``(3, 2)](X), tau[1, 3](X) = tau[``(1, 3)](X), tau[2, 3](X) = r*tau[``(2, 3)](X), tau[3, 3](X) = tau[``(3, 3)](X)])

[diff(tau[``(1, 1)](X), r)+(r*(diff(tau[``(2, 1)](X), theta))+r*tau[``(1, 1)](X)-r*tau[``(2, 2)](X))/r^2+diff(tau[``(3, 1)](X), z), r*(diff(tau[``(1, 2)](X), r))+(r^2*(diff(tau[``(2, 2)](X), theta))+r^2*tau[``(1, 2)](X)+r^2*tau[``(2, 1)](X))/r^2+r*(diff(tau[``(3, 2)](X), z)), diff(tau[``(1, 3)](X), r)+(r*(diff(tau[``(2, 3)](X), theta))+r*tau[``(1, 3)](X))/r^2+diff(tau[``(3, 3)](X), z)]

(12)

And this is the result you show, that you were expecting.

 

_________________________________________________________________________

Details

Note the compact display of derivatives indexed, and the functionality of the components of tau omited (this is what PDEtools:-declare does). But is only a display trick.

The actual Maple objects are behind this display. If you want to see them in standard Maple notation, use show

show

[diff(tau[``(1, 1)](X), r)+(r*(diff(tau[``(2, 1)](X), theta))+r*tau[``(1, 1)](X)-r*tau[``(2, 2)](X))/r^2+diff(tau[``(3, 1)](X), z), r*(diff(tau[``(1, 2)](X), r))+(r^2*(diff(tau[``(2, 2)](X), theta))+r^2*tau[``(1, 2)](X)+r^2*tau[``(2, 1)](X))/r^2+r*(diff(tau[``(3, 2)](X), z)), diff(tau[``(1, 3)](X), r)+(r*(diff(tau[``(2, 3)](X), theta))+r*tau[``(1, 3)](X))/r^2+diff(tau[``(3, 3)](X), z)]

(13)

Also, in (12) you see tau[1, 2] and also tau[2, 1]. If you want the symmetry of the stress tensor - that you indicated when you defined the tensor - to be taken into account, use Physics:-Simplify  (not simplify)

Physics:-Simplify([diff(tau[``(1, 1)](X), r)+(r*(diff(tau[``(2, 1)](X), theta))+r*tau[``(1, 1)](X)-r*tau[``(2, 2)](X))/r^2+diff(tau[``(3, 1)](X), z), r*(diff(tau[``(1, 2)](X), r))+(r^2*(diff(tau[``(2, 2)](X), theta))+r^2*tau[``(1, 2)](X)+r^2*tau[``(2, 1)](X))/r^2+r*(diff(tau[``(3, 2)](X), z)), diff(tau[``(1, 3)](X), r)+(r*(diff(tau[``(2, 3)](X), theta))+r*tau[``(1, 3)](X))/r^2+diff(tau[``(3, 3)](X), z)])

[((diff(tau[``(1, 1)](X), r))*r+(diff(tau[``(3, 1)](X), z))*r+diff(tau[``(2, 1)](X), theta)+tau[``(1, 1)](X)-tau[``(2, 2)](X))/r, r*(diff(tau[``(1, 2)](X), r))+r*(diff(tau[``(3, 2)](X), z))+diff(tau[``(2, 2)](X), theta)+tau[``(1, 2)](X)+tau[``(2, 1)](X), ((diff(tau[``(1, 3)](X), r))*r+(diff(tau[``(3, 3)](X), z))*r+diff(tau[``(2, 3)](X), theta)+tau[``(1, 3)](X))/r]

(14)

If you prefer for the symmetry properties to be taken into account automatically, among other ways you can directly define the tensor as a matrix with the appropriate symmetry, for example:

proc (i, j) options operator, arrow; tau[i, j](X) end proc

proc (i, j) options operator, arrow; tau[i, j](X) end proc

(15)

Tau[i, j] = Matrix(3, proc (i, j) options operator, arrow; tau[i, j](X) end proc, shape = symmetric)

Tau[i, j] = Matrix(%id = 18446744078150270358)

(16)

Define now a tensor Tau with this equation (see Physics:-Define , the paragraph about defining using tensorial equations)

Physics:-Define(Tau[i, j] = Matrix(%id = 18446744078150270358))

`Defined objects with tensor properties`

 

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

(17)

You can now compute taking the symmetry into account automatically

Physics:-D_[`~i`](Tau[i, j])

Physics:-D_[`~i`](Tau[i, j], [X])

(18)

Library:-TensorComponents(Physics:-D_[`~i`](Tau[i, j], [X]))

[diff(tau[1, 1](X), r)+(diff(tau[1, 2](X), theta)+r*tau[1, 1](X)-tau[2, 2](X)/r)/r^2+diff(tau[1, 3](X), z), diff(tau[1, 2](X), r)-tau[1, 2](X)/r+(diff(tau[2, 2](X), theta)+2*r*tau[1, 2](X))/r^2+diff(tau[2, 3](X), z), diff(tau[1, 3](X), r)+(diff(tau[2, 3](X), theta)+r*tau[1, 3](X))/r^2+diff(tau[3, 3](X), z)]

(19)

By the way you may want to compute with this object `𝒟`[`~mu`](Tau[mu, nu]) itself, as a tensor of 1 index. You can do that the same way, defining a tensor whose components are the components of this divergence, as in

Z[j] = Physics:-D_[`~i`](Tau[i, j], [X])

Z[j] = Physics:-D_[`~i`](Tau[i, j], [X])

(20)

Physics:-Define(Z[j] = Physics:-D_[`~i`](Tau[i, j], [X]))

`Defined objects with tensor properties`

 

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

(21)

Now you have direct access to the covariant OR contravariant components using indices. For example, the 2nd covariant and contravariant components are different

'Z[2]' = Z[2]

Z[2] = ((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)/r^2

(22)

'Z[`~2`]' = Z[`~2`]

Z[`~2`] = ((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)/r^4

(23)

simplify(normal((Z[2] = ((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)/r^2)-(Z[`~2`] = ((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)/r^4)), size)

((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)*(r+1)*(r-1)/r^4 = ((diff(tau[1, 2](X), r))*r^2+r*tau[1, 2](X)+diff(tau[2, 2](X), theta)+(diff(tau[2, 3](X), z))*r^2)*(r+1)*(r-1)/r^4

(24)

NOTE: the computations above are performed using the newest Physics library, available for download at Maplesoft's Physics Research & Development webpage

``

NULL


Download DivergenceOfATensor.mw

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

Hi

There is a technique in Maple, not very well know, which however permits eliminations as the one you say indicating your preferred variables. Suppose for that purpose that you do not assign c := a+b. Instead you only want a + b + 2 be rewritten as c + 2, and let's state the task as "I want to simplfy a + b + 2 taking into account c = a + b and removing a and b". Here it is:

The details are explained in ?simplify,siderels. In my opinion, and despite some nuances of its syntax, this is one of the most versatile simplifications available in the Maple system.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Alejandro, others

Regarding Diff -> diff, PDEtools:-dchange works as designed. When I wrote this command (exactly 22 years ago ...) and also by the end of 1999 there was evidence of problems when you did not do Diff -> diff, mainly related to incorrect uses of Diff, that would not be detected if you do not activate these inert derivatives, making the whole 'change of variables' process go astray.

Along the years, mainly while designing `assuming` and the handling of inert functions, another approach proved to be more useful: just spend additional computational cycles, as much as you need, verifying - with reasonable probability - that ill-defined situations are not present, then proceed without activating anything. This always implies on a slow down but it is negligible. PDEtools:-dchange never got updated regarding this; when I saw this post a couple of days ago it passed through my mind to just do it.

By now I am busy with the  Virtual User Summit (Feb/27) and next month with a mini-course on Computer algebra for physicists in Brazil. After that I will give a look at this. If possible, I will implement it and put it available on the Maplesoft R&D page for DEs and Mathematical functions. I will then post here again.

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

@juggler 

In brief: a) use Physics:-Gtaylor, not taylor and b) Before proceeding, update your Physics package with the latest version, available for download at the Maplesoft Maple Physics: Research & Development webpage.

In details: Physics is a relatively new package. The taylor command is from before Physics, and uses `*` and `^` operators that assume commutativity. An important number of developments happen every year towards making the Maple library more aware of the presence of non commutative objects within algebraic expressions, so that their products, powers, simplification, expansion and combination rules, etc happen as expected. A relevant command in this process is Physics:-Check that will tell you, among other things, whether products of non-commutative objects are ill-formed; i.e. expressed using a commutative `*` operator. Try it with the output of taylor (not Physics:-Gtaylor) and you will see.

Regarding updating Physics: bug fixes and new Physics and Physics-related developments are integrated into the R&D version of the package every week.

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

Hi

Following Mac Dude's advise (you need to write r(phi), not r), dsolve(ode) returns to you an integral that is already an elliptic integral. You may recognize it by eye, or if you are not familiar with elliptic integrals call value over the output of dsolve (as in value(%)) and you see that the output, rather large in length, involves the EllipticF function. Having said that this is an elliptic integral not of Jacobi but of inverse-Jacobi type: EllipticF(z,k) = InverseJacobiSN(z,k).

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

Hi

Thanks Carl. I gave a look at your worksheet (html first link). In Maple there is a Physics package, that includes noncommutative products, powers, differentiation, series expansion, and also an implementation of Campbell-Baker-Hausdorff formula in that, when [A,[A,B]] <> 0 or [B,[A,B]] <> 0, the expansion of exponentials does not proceed, otherwise it proceeds, etc.

So at first sight I'd say that what I see in your html link can be reproduced in Maple naturally. If not, please post here the issue so that we can give it a look.

In case you go ahead and implement the contents of your html page using Maple's Physics, I also suggest you to first download the most up-to-date Physics for Maple 17 at the Maple Physics: Research & Development webpage.

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

Hi Dude

In order to reproduce a problem it is necessary the actual input lines. The standard way of doing that is to copy and paste, or better: attach a worksheet where the problem is shown (you attach a worksheet by clicking the green arrow you see in the toolbar when editing your post). In particular, what you describe looks more like a 1D versus 2D input issue, only observable within a worksheet.

Besides that, you know, Maple changes in significant ways at every release and, particularly so, the Physics package. Since Maple 15 Physics duplicated its size two times, for Maple 16 then again for Maple 17, and currently relies on non-Physics features that didn't exist in Maple 15. Unfortunately this makes non obvious how to help you even if you had posted the actual input lines to reproduce the problem.

Having said that, if the problem you are observing, that motivated your post, is in the Physics package and is reproducible in Maple 17, chances are that it will get fixed next day and you will be able to download the fix directly from the Maplesoft Physics: Research & Development webpage, where Physics is updated regularly with the latest developments.

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

Hi
I'm sorry but am overloaded till the end of January - this is a special time of the year, closing a new Maple release. Then I will give a look and post here my take on your question.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

If you only have access to Maple 12, I suggest you to give a look at the documentation of GRTensor.

If you have acces to current Maple (17), using the Physics package, just enter

> with(Physics);
> Setup(metric = arbitrary);

And that is all. The metric, g_[mu,nu], depends on 10 arbitrary functions of four variables (x,y,z,t), and the Christoffel, Ricci, Rieman, etc. general relativity tensors all got automatically defined on background when you entered the Setup command.

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

Hi Carl

print/foo are not traceable - they can easily (not always though) enter an infinite loop invoking themselves to print on the screen the debug output. What you can do is to stopat them. Or you can also redefine them inserting an option trace, then diminish the prettyprint level in order to avoid possible infinite loops, then run. By the way if you have any questions regarding the routine itself please feel free to ask - I wrote it.

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

 

Hi John

 

There are three situations: the anticommutative variables can be taken as a) real "numbers"; b) complex "numbers"; c) operators.

 

Dagger is supposed to perform the operation in all cases, what changes is what it should returns.

 

For c) it works as you see it working today, this is the default mode.

For b) we needed a way to specify that the object is a scalar, then Dagger(theta) would return conjugate(theta). This can now be done if you assume(theta, scalar) 

For a) we already have the new Setup(realobjects = {...}) where {...} can contain anything, including anticommutative variables, and so conjugate(theta) returns theta - this also already works. If you assume(theta, scalar) and also Setup(realobjects = theta) you can work as in classical real field theory.

 

Example: (you need to download the updated Physics.mla from Maple Physics: Research & Development)

restart; with(Physics)

Setup(anticommutativepre = theta)

`* Partial match of  'anticommutativepre' against keyword 'anticommutativeprefix'`

 

[anticommutativeprefix = {_lambda, theta}]

(1)

So the default case is case c)

Dagger(theta1)

Physics:-Dagger(theta1)

(2)

theta1*theta2

Physics:-`*`(theta1, theta2)

(3)

Dagger(Physics[`*`](theta1, theta2))

-Physics:-`*`(Physics:-Dagger(theta1), Physics:-Dagger(theta2))

(4)

Suppose now that your anticommutative variables

G := {theta1, theta2, theta3}

{theta1, theta2, theta3}

(5)

are all scalars. For that purpose, explicitly assume all the elements of G to be scalars; this is case b)

map(assume, G, scalar)

 

For readability let's displayed assumed variables without a trailing tilde:

interface(showassumed = 0)

 

Dagger now returns using conjugate

Dagger(theta1)

conjugate(theta1)

(6)

Dagger(Physics[`*`](theta1, theta2))

-Physics:-`*`(conjugate(theta1), conjugate(theta2))

(7)

And that is what you can use in classical field theory.

 

Suppose furthermore that you want to compute as in case a) so with all these objects taken as real. You can either 'assume additionally (see assume )' or use the new Setup option to indicate real objects in your theory, as in

Setup(real = G)

`* Partial match of  'real' against keyword 'realobjects'`

 

[realobjects = {theta1, theta2, theta3}]

(8)

So for case a)

is(theta1, real)

true

(9)

Dagger(theta1)

theta1

(10)

Dagger(Physics[`*`](theta1, theta2))

-Physics:-`*`(theta1, theta2)

(11)

In any case, the same way realobjects has advantages with regards to assume(theta, real), I'll see to add another Setup option, scalarobjects, with the same advantages, and eventually generalize the approach furthermore to include other more frequent assumptions.

 

Download ScalarGrassmannVaria.mw


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

Hi John,

There is a distinction between Dagger and conjugate when you operate over a product of matrices, as well as when you operate over a product of anticommutative (Grassmaniann) objects. So, for instance, conjugate returns what you received, by design, and Dagger returns what I believe you were expecting from conjugate:

b := Dagger(a);

-Physics:-`*`(Physics:-Dagger(theta1), Physics:-Dagger(theta2))

(1)

Having said that, whether to treat a Grasmanniann object itself as a scalar, and so to have Dagger(theta) -> conjugate(theta), is a different issue; debatable, I think. The current implementation allows for anticommutative objects that are also not scalars. A distinction between the two cases - anticommutative scalar and not-scalar - may be useful ..

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

First 46 47 48 49 50 51 52 Last Page 48 of 56