ecterrab

14605 Reputation

24 Badges

20 years, 99 days

MaplePrimes Activity


These are answers submitted by ecterrab

 

Michael

Your definition of RicciT (by the way, why don't you use the already defined Ricci tensor directly with tetrad indices?) involves d_[c] where c is a tetrad index. Then, when you invoke RicciT[1,2], that requires computing the tetrad component d_[1] which, in order to be mapped into derivatives with respect to the spacetime (global system of references) variable, it needs to be multiplied by the tetrad. It so happens that for the tetrad metric you set the corresponding tetrad has square roots and the imaginary unit, and so d_[1] where 1 is a tetrad index will appear with the imaginary unit and square roots around.

 

Here is how it happens

restart; with(Physics); 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

(1)

Please note that when you load Tetrads, tetrad indices are automatically set to lowercaselatin, so you do not need to set them again to lowercaselatin (you do that in your Setup command).

 

Copying now from your worksheet, the tetrad metric you want to use us

Matrix([[0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]], shape = symmetric)

Matrix([[0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]])

(2)

NOTE: you can have this for tetrad metric in place by just telling Physics that you want to work with a null (instead of orthonormal) tetrad and that the signature is +--- (instead of the default in Physics that is ---+). So instead of using the Matrix as you did, here I use these Physics commands directly that result in the same

Physics:-Setup(coordinates = (X = [t, x, y, z]), signature = `+---`, tetradmetric = null)

`* Partial match of  'coordinates' against keyword 'coordinatesystems'`

 

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

 

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

 

[coordinatesystems = {X}, signature = `+ - - -`, tetradmetric = {(1, 2) = 1, (3, 4) = -1}]

(3)

eta_[]

eta[a, b] = (Matrix(4, 4, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (1, 4) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (3, 3) = 0, (3, 4) = -1, (4, 4) = 0}, storage = triangular[upper], shape = [symmetric]))

(4)

Before proceeding, check the tetrad

e_[]

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

(5)

You see it contains sqrt(2) and the imaginary unit. It is all correct, according to the definition

e_[definition]

Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b]

(6)

Check if the definition holds:

TensorArray(Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b])

Matrix(%id = 18446744078378088558)

(7)

So all is correct. Next you define two tensors, GammaT and RicciT (I imagine that you are using 'T' to mean "in the tetrad local system of references", but for that it suffices to use the Physics Ricci tensor and Christoffel directly with tetrad indices, no need to define yet another tensor). Here I do things in both ways.

 

First your way, I am just copying from your worksheet:

