ecterrab

14540 Reputation

24 Badges

20 years, 22 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi
After you Setup(dimension = 3) you can use Coordinates(X = [r, theta, phi]) or Setup(coordinates = (X = [r, theta, phi])). You can also set both things in one go via Setup(dimension = 3, coordinates = (X = [r, theta, phi])).

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

 

Hi
The parameters used are the global letters E, B, A, Omega and they are entered by TransformTetrdas. You can replace them by any other symbol or number in the output of TransformTetrads. Also, if before calling TransformTetrads these letters happen to be assigned to something, or have some attribute, or have been used in the left-hand-side of a macro or alias, in all these cases the code will search for E__1, if it is not available for that same reason then E__2 ... and so on, and ditto for B, A, Omega.

 

(I always recommend to use the latest version of Physics distributed in the Maplesoft R&D Physics webpage.)

Example:

restart

with(Physics); -1; with(Tetrads)

`Setting lowercaselatin letters to represent tetrad indices `

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

[IsTetrad, NullTetrad, OrthonormalTetrad, PetrovType, SimplifyTetrad, TransformTetrad, e_, eta_, gamma_, l_, lambda_, m_, mb_, n_]

(1)

Load 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]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))

(2)

An orthonormal tetrad (this is the one used by default) is

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467505318)

(3)

You can always check whether this is or not a tetrad and the corresponding type (orthonormal or null) using

Physics:-Tetrads:-IsTetrad(Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467505318))

`Type of tetrad: orthonormal `

 

true

(4)

A related null tetrad can be obtained via

NullTetrad()

Matrix(%id = 18446744078459221646)

(5)

Physics:-Tetrads:-IsTetrad(%)

`Type of tetrad: null `

 

true

(6)

Once you have the tetrad you want, you can set it to be the tetrad e_[a,b] to be used by the system using Setup(e_ = ...) or Setup(tetrad = ...):

Physics:-Setup(Physics:-Tetrads:-e_ = Matrix(%id = 18446744078459221646))

[tetrad = {(1, 1) = ((1/2)*I)*2^(1/2)*r^(1/2)/(-r+2*m)^(1/2), (1, 4) = -((1/2)*I)*2^(1/2)*(-r+2*m)^(1/2)/r^(1/2), (2, 2) = (1/2)*2^(1/2)*r, (2, 3) = ((1/2)*I)*2^(1/2)*r*sin(theta), (3, 2) = (1/2)*2^(1/2)*r, (3, 3) = -((1/2)*I)*2^(1/2)*r*sin(theta), (4, 1) = -((1/2)*I)*2^(1/2)*r^(1/2)/(-r+2*m)^(1/2), (4, 4) = -((1/2)*I)*2^(1/2)*(-r+2*m)^(1/2)/r^(1/2)}]

(7)

Check it out

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078459440774)

(8)

Transform this tetrad using a null rotation with fixed l_, where l_ is given by

Physics:-Tetrads:-l_[definition]

Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-l_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[`~mu`] = 1, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-mb_[`~mu`] = 0, Physics:-g_[mu, nu] = Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]+Physics:-Tetrads:-l_[nu]*Physics:-Tetrads:-n_[mu]-Physics:-Tetrads:-m_[mu]*Physics:-Tetrads:-mb_[nu]-Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[mu]

(9)

l_[]

Physics:-Tetrads:-l_[mu] = Vector[row](%id = 18446744078467506038)

(10)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078467470270)

(11)

You see the letter E introduced by TransformTetrad. You can replace it or assign if if you prefer. Now is this a tetrad? Of what type?

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078467470270))

`Type of tetrad: null `

 

true

(12)

A related orthonormal tetrad

OrthonormalTetrad()

Matrix(%id = 18446744078555815798)

(13)

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078555815798))

`Type of tetrad: orthonormal `

 

true

(14)

An example where the letter E is already in use, so it cannot be used by TransformTetrad: the Tolman metric

g_[tol]

