ecterrab

13431 Reputation

24 Badges

19 years, 361 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi nm

Good catch and thanks for reporting - it is fixed and the fix distributed within the Maplesoft Physics Updates v.315 or higher

This PDE problem is solved for some values of k and not for others, in connection with the ability of Maple's solve command to solve for the eigenvalue an algebraic expression involving Bessel functions and return that solution in terms of an arbitrary integer (that can then be related to the summation index). For k = 1/25 the resulting expression in terms of Bessel functions happens to be within the scope of the algorithms implemented in solve, but not for k = 1.

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

Hi struckmeier

Thanks, I received your LaTeX, and you are right. This is now corrected and the correction uploaded for everybody within the Physics Updates v.302 or higher (requires Maple 2018.2)

Best

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

Hi nm,

Good catch. The problem is fixed in the Physics Updates version 293 (or higher). The equation is however out of reach of what is implemented in pdsolve, therefore not solved.

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

Hi Mmcdara

The work by Nasser Abbasi, concerning the solution of PDE benchmarks with Maple and Mathematica, is indeed impressive. Clicking "previous" in the page you linked, I read the following comparison of performances in solving 522 examples of PDE mostly with Boundary Conditions:

This is a nice result. I was aware that Maple's performance, with ODE and PDE in general, is concretely better, but wasn't aware of this difference in performance regarding exact solving of PDE with Boundary Conditions. That difference may be related to the work described in Exact solutions for PDE and Boundary / Initial Conditions (2018).