Physics:-Define(GammaT[a, b, c], RicciT[b, c] = -%d_[c](GammaT[`~a`, b, a])+%d_[a](GammaT[`~a`, b, c])-Physics:-`*`(GammaT[`~m`, b, a], GammaT[`~a`, m, c])+Physics:-`*`(GammaT[`~m`, b, c], GammaT[`~a`, m, a])-Physics:-`*`(GammaT[`~a`, b, m], GammaT[`~m`, c, a]-GammaT[`~m`, a, c]))

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], GammaT[a, b, c], Physics:-Psigma[mu], RicciT[b, c], Physics:-d_[mu], Physics:-Tetrads:-eta_[a, b], Physics:-g_[mu, nu], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-m_[mu], Physics:-Tetrads:-mb_[mu], Physics:-Tetrads:-n_[mu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(8)

Check your definition of RicciT

RicciT[definition]

RicciT[b, c] = -%d_[c](GammaT[`~a`, b, a])+%d_[a](GammaT[`~a`, b, c])-GammaT[`~m`, b, a]*GammaT[`~a`, m, c]+GammaT[`~m`, b, c]*GammaT[`~a`, m, a]-GammaT[`~a`, b, m]*(GammaT[`~m`, c, a]-GammaT[`~m`, a, c])

(9)

You see it involves the non-covariant derivative with tetrad indices, but if you want this to become derivatives with respect to the spacetime coordinates (from the global system of references) you will need to multiply by the tetrad. For example, define a tensor in the tetrad system of references, as you did (for that, it suffices to define it with a tetrad index)

Physics:-Define(A[a])

`Defined objects with tensor properties`

 

{A[a], Physics:-Dgamma[mu], GammaT[a, b, c], Physics:-Psigma[mu], RicciT[b, c], Physics:-d_[mu], Physics:-Tetrads:-eta_[a, b], Physics:-g_[mu, nu], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-m_[mu], Physics:-Tetrads:-mb_[mu], Physics:-Tetrads:-n_[mu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(10)

Take now the non-covariant derivative using tetrad indices and indicate a dependency of A[a] with respect to the spacetime variables

PDEtools:-declare(A(X))

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

(11)

Physics:-d_[b](A[a](X))

Physics:-d_[b](A[a](X), [X])

(12)

Rewrite now the type of indices of this expression so that it can be computed in terms of derivatives with respect to the spacetime variables

Physics:-d_[b](A[a](X), [X]) = Library:-RewriteTypeOfIndices(Physics:-d_[b](A[a](X), [X]))

Physics:-d_[b](A[a](X), [X]) = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-d_[mu](A[a](X), [X])

(13)

Recalling now from (5) that the tetrad "`𝔢`[b]^(mu)" involves the imaginary unit and sqrt(2), when you compute the components of this 2x2 matrix behind this tensorial expression (12) you can expect the imaginary unit and sqrt(2) around. To compute this matrix (array), use

TensorArray(Physics[d_][b](A[a](X), [X]))

Matrix(%id = 18446744078408303190)

(14)

Therefore you will see the imaginary unit in your definition of RicciT, and that is the answer to your question in this thread.

 

Let me show now that you do not need to define RicciT nor GammaT to compute with these tensors in the local system of references (the tetrad system). First note that your spacetime is flat, from where the same is true with respect to your tetrad system, and hence the components of the Ricci tensor in both systems of references are all equal to 0.

 

So to illustrate the use of tetrad indices with Ricci let's first set the curvature to something, and cannot be the standard Schwarzchild metric because in that case too the components of Ricci are 0. So how about 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) = -Typesetting:-mcomplete(Typesetting:-msub(Typesetting:-mi("R"), Typesetting:-mi("r")), Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mo("∂"), Typesetting:-mrow(Typesetting:-mo("∂"), Typesetting:-mi("r"))), Typesetting:-mspace(width = "0.4em"), Typesetting:-mi("R"), Typesetting:-mo("⁡"), Typesetting:-mfenced(Typesetting:-mi("t"), Typesetting:-mi("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)

PDEtools:-declare(Physics:-g_[mu, nu] = Matrix(%id = 18446744078543569374))

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

 

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

(16)

So here are the components of the Ricci tensor in the global (spacetime) system of references

"Ricci[mu,nu,matrix)  "# Here you can use Ricci[] as a shortcut too

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

(17)

And these are the components of the Ricci tensor in the local (tetrad) system of references

Ricci[a, b, matrix]

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

(18)

To understand how one is obtained form the other one you can use the same Library routine used some lines above

Ricci[b, c]:

Physics:-Ricci[b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]*Physics:-Ricci[mu, nu]

(19)

This gives you an array of equations, where all the lhs (the components of R[a, b]) are equal to the rhs (the components of "`𝔢`[a]^(mu) `𝔢`[b]^(nu) R[mu,nu]")

TensorArray(Physics[Ricci][b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]*Physics[Ricci][mu, nu], simplifier = normal)

Matrix(%id = 18446744078558356654)

(20)

Get the equations:

map(rhs, ArrayElems(Matrix(%id = 18446744078558356654)))

{0 = 0, ((diff(R(t, r), t))*(diff(diff(R(t, r), r), t))-(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))) = ((diff(R(t, r), t))*(diff(diff(R(t, r), r), t))-(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))), (R(t, r)*(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))+(diff(R(t, r), t))^2*(diff(R(t, r), r))+(diff(diff(R(t, r), r), t))*R(t, r)*(diff(R(t, r), t))-(diff(E(r), r))*R(t, r)-2*(diff(R(t, r), r))*E(r))/(R(t, r)^2*(diff(R(t, r), r))) = (R(t, r)*(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))+(diff(R(t, r), t))^2*(diff(R(t, r), r))+(diff(diff(R(t, r), r), t))*R(t, r)*(diff(R(t, r), t))-(diff(E(r), r))*R(t, r)-2*(diff(R(t, r), r))*E(r))/(R(t, r)^2*(diff(R(t, r), r))), -((diff(diff(diff(R(t, r), r), t), t))*R(t, r)+(diff(R(t, r), t))*(diff(diff(R(t, r), r), t))+(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))) = -((diff(diff(diff(R(t, r), r), t), t))*R(t, r)+(diff(R(t, r), t))*(diff(diff(R(t, r), r), t))+(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r)))}

(21)

Check whether they are all just identities of the form A = A

map(evalb, {0 = 0, ((diff(R(t, r), t))*(diff(diff(R(t, r), r), t))-(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))) = ((diff(R(t, r), t))*(diff(diff(R(t, r), r), t))-(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))), (R(t, r)*(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))+(diff(R(t, r), t))^2*(diff(R(t, r), r))+(diff(diff(R(t, r), r), t))*R(t, r)*(diff(R(t, r), t))-(diff(E(r), r))*R(t, r)-2*(diff(R(t, r), r))*E(r))/(R(t, r)^2*(diff(R(t, r), r))) = (R(t, r)*(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))+(diff(R(t, r), t))^2*(diff(R(t, r), r))+(diff(diff(R(t, r), r), t))*R(t, r)*(diff(R(t, r), t))-(diff(E(r), r))*R(t, r)-2*(diff(R(t, r), r))*E(r))/(R(t, r)^2*(diff(R(t, r), r))), -((diff(diff(diff(R(t, r), r), t), t))*R(t, r)+(diff(R(t, r), t))*(diff(diff(R(t, r), r), t))+(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r))) = -((diff(diff(diff(R(t, r), r), t), t))*R(t, r)+(diff(R(t, r), t))*(diff(diff(R(t, r), r), t))+(diff(diff(R(t, r), t), t))*(diff(R(t, r), r))-(diff(E(r), r)))/(R(t, r)*(diff(R(t, r), r)))})

{true}

(22)

Summarizing: nothing is wrong here, and for the way you defined RicciT you can expect the imaginary unit.

 

One last thing: is Ricci[a,b] equal to your RicciT[a,b]? To verify that take the right-hand side of (19) and express it in terms of Christoffel symbols

lhs(Physics:-Ricci[b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]*Physics:-Ricci[mu, nu]) = convert(rhs(Physics:-Ricci[b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]*Physics:-Ricci[mu, nu]), Christoffel)

Physics:-Ricci[b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~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])

(23)

Simplify now the repeated indices

Physics:-Simplify(Physics:-Ricci[b, c] = Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~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]))

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

(24)

Compare with your definition, and I will substitute here GammaT by Christoffel in the definition just to make it more readable for comparison purposes

subs(GammaT = Christoffel, RicciT[definition])

