ecterrab

7786 Reputation

20 Badges

14 years, 226 days

MaplePrimes Activity


These are replies submitted by ecterrab

@macrobbair 

Yes, that is what is written in the previous reply. Quoting from there: "Could you please upload a worksheet with the formulation and related text comments? For that purpose you can use the green arrow you see when you write a comment / question here in Mapleprimes."

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

@macrobbair 

All OK with you loading a metric or tetrad by hand, but It is not clear what you are doing or how to help you just from text (for example, I don't understand what you meant by something 'going wrong with the indices' or 'red comment'). Note as well that you can always edit a previous post, for example, to make it more clear, just click More -> Edit and proceed.)

Could you please upload a worksheet with the formulation and related text comments? For that purpose you can use the green arrow you see when you write a comment / question here in Mapleprimes.

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

@denitsastaicova

You say "For more complicated metrics, that procedure [calling Physics:-e_[]] may fail ". Sometimes (mostly radicals around) the simplifications may be difficult. The procedure, however, does not fail in that it is systematic and correct.

 

Consider for instance the more general situation, that of an arbitrary spacetime metric depending on 10 arbitrary functions of 4 variables:

with(Physics)

g_[arb]

_______________________________________________________

 

`Systems of spacetime coordinates are:`*{X = (x1, x2, x3, x4)}

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x1, x2, x3, x4)}

 

`The arbitrary metric in coordinates `*[x1, x2, x3, x4]

 

_______________________________________________________

 

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

(1)

"CompactDisplay(?)"

` _F1`(X)*`will now be displayed as`*_F1

 

` _F10`(X)*`will now be displayed as`*_F10

 

` _F2`(X)*`will now be displayed as`*_F2

 

` _F3`(X)*`will now be displayed as`*_F3

 

` _F4`(X)*`will now be displayed as`*_F4

 

` _F5`(X)*`will now be displayed as`*_F5

 

` _F6`(X)*`will now be displayed as`*_F6

 

` _F7`(X)*`will now be displayed as`*_F7

 

` _F8`(X)*`will now be displayed as`*_F8

 

` _F9`(X)*`will now be displayed as`*_F9

(2)

Load Tetrads

with(Tetrads)

_______________________________________________________

 

`Setting `*lowercaselatin_ah*` letters to represent `*tetrad*` indices`

 

((`Defined as tetrad tensors `(`see ?Physics,tetrads`)*`, `*`𝔢`[a, mu]*`, `)*eta[a, b]*`, `*gamma[a, b, c]*`, `)*lambda[a, b, c]

 

((`Defined as spacetime tensors representing the NP null vectors of the tetrad formalism `(`see ?Physics,tetrads`)*`, `*l[mu]*`, `)*n[mu]*`, `*m[mu]*`, `)*conjugate(m[mu])

 

_______________________________________________________

(3)

An orthonormal tetrad in this the most general case, is computed in 2 seconds

time(); e_[]

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

(4)

(time()-`%%`)*seconds

1.989*seconds

(5)

Verify this result

"IsTetrad(?)"

`Type of tetrad: `*orthonormal

 

true

(6)

Also for a null tetrad

Setup(tetradmetric = null)

[tetradmetric = {(1, 4) = 1, (2, 3) = -1}]

(7)

time(); e_[]

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

(8)

(time()-`%%`)*seconds

.598*seconds

(9)

Verify this result

"IsTetrad(?)"

`Type of tetrad: `*null

 

true

(10)

``

So even in the most general case the procedure within the Physics package to compute a tetrad works. Not the topic, but, given a metric there are infinitely many possible tetrads. So relevant in this context is also the TransformTetrad  command, that allows for reorienting a tetrad in rather general ways.


 

Download Tetrads_for_the_most_general_case.mw

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

 

@Carl Love 

Somehow I didn't get notified by Mapleprimes and only saw this one by chance now. Dmitry, the definition of normal form for an ODE depends largely on the person speaking - see also the help page ?convert/ODE. For hyper-normal forms I only found a paper with 40 pages.

Could you please upload a worksheet with what you expect and one single (simple) example?

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

@lastgunslinger 

I revised your worksheet. You say "The problem arises in the above computation, namely, the inner product taken between f[~mu,nu]*h[mu,beta,alpha],the inner product should be taken on the first index of each of the tensors, yet the results do not correspond to reults already computed. The antisymmetry is gone and the corresponding values do not coincide."

But neither you show what are these results "already computed" nor what antisymmetry are you talking about (none of the tensors you show is antisymmetric). From your worksheet, I have no way to understand these two statements.

I also see that you define tensors using TensorArray but without the freeindices keyword, and with some indices contravariant. The freeindices tells what is the ordering of the free indices - this is key when there are more than two indices, as in your case. Defining tensors with some indices contravariant, although possible, it is problem to problems since you don't know, from start, what are the components of the all covariant tensor (will depend on the metric, you understand).

