ecterrab

13431 Reputation

24 Badges

19 years, 359 days

MaplePrimes Activity


These are answers submitted by ecterrab


Hi umbli,

I intercalated some comments italized below, and in general, regarding questions on how to do something, you can give a look at the Mapleprimes post "A Complete Guide for peforming Tensor Computations using Physics". In Maple 2019, that guide is also a help page, ? Physics,Tensors

restart

with(Physics)

Setup(signature = `-+++`, coordinates = (X = [t, r, theta, phi]))

(`Defined Pauli sigma matrices (Psigma): `*sigma[0]*`, `*sigma[1]*`, `)*sigma[2]*`, `*sigma[3]

 

__________________________________________________

 

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

 

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

 

_______________________________________________________

 

[coordinatesystems = {X}, signature = `- + + +`]

(1)

Setup(g_ = -exp(2*alpha(r))*dt^2+dr^2/(1-2*m(r)/r)+r^2*dtheta^2+r^2*sin(theta)^2*dphi^2)

[metric = {(1, 1) = -exp(2*alpha(r)), (2, 2) = 1/(1-2*m(r)/r), (3, 3) = r^2, (4, 4) = r^2*sin(theta)^2}]

(2)

Setup(spacetimeindices = lowercaselatin)

[spacetimeindices = lowercaselatin]

(3)

g_[]

Physics:-g_[a, b] = Matrix(%id = 18446744078322510054)

(4)

"Christoffel[~1,a,b]"

Physics:-Christoffel[`~1`, a, b]

(5)

"Christoffel[~0,a,b,matrix]"

Physics:-Christoffel[`~1`, a, b] = Matrix(%id = 18446744078397546358)

(6)

Ricci[0, 1]

-(2*m(r)*(diff(alpha(r), r))^2*r-(diff(alpha(r), r))^2*r^2+2*(diff(diff(alpha(r), r), r))*r*m(r)-(diff(diff(alpha(r), r), r))*r^2+(diff(alpha(r), r))*r*(diff(m(r), r))+3*(diff(alpha(r), r))*m(r)-2*(diff(alpha(r), r))*r)*exp(2*alpha(r))/r^2

(7)

Ricci[a, b, matrix]

Physics:-Ricci[a, b] = Matrix(%id = 18446744078397521182)

(8)

Ricci[1, 2]

0

(9)

Einstein[a, b, matrix]

Physics:-Einstein[a, b] = Matrix(%id = 18446744078352837318)

(10)

Define(u[a] = [exp(alpha(r)), 0, 0, 0])

`Defined objects with tensor properties`

 

{Physics:-D_[a], Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-Ricci[a, b], Physics:-Riemann[a, b, c, d], Physics:-Weyl[a, b, c, d], Physics:-d_[a], Physics:-g_[a, b], u[a], Physics:-Christoffel[a, b, c], Physics:-Einstein[a, b], Physics:-LeviCivita[a, b, c, d], Physics:-SpaceTimeVector[a](X)}

(11)

u[definition]

u[a] = [exp(alpha(r)), 0, 0, 0]

(12)

u[a]^2

u[a]*u[`~a`]

(13)

Regarding your question 1) Look closer to the next input line: you forgot placing parenthesis around (13) :

SumOverRepeatedIndices*u[a]*u[`~a`]

Physics:-SumOverRepeatedIndices*u[a]*u[`~a`]

(14)

Withoug the parenthesis, the above is "the product" of the word SumOverRepeatedIndices with u[a]*u[`~a`].

 

With the parenthesis you get what you wanted

SumOverRepeatedIndices(u[a]*u[`~a`])

-1

(15)

Regarding 2)

B[a, b] = D_[a](u[b])

B[a, b] = Physics:-D_[a](u[b], [X])

(16)

Define(B[a, b] = D_[a](u[b], [X]))

`Defined objects with tensor properties`

 

{B[a, b], Physics:-D_[a], Physics:-Dgamma[a], Physics:-Psigma[a], Physics:-Ricci[a, b], Physics:-Riemann[a, b, c, d], Physics:-Weyl[a, b, c, d], Physics:-d_[a], Physics:-g_[a, b], u[a], Physics:-Christoffel[a, b, c], Physics:-Einstein[a, b], Physics:-LeviCivita[a, b, c, d], Physics:-SpaceTimeVector[a](X)}