RicciT[b, c] = -%d_[c](Physics:-Christoffel[`~a`, b, a])+%d_[a](Physics:-Christoffel[`~a`, b, c])-Physics:-Christoffel[`~m`, b, a]*Physics:-Christoffel[`~a`, m, c]+Physics:-Christoffel[`~m`, b, c]*Physics:-Christoffel[`~a`, m, a]-Physics:-Christoffel[`~a`, b, m]*(Physics:-Christoffel[`~m`, c, a]-Physics:-Christoffel[`~m`, a, c])

(25)

Let's compare the first term of Ricci[b,c] and RicciT[b,c]; if these two are equal we would have

op(2, rhs(Physics:-Ricci[b, c] = Physics:-d_[alpha](Physics:-Christoffel[`~alpha`, mu, nu], [X])*Physics:-Tetrads:-e_[b, `~mu`]*Physics:-Tetrads:-e_[c, `~nu`]-Physics:-Tetrads:-e_[b, `~mu`]*Physics:-d_[c](Physics:-Christoffel[alpha, mu, `~alpha`], [X])+Physics:-Christoffel[`~alpha`, alpha, beta]*Physics:-Christoffel[`~beta`, b, c]-Physics:-Christoffel[`~alpha`, beta, c]*Physics:-Christoffel[`~beta`, alpha, b])) = op(1, rhs(RicciT[b, c] = -%d_[c](Physics:-Christoffel[`~a`, b, a])+%d_[a](Physics:-Christoffel[`~a`, b, c])-Physics:-Christoffel[`~m`, b, a]*Physics:-Christoffel[`~a`, m, c]+Physics:-Christoffel[`~m`, b, c]*Physics:-Christoffel[`~a`, m, a]-Physics:-Christoffel[`~a`, b, m]*(Physics:-Christoffel[`~m`, c, a]-Physics:-Christoffel[`~m`, a, c])))

-Physics:-Tetrads:-e_[b, `~mu`]*Physics:-d_[c](Physics:-Christoffel[alpha, mu, `~alpha`], [X]) = -%d_[c](Physics:-Christoffel[`~a`, a, b])

(26)

But these two are not equal: to be equal you would need to move "`𝔢`[b]^(mu)" within the `∂`[c] derivative but you cannot do that because "`𝔢`[b]^(mu)" depends on the coordinates, it does not commute with `∂`[c]. One could think that your GammaT is not Christoffel at tetrad indices, so let's check what Christoffel at tetrad indices is:

Christoffel[a, b, c]; -1; % = Library:-RewriteTypeOfIndices(%)

Physics:-Christoffel[a, b, c] = Physics:-Tetrads:-e_[a, `~mu`]*Physics:-Tetrads:-e_[b, `~nu`]*Physics:-Tetrads:-e_[c, `~alpha`]*Physics:-Christoffel[mu, alpha, nu]

(27)

Summarizing about these releationships: I suggest you to check carefully whether RicciT and GammaT are the objects you want them to be, and whether you really need to introduce them or perhaps it is simpler to work with the Ricci and Christoffel symbols just using tetrad indices.

``

NOTE (after having posted): it might also be the case that what you want to use instead of RicciT is actually Tetrads:-gamma_, that is, the Ricci rotation coefficients in the (local) tetrad system of references.

Download _No_Problem_with_Defined_Tetrad_Function_(reviewed).mw

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

You can always use an alias, for instance as shown in this image:

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

Hi

Just to let you know, that the symmetry routines of PDEtools are Maple native (official) and more thorough by large and accross the board, besides being used (and so tested) by people around the world. Please give a look at the help page ?PDEtools, the section on Symmetry commands. If after that there is still a computation that you think you cannot do it with these PDEtools / Symmetry routines, please post the problem and I will step in to show how you can do it.

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

Hi

Please give a look at the help page ?Physics,Examples, where in the first section, on Vector Analysis, you will find material like the one you posted using vector notation, and in the one for Relativity you will find material more advanced now using tensor notation (covariant and contravariant, for Galilean or curved spaces or spacetimes).

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

This is a subtle bug; although rare to happen in the DE programs, these contain a formidably large amount of code ... Anyway it is fixed now. The fix is available to everybody as usual, in the Mapelsoft R&D web page for Differential Equations and Mathematical Functions. Note however that this fix only works in Maple 2015 so maybe you want to consider upgrading, there are good reasons for that independent of this fix. If that is not at reach for you please write me an email to physics@maplesoft.com and I will see if I can help perhaps guiding in some way for you to have this fixed in Maple 16.

Oct/6 update: Here is is a maple library, Maple16_DE_update.mla.zip, that you can drop in the lib directory of your Maple 16 installation and fixes the issue, so that now you have:

 

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

@Dmitry Lyakhov 

There is no command in the Physics package to automatically find the maximal abelian subalgebra of a given Lie algebra. 

I worked on an implementation of derived subalgebras in the context of differential equations time ago, and the related command is DEtools[solve_group]. I didn't find the time to do this more generally in the more modern symmetry routines of PDEtools.

But then there is the DifferentialGeometry package that we introduce not many years ago, with commands for performing these computations, in either semi-automatic way (not "one go", but almost), or step by step, with commands for performing - I'd say - all the seps.

So why don't you post your problem? Giving a look at the details it may be possible to understand why is that the existing commands are not sufficient (are they really not?) or what is that you find non-algorithmic (as far as I recall,  polynomial factorization is fully algorithmic - see for instance The complete analysis of a polynomial factorization algorithm over finite fields).

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

 

Hi Michael

Your question misses context: the d_ Physics command is an indexed differential operator that is applied onto a "derivand", you know. But your question shows nothing of that. So without further details from you, this is the basics about how it works