Attached is a reviewed version of your worksheet, removing some lines that are not necessary and using some other tools to investigate the symmetries of the resulting tensors. I suggest you

  1. Use the keyword freeindices of TensorArray to see exactly what is the ordering of the indices in the rhs of your definition (I show how to do that in the reviewed worksheet below).
  2. Make your indices be all covariant by multiplying by the metric, then taking TensorArray to see, exactly, what are the covariant components of the tensors you are defining.
  3. Use Library:-GetTensorSymmetryProperties to see the symmetry properties of the resulting tensors, and/or do some verification in any other way regarding these symmetry properties, before constructing the inner product you expect to be antisymmetric.

Then it would be possible to understand whether the last result should or should not be antisymmetric.

Download Maple_inner_tensor_product_(reviewed).mw

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

 

@lastgunslinger 

I see a worksheet with a rather long computation, but not using current Maple Physics but the old tensor. That old code worked fine but it is very old, not as capable as Physics, and not what I was asking for. Sorry for that, I do not work using that code since too many years.

In order to help you further please attach a worksheet with your computation using the current Maple Physics. Please also have in mind: the idea is to help you, that requires you to rewrite the worksheet (expressing the computation using Physics). Where you have a doubt, just present please the worksheet up to what you understand and the question.

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

@lastgunslinger 

Would you mind please putting all your computation into a worksheet? Use the green arrow for that purpose. And in the worksheet I will be able to see the input (without having to do copy and paste from your post above), the output, and you can place your comments in text regions (check the help to see how you do that, or take any of the worksheets I attached in the previous replies as template).

From there I think I can give you some help more concretely.

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

@lastgunslinger 

There are several ways of accomplishing the same thing, perhaps the simplest is to input

> Define(k2[sigma, ~mu, nu] = k[~mu, nu, sigma]);

Likewise you can use

> Define(k[sigma, ~mu, nu] = rhs(k[~mu, nu, sigma, array]));

or

> Define(k[sigma, ~mu, nu] = TensorArray(k[~mu, nu, sigma]));

By the way: to define a tensor (lhs) in terms of other tensors (rhs) you do not need to express the rhs in array form. You could use, directly, the symbolic expression. If so, the only thing you need to be consistent is with having the same free indices and character (covariant or contravariant) on both sides of the defining equation. For example, you could define 

> Define( j[sigma, ~mu, nu] = (9) )

where (9) is the symbolic tensorial expression e[nu, ~alpha] * f[~sigma, beta] * Christoffel[~nu, sigma, mu], but then the free indices, and their covariant/contravariant character, on the lhs and rhs, are not the same. If you make them be the same it will work, or if you really intended something different, using the array form (via TensorArray, check its option to indicate the ordering of the free indices) also works.

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

Hi
Replacing your line 
t:= textplot3d([-1.1,1.1,1,v_])
by
 t := textplot3d([-1.1, 1.1, 1, Typesetting:-Typeset(v_)])
also works.

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


With the Physics Updates v.576 or higher installed, the computation of parameterized symmetries, whether the parameters are taken as continuous or not, is automatic.

 

This is the example of the post

with(PDEtools)

U := diff_table(u(x, t))

pde := b*U[]*U[x]+a*U[x]+q*U[x, x, x]+U[t] = 0

b*u(x, t)*(diff(u(x, t), x))+a*(diff(u(x, t), x))+q*(diff(diff(diff(u(x, t), x), x), x))+diff(u(x, t), t) = 0

(1)

declare(U[])

` u`(x, t)*`will now be displayed as`*u

(2)

This pde admits a 4-dimensional symmetry group, whose infinitesimals - for arbitrary values of the parameters "a, b, q,"are given by

I__1 := Infinitesimals(pde, [u], specialize_Cn = false)

[_xi[x](x, t, u) = (1/3)*_C1*x+_C3*t+_C4, _xi[t](x, t, u) = _C1*t+_C2, _eta[u](x, t, u) = (1/3)*((-2*b*u-2*a)*_C1+3*_C3)/b]

(3)

The computation of symmetries parameterized by a, b and q , shown in the main post as equation (5) can now be performed by indicating the parameters (the second list is actually that equation (5) )

I__2 := Infinitesimals(pde, [u], specialize_Cn = false, parameters = {a, b, q}, continuousparameters = false)

