ecterrab

13316 Reputation

24 Badges

18 years, 84 days

MaplePrimes Activity


These are answers submitted by ecterrab

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

Hi John
Good catch. It's fixed now. The updated Physics mla containing this fix is available at the Maple Physics: Research & Development webpage.

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

Hi,
Grassmanian operations worked and work fine. The conditional for a Matrix of noncommutative elements however had a typo and so end up performed as if the elements of the Matrix were commutative. This is fixed now. The fix is available on the Maplesoft Physics: Research & Development webpage. For instance, with the fix, for the Matrix you indicated you get

B := A.A

Matrix(%id = 18446744078299947126)

(1)

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

One way of doing what you say is using the D operator. For example:

P := h+f[1]*D(y)+f[2]*(D@@2)(y)+f[3]*(D@@3)(y)

h+f[1]*D(y)+f[2]*(D@@2)(y)+f[3]*(D@@3)(y)

(1)

ODE := eval(P, [f[1] = (proc (u) options operator, arrow; u end proc), f[2] = (proc (u) options operator, arrow; 1/u end proc), f[3] = (proc (u) options operator, arrow; 1 end proc), h = (proc (u) options operator, arrow; 1 end proc)])

(proc (u) options operator, arrow; 1 end proc)+(proc (u) options operator, arrow; u end proc)*D(y)+(proc (u) options operator, arrow; 1/u end proc)*(D@@2)(y)+(proc (u) options operator, arrow; 1 end proc)*(D@@3)(y)

(2)

ODE(x)

1+x*(D(y))(x)+((D@@2)(y))(x)/x+((D@@3)(y))(x)

(3)

dsolve(1+x*(D(y))(x)+((D@@2)(y))(x)/x+((D@@3)(y))(x))

y(x) = Int(BesselJ(0, (2/3)*x^(3/2))*_C2+BesselY(0, (2/3)*x^(3/2))*_C1-(1/3)*LommelS1(1/3, 0, (2/3)*x^(3/2))*12^(1/3), x)+_C3

(4)

Regarding symbolic derivatives, mentioned in your question, see diff,symbolic; the capabilities are not built into the D operator but into the diff

diff(f(x)*g(x), `$`(x, n))

Sum(binomial(n, _k1)*(diff(f(x), [`$`(x, _k1)]))*(diff(g(x), [`$`(x, n-_k1)])), _k1 = 0 .. n)

(5)

((D@@n)(f*g))(x)

((D@@n)(f*g))(x)

(6)

convert(%, diff)

Sum(binomial(n, _k1)*(diff(f(x), [`$`(x, _k1)]))*(diff(g(x), [`$`(x, n-_k1)])), _k1 = 0 .. n)

(7)

NULL


Download OperatorForm.mw

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

Hi

Yes you can change the way the solution is written, but this equation admits no Liouvillian solution (for a definition see ?DEtools[kovacicsols], 2nd paragraph). So you cannot avoid using special functions, e.g. Legendre or something more general as pFq (hypergeom) to represent the solution.

