Hi,
This thread seem to have different questions; I'll try to answer them by RE to the title of each message.
*I need to simplify tedious expressions involving products of fermionic creation/annihilation operators.
I loaded the Physics package,
*
In that package there are the Annihilation and Creation commands, that will construct these operators with the corresponding properties in one step.
*and defined the fermionic operators c[i,spin] and C[i,spin] where i=1..4, spin=1..2*
Are these c[i], C[j] annihilation/creation operators? Or are they just fermionic (thus anticommuting) operators?
*My first concern is that c[i,spin].c[i,spin] doesn't return 0*
If c[i] are annihilation or creation operators, then c[i].c[i] is not zero. If c[i] is a anticommuting operator, then yes c[i]^2 = 0, and you need to tell the system that these are anticommuting objects. For that purpose either use an anticommuting variable (see Setup, search for anticommutativeprefix) or set them to be operators that satisfy an algebrarule: AntiCommutator(c[i], c[j]) = 0
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft
Editor for Computer Algebra, Computer Physics Communications

Hi,
Regarding the difficulties to read the help text: to search the Maple system about tensor notation, for instance contravariant or covariant notation, you can enter the keyword contravariant in a Text search in the Help (F1, then to your left select Text and enter the word contravariant; in the Classic GUI try Help -> FullTextSearch for contravariant). That will point you to everything in Maple that knows about contravariant/covariant notation. Essentially, there are three packages: the old tensor and the new Physics and DifferentialGeometry:-Tensor packages introduced in Maple 11. The latter is a package for specialized operations in curved spaces (there are Maple lessons on its use, also distributed with Maple 11, linked in ?DifferentialGeometry:-Tensor). The old "tensor", also permits operations in curved spaces but is less general than the latter and has not the frame given by all the DifferentialGeometry (DG) subpackages. The Maple 11 version of the Physics package, on the other hand, is mainly for doing _abstract_ tensor algebra (not working with tensor components) and in flat spaces (see ?Physics,conventions, listed in that full text search).
The plan is to keep DG:-Tensor as the main Tensor package after integrating into it some functionality available in the old "tensor" that is still not present in DG, and keep Physics as package permitting performing tensor algebra using a simpler notation and setup, basically as it is done when computing with paper and pencil, and including the ability to work with tensors in curved spaces. Clearly we are not there yet, and even so we would still miss relevant tensor functionality that you see nowadays in a package like GR-Tensor (see the web for that).
Having said that, the answer to your question regarding the Physics package is basically the 1st paragraph in ?Physics,conventions (Spacetime, tensor simplification and default settings). I quote it here: "A notational convention, not settable, used along the Physics package, is that the distinction between covariant and contravariant indices is omitted: when the index is free, the expression has meaning no matter the character of the index, and when a spacetime index is contracted with another one, it is not relevant which of them is covariant and which is contravariant. So both covariant and contravariant free indices are entered the same way, by "computationally indexing" the tensor - say A - as in A[mu], and are displayed the same way as if they were covariant".
Me again: the above makes sense provided that you do abstract tensor algebra, i.e. do not split into space and time. The plans for soon is to allow for this splitting and so some conventions are being introduced allowing to set whether a free index in a tensor expression is covariant or contravariant, so that the split into space and time can be performed with the desired sign (flat space).
Regarding the printing of covariant and contravariant indices as in textbooks, this is also an area of evolution for Maple, and we expect at some point (not for Maple 12 but hopefully the next one) to have the infrastructure in place for doing that naturally. In this moment, regarding the Physics package notation, as the paragraph quoted above says, all indices (free and contracted) are displayed as subscripts.
Regarding the other post (title: "also confused"), there is an implementation detail you are missing: when you say that F is antisymmetric, nothing gets assigned to F, and, instead, the information of the antisymmetry of F is available for the Physics commands to perform operations with F correctly. Now when you actually assign something to a component of F, like in F[1,1] := 10, you are moving away from the Physics package framework (remember the Physics routines implement functionality for doing _abstract_ tensor algebra, not for computing with tensor "components") and Maple allows you to assign anything to anything.
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft
Editor for Computer Algebra, Computer Physics Communications