`The Tolman metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[R(t, r), E(r)]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = -(diff(R(t, r), r))^2/(1+2*E(r)), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -R(t, r)^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -R(t, r)^2*sin(theta)^2, (3, 4) = 0, (4, 4) = 1}, storage = triangular[upper], shape = [symmetric]))

(15)

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

E(r)*`will now be displayed as`*E

 

R(t, r)*`will now be displayed as`*R

(16)

The tetrad and the transformed tetrad

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078467501942)

(17)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078467460262)

(18)

You see TransformTetrad now used E__1, and as usual it assumes that these parameters are complex. Suppose you want to work with a real E__1:

Physics:-Assume(E__1::real)

{E__1::real}

(19)

Try now invoking (18), or performing the same transformation

"?"

Matrix(%id = 18446744078467460262)

(20)

TransformTetrad(nullrotationwithfixedl_)

Matrix(%id = 18446744078459450782)

(21)

You can now set this to be the tetrad as explained above

Physics:-Setup(tetrad = Matrix(%id = 18446744078459450782))

[tetrad = {(1, 1) = ((1/2)*I)*E__1*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (1, 2) = ((1/2)*I)*2^(1/2)*R(t, r), (1, 3) = (1/2)*2^(1/2)*sin(theta)*R(t, r), (1, 4) = ((1/2)*I)*E__1*2^(1/2), (2, 1) = ((1/2)*I)*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (2, 4) = ((1/2)*I)*2^(1/2), (3, 1) = ((1/2)*I)*2^(1/2)*(diff(R(t, r), r))*(E__1^2-1)/(1+2*E(r))^(1/2), (3, 2) = I*E__1*2^(1/2)*R(t, r), (3, 4) = ((1/2)*I)*2^(1/2)*(E__1^2+1), (4, 1) = ((1/2)*I)*E__1*2^(1/2)*(diff(R(t, r), r))/(1+2*E(r))^(1/2), (4, 2) = ((1/2)*I)*2^(1/2)*R(t, r), (4, 3) = -(1/2)*2^(1/2)*sin(theta)*R(t, r), (4, 4) = ((1/2)*I)*E__1*2^(1/2)}]

(22)

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078449801326)

(23)

A related orthonormal tetrad

OrthonormalTetrad()

Matrix(%id = 18446744078449920590)

(24)

Physics:-Tetrads:-IsTetrad(Matrix(%id = 18446744078449920590))

`Type of tetrad: orthonormal `

 

true

(25)

NULL


 

Download TransformTetrad.mw

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

Hi
There is a command, DEtools[MatrixDE] that I imagine that does what you are looking for.
Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi
First of all: I recommend you to update your Physics library with the one distributed in the Maplesoft R&D Physics webpage. With the update, that exists for Maple 2016 and the two previous releases, Dagger(d_[mu]) returns d_[mu].

Next, before answering your question, some comments on the input you show.

You set spaceindices to be uppercaselatin, then by default spacetimeindices are represented by greek lowercase letters (you can always check all settings rapidly by entering > Setup(); so without arguments), and then you define mu, mu5 and Pi as tensors. But mu and mu5 are indices ... you can but it is better not to use them also as tensor names. Also Pi is the constant 3.14.... it is not a good idea to use it as a tensor name.

Then you defined M but you use M_ These two things are not the same.

You also seem to have a problem in the keyboard: I imagine that in the input you show you intended multiplication but you used "power *", that displays like a product operator but as a superscript (exponent) thus triggering "Hermitian conjugation" instead of multiplication. Concretely, nowwhere in your input I see the 'Dagger' command being used but for these multiplication operators appearing as exponents.

There must also be something wrong in that the output of the two input lines you show look the same, while the input liens are not the same.

To avoid this kind of confusion it is better if you post a worksheet instead of copy and paste expressions.

Now on your question: to indicate that some objects are real (and therefore, if A is real, Dagger(A) = A), you can use Setup, as in Setup(realobjects = A), or Setup(realobjects = {A, B, C}) and so on. To set more specific assumptions, you can use the Physics:-Assume command, for example as in Assume(A > 0).

Finally, it is helpful if you tag your questions with 'physics' - somehow I was unable to fix this myself (I was in previous versions of Mapleprimes).

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

First set the algebra for Dirac matrices (this is automatic in the version under development, but not in Maple 2016)

with(Physics)

Setup(%AntiCommutator(Dgamma[mu], Dgamma[nu]) = 2*g_[mu, nu])

[algebrarules = {%AntiCommutator(Physics:-Dgamma[mu], Physics:-Dgamma[nu]) = 2*Physics:-g_[mu, nu]}]

(1)

Define your tensor

Define(a)

`Defined objects with tensor properties`

 

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

(2)

This is the expression you want to simplify

ee := Dgamma[mu]*a[mu]*Dgamma[nu]*a[nu]

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`]

(3)

Although the simplification of products of Dirac matrices is not there by default, you can accomplish this type of simplification by turning explicit the anticommutator rule that defines the algebra of Dirac matrices. The simplest way to accomplish that is to symmetrize the product of Dirac matrices (thus bringing the anticommutator to the expression) in view of the symmetric character of the product a[`~mu`]*a[`~nu`]

Symmetrize(Dgamma[mu]*Dgamma[nu])