On the problem you brought today: linear PDEs, like the one you show, you know, have for general solution a linear combination of (what I'd call) a core solution, as the one that pdsolve returns when passing the option build. To express a general formal solution it then suffices to write sum(core(_C[n]), n = 0..infinity)

Although in some contexts it may be desired to have that formal infinite sum form of the solution constructed by pdsolve automatically, in other cases the core solution is what is actually of use. Not less important is the understanding of how this solution got computed, for instance, if by separation of variables, and if so whether by product or sum, the former relevant in, e.g. electrodynamics and quantum mechanics, the latter in the Hamilton-Jacobi formulation of classical mechanics. The pdsolve command returns that information when not passing the option build.

Being myself a physicist, all that was in mind when coding the first version of pdsolve. The design you see implemented intentionally follows those considerations. Many years have passed since that first version, and today I think that design - although unusual in computer algebra - was a good idea, I haven't seen people complaining about this. People seem to find this design natural. Some things may still change, but for now, most of that original design will remain as you see it today.

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


Hi Bryan,

 

It sometimes helps considering the inverse problem: depart from where you want to arrive and think on ways to go back, reverse the operation. In this case that solves the problem well, as follows.

 

Start loading some useful packages for performing these operations and representing them in inert form (something so valuable in the Maple system, not entirely noticed)

with(Physics); with(Vectors)

Consider now two vectors. I will do this in polar coordinates, just 2D for the purpose of passing the idea, that clearly extends to 3D vectors. Using your notation, we have

a_ := cos(`θa`)*_i+sin(`θa`)*_j

cos(`θa`)*_i+sin(`θa`)*_j

(1)

b_ := cos(`φa`)*_i+sin(`φa`)*_j

cos(`φa`)*_i+sin(`φa`)*_j

(2)

Take their scalar product, and on the right-hand side represent it in inert form (unfortunately we still have to use the `%.` functional form to represent inert products, this may change in a future version of Maple)

e__1 := a_.b_ = `%.`(%a_, %b_)

cos(`θa`)*cos(`φa`)+sin(`θa`)*sin(`φa`) = `%.`(%a_, %b_)

(3)

What do you want now? To reverse the operation. Spell it: "depart from the lhs, and simplify quadratic expressions in trig functions such that the left-hand side becomes the right-hand side" 

 

That is possible. You need to have the trig functions expanded (not combined), as you see in the left-hand side above. How? using simplify, with respect to side relations  a very powerful command also not entirely noticed. it works like this: simplify(expression, {equations}, {objects_to_be_removed}) The third argument can frequently be omitted, but if what gets removed is not what you wanted then pass that third argument.


In this case, the simplest possible, the left-hand side of e__1 is already, exactly, the equation to be used to perform elimination, you get right away

simplify(e__1, {e__1})

`%.`(%a_, %b_) = `%.`(%a_, %b_)

(4)

This is now not so obvious:

expand(lhs(e__1)^2+3*lhs(e__1)+1)

cos(`φa`)^2*cos(`θa`)^2+2*sin(`θa`)*sin(`φa`)*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*sin(`φa`)^2+3*cos(`θa`)*cos(`φa`)+3*sin(`θa`)*sin(`φa`)+1

(5)

simplify(cos(`φa`)^2*cos(`θa`)^2+2*sin(`θa`)*sin(`φa`)*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*sin(`φa`)^2+3*cos(`θa`)*cos(`φa`)+3*sin(`θa`)*sin(`φa`)+1, {e__1})

`%.`(%a_, %b_)^2+3*`%.`(%a_, %b_)+1

(6)

Introduce the cross product

e__2 := `&x`(a_, b_) = `%&x`(%a_, %b_)

(cos(`θa`)*sin(`φa`)-sin(`θa`)*cos(`φa`))*_k = `%&x`(%a_, %b_)

(7)

expand(e__2)

cos(`θa`)*sin(`φa`)*_k-sin(`θa`)*cos(`φa`)*_k = Physics:-Vectors:-`&x`(%a_, %b_)

(8)

simplify(cos(`θa`)*sin(`φa`)*_k-sin(`θa`)*cos(`φa`)*_k = Physics[Vectors][`&x`](%a_, %b_), {(cos(`θa`)*sin(`φa`)-sin(`θa`)*cos(`φa`))*_k = `%&x`(%a_, %b_)})

`%&x`(%a_, %b_) = Physics:-Vectors:-`&x`(%a_, %b_)

(9)

Important: in e__2 you see the unit vector `#mover(mi("k"),mo("∧"))`, and simplify w.r.t side relations doesn't know about "vectors", e.g., that you cannot divide by `#mover(mi("k"),mo("∧"))`, so either the expression to be simplified is linear in `#mover(mi("k"),mo("∧"))` or you need to introduce another simplification equation, e.g. the scalar product of e__2 with itself,

e__3 := (`@`(expand, lhs) = rhs)(e__2.e__2)

cos(`θa`)^2*sin(`φa`)^2-2*sin(`θa`)*sin(`φa`)*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*cos(`φa`)^2 = `%&x`(%a_, %b_)^2

(10)

simplify(e__3, {e__3})

`%&x`(%a_, %b_)^2 = `%&x`(%a_, %b_)^2

(11)

This would be a good testing example:

e__1*(e__2.e__2)+e__1^2

(cos(`θa`)*cos(`φa`)+sin(`θa`)*sin(`φa`))*(cos(`θa`)*sin(`φa`)-sin(`θa`)*cos(`φa`))^2+(cos(`θa`)*cos(`φa`)+sin(`θa`)*sin(`φa`))^2 = `%.`(%a_, %b_)*`%&x`(%a_, %b_)^2+`%.`(%a_, %b_)^2

(12)

You want the left-hand side

expand(lhs((cos(`θa`)*cos(`φa`)+sin(`θa`)*sin(`φa`))*(cos(`θa`)*sin(`φa`)-sin(`θa`)*cos(`φa`))^2+(cos(`θa`)*cos(`φa`)+sin(`θa`)*sin(`φa`))^2 = `%.`(%a_, %b_)*`%&x`(%a_, %b_)^2+`%.`(%a_, %b_)^2))

sin(`θa`)^3*sin(`φa`)*cos(`φa`)^2-2*sin(`θa`)^2*sin(`φa`)^2*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*cos(`φa`)^3*cos(`θa`)+sin(`θa`)*sin(`φa`)^3*cos(`θa`)^2-2*sin(`θa`)*sin(`φa`)*cos(`φa`)^2*cos(`θa`)^2+sin(`φa`)^2*cos(`φa`)*cos(`θa`)^3+cos(`φa`)^2*cos(`θa`)^2+2*sin(`θa`)*sin(`φa`)*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*sin(`φa`)^2

(13)

to be mapped into the right-hand side of (12). This is how you accomplish such a task (would be titanic if done by hand ...)

simplify(sin(`θa`)^3*sin(`φa`)*cos(`φa`)^2-2*sin(`θa`)^2*sin(`φa`)^2*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*cos(`φa`)^3*cos(`θa`)+sin(`θa`)*sin(`φa`)^3*cos(`θa`)^2-2*sin(`θa`)*sin(`φa`)*cos(`φa`)^2*cos(`θa`)^2+sin(`φa`)^2*cos(`φa`)*cos(`θa`)^3+cos(`φa`)^2*cos(`θa`)^2+2*sin(`θa`)*sin(`φa`)*cos(`φa`)*cos(`θa`)+sin(`θa`)^2*sin(`φa`)^2, {e__1, e__3})

`%.`(%a_, %b_)*(`%&x`(%a_, %b_)^2+`%.`(%a_, %b_))

(14)

And so on. If you explore this strategy, a command that may help you formulating inverse problems is Physics:-Vectors:-ChangeBasis.

NULL


 

Download simplifying_vectorial_trigonometric_expressions.mw

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

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

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