(17)

B[definition]

B[a, b] = Physics:-D_[a](u[b], [X])

(18)

B[]

B[a, b] = Matrix(%id = 18446744078477034670)

(19)

"B[~]"

B[`~a`, `~b`] = Matrix(%id = 18446744078471457718)

(20)

Regarding 3), check the help page ? Physics , it has an alphabetical listing ofcommands with one line descriptions, there you see Symmetrize and Antisymmetrize

Symmetrize(B[a, b])

(1/2)*B[a, b]+(1/2)*B[b, a]

(21)

TensorArray((1/2)*B[a, b]+(1/2)*B[b, a])

Matrix(%id = 18446744078365857422)

(22)

Antisymmetrize(B[a, b])

(1/2)*B[a, b]-(1/2)*B[b, a]

(23)

TensorArray((1/2)*B[a, b]-(1/2)*B[b, a])

Matrix(%id = 18446744078365866574)

(24)

NULL


 

Download tov_(reviewed).mw

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

Hi

The page ?Physics,Tensors, sec. II, has a subsection about Tetrads and the local system of references. That section, combined with the help pages for the commands illustrated there, give answers to everything about tetrads. Denitsa's answer is also accordingly. I gave a look at your worksheet too, everything looks correct, the only thing I'd point out is to recall that the signature used in Physics by default always has the time-like component in position 4, not 1 (so that, e.g. in Cartesian, X[1] = x, instead of X[1] = t and X[2] = x). So, when displaying the null tetrad as you do in your worksheet, you see the number 1 takes the diagonal from right to left (the opposite of the one of the identity matrix).

In your worksheet, however, I see t in position 1, so I suppose you are using Maple 2019.0? There were two upgrades (for free). The current version is 2019.2. I'd recommend you to install it, it contains several fixes and improvements.

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

You can set the coordinates in any way you prefer, for instance, Coordinates(X = [x1, x2, x3, t]). See section 1.a in the help page ?Physics,Tensors.

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

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 = 18446744078374980414)