(1/2)*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+(1/2)*Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])

(4)

As said, in view of the symmetry of a[`~mu`]*a[`~nu`] under interchange of mu and nu, substitute now gamma[mu]*gamma[nu] by their symmetrized product

ee = SubstituteTensor(Dgamma[mu]*Dgamma[nu] = (1/2)*Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+(1/2)*Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu]), ee)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = ((1/2)*Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+(1/2)*Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu]))*a[`~mu`]*a[`~nu`]

(5)

Simplify(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = ((1/2)*Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+(1/2)*Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu]))*a[`~mu`]*a[`~nu`])

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = a[nu]*a[`~nu`]

(6)

 

Alternatively you can achieve the same the other way around.

 

1) Resort the ordering of the two Dirac matrices using the anticommutator that defines their algebra

ee = Library:-SortProducts(ee, [Dgamma[nu], Dgamma[mu]], useanticommutator)

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = (-Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])+2*Physics:-g_[mu, nu])*a[`~mu`]*a[`~nu`]

(7)

2) Simplify contracted indices

Simplify(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = (-Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])+2*Physics[g_][mu, nu])*a[`~mu`]*a[`~nu`])

Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])*a[`~mu`]*a[`~nu`] = -Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])*a[`~mu`]*a[`~nu`]+2*a[mu]*a[`~mu`]

(8)

3) Isolate a^2

factor(isolate(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])*a[`~mu`]*a[`~nu`] = -Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])*a[`~mu`]*a[`~nu`]+2*a[mu]*a[`~mu`], a[mu]*a[`~mu`]))

a[mu]*a[`~mu`] = (1/2)*a[`~mu`]*a[`~nu`]*(Physics:-`*`(Physics:-Dgamma[mu], Physics:-Dgamma[nu])+Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu]))

(9)

By inspection, you see that the rhs is the symmetrized version of gamma[mu]*gamma[nu]  and in view of the symmetry of a[`~mu`]*a[`~nu`] under exchange of mu and nu you can replace it by the non-symmetrized product

subs(gamma[mu]*gamma[nu] = gamma[mu]*gamma[nu], a[mu]*a[`~mu`] = (1/2)*a[`~mu`]*a[`~nu`]*(Physics[`*`](Physics[Dgamma][mu], Physics[Dgamma][nu])+Physics[`*`](Physics[Dgamma][nu], Physics[Dgamma][mu])))

a[mu]*a[`~mu`] = Physics:-`*`(Physics:-Dgamma[nu], Physics:-Dgamma[mu])*a[`~mu`]*a[`~nu`]

(10)


 

Download SimplificationOfDgamma.mw

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

Hi
Just do it as with paper and pencil:

  1. You specify in your mind what indices you will use for spacetime and for space, e.g. respectively A and a, so uppercaselatin and lowercaselatin; tell the computer about that: Setup(spacetimeindices=uppercaselatin, spaceindices=lowercaselatin);

And that is all. You can now work using these two different kind of indices at the same time with exactly the meaning you attribute to them when computing with paper and pencil. Simplify, TensorArray, Library:-TensorComponents; all will perform the operations distinguising between 4 and 3 dimensions.

Two CAVEATS.

  1. If you work with a Minkowski spacetime, the default signature is ---+; in this case the 3D metric is Euclidean while the 3D components of the 4D spacetime metric, g_[a,b] all have a `-` sign in front. In this case, for 3D tensor operations, instead of g_[a,b] you can use the Physics:-gamma_[a,b] command, which is the true 3D metric. Alternatively, you can change the signature (Setup(signature = `-+++`)) and now the components of g_[a,b] and gamma_[a,b] are the same. And of course if you work with an Euclidean 4D spacetime, g_[a,b] = gamma_[a,b].
  2. If you work with an arbitrary curved spacetime, you need to use gamma_[a,b] as the 3D metric because the 3D components of g_, that is g_[a,b] are not a metric, ie. A[a] * A[~a] is different from g_[a,b] A[~a] A[~b].

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

I see the error message, about a Physics setting (geometricdifferentiation), but cannot reproduce the problem in current Maple. What version of Maple are you using? In any case I suggest you to update your Physics library with the one distributed in the Maplesoft R&D Physics webpage -- there are udpates also for Maple 2015 and the former Maple18.

Independent of solving the problem by updating your library, I think a workaround in your machine without changing anything would be to load Physics[diff] before using it; for instance: at the top of your worksheet, enter > with(Physics, diff);

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

Hi

Yes, there is a package; see the help page for ?PDEtools, the section on symmetry methods.

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

