ecterrab

6368 Reputation

17 Badges

13 years, 194 days

MaplePrimes Activity


These are answers submitted by ecterrab

PDEtools:-declare is the most thorough command for accomplishing that. It will also display derivatives indexed, or with prime.

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

Hi Kitonum,

 

For that purpose you can redefine sum to enhance it with the advanced multi-index functionality provided within the Physics package. For details on that, see Physics:-Library:-Add .

 

Physics:-Setup(redefinesum = true)

 

With multi-index in place, the multinomial theorem can be represented straightforwardly:

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(1)

For example:

eval((a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n), n = 3)

(a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3

(2)

Verify taking one minus the other one

expand((lhs-rhs)((a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3))

0

(3)

Alternatively, if you prefer to not have this functionality plugged in sum - for instance because it also frees sum from all of its premature evaluation problems, which is a relevant good feature, but perhaps you have code that relies on those problems - you can use Physics:-Library:-Add  directly:

 

restart

(a+b+c)^n = Physics:-Library:-Add(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(a+b+c)^n = Physics:-Library:-Add(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(4)

eval((a+b+c)^n = Physics:-Library:-Add(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n), n = 3)

(a+b+c)^3 = a^3+3*a^2*b+3*a^2*c+3*a*b^2+6*a*b*c+3*a*c^2+b^3+3*b^2*c+3*b*c^2+c^3

(5)

NULL


 

Download Sum_multi-index.mw

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

Hi mistel

There are two issues: 

  1. (5) is not as (4)
  2. (6) is not 0

Issue 1. is a weakness in new routines - I'll fix that this week. Workaround: after (5), insert an input line and type eval((5), `*` = `.`);

Issue 2. is somewhat expected: when you defined proj2, you used i as summation index in both sums. Replace i by j in the one for B. Then after (6) input combine(%) or Simplify(%) and both return 0.

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


 

Hi deniscr

Physics and DifferentialGeometry outputs are correct, and you seem to have made a typographical mistake in the input of the line element: the one you sent to Physics is not the same as the one you sent to DifferentialGeometry.

 

Below I first verify that the Killing vectors returned using the Physics are correct for the line element (metric) you indicated. After that I am pointing at what seems to me a typographical mistake you've done in your input for DifferentialGeometry in your other worksheet "killing_test2.mw" (or the other way around, a typo in the metric you indicated to Physics in this worksheet ). Then I verify that the Killing vectors for the metric you sent to DifferentialGeometry, either computed with Physics or DifferentialGeometry, are correct too.

 

In summary: everything looks correct but for your typographical mistake sending different metrics to Physics and DifferentialGeometry. This is anyway an interesting example on "verification", a key component in the use of computer algebra.

 

restart; with(Physics)

Setup(dimension = 5, mathematicalnotation = true)

`The dimension and signature of the tensor space are set to `[5, `- - - - +`]

 

[dimension = 5, mathematicalnotation = true]

(1)

Coordinates(X = [phi, f, chi, u, v])

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (phi, f, chi, u, v)}

 

`Systems of spacetime Coordinates are:`*{X = (phi, f, chi, u, v)}

 

{X}

(2)

2*dphi^2+(df^2+(du*v-dv*u+dchi)^2)/(2*f^2)-(du^2+dv^2)/f

2*dphi^2+(1/2)*(df^2+(du*v-dv*u+dchi)^2)/f^2-(du^2+dv^2)/f

(3)

Setup(metric = 2*dphi^2+(1/2)*(df^2+(du*v-dv*u+dchi)^2)/f^2-(du^2+dv^2)/f)

[metric = {(1, 1) = 2, (2, 2) = (1/2)/f^2, (3, 3) = (1/2)/f^2, (3, 4) = (1/2)*v/f^2, (3, 5) = -(1/2)*u/f^2, (4, 4) = (1/2)*v^2/f^2-1/f, (4, 5) = -(1/2)*v*u/f^2, (5, 5) = (1/2)*u^2/f^2-1/f}]

(4)

g_[]

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

(5)

Define(V, quiet)

KillingVectors(V)

[V[`~mu`] = [1, 0, 0, 0, 0], V[`~mu`] = [0, u*f, (1/4)*v^3+(1/4)*(u^2-2*f)*v+(1/2)*chi*u, (1/2)*f+(1/4)*u^2-(3/4)*v^2, -(1/2)*chi+v*u], V[`~mu`] = [0, v*f, -(1/4)*u^3+(1/4)*(-v^2+2*f)*u+(1/2)*chi*v, v*u+(1/2)*chi, -(3/4)*u^2+(1/4)*v^2+(1/2)*f], V[`~mu`] = [0, chi*f, (1/2)*chi^2-(1/8)*(-u^2-v^2+2*f)^2, (1/4)*v^3+(1/4)*(u^2-2*f)*v+(1/2)*chi*u, -(1/4)*u^3+(1/4)*(-v^2+2*f)*u+(1/2)*chi*v], V[`~mu`] = [0, f, chi, (1/2)*u, (1/2)*v], V[`~mu`] = [0, 0, 0, v, -u], V[`~mu`] = [0, 0, v, 1, 0], V[`~mu`] = [0, 0, -u, 0, 1], V[`~mu`] = [0, 0, 1, 0, 0]]

(6)

First: verify that all of (6) are indeed Killing vectors. For that purpose, use the definition, shown in the help page. You can use `▿`[nu](V[alpha])+`▿`[alpha](V[nu]) = 0 or `ℒ`[V](g[mu, nu]) = 0.

 

"for K in [V[~mu] = [1, 0, 0, 0, 0], V[~mu] = [0, u*f, 1/4*v^3+1/4*(u^2-2*f)*v+1/2*chi*u, 1/2*f+1/4*u^2-3/4*v^2, -1/2*chi+v*u], V[~mu] = [0, v*f, -1/4*u^3+1/4*(-v^2+2*f)*u+1/2*chi*v, v*u+1/2*chi, -3/4*u^2+1/4*v^2+1/2*f], V[~mu] = [0, chi*f, 1/2*chi^2-1/8*(-u^2-v^2+2*f)^2, 1/4*v^3+1/4*(u^2-2*f)*v+1/2*chi*u, -1/4*u^3+1/4*(-v^2+2*f)*u+1/2*chi*v], V[~mu] = [0, f, chi, 1/2*u, 1/2*v], V[~mu] = [0, 0, 0, v, -u], V[~mu] = [0, 0, v, 1, 0], V[~mu] = [0, 0, -u, 0, 1], V[~mu] = [0, 0, 1, 0, 0]] do          print(`_____________________________________________________________`);  Define(K,quiet);          print(V[~]);          print('`▿`[nu](V[alpha])+`▿`[alpha](V[nu])' = TensorArray(`▿`[nu](V[alpha])+`▿`[alpha](V[nu]),simplifier=simplify)); end do:"

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 1, (2) = 1, (3) = 1, (4) = 1, (5) = 1}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

Physics:-D_[nu](V[alpha])+Physics:-D_[alpha](V[nu]) = Matrix(%id = 18446744078356038230)

(7)

As mentioned you can try the same loop with the LieDerivative. For example, the last Killing vector defined in the loop above is

"V[~]"

V[`~mu`] = Array(%id = 18446744078356094118)

(8)

This is the unevaluated LieDerivative

'LieDerivative[V](g_[alpha, beta])' = 0

Physics:-LieDerivative[V](Physics:-g_[alpha, beta]) = 0

(9)

Release the unevaluation

Physics[LieDerivative][V](Physics[g_][alpha, beta]) = 0

Physics:-g_[mu, beta]*Physics:-D_[alpha](V[`~mu`], [X])+Physics:-g_[alpha, mu]*Physics:-D_[beta](V[`~mu`], [X]) = 0

(10)

TensorArray(Physics[g_][mu, beta]*Physics[D_][alpha](V[`~mu`], [X])+Physics[g_][alpha, mu]*Physics[D_][beta](V[`~mu`], [X]) = 0)

Matrix(%id = 18446744078441914110)

(11)

"simplify(?)"

Matrix(%id = 18446744078437083966)

(12)

Now on what seems to me a typographical mistake you made in the input you used for DifferentialGeometry: in killing_test_2.mw you show this input line (that I am not executing):

g := evalDG(2*`&t`(dphi, dphi)+v^2*`&t`(du, du)/(2*f^2)-u*v*`&s`(du, dv)/f^2+u^2*`&t`(dv, dv)/f^2+v*`&s`(dchi, du)/f^2-u*`&s`(dchi, dv)/f^2+`&t`(dchi, dchi)/(2*f^2)+`&t`(df, df)/(2*f^2)-`&t`(dv, dv)/f-`&t`(du, du)/f)

You are using &t for the square of the differentials and &s - the symmetric product - for their (crossed) products. Since in Physics you don't need to be concerned with whether in the product of two differentials they are or not the same, try this:

1. 

Assign both &t and &s to `*`

2. 

Copy your line-element input to evalDG from the other worksheet and paste it here

3. 

Set this other line-element as a metric using Physics and compare the metric you get with the one shown above as (5)

4. 

Compute, using Physics, the Killing vectors using this metric you sent to DifferentialGeometry

5. 

Compare the Killling vectors returned by DifferentialGeometry with those you got using Physics

 

You will see (below) that they are the same, indicating there is no bug and the problem seems indeed to be your typographial miskate in the input to DG.

 

So,

`&t` := `*`; `&s` := `*`

Physics:-`*`

 

Physics:-`*`

(13)

2*`&t`(dphi, dphi)+v^2*`&t`(du, du)/(2*f^2)-u*v*`&s`(du, dv)/f^2+u^2*`&t`(dv, dv)/f^2+v*`&s`(dchi, du)/f^2-u*`&s`(dchi, dv)/f^2+`&t`(dchi, dchi)/(2*f^2)+`&t`(df, df)/(2*f^2)-`&t`(dv, dv)/f-`&t`(du, du)/f

2*dphi^2+(1/2)*v^2*du^2/f^2-u*v*du*dv/f^2+u^2*dv^2/f^2+v*dchi*du/f^2-u*dchi*dv/f^2+(1/2)*dchi^2/f^2+(1/2)*df^2/f^2-dv^2/f-du^2/f

(14)

Setup(g_ = 2*dphi^2+(1/2)*v^2*du^2/f^2-u*v*du*dv/f^2+u^2*dv^2/f^2+v*dchi*du/f^2-u*dchi*dv/f^2+(1/2)*dchi^2/f^2+(1/2)*df^2/f^2-dv^2/f-du^2/f)

[metric = {(1, 1) = 2, (2, 2) = (1/2)/f^2, (3, 3) = (1/2)/f^2, (3, 4) = (1/2)*v/f^2, (3, 5) = -(1/2)*u/f^2, (4, 4) = (1/2)*(v^2-2*f)/f^2, (4, 5) = -(1/2)*v*u/f^2, (5, 5) = (u^2-f)/f^2}]

(15)

g_[]

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

(16)

By eye there is (only) one difference, g_[4,4] in (5) is equal to (u^2-2*f)/(2*f^2) while in (16) you have (u^2-f)/f^2 and that, I think, is the answer to your question. Anyway, verify that the Killing vectors obtained using DifferentialGeometry are correct by computing them using Physics and comparing

Define(redo, V, quiet)

 

These are the Killling vectors for this other metric using Physics,

KillingVectors(V)

[V[`~mu`] = [1, 0, 0, 0, 0], V[`~mu`] = [0, f, chi, (1/2)*u, (1/2)*v], V[`~mu`] = [0, 0, u, 0, -1], V[`~mu`] = [0, 0, 1, 0, 0]]

(17)

they are correct too

"for K in [V[~mu] = [1, 0, 0, 0, 0], V[~mu] = [0, f, chi, 1/2*u, 1/2*v], V[~mu] = [0, 0, u, 0, -1], V[~mu] = [0, 0, 1, 0, 0]] do          print(`_____________________________________________________________`);  Define(K,quiet);          print(V[~]);          print('`▿`[nu](V[alpha])+`▿`[alpha](V[nu])' = TensorArray(`▿`[nu](V[alpha])+`▿`[alpha](V[nu]),simplifier=simplify)); end do:"

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 1, (2) = 1, (3) = 1, (4) = 1, (5) = 1}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

D_[nu](V[alpha])+D_[alpha](V[nu]) = (Matrix(5, 5, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0}))

 

