ecterrab

14540 Reputation

24 Badges

20 years, 24 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi Mac,
This is yet another solution for Maples before Maple 18:

> unprotect(intat):
> Intat := setattribute('Intat', '_syslib'):
> protect(intat):

That will just make Intat fully inert and resolve your issue the same way as the other 'workarounds', though in this case it is more a solution than a workaround. And for Maple 18, this will be available in a couple of days on the webpage with updates to the DE and mathematical functions libraries.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
Indeed, Alejandro is right when saying that Intat is not entirely inert: it checks arguments, from a time (actually, 1996) when inert routines were under discussion. I will remove this check of arguments.

Then you can also use %intat (so: the active lowercase command preceeded by the %) instead of Intat, and if that doesn't work, it needs to be fixed. I have not tried with your example, but am cooking an update on DEs and Mathematical Functions to be released this week and can include a fix for this too if it doesn't work (please let me know).

Then there is the use of single versus double quoting or use of value: generally speaking, double quoting or double calls to value should not be necessary, but if you use %Intat (so the uppercase preceeded by %) you will naturally need double calls to value, the same way if you use %Int instead of %int, for example as in value(value(%Int(x,x))).

The message I am trying to pass is that the real issues are to be fixed, not worked around. The fixes are easy to accomplish and can be available to everybody as soon as this week (CAVEAT: they only work in Maple 18).

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