Hi nm
Check the help page, it is explained there, what a general, particular and singular solution means, what dsolve returns (the general and essentially singular solutions) and how to obtain the other ones if you prefer (using the optional argument singsol, or DEtools[particularsol]. As a very brief summary, a) there is no point in returning particular solutions, there are just infinitely many; b) singular solutions are returned only when they cannot be obtained by specializing the integration constants in any way (including here infinite values for them and limiting processes). The singular solutions returned are thus called essential. For a more technical description of singular solutions (essential versus non-essential ones) see ?diffalg,essential_components.

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

In eval(g(x),x=1), first g(x) is computed, resulting in the integrand f(2x), then eval is applied, finding "no x" in the integrand because this is an definite integral: 'x' is just a dummy here.

In eval(g(z),z=1), computing g(z) results in the integrand f(x+z), then eval at z = 1 is applied, finding z in the integrand (in this case z is not the dummy integration variable of a definite integral), so that it becomes f(x+1).

All looks right and enough. By the way what were you expecting?

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

Hi

To obtain the triangularization you mention, just remove 'integrabilityconditions = false' from the input, and DeterminingPDE will do that triangularization for you automatically. Now, if you prefer to do it manually, you can 'casesplit(DetSys)' and will get the same triangularization, which in turn can be performed using the RIF (Reduced Involutive Form) or DifferentialAlgebra packages. By default we use RIF (it is faster) but you can request to casesplit to do the task using DifferentialAlgebra by passing the optional argument diffalg. All this is explained in the help pages for PDEtools:-Determining and PDEtools:-casesplit .

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

The error message tells you only that dsolve cannot handle derivatives like

> diff(1/(ln(X)-Psi(1-f(X))-Psi(f(X))), [X$n-k[1]-k[2]]); # input this in the worksheet to see what it is

while solving w.r.t f(X). Indeed, this derivative is of order n-k[1] -k[2] but, mainly, the derivand is of the form 1/(ln(X)-Psi(1-f(X))-Psi(f(X))), which makes it be beyond what dsolve can handle for solving purposes. The error message actually collects all such derivatives that cannot be handled and were found in the input you sent to dsolve.

Now, none of these strange derivative constructions were introduced by dsolve. They were in the input you sent to the command. I may be missing something here but - besides the fact that these derivatives you sent to dsolve are rare constructions - the error message is actually simple to understand.

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

Hi Mehdi

I am not sure I understand your question correctly. Are you taking of D_[mu](d_[nu](psi(X)))? I.e. psi(X) is a scalar function, then d_[nu](Psi(X)) is what you call the "ordinary derivative" (... unlike the ordinary diff, d_[nu] is a rather special differential operator, whose effect, when applied to a scalar function, is actually a tensor, also in a curved spacetime). Then you want to take the covariant derivative of that - so just proceed, the covariant differentiation operator is D_, and if you enter all in one, that would be D_[mu](d_[nu](psi(X))). If so, check please the help page for ?Physics:-D_.

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

Hi
for x[k] use X[k], where X is the (main) coordinates system (i.e the one used by d_ and D_, the differentiation operators in the Physics package). For R[ijkl] you can, for instance, define a tensor R that actually has the same components of the Riemann tensor, then you go and define the metric using the expression you gave (REMARK: you are presenting a truncated power series ... that is not possible, for the purpose of symbolic computing with a metric, you really need to give an exact expression). For the defintions use the Define command. Hope this is clear enough, or else it would help if you could give more details, within a Maple worksheet (instead of the image of a formula).

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

Hi Chris

Look closer to your input lines: first you define k[mu] such that it depends on X through k0(X), k1(X) and k2(X), and epsilon. That is all OK. Then you define OpticalDeformationMatrix[mu,nu] - not in terms of k[mu] but in terms of k[mu](X) - that is k0(X)(X), k1(X)(X), k2(X)(X), sin(theta)(X), and epsilon(X). Give a look at the output of

> indets(OpticalDeformationMatrix[], unknown);

and you will see those undesired objects around. It is important to have in mind that once you defined a tensor with its dependency, you do not need to indicate its dependency on top of the one used in the definition. Remove then this additional dependency of k[mu] in your second definition input line. I.e. use:

> Define(NullGDE[nu]=(k[~mu]*D_[mu](k[nu])),OpticalDeformationMatrix[mu,nu]=(D_[mu](k[nu])));

Check it out now:

> selectremove(type, indets(OpticalDeformationMatrix[], Or(unknown, symbol)), function);

            {Phi(X), a(t), k0(X), k1(X), k2(X), k3(X), psi(X)}, {epsilon, phi, r, t, theta}

So: as expected.


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

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