`casesplit/ans`([_xi[x](x, t, u) = (1/3)*_C1*x+_C3*t+_C4, _xi[t](x, t, u) = _C1*t+_C2, _eta[u](x, t, u) = (1/3)*((-2*b*u-2*a)*_C1+3*_C3)/b], []), `casesplit/ans`([_xi[x](x, t, u) = _F3(x, t, u), _xi[t](x, t, u) = Intat(((b*u+a)*(D[1](_F3))(_a, ((b*u+a)*t-x+_a)/(b*u+a), u)-_F1(u, ((b*u+a)*t-x)/(b*u+a))*b+(D[2](_F3))(_a, ((b*u+a)*t-x+_a)/(b*u+a), u))/(b*u+a)^2, _a = x)+_F2(u, ((b*u+a)*t-x)/(b*u+a)), _eta[u](x, t, u) = _F1(u, ((b*u+a)*t-x)/(b*u+a))], [q = 0]), `casesplit/ans`([_xi[x](x, t, u) = _F1(x, u), _xi[t](x, t, u) = _F3(x, t, u), _eta[u](x, t, u) = _F2(x, u)], [a = 0, b = 0, q = 0])

(4)

The computation of continuous transformations of the parameters a, b and q that leave pde invariant in form, that in the post is presented starting at equation (12) and are useful to remove parameters from the differential equation system, can now be performed also indicating the parameters to Infinitesimals, and that these are to be taken as continous. The first infinitesimal is actually that equation (12):

I__3 := Infinitesimals(pde, [u], specialize_Cn = false, parameters = {a, b, q}, continuousparameters = true)

`casesplit/ans`([_xi[x](x, t, a, b, q, u) = (1/3)*(_F4(a, b, q)*q+_F3(a, b, q))*x/q+_F6(a, b, q)*t+_F7(a, b, q), _xi[t](x, t, a, b, q, u) = _F4(a, b, q)*t+_F5(a, b, q), _xi[a](x, t, a, b, q, u) = _F1(a, b, q), _xi[b](x, t, a, b, q, u) = _F2(a, b, q), _xi[q](x, t, a, b, q, u) = _F3(a, b, q), _eta[u](x, t, a, b, q, u) = (1/3)*((b*u+a)*_F3(a, b, q)-2*q*((b*u+a)*_F4(a, b, q)+(3/2)*u*_F2(a, b, q)+(3/2)*_F1(a, b, q)-(3/2)*_F6(a, b, q)))/(b*q)], []), `casesplit/ans`([_xi[x](x, t, a, b, q, u) = _F6(x, t, a, b, q, u), _xi[t](x, t, a, b, q, u) = Intat(((b*u+a)*(D[1](_F6))(_a, ((b*u+a)*t-x+_a)/(b*u+a), a, b, q, u)-b*_F4(a, b, q, u, ((b*u+a)*t-x)/(b*u+a))-_F3(a, b, q, u, ((b*u+a)*t-x)/(b*u+a))*u+(D[2](_F6))(_a, ((b*u+a)*t-x+_a)/(b*u+a), a, b, q, u)-_F2(a, b, q, u, ((b*u+a)*t-x)/(b*u+a)))/(b*u+a)^2, _a = x)+_F5(a, b, q, u, ((b*u+a)*t-x)/(b*u+a)), _xi[a](x, t, a, b, q, u) = _F2(a, b, q, u, ((b*u+a)*t-x)/(b*u+a)), _xi[b](x, t, a, b, q, u) = _F3(a, b, q, u, ((b*u+a)*t-x)/(b*u+a)), _xi[q](x, t, a, b, q, u) = _F1(a, b, q, u, ((b*u+a)*t-x)/(b*u+a)), _eta[u](x, t, a, b, q, u) = _F4(a, b, q, u, ((b*u+a)*t-x)/(b*u+a))], [q = 0]), `casesplit/ans`([_xi[x](x, t, a, b, q, u) = _F1(x, a, b, q, u), _xi[t](x, t, a, b, q, u) = _F6(x, t, a, b, q, u), _xi[a](x, t, a, b, q, u) = _F2(x, a, b, q, u), _xi[b](x, t, a, b, q, u) = _F3(x, a, b, q, u), _xi[q](x, t, a, b, q, u) = _F4(x, a, b, q, u), _eta[u](x, t, a, b, q, u) = _F5(x, a, b, q, u)], [a = 0, b = 0, q = 0])

(5)

``


 

Download How_to_split_symmetries_into_cases_(III).mw

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


The main part of the answer is about the use of TensorArray. This one is regarding your questions

restart

with(Physics)

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1)

Setup(coordinatesystems = spherical)

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (r, theta, phi, t)}

 

`Systems of spacetime coordinates are:`*{X = (r, theta, phi, t)}

(2)

ds2 := -dt^2+a(t)^2*dr^2/(-k*r^2+1)+a(t)^2*r^2*dtheta^2+a(t)^2*r^2*sin(theta)^2*dphi^2

-dt^2+a(t)^2*dr^2/(-k*r^2+1)+a(t)^2*r^2*dtheta^2+a(t)^2*r^2*sin(theta)^2*dphi^2