Hi
Just gave a look and updated the Maplesoft webpage: this issue related to having to apply Simplify twice to obtain zero is fixed. So now Simplify((16) - (14)) returns zero in one go and the same for Simplify((rhs((17)) - rhs((15))).

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Markiyan

In cases like this one (fractional powers and some other ones) one approach is to transform your problem into one that is a bit more general, solve that one, then try restricting the solutions to solve the original problem - sometimes you only need to select the solution that is useful.

For example, you starting expression is

y^2+y^3+(y^3-x^2-3*x*y)^(1/4) <= 5*x*y;

Isolate the radical

isolate(%, (y^3-x^2-3*x*y)^(1/4));

Now map both sides to the power 4

map(u -> u^4, %);

Solve this more-general problem:

solve(%, allsolutions);  # bunch of solutions here

And, I haven't tried, but either one of these already solves your problem or from their remainder (obtained after substituting the solution into the original problem and simplifying) you could see how to particularize it further.

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

Looking closer, the simplification works fine. You say that "equation (16) should correspond to equation (14)" and that is indeed the case. One way to verify that is to take the difference (16) (14) and perform the summation over all the repeated indices:

Vacuum_Solutions_reviewed.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Mac,
There is no addBasis command, the three coordinate systems with which the Physics :-Vectors package works are fixed, as explained in ?Physics,Vectors : [x, y, z], [rho, phi, z], [r, theta, phi]. I do have in mind implementing arbitrary basis, but it is not high in the list of priorities, mainly because these three systems of coordinates cover most applications & textbooks, swapping two coordinates in the basis definition does not really change the geometry (the existing system is mostly as good for that purpose), and there are various other things - new functionality - that look more relevant or having higher positive impact if implemented.

Regarding Physics being open: it is as open as any other Maple program. You can see the routines and change them if you want. More important: Physics (starting with Maple 17) comes with a library of more than 100 dedicated-physics-programming commands, plus approx 70 physics-dedicated-types, basically all the routines used to write Physics, that allow you to extend the package in different ways if you are willing to program. Various of these "programming" routines are also useful at interactive level. Details are in the help page (available online) ?Physics,Library

But you need to update your Maple, Mac. Have in mind that the Physics package duplicated its size for Maple 16, then again for Maple 17, and mostly one more time for Maple 18, not to mention that by now more than 40 updates were posted in the Maplesoft R&D Physics webpage after Maple 18 got released.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Mac,

The problem in old maples is that assuming replaces the cartesian coordiante x with a local one and then the Nabla operator in Physics differentiates as in diff(local_x, global_x) = 0. This has been fixed in previous Maples - it works fine in Maple 18, and also in Maple 17 + the Physics update. This is what I receive in Maple 18:

 

"Maple Initialization loaded..."

(1)

restart:with(Physics[Vectors]);
Setup(mathematicalnotation = true);

[`&x`, `+`, `.`, ChangeBasis, Component, Curl, DirectionalDiff, Divergence, Gradient, Identify, Laplacian, Nabla, Norm, Setup, diff]

 

[mathematicalnotation = true]

(2)

# Maxwell's eqn
M4 := `&x`(Nabla, B1_(x, y, z, t)) = mu*epsilon*(diff(E1_(x, y, z, t), t));

Physics:-Vectors:-Curl(B1_(x, y, z, t)) = mu*epsilon*(diff(E1_(x, y, z, t), t))

(3)

eval(subs(B1_(x,y,z,t)=Bxx(x,y,z,t)*_i+Bzz(x,y,z,t)*_k,M4));

(diff(Bzz(x, y, z, t), y))*_i+(diff(Bxx(x, y, z, t), z)-(diff(Bzz(x, y, z, t), x)))*_j-(diff(Bxx(x, y, z, t), y))*_k = mu*epsilon*(diff(E1_(x, y, z, t), t))

(4)

eval(subs(B1_(x,y,z,t)=Bxx(x,y,z,t)*_i+Bzz(x,y,z,t)*_k,M4)) assuming real;

(diff(Bzz(x, y, z, t), y))*_i+(diff(Bxx(x, y, z, t), z)-(diff(Bzz(x, y, z, t), x)))*_j-(diff(Bxx(x, y, z, t), y))*_k = mu*epsilon*(diff(E1_(x, y, z, t), t))

(5)

The above is in Maple 18, but you can reproduce it in Maple 17 as well including the update of Physics available on the Maplesoft R&D Physics webpage.

 

In brief: you need to update your Maple.

 

NULL

 

Download Maxwell_testMaple18.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

I am not sure I understand your problem, but if what you want is to solve 

ee := A*cos(x)+R*i*sin(x) = B*exp(-x)+C*exp(x);

For A, B, C, R independent of x, and such that ee is true for arbitrary values of x, as far as I can tell the problem has no solution but for the trivial solution. The command in Maple that performs this computation is PDEtools:-Solve. Check its help page for details. The input/output for your example is as follows:

PDEtools:-Solve(ee, {A, B, C, R}, independentof = x);

                                                  {A = 0, B = 0, C = 0, R = 0}


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

@John Fredsted 

We included the fix to this problem in the latest update for Maple 17, that also includes all the changes in the package till March 18 2014, and with this we close the updates for Maple 17. This update is available for download as usuai on the Maplesoft R&D Physics webpage (note that there are two links: one for the ongoing updates in Maple 18, these do not work in Maple 17, and another link, Physics-61.3.mla.zip, with the latest update for Maple 17).

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

@Carl Love 
I see, you are correct Carl, and yes, the MeijerG function of two arguments (not talking about its list of parameters) does not exist as such in Maple. It is however easy to translate in some cases, for example in the one posted:

MeijerG[{{0, 1/2}, {}}, {{0, 1}, {-1, -1}}, 10, 1/2] = MeijerG[{{0, 1/2}, {}}, {{0, 1}, {-1, -1}}, 10^(1/2)] 

and the rhs above exists in Maple.

I will fix the convert facility regarding this - one more for the next update of the Mathematical functions code.

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

Hi

You ask on how to implement this function in Maple. But the MeijerG function is already implemented in Maple, you do not need to implement it. Please give a look at ?MeijerG.

Regarding your question about Matlab, or comment about the output of the Mathematica command Integrate, note please that in this forum we work with Maple, not Matlab nor Mathematica, so perhaps it is better if you ask those question in Matlab or Mathematica forums?

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

Hi
If all what you want is to indicate that {a, b} are real then Physics:-Setup(realobjects = {a, b}) will suffice for the `is` command, and through it everything else in the library (including conjugate), recognize these are real objects. You can also use the standard assume facility, as in assume(a, real) assume(b, real) but that changes who a and b are and that may or not be convenient in general (it frequentiy is not).

So for example Setup(quantumoperator = {a, b}, real = {a, b}) will do what you want to do, then expand(conjugate(k1*a+k2*conjugate(b))) returns as you expect/mentioned in your question.

Note also that you can indicate Setup(hermitianoperator = {a,b}) for the case of a = Dagger(a); generally speaking you can set a quantumoperator, hermitianoperator and unitaryoperator.

The types of operators that you can set as well as the realobjects are all explained in ?Physics:-Setup. 

Finally, note that entering Physics:-Setup(); so without any arguments, you open an applet that shows all the Physics setup at once, and directly in the applet you can specify quantum, hermitian and unitary operators as well as realobjects.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Generally speaking, the command for changing variables in sums is PDEtools:-dchange, for example:

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

Hi

If I understand you correctly, a step forward with regards to your previous question  you want to also

express tensorial expressions involving the metric g_[mu, nu] in terms of the 4-vector l[mu] and the Minkowski

form of the metric - call it eta[mu, nu]. Here is one way to do that, you tell  whether I am missing something and

we move from there.

 

Load the package, set the notation to be textbooklike

restart; with(Physics); Setup(notation = true)

`* Partial match of  'notation' against keyword 'mathematicalnotation'`

(1)

NOTE: I am using the latest version of Physics for Maple 18, that you can download from

Maplesoft's R&D Physics webpage; you verify that checking the Physics datestamp:

Physics:-Version()[2]

`2014, April 15, 18:46 hours`

(2)

So, define your 4-Vector l[mu]

Define(l[mu])

`Defined objects with tensor properties`

 

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

(3)

If you want to define it giving the components, try Define(l[mu] = [a, b, c, d]) where the list on the

right-hand side contains each of the four covariant components of l[mu]

 

I assume also that, in the metric you may want to define, the components of l[mu] depend on the

coordinates, so set a system of coordinates, which you will need anyway to have the Christoffel

symbols working. For simplicity I use here cartesian coordinates  (NOTE: cartesian or arbitrary at this

point mean the same, but if you prefer 'arbitrary' try Setup(coordinates = X))

Setup(Coordinates = cartesian)

`* Partial match of  'Physics:-Coordinates' against keyword 'coordinatesystems'`

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are: `*{X = (x, y, z, t)}

 

[coordinatesystems = {X}]

(4)

Again for simplicity, let's have the functionality of l[mu] not displayed all the time, so that everything is

more readable

PDEtools:-declare(l(X))

l(x, y, z, t)*`will now be displayed as`*l

(5)

Getting into the problem: you want to define a metric - that at this point, as a draft, I am calling it

G - equal to:

G[mu, nu] = g_[mu, nu]+l[mu](X)*l[nu](X)

G[mu, nu] = Physics:-g_[mu, nu]+l[mu](X)*l[nu](X)

(6)

So define this G as a tensor

Define(G[mu, nu] = Physics[g_][mu, nu]+l[mu](X)*l[nu](X))

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], G[mu, nu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], l[mu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(7)

Moreover, you want to have a tensor that is exactly equal to the Minkowski metric, and that is available

for computations even after you set the metric g[mu, nu] to something else. You can always do that defining

such a tensor; it is simpler at this point, before changing the metric as follows:

eta[mu, nu] = rhs(g_[])

eta[mu, nu] = Matrix(%id = 18446744078329981398)

(8)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], G[mu, nu], Physics:-Psigma[mu], Physics:-d_[mu], eta[mu, nu], Physics:-g_[mu, nu], l[mu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(9)

Verify ...

eta[]

eta[mu, nu] = Matrix(%id = 18446744078519433926)

(10)

Let's continue defining the actual metric g[mu, nu] using the matrix of the covariant components of G 

NULL

Setup(metric = rhs(G[]))

[metric = {(1, 1) = -1+l[1](X)^2, (1, 2) = l[1](X)*l[2](X), (1, 3) = l[1](X)*l[3](X), (1, 4) = l[1](X)*l[4](X), (2, 2) = -1+l[2](X)^2, (2, 3) = l[2](X)*l[3](X), (2, 4) = l[2](X)*l[4](X), (3, 3) = -1+l[3](X)^2, (3, 4) = l[3](X)*l[4](X), (4, 4) = 1+l[4](X)^2}]

(11)

Check g[mu, nu]

g_[]

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

(12)

Rewrite now the Christoffel symbols in terms of the metric

Christoffel[alpha, mu, nu] = convert(Christoffel[alpha, mu, nu], g_)

Physics:-Christoffel[alpha, mu, nu] = (1/2)*Physics:-d_[nu](Physics:-g_[alpha, mu], [X])+(1/2)*Physics:-d_[mu](Physics:-g_[alpha, nu], [X])-(1/2)*Physics:-d_[alpha](Physics:-g_[mu, nu], [X])

(13)

and you want to express this result (13) in terms of l[mu] using

g_[mu, nu] = eta[mu, nu]+l[mu](X)*l[nu](X)

Physics:-g_[mu, nu] = eta[mu, nu]+l[mu](X)*l[nu](X)

(14)

Before moving ahead, verify that this equation is true

TensorArray(Physics[g_][mu, nu] = eta[mu, nu]+l[mu](X)*l[nu](X))

Matrix(%id = 18446744078525784902)

(15)

You see by eye that this is an Array of equations all of which are true:

"map(evalb,?)"

Matrix(%id = 18446744078462675414)

(16)

To substitute now (14) in (13) you can use the library command Library:-SubstituteTensor, for which

you have a help page section in the help page for Physics,Library . Note that it will take care of the

indices automatically

Library:-SubstituteTensor(Physics[g_][mu, nu] = eta[mu, nu]+l[mu](X)*l[nu](X), Physics[Christoffel][alpha, mu, nu] = (1/2)*Physics[d_][nu](Physics[g_][alpha, mu], [X])+(1/2)*Physics[d_][mu](Physics[g_][alpha, nu], [X])-(1/2)*Physics[d_][alpha](Physics[g_][mu, nu], [X]))

Physics:-Christoffel[alpha, mu, nu] = (1/2)*Physics:-d_[nu](eta[alpha, mu]+l[alpha](X)*l[mu](X), [X])+(1/2)*Physics:-d_[mu](eta[alpha, nu]+l[alpha](X)*l[nu](X), [X])-(1/2)*Physics:-d_[alpha](eta[mu, nu]+l[mu](X)*l[nu](X), [X])

(17)

You may prefer to see the d_[mu] derivatives evaluated. For that you can just invoke the label or use the

optional argument evaluateexpression

Physics[Christoffel][alpha, mu, nu] = (1/2)*Physics[d_][nu](eta[alpha, mu]+l[alpha](X)*l[mu](X), [X])+(1/2)*Physics[d_][mu](eta[alpha, nu]+l[alpha](X)*l[nu](X), [X])-(1/2)*Physics[d_][alpha](eta[mu, nu]+l[mu](X)*l[nu](X), [X])

Physics:-Christoffel[alpha, mu, nu] = (1/2)*Physics:-d_[nu](l[alpha](X), [X])*l[mu](X)+(1/2)*l[alpha](X)*Physics:-d_[nu](l[mu](X), [X])+(1/2)*Physics:-d_[mu](l[alpha](X), [X])*l[nu](X)+(1/2)*l[alpha](X)*Physics:-d_[mu](l[nu](X), [X])-(1/2)*Physics:-d_[alpha](l[mu](X), [X])*l[nu](X)-(1/2)*l[mu](X)*Physics:-d_[alpha](l[nu](X), [X])

(18)

Library:-SubstituteTensor(Physics[g_][mu, nu] = eta[mu, nu]+l[mu](X)*l[nu](X), Physics[Christoffel][alpha, mu, nu] = (1/2)*Physics[d_][nu](Physics[g_][alpha, mu], [X])+(1/2)*Physics[d_][mu](Physics[g_][alpha, nu], [X])-(1/2)*Physics[d_][alpha](Physics[g_][mu, nu], [X]), evaluateexpression)

Physics:-Christoffel[alpha, mu, nu] = (1/2)*Physics:-d_[nu](l[alpha](X), [X])*l[mu](X)+(1/2)*l[alpha](X)*Physics:-d_[nu](l[mu](X), [X])+(1/2)*Physics:-d_[mu](l[alpha](X), [X])*l[nu](X)+(1/2)*l[alpha](X)*Physics:-d_[mu](l[nu](X), [X])-(1/2)*Physics:-d_[alpha](l[mu](X), [X])*l[nu](X)-(1/2)*l[mu](X)*Physics:-d_[alpha](l[nu](X), [X])

(19)

Likewise, for the Ricci tensor,

Ricci[mu, nu]; % = convert(%, Christoffel)

Physics:-Ricci[mu, nu] = Physics:-d_[alpha](Physics:-Christoffel[`~alpha`, mu, nu], [X])-Physics:-d_[nu](Physics:-Christoffel[`~alpha`, alpha, mu], [X])+Physics:-Christoffel[`~beta`, mu, nu]*Physics:-Christoffel[`~alpha`, alpha, beta]-Physics:-Christoffel[`~beta`, alpha, mu]*Physics:-Christoffel[`~alpha`, beta, nu]

(20)

so this expresses the Ricci tensor in terms of derivatives of l[mu]

Library:-SubstituteTensor(Physics[Christoffel][alpha, mu, nu] = (1/2)*Physics[d_][nu](l[alpha](X), [X])*l[mu](X)+(1/2)*l[alpha](X)*Physics[d_][nu](l[mu](X), [X])+(1/2)*Physics[d_][mu](l[alpha](X), [X])*l[nu](X)+(1/2)*l[alpha](X)*Physics[d_][mu](l[nu](X), [X])-(1/2)*Physics[d_][alpha](l[mu](X), [X])*l[nu](X)-(1/2)*l[mu](X)*Physics[d_][alpha](l[nu](X), [X]), Physics[Ricci][mu, nu] = Physics[d_][alpha](Physics[Christoffel][`~alpha`, mu, nu], [X])-Physics[d_][nu](Physics[Christoffel][`~alpha`, alpha, mu], [X])+Physics[Christoffel][`~beta`, mu, nu]*Physics[Christoffel][`~alpha`, alpha, beta]-Physics[Christoffel][`~beta`, alpha, mu]*Physics[Christoffel][`~alpha`, beta, nu], evaluateexpression)

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

(21)

The same for Riemann

Riemann[alpha, mu, beta, nu]; % = convert(%, Christoffel)

Physics:-Riemann[alpha, mu, beta, nu] = Physics:-g_[alpha, lambda]*(Physics:-d_[beta](Physics:-Christoffel[`~lambda`, mu, nu], [X])-Physics:-d_[nu](Physics:-Christoffel[`~lambda`, beta, mu], [X])+Physics:-Christoffel[`~lambda`, beta, kappa]*Physics:-Christoffel[`~kappa`, mu, nu]-Physics:-Christoffel[`~lambda`, kappa, nu]*Physics:-Christoffel[`~kappa`, beta, mu])

(22)

Library:-SubstituteTensor(Physics[Christoffel][alpha, mu, nu] = (1/2)*Physics[d_][nu](l[alpha](X), [X])*l[mu](X)+(1/2)*l[alpha](X)*Physics[d_][nu](l[mu](X), [X])+(1/2)*Physics[d_][mu](l[alpha](X), [X])*l[nu](X)+(1/2)*l[alpha](X)*Physics[d_][mu](l[nu](X), [X])-(1/2)*Physics[d_][alpha](l[mu](X), [X])*l[nu](X)-(1/2)*l[mu](X)*Physics[d_][alpha](l[nu](X), [X]), Physics[Riemann][alpha, mu, beta, nu] = Physics[g_][alpha, lambda]*(Physics[d_][beta](Physics[Christoffel][`~lambda`, mu, nu], [X])-Physics[d_][nu](Physics[Christoffel][`~lambda`, beta, mu], [X])+Physics[Christoffel][`~lambda`, beta, kappa]*Physics[Christoffel][`~kappa`, mu, nu]-Physics[Christoffel][`~lambda`, kappa, nu]*Physics[Christoffel][`~kappa`, beta, mu]), evaluateexpression)

Physics:-Riemann[alpha, mu, beta, nu] = Physics:-g_[alpha, lambda]*((1/2)*Physics:-d_[beta](Physics:-d_[nu](l[`~lambda`](X), [X]), [X])*l[mu](X)+(1/2)*l[`~lambda`](X)*Physics:-d_[beta](Physics:-d_[nu](l[mu](X), [X]), [X])+(1/2)*Physics:-d_[beta](Physics:-d_[mu](l[`~lambda`](X), [X]), [X])*l[nu](X)+(1/2)*Physics:-d_[mu](l[`~lambda`](X), [X])*Physics:-d_[beta](l[nu](X), [X])+(1/2)*Physics:-d_[beta](l[`~lambda`](X), [X])*Physics:-d_[mu](l[nu](X), [X])+(1/2)*l[`~lambda`](X)*Physics:-d_[beta](Physics:-d_[mu](l[nu](X), [X]), [X])-(1/2)*Physics:-d_[beta](Physics:-d_[`~lambda`](l[mu](X), [X]), [X])*l[nu](X)-(1/2)*Physics:-d_[`~lambda`](l[mu](X), [X])*Physics:-d_[beta](l[nu](X), [X])-(1/2)*Physics:-d_[beta](l[mu](X), [X])*Physics:-d_[`~lambda`](l[nu](X), [X])-(1/2)*l[mu](X)*Physics:-d_[beta](Physics:-d_[`~lambda`](l[nu](X), [X]), [X])-(1/2)*Physics:-d_[nu](Physics:-d_[mu](l[`~lambda`](X), [X]), [X])*l[beta](X)-(1/2)*Physics:-d_[mu](l[`~lambda`](X), [X])*Physics:-d_[nu](l[beta](X), [X])-(1/2)*Physics:-d_[nu](l[`~lambda`](X), [X])*Physics:-d_[mu](l[beta](X), [X])-(1/2)*l[`~lambda`](X)*Physics:-d_[nu](Physics:-d_[mu](l[beta](X), [X]), [X])-(1/2)*Physics:-d_[nu](Physics:-d_[beta](l[`~lambda`](X), [X]), [X])*l[mu](X)-(1/2)*l[`~lambda`](X)*Physics:-d_[nu](Physics:-d_[beta](l[mu](X), [X]), [X])+(1/2)*Physics:-d_[nu](Physics:-d_[`~lambda`](l[beta](X), [X]), [X])*l[mu](X)+(1/2)*Physics:-d_[`~lambda`](l[beta](X), [X])*Physics:-d_[nu](l[mu](X), [X])+(1/2)*Physics:-d_[nu](l[beta](X), [X])*Physics:-d_[`~lambda`](l[mu](X), [X])+(1/2)*l[beta](X)*Physics:-d_[nu](Physics:-d_[`~lambda`](l[mu](X), [X]), [X])+((1/2)*Physics:-d_[kappa](l[`~lambda`](X), [X])*l[beta](X)+(1/2)*l[`~lambda`](X)*Physics:-d_[kappa](l[beta](X), [X])+(1/2)*Physics:-d_[beta](l[`~lambda`](X), [X])*l[kappa](X)+(1/2)*l[`~lambda`](X)*Physics:-d_[beta](l[kappa](X), [X])-(1/2)*Physics:-d_[`~lambda`](l[beta](X), [X])*l[kappa](X)-(1/2)*l[beta](X)*Physics:-d_[`~lambda`](l[kappa](X), [X]))*((1/2)*Physics:-d_[nu](l[`~kappa`](X), [X])*l[mu](X)+(1/2)*l[`~kappa`](X)*Physics:-d_[nu](l[mu](X), [X])+(1/2)*Physics:-d_[mu](l[`~kappa`](X), [X])*l[nu](X)+(1/2)*l[`~kappa`](X)*Physics:-d_[mu](l[nu](X), [X])-(1/2)*Physics:-d_[`~kappa`](l[mu](X), [X])*l[nu](X)-(1/2)*l[mu](X)*Physics:-d_[`~kappa`](l[nu](X), [X]))-((1/2)*Physics:-d_[nu](l[`~lambda`](X), [X])*l[kappa](X)+(1/2)*l[`~lambda`](X)*Physics:-d_[nu](l[kappa](X), [X])+(1/2)*Physics:-d_[kappa](l[`~lambda`](X), [X])*l[nu](X)+(1/2)*l[`~lambda`](X)*Physics:-d_[kappa](l[nu](X), [X])-(1/2)*Physics:-d_[`~lambda`](l[kappa](X), [X])*l[nu](X)-(1/2)*l[kappa](X)*Physics:-d_[`~lambda`](l[nu](X), [X]))*((1/2)*Physics:-d_[mu](l[`~kappa`](X), [X])*l[beta](X)+(1/2)*l[`~kappa`](X)*Physics:-d_[mu](l[beta](X), [X])+(1/2)*Physics:-d_[beta](l[`~kappa`](X), [X])*l[mu](X)+(1/2)*l[`~kappa`](X)*Physics:-d_[beta](l[mu](X), [X])-(1/2)*Physics:-d_[`~kappa`](l[beta](X), [X])*l[mu](X)-(1/2)*l[beta](X)*Physics:-d_[`~kappa`](l[mu](X), [X])))

(23)

Also, recalling from my previous reply you have not defined l[mu], so in practice you do not have l[mu]*l[`~mu`] = 0.

Hence, I understand that, generally speaking, l[mu]*l[nu]*R[`~mu`, `~nu`] <> 0.

 

Regarding the simplifications you mention: could you please attach a worksheet to your post showing

the actual input you are using in Maple to represent your computation? Looking at this actual Maple

input I could probably give you some concrete feedback.

 

As an example illustrating what I say above, the following shows that, without specifying l[mu], you have

l[mu]*l[nu]*R[`~mu`, `~nu`] <> 0:

Ricci[mu, nu]*l[mu](X)*l[nu](X)

l[mu](X)*l[nu](X)*Physics:-Ricci[`~mu`, `~nu`]

(24)

If you uncomment the following input line you see a rather long expression different from zero involving

the components of l[mu] and their derivatives

NULL

NULL

 

Download RewriteTensors.mw


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

Hi
In a previous post in Mapleprimes, the question possed was a bit different but the answer is precisely what you are asking now, about setting the algebra for Pauli matrices. So in addition to Mehdi's answer you may want to check the reply entitled "Algebra for Pauli matrices" (you will need to scroll down the page to see this answer, by myself).

Independent of these two answers: a) it is possible as well to set this algebra as a tensor algebra, by setting spaceindices and using them to set the algebra; b) this algebra, as well as the algebra for Dirac matrices, they will soon both be loaded by default when you load Physics; that is, implemented directly in the package, not requiring someone to code them.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

First 48 49 50 51 52 53 54 Last Page 50 of 59