with(Physics); -1; Setup(coordinates = X, tensors = A)

`* Partial match of  'coordinates' against keyword 'coordinatesystems'`

 

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

 

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

 

[coordinatesystems = {X}, tensors = {A, Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}]

(1)

Physics:-d_[mu](A[mu](X))

Physics:-d_[mu](A[`~mu`](X), [X])

(2)

The above cannot be expressed in terms of diff or D because mu has not been given any value and, you know, the differentiation variable depends on the value of mu.

Then, if you perform the summation implicit in the repeated indices, the output already comes in diff format:

Physics:-SumOverRepeatedIndices(Physics:-d_[mu](A[`~mu`](X), [X]))

diff(A[`~1`](X), x1)+diff(A[`~2`](X), x2)+diff(A[`~3`](X), x3)+diff(A[`~4`](X), x4)

(3)

The same does not happen with the inert form %d_, but then you can convert to diff or D using convert (that you say it has no effect, but actually works fine as expected):

subs(Physics:-d_ = %d_, Physics:-d_[mu](A[`~mu`](X), [X]))

%d_[mu](A[`~mu`](X), [X])

(4)

Physics:-SumOverRepeatedIndices(%d_[mu](A[`~mu`](X), [X]))

%d_[1](A[`~1`](X), [X])+%d_[2](A[`~2`](X), [X])+%d_[3](A[`~3`](X), [X])+%d_[4](A[`~4`](X), [X])

(5)

convert(%d_[1](A[`~1`](X), [X])+%d_[2](A[`~2`](X), [X])+%d_[3](A[`~3`](X), [X])+%d_[4](A[`~4`](X), [X]), diff)

diff(A[`~1`](X), x1)+diff(A[`~2`](X), x2)+diff(A[`~3`](X), x3)+diff(A[`~4`](X), x4)

(6)

convert(%d_[1](A[`~1`](X), [X])+%d_[2](A[`~2`](X), [X])+%d_[3](A[`~3`](X), [X])+%d_[4](A[`~4`](X), [X]), D)

(D[1](A[`~1`]))(X)+(D[2](A[`~2`]))(X)+(D[3](A[`~3`]))(X)+(D[4](A[`~4`]))(X)

(7)

So what is the context for you question? What is the actual expression you want to convert that you say is not being converted?

 

Download convert_inert_d_to_D.mw

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

I actually like and use 2D Math input, but it has its problems, frequently invisible, and this one you mention looks like that kind of thing.

The simple workaround, that more than that it is a saving of your time all around, is to not rewrite the commands found in this site you mention, but instead use these commands as already written by Maple. I mean:

  1. Open the help page by typing ?Poincare,examples (you see I am entering the question mark "?" to invoke the help page) then pressing Enter.
  2. The page that opens is actually a worksheet with everything written, you can reproduce things, play around, change, etc. and more than nothing: you don't need to spend your time rewriting :) 

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

It is not, at all, that a loop could change or corrupt in this way a tetrad definition.

The answer actually is that you shall not use spacetime contracted indices, that enter your definition of RicciT, I am talking of a (see the line that starts with 'Define'), also as a loop dummy variable, because in this way you corrupt your definition (because the repeated spacetime index a ends up having the value of the loop index, that actually refers to a free, not repeated index).

So the correction in this case is to use something else for the loop dummies, for instance i and j, that do not enter as repeated indices in the definition of your tensors or, to avoid having to read things by eye to discard letters, once you choose using lowercase latin to represent spacetime indices, then, in general, use some other kind of letter for for-do-od loops, for instance alpha and beta, or A and B.

 

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

Hi Damon,
This is also the kind of operation you do directly by using the Physics package; in this example using its Vectors subpackage; please give a look at the help page ?Physics,Vectors

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

Tensor algebra using standard tensor indicial notation, including the LeviCivita and KroneckerDelta tensors (your epsilon and delta) is implemented in the Physics package, please give a look at the help page ?Physics.

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

Yes the output is correct. Recalling, differentiation with respect to a 'function' is not an ambiguous operation but just differentiation with respect to a jet variable of a jet space. Skipping technical details you can think of a jet space as one where independent variables, dependent variables (what we call 'functions') and their partial derivatives are all "independent objects in equal footing". That is, q and dq/dt are independent objects, and so  d/dq (dq/dt) = 0. See the help page for PDEtools:-ToJet. Another page you can give a look for a concrete example of the form you are posting (a bit more general) is ?Physics,diff, in the Examples section, starting at equation number (6).

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

Hi

The error message tells what the problem is. Change, in your definition of a (first equation), f(x) by f(x(t)) and everything will work as you expect.

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

 

There are two issues: first, in each DetSys you use a different name for the infinitesimals - you needto use the same name in order to compare; second and more important: you forgot to include the information of PDE1 in DetSys2, in that way it is not possible to compare things. I adjusted these two things below and showed how to compare the resulting DetSys: they are both correct and equivalent (i.e. they have the same solutions).

 

Below I intercalate comments all italized, as well as adjust a bit a few input lines to make things more straightforward.

 

with(PDEtools):

DepVars := [u(x, t), a(t), b(t)]

[u(x, t), a(t), b(t)]

(1)

declare(u(x, t), a(t), b(t))

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

 

a(t)*`will now be displayed as`*a

 

b(t)*`will now be displayed as`*b

(2)

U, A, B := diff_table(u(x, t)), diff_table(a(t)), diff_table(b(t))

table( [(  ) = u(x, t) ] ), table( [(  ) = a(t) ] ), table( [(  ) = b(t) ] )