(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[`~mu`, 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[`~mu`, nu] = Matrix(%id = 18446744078480903094)

(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[`~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)}

(8)

e[nu, `~alpha`].f[`~sigma`, beta].Christoffel[`~nu`, sigma, mu]

e[nu, `~alpha`]*f[beta, sigma]*Physics:-Christoffel[`~nu`, mu, `~sigma`]

(9)

The output above tells you there is nothing to simplify there. If what you want is the array of components of this tensorial expression, try instead

TensorArray(e[nu, `~alpha`]*f[beta, sigma]*Physics[Christoffel][`~nu`, mu, `~sigma`])

Array(%id = 18446744078480950566)

(10)

If you have Maple 2019.2 and are working with one of the latest versions of the Physics Updates, then you can use the (still undocumented but already working) explore keyword

TensorArray(e[nu, `~alpha`]*f[beta, sigma]*Physics[Christoffel][`~nu`, mu, `~sigma`], explore)


``


 

Download Maple_inner_tensor_product.mw

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

Take a look at the help page of PDEtools, the table of symmetry commands. You can attempt the computation of symmetries of any sort.

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

I just received the following from Katherina von Bulow.

 

Again, the problem:

pde := convert(diff(T(x, y, t), x, x)+diff(T(x, y, t), y, y) = (diff(T(x, y, t), t))/(0.44e-2), rational, exact); conds := T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

diff(diff(T(x, y, t), x), x)+diff(diff(T(x, y, t), y), y) = (2272727273/10000000)*(diff(T(x, y, t), t))

 

T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

(1)

The following change of variables (rather easy ..) suffices to solve the problem as an infinite series, with no composed differential operators around

tr := T(x, y, t) = U(x, y, t)+1

T(x, y, t) = U(x, y, t)+1

(2)

itr := isolate(tr, U(x, y, t))

U(x, y, t) = T(x, y, t)-1

(3)

PDEtools:-dchange(tr, [pde, conds], [U(x, y, t)])

[diff(diff(U(x, y, t), x), x)+diff(diff(U(x, y, t), y), y) = (2272727273/10000000)*(diff(U(x, y, t), t)), U(0, y, t)+1 = 1, U(1, y, t)+1 = 1, U(x, 0, t)+1 = 1, U(x, 1, t)+1 = 1, U(x, y, 0)+1 = 0]

(4)

Call now,

pdsolve([diff(diff(U(x, y, t), x), x)+diff(diff(U(x, y, t), y), y) = (2272727273/10000000)*(diff(U(x, y, t), t)), U(0, y, t)+1 = 1, U(1, y, t)+1 = 1, U(x, 0, t)+1 = 1, U(x, 1, t)+1 = 1, U(x, y, 0)+1 = 0])

U(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)

(5)

Change variables back and isolate T(x, y, t)

PDEtools:-dchange(itr, U(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity), [T(x, y, t)])

T(x, y, t)-1 = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)

(6)

isolate(T(x, y, t)-1 = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity), T(x, y, t))

T(x, y, t) = Sum(Sum(4*(-(-1)^(n1+n)+(-1)^n1+(-1)^n-1)*sin(n*Pi*x)*sin(n1*Pi*y)*exp(-(10000000/2272727273)*t*Pi^2*(n^2+n1^2))/(n*Pi^2*n1), n = 1 .. infinity), n1 = 1 .. infinity)+1

(7)

Besides that this approach solves the problem in a more useful way, the lines above also mean there is something else to adjust in the internal series routines. Although sometimes completely non-obvious, the internal routines are supposed to unveil the need of a transformation of this kind for examples like this one.

``


 

Download PDE_solution_via_change_of_variables.mw

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

Hi Larry
Good catch. The problem is fixed for everybody within the Physics Updates v.453 and higher.

Details: the problem was not related to  Library:-PerformMatrixOperations - you could reproduce it just entering mt . Dgamma[2] . m . Maple's implementation of Matrix is such that - e.g. - evalb(Matrix(2,[a,b]) = Matrix(2,[a,b])) returns false. The composition of three of these objects put an internal subroutine in trouble. Anyway, it is fixed now. Thanks for posting the problem.

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

Christian, Kambiz1,

A quick look suggests to me that this problem has no exact and closed form solution where the arbitrary constants and functions could be tweaked to satisfy something like  T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0.Those conditions are too many and too specific. My impression is that, if a solution to this problem exists, it is an infinite series solution.


One approach is then, always, to investigate first that part of the problem, the set of initial conditions. This is your problem after converting it to an exact form (no floating point numbers here):

pde := convert(diff(T(x, y, t), x, x)+diff(T(x, y, t), y, y) = (diff(T(x, y, t), t))/(0.44e-2), rational, exact)
conds := T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

diff(diff(T(x, y, t), x), x)+diff(diff(T(x, y, t), y), y) = (2272727273/10000000)*(diff(T(x, y, t), t))

 

T(0, y, t) = 1, T(1, y, t) = 1, T(x, 0, t) = 1, T(x, 1, t) = 1, T(x, y, 0) = 0

(1)

The question is: what would be the most general form of initial conditions compatible with the given pde (i.e.: such that the problem is consistent, has a solution regardless of whether we can compute it).

 

The command for that is DEtools[initialdata]

IC := DEtools[initialdata]([isolate(pde, diff(T(x, y, t), x, x))])

table( [( Finite ) = [], ( Infinite ) = [T(x[0], y, t) = _F1(y, t), (D[1](T))(x[0], y, t) = _F2(y, t)] ] )

(2)

So, for this problem to be consistent, the initial conditions depend at most on two arbitrary functions and are of the following form and the problem has an exact solution:

conds_at_x0 := IC[Infinite]

[T(x[0], y, t) = _F1(y, t), (D[1](T))(x[0], y, t) = _F2(y, t)]

(3)

pdsolve([pde, op(conds_at_x0)], T(x, y, t))

T(x, y, t) = _F1(y, t)+Sum((x-x[0])^(2*n)*((proc (U) options operator, arrow; -(diff(diff(U, y), y))+(2272727273/10000000)*(diff(U, t)) end proc)@@n)(_F1(y, t))/factorial(2*n), n = 1 .. infinity)+Sum((x-x[0])^(2*n1+1)*((proc (U) options operator, arrow; -(diff(diff(U, y), y))+(2272727273/10000000)*(diff(U, t)) end proc)@@n1)(_F2(y, t))/factorial(2*n1+1), n1 = 0 .. infinity)

(4)

Voila! The solution got computed using the most abstract method implemented, which requires computing a differential operator, proc (U) options operator, arrow; -(diff(U, y, y))+(2272727273/10000000)*(diff(U, t)) end proc, and then each term of the infinite series is involves its n composition, e.g.:

u := proc (U) options operator, arrow; -(diff(U, y, y))+(2272727273/10000000)*(diff(U, t)) end proc

proc (U) options operator, arrow; -(diff(U, y, y))+(2272727273/10000000)*(diff(U, t)) end proc

(5)

(u@@n)(F(y, t))

(u@@n)(F(y, t))

(6)

eval((u@@n)(F(y, t)), n = 1)

-(diff(diff(F(y, t), y), y))+(2272727273/10000000)*(diff(F(y, t), t))

(7)

eval((u@@n)(F(y, t)), n = 2)

diff(diff(diff(diff(F(y, t), y), y), y), y)-(2272727273/5000000)*(diff(diff(diff(F(y, t), t), y), y))+(5165289257438016529/100000000000000)*(diff(diff(F(y, t), t), t))

(8)

So if you can tweak this general form of the initial conditions (3) to match your problem, then you have a solution here. And then, if an approximate solution (with a finite number of terms) is of use for you, you can simply substitute infinity by a finite number and perform the summation to obtain an exact form.

 

Likewise, since conds_at_x0 := [T(x[0], y, t) = _F1(y, t), (D[1](T))(x[0], y, t) = _F2(y, t)] has only one expansion point x = x__0 (and note that for y and t you have arbitrariness, so you can tweak the problem almost at will regarding them), then this problem is also suitable for a direct computation of a truncated series solution; here is up to order 2 but of course you can compute them to arbitrary order - the advantage with respect to the exact infinite sum (4) being that you do not have the composed differential operator:

pdsolve([pde, op(conds_at_x0)], T(x, y, t), series, order = 2)

T(x, y, t) = _F1(0, 0)+(D[2](_F1))(0, 0)*t+(D[1](_F1))(0, 0)*y+_F2(0, 0)*(x-x[0])+(1/2)*(D[2, 2](_F1))(0, 0)*t^2+(D[1, 2](_F1))(0, 0)*y*t+(D[2](_F2))(0, 0)*(x-x[0])*t+(1/2)*(D[1, 1](_F1))(0, 0)*y^2+(D[1](_F2))(0, 0)*(x-x[0])*y+(1/2)*(-(D[1, 1](_F1))(0, 0)+(2272727273/10000000)*(D[2](_F1))(0, 0))*(x-x[0])^2

(9)

Finally, independent of of all the above, while pdsolve is the main guy to compute exact solutions, the fact is that Maple has more PDE solvers, yet to be integrated properly into pdsolve's (large ...) strategy; the main one is PDEtools:-InvariantSolutions ; here are, then, other exact solutions for pde without initial conditions

PDEtools:-InvariantSolutions(pde, dependency = {t, x, y})

T(x, y, t) = _C1/(t*exp((2272727273/40000000)*(x^2+y^2)/t)), T(x, y, t) = _C1+Ei(1, (2272727273/40000000)*(x^2+y^2)/t)*_C2, T(x, y, t) = (_C1*t+_C2*y)/(t^2*exp((2272727273/40000000)*(x^2+y^2)/t)), T(x, y, t) = (_C1*t+_C2*x)/(t^2*exp((2272727273/40000000)*(x^2+y^2)/t)), T(x, y, t) = (_C2*ln(t/(x^2+y^2)^(1/2))+_C1)/(t*exp((2272727273/40000000)*(x^2+y^2)/t)), T(x, y, t) = (2000*(t/x^2)^(1/2)*exp(-(2272727273/40000000)*x^2/t)*22727272730^(1/2)*_C2+2272727273*erf((1/20000)*22727272730^(1/2)/(t/x^2)^(1/2))*Pi^(1/2)*_C2-2272727273*Pi^(1/2)*_C2+_C1)/((t/x^2)^(1/2)*exp((2272727273/40000000)*y^2/t)), T(x, y, t) = (2000*(t/y^2)^(1/2)*exp(-(2272727273/40000000)*y^2/t)*22727272730^(1/2)*_C2+2272727273*erf((1/20000)*22727272730^(1/2)/(t/y^2)^(1/2))*Pi^(1/2)*_C2-2272727273*Pi^(1/2)*_C2+_C1)/((t/y^2)^(1/2)*exp((2272727273/40000000)*x^2/t))

(10)

Check the help page of this command, it has too many options to mention here, and several of them may take you to more exact solutions - all of them of particular type (these are the so-called Lie symmetry invariant solutions) .


 

Download PDE_solution_for_more_general_ICs.mw

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

Hi

First, note that Physics comes with an implementation of Pauli matrices. The command is called Psigma and has a help page. Then note that these matrices satisfy both commutation and also anticommutation relations, and you didn't enter anticommutations for your J[n]. A third comment: if in your (your equation (3)) you replace J by Psigma, the final result S1 is basically what you expected; , but for a weakness: for Simplify(S) you get S1 := -Psigma[1]^2 - Psigma[3]^2 + 2, and then Simplify(S1) returns 0 as expected. I will fix this weakness (it should have returned 0 directly on Simplify(S)) today or tomorrow and post the fix within the next Physics Updates (works with Maple 2019).

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

In general, for questions about DE manipulation, take a look at ?PDEtools, or ?DEtools. Both have alphabetical lists of commands with a one-line description, including links to the corresponding help pages. If you don't find the answer there, take a look at ?PDEtools,Library.

For this particular question, see ?PDEtools:-dcoeffs. The following does what you want with regards to the functions u and vmap(PDEtools:-dcoeffs, [PDEtools:-dcoeffs((lhs - rhs)((3)), u(x, y, z))], v(x, y, z))Of course you get more than just equations on F, P and Q, so to that you may want to asd select(has,%, {F, P, Q}) .

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

Hi Pooyan,
Opening your worksheet I see that your Vr(Rmax(theta, beta), theta, beta) is actually equal to 

Vr(((4.000000000*cos(theta) + sqrt(17 + 8*cos(2*theta)))*(9 + 20*beta/Pi))/9, theta, beta) = 0

The problem being that the first 'independent' variable in Vr(r, theta,beta), that is 'r', cannot depend on theta and beta, so I imagine there is some problem with your formulation, and that is what the error message is telling you: it is unexpected to find {beta, theta} in the first operand of Vr(..., theta, beta).

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

Hi Rouben

I don't recall seeing this problem before ... It is fixed and the fix available to everybody within the Physics Updates v.446 or higher.

Details: at a very low level, Maple does some automatic simplifications: a + 0 is transformed into a, while a + 0.0 is not (for natural reasons), but then 0.0 * _j is automatically transformed into 0.0. Your input 3.0 _i + 0.0 _j thus arrives at `+` as 3.0 _i + 0.0. Independent of that, Vectors is programmed to work with exact vectors, which doesn't prevent it from working with floats, but then an interpretation for the meaning of 3.0 _i + 0.0 is necessary. I coded now to take that as equal to 3.0 _i, so that in the context of adding vectors, 0.0 is the 0 vector.

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

Hi mwahab

Unfortunately, Mapleprime's mechanism for uploading and displaying the contents of a worksheet is not working, so below, you have only the link to this reply.

In brief, what you have done incorrectly is to assume that splitting the determining system into cases concerning k (so, not pde, but its determining system) would take you to the symmetries of each case of splitting pde into cases with respect to k. Although that may work in some cases, it is not assured that it will work in all cases.

In the worksheet attached I show three things: 1) and 2) are concretely different -however equivalent - approaches to split the symmetries into cases with respect to parameters, then 3) is how to tell when the approach you used will work. 

When the Mapleprimes mechanism to upload and display the contents of a worksheet is restored, I will repost this answer with the contents visible. Your question is indeed interesting for a wider audience, I think.

Download How_to_split_symmetries_into_cases.mw

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

 


 

I can't help you with a grtensor issue but Maple already comes with routines more advanced and easier to use than grtensor; what follows then illustrates how you could do your computation using the official-Maple Physics package; for more info you can take a look to its help page, ?Physics

"f(t):=a(t)^(2);"

proc (t) options operator, arrow, function_assign; a(t)^2 end proc

(1)

with(Physics)

Setup(signature = `+---`, coord = cartesian, metric = dt^2-f(t)*(dx^2+dy^2+dz^2))

[coordinatesystems = {X}, metric = {(1, 1) = 1, (2, 2) = -a(t)^2, (3, 3) = -a(t)^2, (4, 4) = -a(t)^2}, signature = `+ - - -`]

(2)

Check the metric

g_[]

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

(3)

The Ricci tensor is Ricci[mu,nu]. Its definition, one component, all the nonzero, and its matrix form

Ricci[definition]

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

(4)

With compact display, derivatives are displayed indexed (to have them displayed in non-compact form, input OFF for details see CompactDisplay )

Ricci[1, 1]

-3*(diff(diff(a(t), t), t))/a(t)

(5)

Ricci[nonzero]

Physics:-Ricci[mu, nu] = {(1, 1) = -3*(diff(diff(a(t), t), t))/a(t), (2, 2) = 2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)), (3, 3) = 2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)), (4, 4) = 2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t))}

(6)

Ricci[]

Physics:-Ricci[mu, nu] = Matrix(%id = 18446744078320134734)

(7)

"Ricci[~]"

Physics:-Ricci[`~mu`, `~nu`] = Matrix(%id = 18446744078195215886)

(8)

Define a tensor as the product of a scalar and a covariant derivative (following your worksheet)

fyr[mu, nu] = fY(t)*Ricci[mu, nu]

fyr[mu, nu] = fY(t)*Physics:-Ricci[mu, nu]

(9)

Define(fyr[mu, nu] = fY(t)*Physics[Ricci][mu, nu])

`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], fyr[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)}

(10)

Check it out

fyr[definition]

fyr[mu, nu] = fY(t)*Physics:-Ricci[mu, nu]

(11)

fyr[1, 1]

-3*fY(t)*(diff(diff(a(t), t), t))/a(t)

(12)

fyr[nonzero]

fyr[mu, nu] = {(1, 1) = -3*fY(t)*(diff(diff(a(t), t), t))/a(t), (2, 2) = fY(t)*(2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t))), (3, 3) = fY(t)*(2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t))), (4, 4) = fY(t)*(2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)))}