(3)

Setup(coordinates = spherical, metric = ds2)

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (r, theta, phi, t)}

 

`Systems of spacetime coordinates are:`*{X = (r, theta, phi, t)}

 

_______________________________________________________

 

[coordinatesystems = {X}, metric = {(1, 1) = a(t)^2/(-k*r^2+1), (2, 2) = a(t)^2*r^2, (3, 3) = a(t)^2*r^2*sin(theta)^2, (4, 4) = -1}]

(4)

e[mu, `~nu`] = Matrix(4, {(1, 1) = a(t)/sqrt(-k*r^2+1), (2, 2) = a(t)*r, (3, 3) = a(t)*r*sin(theta), (4, 4) = 1}, fill = 0)

e[mu, `~nu`] = Matrix(%id = 18446744078400333694)

(5)

"Define(?)"

`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], e[mu, `~nu`], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(6)

f[`~rho`, nu] = Matrix(4, {(1, 1) = sqrt(-k*r^2+1)/a(t), (2, 2) = 1/(a(t)*r), (3, 3) = 1/(a(t)*r*sin(theta)), (4, 4) = 1}, fill = 0)

f[`~rho`, nu] = Matrix(%id = 18446744078574155886)

(7)

"Define(?)"

`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], e[mu, `~nu`], f[`~rho`, nu], Physics:-g_[mu, nu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(8)

Did I define the mixed tensors incorrectly?

No. You defined the mixed tensors corectly. Note you can always check the definition, in different ways, for example:

e[definition]

e[mu, `~nu`] = Matrix(%id = 18446744078574192990)

(9)

 Does it matter how you define the indices when you're gonna take the inner product?

No, it doesn't matter, regardless of what you intend to do with the tensors (generally speaking, you can do everything you can do with paper and pencil)

 

[Why] taking the inner product of simply e[mu, `~nu`].f[`~mu`, nu] returns unevaluated [?]
Because on the worksheet you can compute symbolically, with the indices, and simplify expressions taking into account symmetry properties of the indices, and you can also compute with tensor components (basically, use TensorArray for that).

 

I should mention that  e[mu, `~nu`] and f[`~mu`, nu] are inverses of each other,

Yes, that is understood by the system

e[definition].f[definition]

f[nu, `~rho`]*e[mu, `~nu`] = Matrix(%id = 18446744078467106686)

(10)

Likewise, using TensorArray

"TensorArray(?)"

Matrix(%id = 18446744078574149870) = Matrix(%id = 18446744078574150950)

(11)

Is there any way to define one and get the other[?]
Yes t in that you can get one from the other one taking power -1

1/f[definition]

1/f[`~rho`, nu] = Matrix(%id = 18446744078593123262)

(12)

e[definition]

e[mu, `~nu`] = Matrix(%id = 18446744078574192990)

(13)

and, as you correctly say, raising or lowering the indices doesn't take the reciprocal of the components.

``


 

Download Maple_inner_tensor_product_answers.mw

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

@Rouben Rostamian  

Enjoyable reading as usual, only one comment: convert(%, set) is not necessary, dsolve accepts differential equations also directly in matricial form.

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

@otaviosama 

You realize you sent a document with 23 pages. Man, it shouldn't be that way. Think about. Could you please indicate one page where I can see the formulas you would like help proving?

@mwahab 

Having m and/or k as exponents in powers, or as coefficients of non-linear terms, makes no difference: they are just parameters, things that don't depend on the independent or dependent variables of the problem. You can try replacing pde (equation (1) in the post) by pde := U[t] + U[]^m*U[x] + U[]^k = 0 and run the same computation. Of course, the problem is more complicated, and so are the infinitesimals. You can then indicate u as the dependent variable, or the list [u, k, m] as I did in answer to the recent question in Mapleprimes, or replace the functionality (x, t) by (x, t, k, m)as I did in the post above. It all works (Maple 2019, latest Physics Updates), and what you do depends on what you want to achieve.

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

@otaviosama 

My impression is that you are not typing the right equations. For instance: your algebra rules involve J[y], but your expected result (righ-hand side of the equation you added in red in the original post and after the post) has no J[y]. (Also: when changing the worksheet, do not rewrite the original, but attach a new one so that we can follow and find things right away.)

Likewise, although I understood your now CommuRules are not the ones for the Pauli sigma matrices, from your title, if you are computing with angular momentum operators, their algebra rules and identities are all shown in this Wikipedia page and they all check OK when entered and simplified on a Maple worksheet.

Would you mind revise your input and, if necessary, please create an image from the book (also what book) you are taking these formulas and paste the image here? That may help to identify a typo or what is going on. From what I've seen so far, Maple's result is just correct, and not what you expect.

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

1 2 3 4 5 6 7 Last Page 1 of 40