(3)

PDE1 := U[t]+u(x, t)*U[x]+a(t)*u(x, t)+b(t)*U[x, x, x] = 0

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

(4)

In this worksheet you have used _xi and _eta (with underscor) for DetSys and xi and eta (without underscore) for DetSys2, so to be sure you use the same names for the infinitesimals, set G right here and use it for both determining systems

G := [seq(xi[j](x, t, u), j = [x, t]), seq(eta[j](x, t, u), j = [u])]

[xi[x](x, t, u), xi[t](x, t, u), eta[u](x, t, u)]

(5)

PDEtools:-declare(G)

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

 

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

(6)

DetSys := DeterminingPDE(PDE1, G, integrabilityconditions = false)

{3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*b(t)-3*(diff(xi[x](x, t, u), u)), 3*(diff(diff(diff(xi[x](x, t, u), u), u), x))-(diff(diff(diff(eta[u](x, t, u), u), u), u)), -3*(diff(diff(eta[u](x, t, u), u), x))+3*(diff(diff(xi[x](x, t, u), x), x)), 9*(diff(diff(xi[x](x, t, u), u), x))-3*(diff(diff(eta[u](x, t, u), u), u)), 3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*b(t)-3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*b(t)-3*(diff(xi[x](x, t, u), u))*u, u*(diff(xi[t](x, t, u), x))*b(t)-3*(diff(xi[x](x, t, u), x))*b(t)+(diff(diff(diff(xi[t](x, t, u), x), x), x))*b(t)^2+(diff(b(t), t))*xi[t](x, t, u)+(diff(xi[t](x, t, u), t))*b(t)-a(t)*u*(diff(xi[t](x, t, u), u))*b(t), -(diff(diff(diff(eta[u](x, t, u), x), x), x))*b(t)^2+b(t)*(diff(eta[u](x, t, u), u))*a(t)*u-b(t)*(diff(eta[u](x, t, u), t))-(diff(eta[u](x, t, u), x))*b(t)*u-3*b(t)*(diff(xi[x](x, t, u), x))*a(t)*u+u*(a(t)*(diff(b(t), t))-b(t)*(diff(a(t), t)))*xi[t](x, t, u)-eta[u](x, t, u)*b(t)*a(t), -2*b(t)*(diff(xi[x](x, t, u), x))*u+(diff(b(t), t))*xi[t](x, t, u)*u-3*(diff(diff(diff(eta[u](x, t, u), u), x), x))*b(t)^2+(diff(diff(diff(xi[x](x, t, u), x), x), x))*b(t)^2-eta[u](x, t, u)*b(t)+b(t)*(diff(xi[x](x, t, u), t))-4*b(t)*(diff(xi[x](x, t, u), u))*a(t)*u, diff(diff(diff(xi[t](x, t, u), u), u), u), diff(diff(diff(xi[t](x, t, u), u), u), x), diff(diff(diff(xi[x](x, t, u), u), u), u), diff(diff(xi[t](x, t, u), u), u), diff(diff(xi[t](x, t, u), u), x), diff(diff(xi[t](x, t, u), x), x), diff(diff(xi[x](x, t, u), u), u), diff(xi[t](x, t, u), u), diff(xi[t](x, t, u), x), diff(xi[x](x, t, u), u)}

(7)

Instead of copying each equation by hand in order to list them, you can list the equations in this way

for EQ in sort([op(DetSys)], length) do EQ = 0 end do

diff(xi[t](x, t, u), u) = 0

 

diff(xi[t](x, t, u), x) = 0

 

diff(xi[x](x, t, u), u) = 0

 

diff(diff(xi[t](x, t, u), u), u) = 0

 

diff(diff(xi[t](x, t, u), u), x) = 0

 

diff(diff(xi[t](x, t, u), x), x) = 0

 

diff(diff(xi[x](x, t, u), u), u) = 0

 

diff(diff(diff(xi[t](x, t, u), u), u), u) = 0

 

diff(diff(diff(xi[t](x, t, u), u), u), x) = 0

 

diff(diff(diff(xi[x](x, t, u), u), u), u) = 0

 

-3*(diff(diff(eta[u](x, t, u), u), x))+3*(diff(diff(xi[x](x, t, u), x), x)) = 0

 

9*(diff(diff(xi[x](x, t, u), u), x))-3*(diff(diff(eta[u](x, t, u), u), u)) = 0

 

3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*b(t)-3*(diff(xi[x](x, t, u), u)) = 0

 

3*(diff(diff(diff(xi[x](x, t, u), u), u), x))-(diff(diff(diff(eta[u](x, t, u), u), u), u)) = 0

 

3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*b(t)-3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*b(t)-3*(diff(xi[x](x, t, u), u))*u = 0

 

u*(diff(xi[t](x, t, u), x))*b(t)-3*(diff(xi[x](x, t, u), x))*b(t)+(diff(diff(diff(xi[t](x, t, u), x), x), x))*b(t)^2+(diff(b(t), t))*xi[t](x, t, u)+(diff(xi[t](x, t, u), t))*b(t)-a(t)*u*(diff(xi[t](x, t, u), u))*b(t) = 0

 

-2*b(t)*(diff(xi[x](x, t, u), x))*u+(diff(b(t), t))*xi[t](x, t, u)*u-3*(diff(diff(diff(eta[u](x, t, u), u), x), x))*b(t)^2+(diff(diff(diff(xi[x](x, t, u), x), x), x))*b(t)^2-eta[u](x, t, u)*b(t)+b(t)*(diff(xi[x](x, t, u), t))-4*b(t)*(diff(xi[x](x, t, u), u))*a(t)*u = 0

 