(13)

fyr[]

fyr[mu, nu] = Matrix(%id = 18446744078328236022)

(14)

"fyr[~]"

fyr[`~mu`, `~nu`] = Matrix(%id = 18446744078328191686)

(15)

The covariant derivative is D_[mu]

D_[mu](fyr[mu, beta])

Physics:-D_[mu](fyr[beta, `~mu`], [X])

(16)

The components of arbitrary tensorial expressions are visible using TensorArray

TensorArray(Physics[D_][mu](fyr[beta, `~mu`], [X]))

Array(%id = 18446744078349157910)

(17)

"simplify(?)"

Array(%id = 18446744078349166342)

(18)

The double contraction

D_[mu](D_[nu](fyr[mu, nu]))

Physics:-D_[mu](Physics:-D_[nu](fyr[`~mu`, `~nu`]), [X])

(19)

Summing over the repeated indices

SumOverRepeatedIndices(Physics[D_][mu](Physics[D_][nu](fyr[`~mu`, `~nu`]), [X]), simplifier = simplify)

(-3*(diff(diff(diff(diff(a(t), t), t), t), t))*fY(t)*a(t)^2+(-6*a(t)^2*(diff(fY(t), t))-9*a(t)*fY(t)*(diff(a(t), t)))*(diff(diff(diff(a(t), t), t), t))-3*fY(t)*(diff(diff(a(t), t), t))^2*a(t)+(-3*a(t)^2*(diff(diff(fY(t), t), t))-9*a(t)*(diff(a(t), t))*(diff(fY(t), t))+15*fY(t)*(diff(a(t), t))^2)*(diff(diff(a(t), t), t))+6*(diff(a(t), t))^3*(diff(fY(t), t)))/a(t)^3