_____________________________________________________________

 

V[`~mu`] = (Vector[row](5, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0}))

 

Physics:-D_[nu](V[alpha])+Physics:-D_[alpha](V[nu]) = Matrix(%id = 18446744078567592894)

(18)

Comparing these Killing vectors (17) computed for this other metric using Physics

[V[`~mu`] = [1, 0, 0, 0, 0], V[`~mu`] = [0, f, chi, (1/2)*u, (1/2)*v], V[`~mu`] = [0, 0, u, 0, -1], V[`~mu`] = [0, 0, 1, 0, 0]]

[V[`~mu`] = [1, 0, 0, 0, 0], V[`~mu`] = [0, f, chi, (1/2)*u, (1/2)*v], V[`~mu`] = [0, 0, u, 0, -1], V[`~mu`] = [0, 0, 1, 0, 0]]

(19)

with those returned by DifferentialGeometry (I'm basically translating them to a readable input form from your worksheet),

[V[`~mu`] = [1/2, 0, 0, 0, 0], V[`~mu`] = [0, 2*f, 2*chi, u, v], V[`~mu`] = [0, 0, u, 0, -1], V[`~mu`] = [0, 0, 2, 0, 0]]

[V[`~mu`] = [1/2, 0, 0, 0, 0], V[`~mu`] = [0, 2*f, 2*chi, u, v], V[`~mu`] = [0, 0, u, 0, -1], V[`~mu`] = [0, 0, 2, 0, 0]]

(20)

you see by eye they are equivalent: some of those by DifferentialGeometry are divided by two and, you know, a constant times a Killing vector is also a Killing vector (they satisfy linear differential equations), so all these returned by DifferentialGeometry are also correct.


 

Download killing_test1_(reviewed).mw

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

Hi Wolfgang

I did this:

  1. Went to the post and download the worksheet linked at the end of it.
  2. Removed my initialization file (if you don't have one, this step is not necessary)
  3. Added some input lines at the beginning to check that
    1. On restart, no names are assigned but for some few shown by the anames() command
    2. The libname shows the Physics Updates first, then the main library of Maple 2018.2.1
    3. The version() command shows the number 1362973 for all of Interface, Kernel and Library
    4. The Physics:-Version()[2] shows version installed = 276

Then clicked the `!!!` icon you see on the toolbar to execute the whole worksheet. Everything performed as expected, no errors and all the equations resolved, as shown in the post. Then closed Maple, opened Maple, and this time executed one input line at a time pressing Enter, and got the same result, no errors, and all equations solved as shown in the post. 

Attached is the worksheet I downloaded today, with the added input lines mentioned so that you could try executing it in your machine. The 1,2,3,4 items above are relevant to assure there is not something interferring with your Maple setup.

PDE_and_BC_during_2018_(reviewed) - no errors.mw

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

Hi Bryan

SortProducts is a new Physics command; it is within the latest Maplesoft Physics Updates . Formerly, it was Physics:-Library:-SortProducts; it got rewritten and attached is a help page. This command is particularly useful if you want to reorder not commutative factors in a product taking algebra or commutation rules into account, but it also sorts these factors when they are commutative; in this simpler case, the Maple command sort can also do the job (it is explained in its help page).

Best wishes for 2019

Physics-SortProducts.mw

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

Hi vv,

Good catch, all of seq, add and mul have special evaluation rules. The value issue is fixed and the fix uploaded for everybody as usual within the Maplesoft Physics Updates version 271 or higher.

All the best for new year's eve.

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

Hi nm

Mariusz Iwaniuk is correct, and the help page of pdsolve tells the same: this command returns one solution, as general as possible. As usual, the design is debatable; I designed this a long time ago having in mind that, for PDEs, the concept of a particular solution is, at the same time, useful, and there are just infinitely many ones, making little sense of the idea of "returning all particular solutions" available.

Frequently, more relevant than "many particular solutions" it is to know what kind of particular solution you are getting. E..g, whether it is a so-called complete solution, relevant in the Hamilton-Jacobi formulation of classical mechanics, or separation of variables, relevant in electrodynamics and quantum mechanics, or symmetry solutions with what kind of symmetry, the information being relevant depending on the context.

Anyway, Mathematica is not stronger than Maple to return particular solutions either. In the two PDE examples you brought, the solutions are traveling wave solutions, as you can see using infolevel[pdsolve] := 2. So for the two examples you posted, try PDEtools:-TWSolutions(pde) and you will see the two and the several many solutions you posted. 

More relevant: you can also try your two pde with the optional argument function = sech, or function = JacobiSN, or function = .... You will be surprised how many particular solutions of this kind exist - none of them returned by Mathematica, which has none of these options. You can as well try the option 'extended' - you will get not just more solutions but also more general. Example (22) of the help page is a beautiful one. All these things are explained in the help page ?PDEtools:-TWSolutions.

By the way, because for PDE particular solutions it is relevant to know what kind of solution you are getting, another  advantage in Maple is the infolevel mechanism used by pdsolve to convey that information.

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

 

Hi Rouben

In the documentation, first paragraph, it says "[Its purpose] is to permit a simple, compact display of functions and derivatives on the screen".

In the third paragraph it says "This scheme also displays all differentiation variables as indices, and permits declaring a prime variable so that, for functions of one variable, derivatives with respect to that declared prime variable are displayed with a prime."

So the behaviour you are showing is intended, according to the design and its documentation. The Examples section of that help page also illustrate with examples what is said in these two sentences: derivatives are displayed indexed, and the functionality of declared functions is omitted.

Now, I imagine you read this help page. What is not clear in these two sentences or in the examples that motivated your post?

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

 

Hi nm, Tom,

The 'method = ...' is new and only for PDE & BC problems. Implementing it for PDE with no BCs is possible, but a whole different project. So taking 'method = ...' for PDE only is not valid. Thus the error message you see: you are passing a wrong extra argument. As for your suggestion of ignoring the extra argument, I think that would be misleading: people (would be my case) would then think that 'method = ...' works, that they just passed a not good method. Regarding documentation, it is not documented in Maple 2018.2 because as said 'method = ...' is new. Attached is a first version of what would be an updated help page mentioning it.

pdsolveBoundaryConditions.mw

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

Hi nm,

D[1]*u(1, theta, t) = 0 is just the product of D[1] times u(1, theta, t), equated to 0. That is not, at all, a third notation to enter a derivative. 

From the point of view of an initial/boundary condition, factors that don't depend on the variables of the problem (would be D[1] in that product) are automatically discarded so entering D[1]*u(1, theta, t) = 0 is the same as entering u(1, theta, t) = 0. That is all about your actual question.

I realize you took this equation for the post I made (example number 8); indeed, I made a typo there, partially hidden by the mathematical notation, and pdsolve solved this problem with u(1, theta, t) = 0. I will look later this week to the same problem but with D[1](u)(1, theta, t) = 0 as a boundary condition, using the derivative, not the function itself.

NOTE: Dec/23, I corrected the typo in the original post, the two valid different problems, with and without the typo, are now solved.

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

Hi nm,

I have installed version 263 in my copy of Maple 2018.2, so apparently the problem is not in your computer or in the Update but somewhere else ... Anyway I tried now the following:

  1. Input PackageTools:-Uninstall("Physics Updates") - say yes to everything towards uninstalling the package
  2. Close Maple
  3. Open Maple, click the MapleCloud icon on the Maple toolbar, then Packages, find Physics Updates and install it.

And in that way I re-installed the package normally, it worked fine again. I hope this helps you. By the way upcomming version 264 (later today) has further developments in PDE & BC.

Best

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

 

Hi

Check the PDEtools commands ToJet, FromJet, diff_table. The first two allow you to input your equations in jet notation and have the software rewriting it for you in the notation used by dsolve and pdsolve, then re-expressing back the answer in jet notation if you want. The diff_table command is different, and in some sense more convenient: it allows you to input things using jet notation and have them automatically coming out in the standard function notation used by dsolve and pdsolve to solve differential equations.

If you also use PDEtools:-declare you will see on the screen everything in jet notation, even when what you are looking at is expressed using the standard function notation.  

By the way, all the Lie symmetry commands of the PDEtools and DifferentialAlgebra packages work internally using jet notation.

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

 J F Ogilvie 

You have a very peculiar way of expressing your points of view ... I will disregard that for this one time and try to help you with the contents.

The Maplesoft Physics Updates work fine with TTY cmaple, and also with the Standard Interface distributed with Maple, maintained by Maplesoft, and also with the not-maintained-anymore-since-years, so-called "Classic," ancient interface, the one you say you want to use, that was developed in the 1990s, provided that Maple itself runs properly in that interface.

IMPORTANT: the Maplesoft Physics Updates require you to have installed the latest Maple version (2018.2.1). If that is not the case Maple will warn you and point to the webpage from where you can download a version of the Updates for your version of Maple.

Now, that there are other things in that ancient "Classic" interface not working the way you expect, as you are saying, would seem expected for me, for the reasons mentioned in the previous paragraph. That is also not related to physics or my person: as you pointed out in your post, Maple 2018.2 is already having trouble to run in that not-maintained ancient interface. Interfaces developed more than 20 years ago typically don't work 100% or at all in nowadays operative systems, a situation standard in software. You could still argue that "Classic" is included in the distribution of Maple (not for Macintosh since many years). Yes, but you know it is not maintained anymore and that is not the interface Maplesoft indicates to use with the Maple system, since years.

Then if for you, using the ancient "Classic" interface, is relevant for any reason, working with the last Maple that runs fine for your purposes in that interface would be the way to go, I suppose. Otherwise, I suggest you to start using the Standard interface, distributed with the Maple system, intended for its use, and well maintained by Maplesoft.

Maybe of help for you in that transition: open the preferences of the Standard interface, the one distributed with Maple and maintained by the company, and choose to use worksheet instead of document mode. If you prefer, also choose to use 1D math input (so-called Maple Notation). These two things already make the Standard interface distributed with Maple nowadays work primarily as that ancient "Classic" one, as said not recommended and not maintained anymore for many years. If the remaining differences are still important for you then, unfortunately, I have nothing else to suggest you.

Hi John

This difference in behaviour between `.` and Physics:-`.`, for A^n (n an integer) when A is the computational object Array of dimension 1 or 2 is not present anymore after installing the Maplesoft Physics Updates version 240 or higher. Arrays (for which type(A, Array) returns true) are now kept unchanged, not rewritten as the object Matrix.

In that sense, this is now adjusted for good, or fixed, depending on whether you see this as an undesired incompatibility (my take on this nowadays) or a bug.

As for the origin of this problem: the same way you  - somehow - found "natural" (say?) that for a 2x2 table of numbers the object A^(-1) would satisfy A . A^(-1) = Identity (number 1 in the diagonal, the rest equal to 0), I also found that natural 15+ years ago when coding this.

But if A is represented using the computational object called Array, then A . A^(-1) is not equal to the Identity but to a square table of numbers all of them equal to 1. The first time I saw this I thought it was a bug. As Pascal4QM says, for the computational object Array, `.` is performing elementwise multiplication. As a physicist, I thought this behaviour was undesired, prone to mistakes. Whether you represent the square table of numbers using the computational object called Array or the one called Matrix (and both are displayed the same way on the screen - as a square table of numbers), in mathematics, the dot product of square tables of objects is called matrix multiplication, not elementwise multiplication. So, in Physics:-`.` day one I also coded a convert(A, Matrix) when A was the object called Array before proceeding with the "multiplication" of square tables of numbers.

And nobody ever complained about this or found it unnatural for 15+ years, but today (this post by you).

Looking at this design issue today, it also seems to me relevant to keep the differences in behaviour - sometimes unavoidable - to a very^2 strict minimum. So the adjustment mentioned at the beginning. 

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

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