-(diff(diff(diff(eta[u](x, t, u), x), x), x))*b(t)^2+b(t)*(diff(eta[u](x, t, u), u))*a(t)*u-b(t)*(diff(eta[u](x, t, u), t))-(diff(eta[u](x, t, u), x))*b(t)*u-3*b(t)*(diff(xi[x](x, t, u), x))*a(t)*u+u*(a(t)*(diff(b(t), t))-b(t)*(diff(a(t), t)))*xi[t](x, t, u)-eta[u](x, t, u)*b(t)*a(t) = 0

(8)

DepVars := [u(x, t)]

[u(x, t)]

(9)

G was already entered lines above, so I comment your input line here

 

S := PDEtools:-InfinitesimalGenerator(G, DepVars, expanded, prolongation = 3):

 

You do not need to enter the equation in Jet notation by hand (prone to mistakes); you can use ToJet instead

L := PDEtools:-ToJet(PDE1, DepVars)

u[t]+u*u[x]+a(t)*u+b(t)*u[x, x, x] = 0

(10)

S(L)

xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*u[x, x, x])+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-4*(diff(xi[x](x, t, u), u))*u[x]*u[x, x, x]-(diff(xi[t](x, t, u), u))*u[t]*u[x, x, x]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2+(diff(eta[u](x, t, u), u))*u[x, x, x]-3*(diff(xi[x](x, t, u), x))*u[x, x, x]-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3)*b(t) = 0

(11)

#In (14), on equating coefficients of various differentials of u(x,t) the determining equation are obtained which does not matches with obtained at (6), what could be the reason???

 

There is one essential issue here: the way you constructed DetSys2, it does not take into account the actual form of PDE1 anywhere. Hence your DetSys2 depends on u[x, x, x]

indets(xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*u[x, x, x])+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-4*(diff(xi[x](x, t, u), u))*u[x]*u[x, x, x]-(diff(xi[t](x, t, u), u))*u[t]*u[x, x, x]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2+(diff(eta[u](x, t, u), u))*u[x, x, x]-3*(diff(xi[x](x, t, u), x))*u[x, x, x]-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3)*b(t) = 0, specindex(u))

{u[t], u[x], u[x, t], u[x, x], u[x, x, t], u[x, x, x]}

(12)

and therefore you cannot compare it with DetSys, that does take into account the actual form of PDE1; it does not depend on u[x, x, x].

 

So let's first remove this third derivative from DetSys2 introducing the information regarding the actual form of PDE1, and in that way you have something valid to be compared with DetSys

isolate(L, u[x, x, x])

u[x, x, x] = (-u*u[x]-u[t]-a(t)*u)/b(t)

(13)

Introduce this value of u[x, x, x] in the expression for the determining system you constructed step by step using the InfinitesimalGenerator then ToJet, then isolate, now subs:

subs(u[x, x, x] = (-u*u[x]-u[t]-a(t)*u)/b(t), xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*u[x, x, x])+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-4*(diff(xi[x](x, t, u), u))*u[x]*u[x, x, x]-(diff(xi[t](x, t, u), u))*u[t]*u[x, x, x]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2+(diff(eta[u](x, t, u), u))*u[x, x, x]-3*(diff(xi[x](x, t, u), x))*u[x, x, x]-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3)*b(t) = 0)

xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*(-u*u[x]-u[t]-a(t)*u)/b(t))+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3+(diff(eta[u](x, t, u), u))*(-u*u[x]-u[t]-a(t)*u)/b(t)-3*(diff(xi[x](x, t, u), x))*(-u*u[x]-u[t]-a(t)*u)/b(t)-4*(diff(xi[x](x, t, u), u))*u[x]*(-u*u[x]-u[t]-a(t)*u)/b(t)-(diff(xi[t](x, t, u), u))*u[t]*(-u*u[x]-u[t]-a(t)*u)/b(t))*b(t) = 0

(14)

 

Now, to compare with DetSys you still need to take the coefficients of the indexed u (here representing derivatives in Jet notation)

du := indets(xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*(-u*u[x]-u[t]-a(t)*u)/b(t))+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3+(diff(eta[u](x, t, u), u))*(-u*u[x]-u[t]-a(t)*u)/b(t)-3*(diff(xi[x](x, t, u), x))*(-u*u[x]-u[t]-a(t)*u)/b(t)-4*(diff(xi[x](x, t, u), u))*u[x]*(-u*u[x]-u[t]-a(t)*u)/b(t)-(diff(xi[t](x, t, u), u))*u[t]*(-u*u[x]-u[t]-a(t)*u)/b(t))*b(t) = 0, specindex(u))

{u[t], u[x], u[x, t], u[x, x], u[x, x, t]}

(15)

 

Note that for coeff to work, you need to apply it to the left-hand side of the equation (14), and I also take the numerator of this expression - in this way there is no need to call expand