(20)

Simplifying properties (first set indicates symmetires, second set antisimmetries)

Library:-GetTensorSymmetryProperties(fyr)

{[1, 2]}, {}

(21)

LeviCivita[mu, nu, alpha, beta]*fyr[alpha, beta]

Physics:-LeviCivita[alpha, beta, mu, nu]*fyr[alpha, beta]

(22)

Simplify(Physics[LeviCivita][alpha, beta, mu, nu]*fyr[alpha, beta])

0

(23)

Raising and lowering indices

"g_[~mu,~nu]  fyr[nu,alpha]"

Physics:-g_[`~mu`, `~nu`]*fyr[alpha, nu]

(24)

Simplify(Physics[g_][`~mu`, `~nu`]*fyr[alpha, nu])

fyr[alpha, `~mu`]

(25)

Or in one go using the `.` product operator instead of `*`

"g_[~mu,~nu] .  fyr[nu,alpha]"

fyr[alpha, `~mu`]

(26)

I imagine the above suffices for you to develop your computation; if not, could you please give more details (that do not require having grtensor installed).

 

NULL

NULL

Warning: grOptionMetricPath has not been assigned.

Default metric is now fr.

 

grcalc(R(dn, dn))

`CPU Time ` = 0.16e-1

(27)

NULL