So you can try dsolve(ode, [hyper3]) to see a solution in terms of hypergeometric functions, and alternatively you can also try FunctionAdvisor(specialize, special_function) (where in your case special_function is LegendreP(1/2*I*sqrt(7)-1/2, I*sqrt(7), 2*I*tau) to see the specializations (different ways of expressing pecial_function) that Maple knows about.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

Regarding Lie algebras or vector fields, there is also PDEtools:-SymmetryCommutator, DifferentialGeometry:-LieBracket and Physics:-LieBracket.

But within the Physics package, the natural commands for this are Commutator and AntiCommutator, and there this missing functionality is an oversight. I fixed this now. The fix is already uploaded and available in Maplesoft's  Physics: Research & Development webpage. With the fix,

with(Physics):

A := Matrix(2, 2, [a, b, c, d])

Matrix(%id = 18446744078296945478)

(1)

B := Matrix(2, 2, [f, g, h, j])

Matrix(%id = 18446744078296946198)

(2)

Commutator(A, B)

Matrix(%id = 18446744078296947878)

(3)

AntiCommutator(A, B)

Matrix(%id = 18446744078296943422)

(4)

 

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

Hi

See the Physics package. In its help page ?Physics you see all the commandas available and a two lines description for each of them. Basically, to define tensors use its Define command. To set the metric use the Setup, or the metrics command g_ itself, as in g_[sc] will do it for the Schawrzschild metric. To compute the geodesics you can use the Physics:-Geodesics command, or Physics:-KillingVectors to compute the Killing vectors, and so on.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
Your post appeared in my radar after Carl added the physics tag. I see that the main question has been answer, but looking at your worksheet, it gives me the impression that perhaps you are not aware of the existence of the Physics package? In your worksheet you define the Dirac matrices, fermions, antifermions, a spacetime metric, etc. All this exists in standard Maple through its Physics package; at first sight I'd say that you can simplify your computation in various ways using Physics.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Marko,

T(3^22-1)-T_ex(3^22-1)

Error, (in T_ex) invalid subscript selector

 

Try tracelast

tracelast

 T_ex called with arguments: 31381059608
 #(T_ex,3): add(3^j*(1+m-j)^3*add(d[k+1]*3^k,k = j .. m),j = 0 .. m)

Error, (in T_ex) invalid subscript selector

 

 locals defined as: m = 22, d = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

So the problem happens when executing the add statement within T_ex. So debug this procecure

debug(T_ex)

T_ex

(1)

T_ex(3^22-1)

{--> enter T_ex, args = 31381059608

 

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

22

 

<-- ERROR in T_ex (now at top level) = invalid subscript selector}

Error, (in T_ex) invalid subscript selector

 

Now you have the data to identify the problem. Copy and paste into input lines the value of d and m

d := [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

(2)

You see there are only 22

nops(d)

22

(3)

So if you go beyond this number:

d[23]

Error, invalid subscript selector

 

Let's see then:

m := 22

22

(4)

Replace d by %d, and get all the %d[anything] in this add structure withou your procedure:

indets(add(3^j*(1+m-j)^3*add(%d[k+1]*3^k, k = j .. m), j = 0 .. m), %d[anything])

{%d[1], %d[2], %d[3], %d[4], %d[5], %d[6], %d[7], %d[8], %d[9], %d[10], %d[11], %d[12], %d[13], %d[14], %d[15], %d[16], %d[17], %d[18], %d[19], %d[20], %d[21], %d[22], %d[23]}

(5)

You see there, at the end, %d[23], wo when it is d[23] it interrupts with an error.

 

At Digits = 50 the situation is different: m = 21, not 22.

Digits := 50

50

(6)

T_ex(3^22-1)

{--> enter T_ex, args = 31381059608

 

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

21

 

3806850983304031497242

 

<-- exit T_ex (now at top level) = 3806850983304031497242}

 

3806850983304031497242

(7)

And with m = 21, the maximum index for d is 22, not 23, so you don't see an error.

 

Summary: ilog[3](n) depends on the value of Digits, that explains why an error for Digits = 10 (default value) but no error for Digits = 50.


Download debug.mw

 

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Sergio
Not sure whether this is of use for you but just in case: PDEtools:-casesplit returns, basically, a triangularization equivalent to a differential Groebner basis, computed using DEtools[rifsimp] or optionally the more formal DifferentialAlgebra:-RosenfeldGroebner. If you want to do the same triangularization but with the derivatives seen as independent of the functions (sort of algebraic Grobner basis, say as in a jet space) you can apply PDEtools:-ToJet(pdesys), then pass the system to PDEtools:-casesplit.

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

Hi

In situations like this one, besides what Markiyan correctly pointed out (see ?to_special_function for a list of conversions including class conversions), the way to go to investigate an expression is

> FunctionAdvisor(specialize, F);

where in your example F = hypergeom([1/2],[3/2,3/2,2,2], rho^2/64). Doing that, you see that the system only knows how to related this F to MeijerG (so not simpler).

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

First 45 46 47 48 49 50 51 Last Page 47 of 55