DetSys3 := {coeffs(numer(lhs(xi[t](x, t, u)*((diff(a(t), t))*u+(diff(b(t), t))*(-u*u[x]-u[t]-a(t)*u)/b(t))+eta[u](x, t, u)*(u[x]+a(t))+(-(diff(xi[x](x, t, u), u))*u[x]^2-(diff(xi[t](x, t, u), u))*u[x]*u[t]+u[x]*(diff(eta[u](x, t, u), u))-(diff(xi[x](x, t, u), x))*u[x]-(diff(xi[t](x, t, u), x))*u[t]+diff(eta[u](x, t, u), x))*u-(diff(xi[x](x, t, u), u))*u[t]*u[x]-(diff(xi[t](x, t, u), u))*u[t]^2+(diff(eta[u](x, t, u), u))*u[t]-(diff(xi[x](x, t, u), t))*u[x]-(diff(xi[t](x, t, u), t))*u[t]+diff(eta[u](x, t, u), t)+(-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]*u[t]*u[x, x]-3*(diff(xi[t](x, t, u), u))*u[x, x]*u[x, t]-3*(diff(xi[t](x, t, u), u))*u[x]*u[x, x, t]-(diff(diff(diff(xi[t](x, t, u), u), u), u))*u[x]^3*u[t]-6*(diff(diff(xi[x](x, t, u), u), u))*u[x]^2*u[x, x]-3*(diff(diff(xi[t](x, t, u), u), u))*u[x]^2*u[x, t]+3*(diff(diff(eta[u](x, t, u), u), u))*u[x]*u[x, x]-3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*u[x]^2*u[t]-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*u[x]*u[t]-9*(diff(diff(xi[x](x, t, u), u), x))*u[x]*u[x, x]-6*(diff(diff(xi[t](x, t, u), u), x))*u[x]*u[x, t]-3*(diff(diff(xi[t](x, t, u), u), x))*u[t]*u[x, x]+diff(diff(diff(eta[u](x, t, u), x), x), x)-3*(diff(xi[x](x, t, u), u))*u[x, x]^2-3*(diff(xi[t](x, t, u), x))*u[x, x, t]-3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*u[x]^3-3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*u[x]^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*u[x]^2+3*u[x]*(diff(diff(diff(eta[u](x, t, u), u), x), x))-(diff(diff(diff(xi[x](x, t, u), x), x), x))*u[x]-(diff(diff(diff(xi[t](x, t, u), x), x), x))*u[t]+3*(diff(diff(eta[u](x, t, u), u), x))*u[x, x]-3*(diff(diff(xi[x](x, t, u), x), x))*u[x, x]-3*(diff(diff(xi[t](x, t, u), x), x))*u[x, t]-(diff(diff(diff(xi[x](x, t, u), u), u), u))*u[x]^4+(diff(diff(diff(eta[u](x, t, u), u), u), u))*u[x]^3+(diff(eta[u](x, t, u), u))*(-u*u[x]-u[t]-a(t)*u)/b(t)-3*(diff(xi[x](x, t, u), x))*(-u*u[x]-u[t]-a(t)*u)/b(t)-4*(diff(xi[x](x, t, u), u))*u[x]*(-u*u[x]-u[t]-a(t)*u)/b(t)-(diff(xi[t](x, t, u), u))*u[t]*(-u*u[x]-u[t]-a(t)*u)/b(t))*b(t) = 0)), du)}

{-(diff(diff(diff(xi[t](x, t, u), u), u), u))*b(t)^2, -3*(diff(diff(diff(xi[t](x, t, u), u), u), x))*b(t)^2, -(diff(diff(diff(xi[x](x, t, u), u), u), u))*b(t)^2, -3*(diff(diff(xi[t](x, t, u), u), u))*b(t)^2, -6*(diff(diff(xi[t](x, t, u), u), x))*b(t)^2, -3*(diff(diff(xi[t](x, t, u), u), x))*b(t)^2, -3*(diff(diff(xi[t](x, t, u), x), x))*b(t)^2, -6*(diff(diff(xi[x](x, t, u), u), u))*b(t)^2, -3*(diff(xi[t](x, t, u), u))*b(t)^2, -3*(diff(xi[t](x, t, u), x))*b(t)^2, -3*(diff(xi[x](x, t, u), u))*b(t)^2, -3*(diff(diff(diff(xi[x](x, t, u), u), u), x))*b(t)^2+(diff(diff(diff(eta[u](x, t, u), u), u), u))*b(t)^2, 3*(diff(diff(eta[u](x, t, u), u), u))*b(t)^2-9*(diff(diff(xi[x](x, t, u), u), x))*b(t)^2, 3*(diff(diff(eta[u](x, t, u), u), x))*b(t)^2-3*(diff(diff(xi[x](x, t, u), x), x))*b(t)^2, 3*(diff(xi[x](x, t, u), u))*b(t)-3*(diff(diff(diff(xi[t](x, t, u), u), x), x))*b(t)^2, -3*(diff(diff(diff(xi[x](x, t, u), u), x), x))*b(t)^2+3*(diff(diff(diff(eta[u](x, t, u), u), u), x))*b(t)^2+3*b(t)*(diff(xi[x](x, t, u), u))*u, -(diff(diff(diff(xi[t](x, t, u), x), x), x))*b(t)^2-(diff(b(t), t))*xi[t](x, t, u)-(diff(xi[t](x, t, u), t))*b(t)+3*(diff(xi[x](x, t, u), x))*b(t)+a(t)*u*(diff(xi[t](x, t, u), u))*b(t)-u*(diff(xi[t](x, t, u), x))*b(t), 3*(diff(diff(diff(eta[u](x, t, u), u), x), x))*b(t)^2-(diff(diff(diff(xi[x](x, t, u), x), x), x))*b(t)^2-b(t)*(diff(xi[x](x, t, u), t))+eta[u](x, t, u)*b(t)+4*b(t)*(diff(xi[x](x, t, u), u))*a(t)*u+2*b(t)*(diff(xi[x](x, t, u), x))*u-(diff(b(t), t))*xi[t](x, t, u)*u, (diff(eta[u](x, t, u), x))*b(t)*u+eta[u](x, t, u)*b(t)*a(t)+(diff(diff(diff(eta[u](x, t, u), x), x), x))*b(t)^2+b(t)*(diff(eta[u](x, t, u), t))-b(t)*(diff(eta[u](x, t, u), u))*a(t)*u+3*b(t)*(diff(xi[x](x, t, u), x))*a(t)*u+xi[t](x, t, u)*(diff(a(t), t))*b(t)*u-xi[t](x, t, u)*(diff(b(t), t))*a(t)*u}