grdef("fyr{c d}:=R{c d}*fY(t) ")

Created definition for fyr(dn,dn)

 

 

grcalc(fyr(dn, dn))

`CPU Time ` = 0.

(28)

 

NULLgrdisplay(fyr(dn, dn))

fyr[a]*``[b] = (array( 1 .. 4, 1 .. 4, [( 2, 1 ) = (0), ( 4, 1 ) = (0), ( 1, 4 ) = (0), ( 1, 2 ) = (0), ( 2, 4 ) = (0), ( 3, 2 ) = (0), ( 3, 4 ) = (0), ( 3, 1 ) = (0), ( 4, 3 ) = (0), ( 3, 3 ) = ((2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)))*fY(t)), ( 2, 2 ) = ((2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)))*fY(t)), ( 2, 3 ) = (0), ( 4, 2 ) = (0), ( 1, 3 ) = (0), ( 4, 4 ) = ((2*(diff(a(t), t))^2+a(t)*(diff(diff(a(t), t), t)))*fY(t)), ( 1, 1 ) = (-3*(diff(diff(a(t), t), t))*fY(t)/a(t))  ] ))

(29)

grcalc(Box[fyr(dn, dn)])

`CPU Time ` = 0.63e-1

(30)

NULL

NULL

grcalc(fyr(dn, dn, cup, cup))

