ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are replies submitted by ecterrab

@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

@mwahab 

I looked again at your worksheet. This is not a Differential Geometry problem, but one of algebraic manipulation of simple form. You can do what you want, entirely, using PDEtools only, and that will avoid the confusion caused by the occurrence of diff(u(x,y,z),y,y) together with u[y,y] in the same expression representing the same thing. The PDEtools commands you want: diff_table (makes your input tremendously simpler), ToJet / FromJet (see the notation options you have to match the one you show in your question) and of course, dcoeffs (use it the way I indicated in my first answer). And then you won't need to write a program or anything of that sort in order to "get the coefficients of u(x,y,z) and/or v(x,y,z)", including of course the coefficients of their derivatives (that is why it is called 'd'coeffs).

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

@otaviosama 

In that case (remember also please for other questions posted here), it is important for you to indicated what you expect as right value, especially if you say "[Maple] Physics doesn't return the right value". Also, in your post I read PauliSigmaRules - that can produce missunderstanding if you (e.g. now) say the J[n] do not obey the anticommutation rules of Pauli sigma Matrices - i.e. the rules you posted as PauliSigmaRules are not actually the Pauli sigma rules.

Please update your worksheet with whatever missing information and we (re)start from there - I'm sure we can help you. Best.

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

@Rouben Rostamian  

Thanks for the feedback; this is already adjusted in v.450.

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

@Fereydoon_Shekofte @Christopher2222

I perceive this the same way as Fereydoon_Shekofte, indeed. And those are, for me, the main reason for a Stack-Exchange Maple forum. There is a TON of mathematics capabilities in the Maple system. Many of them don't even exist in Mathematica, while they would be of use for many people working with mathematics. Yet nobody knows about that - we only advertise it in Mapleprimes where - mostly - only exists Maple users see it.

Regarding the (for me genuine) concern about duplication, I imagine that temporary solutions (e.g. 1 or 2 starting years) on the lines of what Daniel Skoog suggested, or even having every SE-Maple automatically reposted here in Mapleprimes for those who prefer to see it here, and even perhaps the other way around too with automatic reposts in the SE-Maple would suffice.

Regarding searching (another genuine concern) the search field of Mapleprimes could easily (optionally or not) also search in SE-Maple. Maybe it is even possible to have it the other way around too. That looks to me as a matter technically easy to solve.

Another issue that I would mention is the possibility of posting the contents of a Maple worksheet in SE-Maple. I don't know how that could be resolved, but I am sure there is a solution (maybe a tweaked pdf format ... something to think, not a serious obstacle I think).

@nm and  acer

Thanks. From what you posted, I can see we can try. I do not see the roadmap, though; the main questions that spring to my head: "what are they expecting?" Is it a number of questions per day? Per week? Is it a number of visitors per week? Is it a number of posts? And whatever the qualifier is, is it along one month? One semester? One year? And when do they give the membership status? In a month? Six months? A year? 

The point is that without such a roadmap - with explicit qualifiers known - it is not possible to estimate the chances of success (this resembles me giving a problem to a student and not providing him all the information to solve it. I heated that when I was a student, and not doing that was my main flag when giving courses at university.)

Without further information, just in this dark, I can tell you my estimation: many Maple users would be interested in a stack-exchange Maple forum. I foresee the volume of questions/answers and posts getting bigger rapidly if compared with what we see in this moment in Mapleprimes.

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

Adam Ledger's proposal is quite appropriate, I think; stack exchange seems to me the way to go nowadays, and am willing to put some weight/time on this. I am not familiar with the details, maybe you nm could summarize here, kinda brief/succint road-map, what would be necessary for success? Thanks.

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

First 23 24 25 26 27 28 29 Last Page 25 of 64