Hi
First a note: the command to perform differential eliminination used by pdsolve is PDEtools:-casesplit, which handles the problem using both rifsimp and the diffalg package, handles basically all the mathematical functions implemented in maple (rifsimp is currently restricted to exp and some trig functions) and has a simpler interface.
In your problem, try setting the ranking
> fncs := [{alpha[1](u,v), alpha[2](u,v), beta[1](u,v), beta[2](u,v)}, {a, b}];
This means (see ?pdsolve,system) to solve alpha[i] in terms of a, b an take them also as solving variables. Then add the equation eq_ab := a^2+b^2 = 1 to the system, so sys := {PDE, eq_ab}. Call now pdsolve and you have a nontrivial solution, not ugly.
> pdsolve(sys, fncs);
{beta[1](u, v) = -_C3,
alpha[1](u, v) = _C3 exp(u I) + _C1 exp(-I v) + _C2,
beta[2](u, v) = _C1 exp(-I v) exp(v I), b = 0, a = 1,
alpha[2](u, v) = exp(v I) _C3 - _C1 exp(-I u) + _C4}, {
alpha[2](u, v) = 0, a = a, beta[1](u, v) = 0,
2 1/2
alpha[1](u, v) = 0, beta[2](u, v) = 0, b = -(-a + 1) }, {
alpha[2](u, v) = 0, a = a, beta[1](u, v) = 0,
2 1/2
alpha[1](u, v) = 0, beta[2](u, v) = 0, b = (-a + 1) }
In summary: this is not a matter of calling assuming but of telling that there is one more equation in the system and of ranking all the solving variables appropriatedly (you may want to experimen t with the ranking [{a, b}, {alpha[1](u,v), alpha[2](u,v), beta[1](u,v), beta[2](u,v)}] to see how rankings can change the form of the output).
Regards
Edgardo S. Cheb-Terrab, Maplesoft

As far as I know there are no more solutions to this PDE than the trivial one, with all the unknowns equal to zero. One way of verifying that is to enter "> DEtools[rifsimp](expand(PDE));" You see from the output that the integrability conditions of the problem are sufficient to tell that the only solution is the trivial one. What makes you think there are other solutions?
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft

Hi,
You seem to be defining two sets of coordinates (X, Y) and want to differentiate one with respect to the other one. Have in mind that the sets of coordinates you introduce using Physics:-Coordinates(X, Y) or Physics:-Setup(coordinates = {X,Y}) are independent of each other, represented by symbol variables to which you cannot attach functionality (e.g. you cannot do X[1] = X[1](Y[1], Y[2], Y[3], t)).
If I understood you correctly, in order to do what you want you can setup one set of coordinates, say Y, (you may want to set it as "default differentiation variables" as well, use Setup(diff=Y) to perform both operations in one step), then then define a tensor function (Physics:-Define(X)) then work with expressions involving X[mu](Y,t) normally, including performing d_[mu] differentiation automatically using the sum rule for repeated indices. Here are the steps
```
> restart;
> with(Physics):
> Setup(dim = [3, `+`], diff = Y);
```

```
[differentiationvariables = [Y], dimension = 3, signature = +]
```

```
# Define X as a tensor function
```

```
> Define(X):
```

```
# Now you can operate
```

```
> d_[mu]( X[nu](Y,t)^2 );
```

```
2 X[nu](y1, y2, y3, t) ð[mu](X[nu](y1, y2, y3, t))
```

```
# If you prefer not to see the functionality of X all the time try this
```

```
> PDEtools:-declare(X[mu](Y,t));
```

```
X(y1, y2, y3, t) will now be displayed as X
```

```
> d_[mu](X[nu](Y,t)^2);
```

```
2 X[nu] ð[mu](X[nu])
```

Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft

Hi
Would you please post the PDE system that is generating ths error message? With it we can tell where the problem is. Thanks.
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft

Hi,
There is a (downloadable) package, still in experimental stage, at http://lie.uwaterloo.ca/qft.html (for a description see http://lie.uwaterloo.ca/qft/talk_QFT.html) which implements Pauli as well as Dirac matrices and provide tools for computing with them in different representations (standard or helicity).
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft
Editor for Computer Algebra, Computer Physics Communications

> u := sin(x)*sin(th)+sin(x)^2+sin(2x)+sin(th)^2+exp(x)+x
> i want to extract for x
>
> unique functions = {sin(x),sin(2x),exp(x),x}
There are various manners, here is a sample of different types of selection
# functions sin and exp of x and 2*x
> indets(u, specfunc(identical(x, 2*x), [sin,exp]));
{sin(x), sin(2 x), exp(x)}
# functions sin and exp with arguments of type name (see ?type,name)
> indets(u, specfunc(name, [sin,exp]));
{sin(x), sin(th), exp(x)}
# functions sin and exp of any argument
> indets(u, specfunc(anything, [sin,exp]));
{sin(x), sin(th), sin(2 x), exp(x)}
# This other construction using 'satisfies' is very flexible:
> indets(u, And(specfunc(anything, [sin,exp]), satisfies(f -> has(f, th))));
{sin(th)}
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft

The solution may look "insane" but that is a consequence of the input, not a problem in itself. Here is a way to obtain what you want, that is the space crossed in a period of time: from t=3.35 to t=4.77 (seconds), also not looking like an insane wall paper.

For comfort (not necessary) I'll use

**> PDEtools[declare](v(t),x(t),prime=t);**

This is your equation, for , the velocity

**> eq1:=diff(v(t),t)+4.646e-4*v(t)^3-7.13e-3*v(t)^2-0.085*v(t)-2.82;**

Transform it into an equation for , the position

**> eq2 := eval(eq1,v(t)=diff(x(t),t));**

Now let's put the origin for the x axis (any choice is as good) at the place where the object is at t = 3.35; at that moment, the velocity is, according to your post, 14.77 m/s, so the "initial conditions" for this problem are

**> ic := x(3.35)=0, D(x)(3.35)=14.77;**

You can now this exactly, in a rather compact form (note all floats got converted to exact rational numbers);

**> sol := dsolve([eq2,ic]);**

In above you see a double integral and a RootOf as one of the integrands. You can request these integrals to be computed but the output is a kind of (unavoidable) wall paper.

Now, because of our choice of origin for the x axis, the space between from x(3.35) and x(14.77) is directly the value of this solution at 4.77

**> evalf(eval(sol,t=4.77));**

This value, however, relies on the ability to numerically evaluate the double integral with a RootOf in the integrand - that is difficult in itself. Let's check computing a numerical solution directly:

**> nx := dsolve([eq2,ic],numeric);**

**> nx(4.77);**

So using direct numerical methods on this problem the value is ~25.

Edgardo S. Cheb-Terrab

Research Fellow, Maplesoft

This post generated using the online HTML conversion tool

Download the original worksheet

The packages for working with DEs in Maple are DEtools and PDEtools. The DEtools[matrixDE] command could be the closer match to what you are looking for.
Note however that in Maple "multiplication" and "application" (see ?apply) are rather different operations. You could try to reprogram the Maple non-commutative multiplication operator `.` (see ?overload), in order to make it work as "application" too, but for typical problems this may not be worth.
In Maple you can compute the adjoint of a linear equation using the DEtools[adjoint] command, but I guess that in your context the word adjoint has a different meaning (transposing and conjugating?).
Perhaps looking at a concrete example, showing the actual input and output you expect, it may be possible to help you more.
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft

Hi,
Recalling (see ?nspin), in

> npspin(coord, h, G, curinfo)

h is a Maple rank-2 tensor_type object of character [1,-1] (first index contravariant and second index covariant), representing the tetrad transformation "matrix". Using tensorial notation (to the left) and Maple matrix notation (to the right),

a
h = h[compts][a,b]
b

where h entering the right-hand-side is the object created using the tensor[create] command, h[compts] is the matrix contents of that rank-2 tensor, and h satisfies (sum over the repeated indice c)

c [ 0, 1, 0, 0 ]
h h = [ 1, 0, 0, 0 ].
ac b [ 0, 0, 0, -1 ]
[ 0, 0, -1, 0 ]

You can use the tetrad of null 4-vectors you mentioned [l, n, m, \bar{m}], satisfying

a a a _ _a
l l = n n = m m = m m = 0
a a a a
a _a
l n = - m m = 1
a a

to construct h with two covariant indices (so a Maple tensor of rank-2 with character [-1, -1]), via

_
h = [ l , n , m , m ]
ab b b b b

and then use the metric tensor to rise the first indice and obtain the object entering the calling sequence of nspin. The formulas to compute the spin coefficients in terms of this tetrad of 4-vectors and the metrics are the standard ones; see for instance (5.5) page 167 of http://projecteuclid.org/Dienst/UI/1.0/Summarize/euclid.cmp/1103840725
Although you already have the tetrad of 4-vectors, you may prefer to compute the spin coefficients directly from the connections using the tensor[convertNP] command. In turn other commands of the tensor package allow you to construct the connections from the metric tensor - see tensor[connexF]. Alternatively, the GRTensor package mentioned by Tom also has a command, nptetrad, which computes the null tetrad of 4-vectors from the the metric tensor - see http://grtensor.phy.queensu.ca/Griihelp/nptetrad.help. As far as I remember the GRTensor does not have a separate command to compute the spin coefficients.
Edgardo S. Cheb-Terrab
Research Fellow, Maplesoft