`CPU Time ` = 0.63e-1

(31)

NULLNULL

Parse could not create a functional expression for:

  "Tensor_(rc,[dn,dn,dn],[c,d,e],0)≔Tensor_(R,[dn,dn,cdn],[c,d,e],0)"
Please recheck the definition.

Error, (in grtensor:-grF_strToDef) parse() failed

 

This is generic definition of the generic VcVd (fY·Rab)

grdef("kt2{a b c d}:=fyr{a b;c d}")

This object is already defined. The new definition has been ignored.

 

grdisplay(kt2(dn, dn, up, up))

Created definition for kt2(dn,dn,up,up)

kt2(dn,dn,up,up) has not been calculated.

 

grcalc(kt2(up, up, dn, dn))

`CPU Time ` = 0.

(32)

now i want to define contracted quantity  using contraction with upper metrics g^{cd}

grdef("kt3:=kt2{abcd}*g{^cd}*g{^ab}")

Indices in name: [[], []]

Indices in definition: [[c], []]

Error, (in grtensor:-grdef) lhs/rhs index conflict.

 

NULL 

grdef("kt4{a c}:=kt2{abcd}*g{^bd}")

Indices in name: [[], [a, c]]

Indices in definition: [[b], [a]]

Error, (in grtensor:-grdef) lhs/rhs index conflict.

 

``


 

Download grtensor_v2_(reviewed).mw

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

It suffices to equate to 0 the functional derivative, which you can compute with Physics:-Fundiff. Now, the Maple input line you show is not correct on several counts; for one you are using [] as () (in Maple, [] are used to enter lists of objects), then e^ is probably meant to be exp(). I'd suggest you to try to write the problem correctly, then give a look at the help page ?Physics,Fundiff.

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

First 18 19 20 21 22 23 24 Last Page 20 of 55