(16)

Now it is time to compare. The simplest way to do it is: "Reduce one system using the other and you should obtain 0 for all of its equations". If that is happens, then both systems have the same solution, regardless of whether one system has some equations further simplified removing constant factors etc.

 

To reduce systems you can use the ReducedForm command. Start with detecting the variables here - the unknown of these determining systems, these are the infinitesimals

Vars := remove(has, indets(DetSys3, unknown), {a, b})

{eta[u](x, t, u), xi[t](x, t, u), xi[x](x, t, u)}

(17)

Reduce now DetSys3, obtained going one step at a time using InfinitesimalGenerator, using DetSys obtained in one go using DeterminingPDE

PDEtools:-ReducedForm(DetSys3, DetSys, Vars)

`casesplit/ans`([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [])

(18)

That by itself tells that all the solutions of DetSys are also solutions of DetSys3. Let's see now whether the reversed statement is also true

PDEtools:-ReducedForm(DetSys, DetSys3, Vars)

`casesplit/ans`([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [])

(19)

Hence, all solutions of DetSys3 are also solutions of DetSys, from where these two systems just have the same solution, given by

pdsolve(DetSys, Vars)

{eta[u](x, t, u) = exp(Int(-a(t), t))*_C2, xi[t](x, t, u) = 0, xi[x](x, t, u) = _C1+(Int(exp(Int(-a(t), t)), t))*_C2}

(20)

pdsolve(DetSys3, Vars)

{eta[u](x, t, u) = exp(Int(-a(t), t))*_C2, xi[t](x, t, u) = 0, xi[x](x, t, u) = _C1+(Int(exp(Int(-a(t), t)), t))*_C2}

(21)

By the way you can get the solution also in one go, and with the integration constants already specialized

PDEtools:-Infinitesimals(PDE1)

[_xi[x](x, t, u) = 1, _xi[t](x, t, u) = 0, _eta[u](x, t, u) = 0], [_xi[x](x, t, u) = Int(exp(Int(-a(t), t)), t), _xi[t](x, t, u) = 0, _eta[u](x, t, u) = exp(Int(-a(t), t))]

(22)

Or you can use the method to reduce the independent variables of PDE1 as much as possible in one go, also displaying the intermediate solutions; you can also specify the dependency ofthe invariant solutions you are interested on, etc (give a look at the help page for this command, it has a large number of options).

PDEtools:-InvariantSolutions(PDE1, display)

invariants = [t, (u(x, t)*(Int(exp(-(Int(a(t), t))), t))-exp(-(Int(a(t), t)))*x)/(Int(exp(-(Int(a(t), t))), t))]

 

solutions = [{u(x, t) = (_C1*exp(-(Int((a(t)*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t))))/(Int(exp(-(Int(a(t), t))), t)), t)))*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t)))*x)/(Int(exp(-(Int(a(t), t))), t))}]

 

_________________________________________________

 

invariants = [t, u(x, t)]

 

solutions = [{u(x, t) = exp(-(Int(a(t), t)))*_C2}]

 

_________________________________________________

 

u(x, t) = exp(-(Int(a(t), t)))*_C1, u(x, t) = (_C1*exp(-(Int((a(t)*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t))))/(Int(exp(-(Int(a(t), t))), t)), t)))*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t)))*x)/(Int(exp(-(Int(a(t), t))), t))

(23)

So two invariant solutions can be derived from these infinitesimals. Let's test these solutions

map(pdetest, [u(x, t) = exp(-(Int(a(t), t)))*_C1, u(x, t) = (_C1*exp(-(Int((a(t)*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t))))/(Int(exp(-(Int(a(t), t))), t)), t)))*(Int(exp(-(Int(a(t), t))), t))+exp(-(Int(a(t), t)))*x)/(Int(exp(-(Int(a(t), t))), t))], PDE1)

[0, 0]

(24)

I.e. the solutions are correct

 

Download [411]_Determing_Equations_for_Variable_coefficient_KdV_(reviewed).mw

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

@escorpsy 

Just gave a look to your worksheet (BTW why do you ask your question with an exclamation mark `!`, or you intended `?` and the `!` is just a typo?).

The problem in your worksheet is that you use eval (ok...) but then in the input you pass to it you do not distinguish between mu (the covariant index) and~mu (the contravariant index). If you want to use eval, or for the case subs, to replace ~mu, then use, for instance following what I see in your worksheet, eval(expression, ~mu = ~2) and in doing so be sure that there is a blank space between = and ~2, because without that space, =~ has a different meaning (more like the zip command).

Alternatively, you may prefer to jump over these syntactic subtleties of evalsubs, etc. and just use the Physics command SubstituteTensorIndices, which will do the substitution exactly as you intended, that is, you input SubstituteTensorIndice(mu = 2, your_expression) and it will automatically replace mu = 2 or~mu = ~2. Note that SubstituteTensorIndices accepts, among others, the optional arguments evaluatetensor and evaluateexpression, so that you can use this command to work as you would expect from eval, or from subs (these two behave different, if you were not aware of that, please give a look to the corresponding help pages), including some extra flexibility that none of them have.

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

First 40 41 42 43 44 45 46 Last Page 42 of 60