ecterrab

14540 Reputation

24 Badges

20 years, 23 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

What Maple are you using? Although GRTensor was the sate-of-the are for many years, nowadays in Maple there are two packages, Physics and DifferentialGeometry, with which you can now perform General Relativity computations more comprehensively than with GRTEnsor. Feel free to present your problem, maybe we can help you showing how you tackle it with these Maple packages.

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

@trace 

mm_(reviewed).mw

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

 

Hi

In your worksheet critical.mw, in the input that results in (3), an incomplete solution, instead of having only {x1,x2,x3,x4,x5} as solving variables, include in that set m, as in

> solve({…same system…}, {m, x1, x2, x3, x4, x5});

and you will receive, exactly, the solutions (critical lines) you were expecting. So there is no weakness in solve as some people thought. It is in fact a rather sophisticated/powerful command.

Alternatives to solve, using a different solving engine: PDEtools:-Solve, and to split into cases there is also PDEtools:-casesplit, both using the rifsimp routines of DEtools, or optionally the DifferentialAlgebra package. By the way there is nothing in Mathematica like these two packages, rifsimp and DifferentiAlgebra.

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

By default, dsolve returns explicit results. If you prefer an implicit result, you can use the implicit option as in

> dsolve(DE, implicit);

For your DE you will receive the output you mentioned as more elegant.

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


There was an issue in PDEtools:-DeterminingPDE turned evident by your example, where the system constists of a single PDE

but there are three dependent variables R(theta, psi), f(theta, psi), and chi(theta, psi) (to specify less dependent variables, perhaps only one,

you can always pass them as a list as a second argument).

 

Anyway the issue got fixed, and the fix made availble for download to everyone in the

Maplesoft R&D for Differential Equations and Mathematical Functions webpage (see the instructions to install it that come

within the downloadable zip).

 

With the fix in place you get this result

PDEtools:-declare((R, f, chi)(theta, psi))

R(theta, psi)*`will now be displayed as`*R

 

f(theta, psi)*`will now be displayed as`*f

 

chi(theta, psi)*`will now be displayed as`*chi

(1)

pde := ((1/2)*(diff(R(theta, psi), theta))*(diff(f(theta, psi), theta))+(3/8)*(diff(R(theta, psi), theta))^2+(1/8)*(diff(f(theta, psi), theta))^2+(1/4)*(diff(f(theta, psi), theta, theta))+(1/4)*(diff(R(theta, psi), theta, theta)))*exp(f(theta, psi))+diff(R(theta, psi), psi, psi)-(1/2)*(diff(R(theta, psi), psi))*(diff(f(theta, psi), psi))+(1/2)*(diff(chi(theta, psi), psi))^2 = 0

((1/2)*(diff(R(theta, psi), theta))*(diff(f(theta, psi), theta))+(3/8)*(diff(R(theta, psi), theta))^2+(1/8)*(diff(f(theta, psi), theta))^2+(1/4)*(diff(diff(f(theta, psi), theta), theta))+(1/4)*(diff(diff(R(theta, psi), theta), theta)))*exp(f(theta, psi))+diff(diff(R(theta, psi), psi), psi)-(1/2)*(diff(R(theta, psi), psi))*(diff(f(theta, psi), psi))+(1/2)*(diff(chi(theta, psi), psi))^2 = 0

(2)

PDEtools:-ConservedCurrents(pde)

[_J[theta](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi)) = -_F1(theta, psi, R(theta, psi))*(diff(R(theta, psi), psi))+Intat(-(diff(_F1(theta, psi, _a), psi)), _a = R(theta, psi))+Int(-(diff(_F3(theta, psi), psi)), theta)+_F4(psi), _J[psi](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi)) = _F1(theta, psi, R(theta, psi))*(diff(R(theta, psi), theta))+Intat(diff(_F1(theta, psi, _a), theta), _a = R(theta, psi))+_F3(theta, psi)]

(3)

Verify this result

PDEtools:-ConservedCurrentTest([_J[theta](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi)) = -_F1(theta, psi, R(theta, psi))*(diff(R(theta, psi), psi))+Intat(-(diff(_F1(theta, psi, _a), psi)), _a = R(theta, psi))+Int(-(diff(_F3(theta, psi), psi)), theta)+_F4(psi), _J[psi](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi)) = _F1(theta, psi, R(theta, psi))*(diff(R(theta, psi), theta))+Intat(diff(_F1(theta, psi, _a), theta), _a = R(theta, psi))+_F3(theta, psi)], pde)

{0}

(4)

Note that in this problem (2) the PDE system consists of a single equation and the unknowns are not specified in the input that

results in (3), so that the three functions R(theta, psi), f(theta, psi), and chi(theta, psi) are considered unknowns. Still, because the system

consists of a single PDE, the dependency of the conserved current depends on the derivaties of only one of the unknowns,

and the system preferred R(theta, psi), so only derivatives of R(theta, psi) are found in the dependency of _J. To override this default

behavior and have the conserved currents depending on derivatives of the three unknowns when the system involves less than

three equations, indicate the dependency as follows (see details in the help page for PDEtools:-ConservedCurrents )

Q := theta, psi, R, chi, f, R[theta], R[psi], f[theta], f[psi], chi[theta], chi[psi]

theta, psi, R, chi, f, R[theta], R[psi], f[theta], f[psi], chi[theta], chi[psi]

(5)

PDEtools:-ConservedCurrents(pde, _J = F(Q))

[_J[theta](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi), diff(f(theta, psi), theta), diff(f(theta, psi), psi), diff(chi(theta, psi), theta), diff(chi(theta, psi), psi)) = -_F3(theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi))*(diff(R(theta, psi), psi))-(Intat((D[4](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+_F6(theta, psi, chi(theta, psi), f(theta, psi)))*(diff(chi(theta, psi), psi))-(Intat((D[5](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+Intat((D[4](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+_F7(theta, psi, f(theta, psi)))*(diff(f(theta, psi), psi))+Intat(-(D[2](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+Intat(-(D[2](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+Intat(-(diff(_F7(theta, psi, _a), psi)), _a = f(theta, psi))+Intat((diff(f(theta, psi), psi))*f[_w]*Intat((D[4, 4](_F6))(_w, psi, _g, f(theta, psi)), _g = chi(theta, psi))+(diff(chi(theta, psi), psi))*chi[_w]*Intat((D[4, 4](_F3))(_w, psi, _q, chi(theta, psi), f(theta, psi)), _q = R(theta, psi))+(diff(f(theta, psi), psi))*f[_w]*Intat((D[5, 5](_F3))(_w, psi, _n, chi(theta, psi), f(theta, psi)), _n = R(theta, psi))+(diff(chi(theta, psi), psi))*f[_w]*Intat((D[4, 5](_F3))(_w, psi, _p, chi(theta, psi), f(theta, psi)), _p = R(theta, psi))+chi[_w]*(diff(f(theta, psi), psi))*Intat((D[4, 5](_F3))(_w, psi, _p, chi(theta, psi), f(theta, psi)), _p = R(theta, psi))+(diff(f(theta, psi), psi))*Intat((D[1, 4](_F6))(_w, psi, _f, f(theta, psi)), _f = chi(theta, psi))-Intat((D[4, 4](_F6))(_w, psi, _s, f(theta, psi))*f[_w]+(D[1, 4](_F6))(_w, psi, _s, f(theta, psi)), _s = chi(theta, psi))*(diff(f(theta, psi), psi))+(diff(chi(theta, psi), psi))*Intat((D[1, 4](_F3))(_w, psi, _o, chi(theta, psi), f(theta, psi)), _o = R(theta, psi))-Intat((D[4, 4](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi))*chi[_w]+(D[4, 5](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 4](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi)), _v = R(theta, psi))*(diff(chi(theta, psi), psi))+chi[_w]*Intat((D[2, 4](_F3))(_w, psi, _k, chi(theta, psi), f(theta, psi)), _k = R(theta, psi))+f[_w]*Intat((D[2, 5](_F3))(_w, psi, _j, chi(theta, psi), f(theta, psi)), _j = R(theta, psi))+f[_w]*Intat((D[2, 4](_F6))(_w, psi, _b, f(theta, psi)), _b = chi(theta, psi))+(diff(f(theta, psi), psi))*Intat((D[1, 5](_F3))(_w, psi, _m, chi(theta, psi), f(theta, psi)), _m = R(theta, psi))-Intat((D[4, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi))*chi[_w]+(D[5, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi)), _u = R(theta, psi))*(diff(f(theta, psi), psi))-(diff(_F9(_w, psi), psi))-Intat((D[2, 4](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi))*chi[_w]+(D[2, 5](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 2](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi)), _t = R(theta, psi))-Intat((D[2, 4](_F6))(_w, psi, _r, f(theta, psi))*f[_w]+(D[1, 2](_F6))(_w, psi, _r, f(theta, psi)), _r = chi(theta, psi))+Intat((D[1, 2](_F3))(_w, psi, _h, chi(theta, psi), f(theta, psi)), _h = R(theta, psi))+Intat((D[1, 2](_F6))(_w, psi, _a, f(theta, psi)), _a = chi(theta, psi)), _w = theta)+_F10(psi), _J[psi](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi), diff(f(theta, psi), theta), diff(f(theta, psi), psi), diff(chi(theta, psi), theta), diff(chi(theta, psi), psi)) = _F3(theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi))*(diff(R(theta, psi), theta))+Intat((D[4](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi))*(diff(chi(theta, psi), theta))+(D[5](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi))*(diff(f(theta, psi), theta))+(D[1](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+_F6(theta, psi, chi(theta, psi), f(theta, psi))*(diff(chi(theta, psi), theta))+Intat((D[4](_F6))(theta, psi, _a, f(theta, psi))*(diff(f(theta, psi), theta))+(D[1](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+_F7(theta, psi, f(theta, psi))*(diff(f(theta, psi), theta))+Intat(diff(_F7(theta, psi, _a), theta), _a = f(theta, psi))+_F9(theta, psi)]

(6)

Verify this result

PDEtools:-ConservedCurrentTest([_J[theta](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi), diff(f(theta, psi), theta), diff(f(theta, psi), psi), diff(chi(theta, psi), theta), diff(chi(theta, psi), psi)) = -_F3(theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi))*(diff(R(theta, psi), psi))-(Intat((D[4](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+_F6(theta, psi, chi(theta, psi), f(theta, psi)))*(diff(chi(theta, psi), psi))-(Intat((D[5](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+Intat((D[4](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+_F7(theta, psi, f(theta, psi)))*(diff(f(theta, psi), psi))+Intat(-(D[2](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+Intat(-(D[2](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+Intat(-(diff(_F7(theta, psi, _a), psi)), _a = f(theta, psi))+Intat((diff(f(theta, psi), psi))*f[_w]*Intat((D[4, 4](_F6))(_w, psi, _g, f(theta, psi)), _g = chi(theta, psi))+(diff(chi(theta, psi), psi))*chi[_w]*Intat((D[4, 4](_F3))(_w, psi, _q, chi(theta, psi), f(theta, psi)), _q = R(theta, psi))+(diff(f(theta, psi), psi))*f[_w]*Intat((D[5, 5](_F3))(_w, psi, _n, chi(theta, psi), f(theta, psi)), _n = R(theta, psi))+(diff(chi(theta, psi), psi))*f[_w]*Intat((D[4, 5](_F3))(_w, psi, _p, chi(theta, psi), f(theta, psi)), _p = R(theta, psi))+chi[_w]*(diff(f(theta, psi), psi))*Intat((D[4, 5](_F3))(_w, psi, _p, chi(theta, psi), f(theta, psi)), _p = R(theta, psi))+(diff(f(theta, psi), psi))*Intat((D[1, 4](_F6))(_w, psi, _f, f(theta, psi)), _f = chi(theta, psi))-Intat((D[4, 4](_F6))(_w, psi, _s, f(theta, psi))*f[_w]+(D[1, 4](_F6))(_w, psi, _s, f(theta, psi)), _s = chi(theta, psi))*(diff(f(theta, psi), psi))+(diff(chi(theta, psi), psi))*Intat((D[1, 4](_F3))(_w, psi, _o, chi(theta, psi), f(theta, psi)), _o = R(theta, psi))-Intat((D[4, 4](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi))*chi[_w]+(D[4, 5](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 4](_F3))(_w, psi, _v, chi(theta, psi), f(theta, psi)), _v = R(theta, psi))*(diff(chi(theta, psi), psi))+chi[_w]*Intat((D[2, 4](_F3))(_w, psi, _k, chi(theta, psi), f(theta, psi)), _k = R(theta, psi))+f[_w]*Intat((D[2, 5](_F3))(_w, psi, _j, chi(theta, psi), f(theta, psi)), _j = R(theta, psi))+f[_w]*Intat((D[2, 4](_F6))(_w, psi, _b, f(theta, psi)), _b = chi(theta, psi))+(diff(f(theta, psi), psi))*Intat((D[1, 5](_F3))(_w, psi, _m, chi(theta, psi), f(theta, psi)), _m = R(theta, psi))-Intat((D[4, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi))*chi[_w]+(D[5, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 5](_F3))(_w, psi, _u, chi(theta, psi), f(theta, psi)), _u = R(theta, psi))*(diff(f(theta, psi), psi))-(diff(_F9(_w, psi), psi))-Intat((D[2, 4](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi))*chi[_w]+(D[2, 5](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi))*f[_w]+(D[1, 2](_F3))(_w, psi, _t, chi(theta, psi), f(theta, psi)), _t = R(theta, psi))-Intat((D[2, 4](_F6))(_w, psi, _r, f(theta, psi))*f[_w]+(D[1, 2](_F6))(_w, psi, _r, f(theta, psi)), _r = chi(theta, psi))+Intat((D[1, 2](_F3))(_w, psi, _h, chi(theta, psi), f(theta, psi)), _h = R(theta, psi))+Intat((D[1, 2](_F6))(_w, psi, _a, f(theta, psi)), _a = chi(theta, psi)), _w = theta)+_F10(psi), _J[psi](theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi), diff(R(theta, psi), theta), diff(R(theta, psi), psi), diff(f(theta, psi), theta), diff(f(theta, psi), psi), diff(chi(theta, psi), theta), diff(chi(theta, psi), psi)) = _F3(theta, psi, R(theta, psi), chi(theta, psi), f(theta, psi))*(diff(R(theta, psi), theta))+Intat((D[4](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi))*(diff(chi(theta, psi), theta))+(D[5](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi))*(diff(f(theta, psi), theta))+(D[1](_F3))(theta, psi, _a, chi(theta, psi), f(theta, psi)), _a = R(theta, psi))+_F6(theta, psi, chi(theta, psi), f(theta, psi))*(diff(chi(theta, psi), theta))+Intat((D[4](_F6))(theta, psi, _a, f(theta, psi))*(diff(f(theta, psi), theta))+(D[1](_F6))(theta, psi, _a, f(theta, psi)), _a = chi(theta, psi))+_F7(theta, psi, f(theta, psi))*(diff(f(theta, psi), theta))+Intat(diff(_F7(theta, psi, _a), theta), _a = f(theta, psi))+_F9(theta, psi)], pde)

{0}

(7)

To have this ouput in jet variables notation, so with the functions R(theta, psi), f(theta, psi), and chi(theta, psi) that enter the functionality of

 _J being represented by their names and their derivatives by their names indexed, use the option jetnotation = jetvariables

PDEtools:-ConservedCurrents(pde, _J = F(Q), jetnotation = jetvariables)

[_J[theta](theta, psi, R, chi, f, R[theta], R[psi], f[theta], f[psi], chi[theta], chi[psi]) = -_F3(theta, psi, R, chi, f)*R[psi]-(Int(diff(_F3(theta, psi, R, chi, f), chi), R)+_F6(theta, psi, chi, f))*chi[psi]-(Int(diff(_F3(theta, psi, R, chi, f), f), R)+Int(diff(_F6(theta, psi, chi, f), f), chi)+_F7(theta, psi, f))*f[psi]+Int(-(diff(_F3(theta, psi, R, chi, f), psi)), R)+Int(-(diff(_F6(theta, psi, chi, f), psi)), chi)+Int(-(diff(_F7(theta, psi, f), psi)), f)+Int(f[psi]*f[theta]*(Int(diff(diff(_F6(theta, psi, chi, f), f), f), chi))+chi[psi]*chi[theta]*(Int(diff(diff(_F3(theta, psi, R, chi, f), chi), chi), R))+f[psi]*f[theta]*(Int(diff(diff(_F3(theta, psi, R, chi, f), f), f), R))+chi[psi]*f[theta]*(Int(diff(diff(_F3(theta, psi, R, chi, f), chi), f), R))+chi[theta]*f[psi]*(Int(diff(diff(_F3(theta, psi, R, chi, f), chi), f), R))+f[psi]*(Int(diff(diff(_F6(theta, psi, chi, f), f), theta), chi))-(Int((diff(diff(_F6(theta, psi, chi, f), f), f))*f[theta]+diff(diff(_F6(theta, psi, chi, f), f), theta), chi))*f[psi]+chi[psi]*(Int(diff(diff(_F3(theta, psi, R, chi, f), chi), theta), R))-(Int((diff(diff(_F3(theta, psi, R, chi, f), chi), chi))*chi[theta]+(diff(diff(_F3(theta, psi, R, chi, f), chi), f))*f[theta]+diff(diff(_F3(theta, psi, R, chi, f), chi), theta), R))*chi[psi]+chi[theta]*(Int(diff(diff(_F3(theta, psi, R, chi, f), chi), psi), R))+f[theta]*(Int(diff(diff(_F3(theta, psi, R, chi, f), f), psi), R))+f[theta]*(Int(diff(diff(_F6(theta, psi, chi, f), f), psi), chi))+f[psi]*(Int(diff(diff(_F3(theta, psi, R, chi, f), f), theta), R))-(Int((diff(diff(_F3(theta, psi, R, chi, f), chi), f))*chi[theta]+(diff(diff(_F3(theta, psi, R, chi, f), f), f))*f[theta]+diff(diff(_F3(theta, psi, R, chi, f), f), theta), R))*f[psi]-(diff(_F9(theta, psi), psi))-(Int((diff(diff(_F3(theta, psi, R, chi, f), chi), psi))*chi[theta]+(diff(diff(_F3(theta, psi, R, chi, f), f), psi))*f[theta]+diff(diff(_F3(theta, psi, R, chi, f), psi), theta), R))-(Int((diff(diff(_F6(theta, psi, chi, f), f), psi))*f[theta]+diff(diff(_F6(theta, psi, chi, f), psi), theta), chi))+Int(diff(diff(_F3(theta, psi, R, chi, f), psi), theta), R)+Int(diff(diff(_F6(theta, psi, chi, f), psi), theta), chi), theta)+_F10(psi), _J[psi](theta, psi, R, chi, f, R[theta], R[psi], f[theta], f[psi], chi[theta], chi[psi]) = _F3(theta, psi, R, chi, f)*R[theta]+Int((diff(_F3(theta, psi, R, chi, f), chi))*chi[theta]+(diff(_F3(theta, psi, R, chi, f), f))*f[theta]+diff(_F3(theta, psi, R, chi, f), theta), R)+_F6(theta, psi, chi, f)*chi[theta]+Int((diff(_F6(theta, psi, chi, f), f))*f[theta]+diff(_F6(theta, psi, chi, f), theta), chi)+_F7(theta, psi, f)*f[theta]+Int(diff(_F7(theta, psi, f), theta), f)+_F9(theta, psi)]

(8)

NULL

``


Download DeterminingPDE.mw

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

Hi

Besides Carl's answer, if you load the Physics package, the derivatives of all the six complex components abs, argument conjugate, Im, Re, and signum get automatically redefined so that they return unevaluated, i.e. as entered, instead of the result you show in terms of derivatives of abs.

Another alternative: turn ON Wirtinger calculus by entering

> with(Physics, diff): Physics:-Setup(usewirtingerderivatives = true);

and next you can compute with z and conjugate(z) in equal footing, i.e. the derivative of any of them with respect to the other one is 0, and with that all the derivatives of the six complex components become computable, do not return unevaluated, as entered, anymore.

All this is advertised in the help page ?updates,Maple18,Physics under "New Enhanced Modes in Physics Setup".

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


This is the input of your worksheet:

with(Physics):

Look closer: you type mr, not m*r. Hence for the computer you metric depends on the symbol mr, not on the coordinate r.

One way of verifying this problem without being 'by eye' is to get the indeterminates of type symbol, as in

indets(g_[], symbol)

{m, mr, w}

(1)

Correcting this problem (just open a space between m and r) the Ricci scalar is not 0

Setup(metri = dt^2+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(8, w), 1/m^2), sinh(Physics:-`*`(Physics:-`*`(m, r), 1/2))^2), dphi), dt)-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4, 1/m^2), sinh(Physics:-`*`(Physics:-`*`(m, r), 1/2))^4), coth(Physics:-`*`(Physics:-`*`(m, r), 1/2))^2-Physics:-`*`(Physics:-`*`(4, w^2), 1/m^2)), dphi^2)-dr^2-dz^2, quiet):

indets(g_[], symbol)

{m, r, w}

(2)

Ricci[scalar]

2*m^2-2*w^2

(3)

NULL


Download metric_(reviewed).mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft


Hi Gerard

Understanding that you are talking about Poisson's brackets and that your canonical variables are

q, p := [x, y], [u, v]

you can define the procedure directly, as in

PoissonBracket := proc (f, g) options operator, arrow; add((diff(f, q[j]))*(diff(g, p[j]))-(diff(f, p[j]))*(diff(g, q[j])), j = 1 .. 2) end proc

proc (f, g) options operator, arrow; add((diff(f, q[j]))*(diff(g, p[j]))-(diff(f, p[j]))*(diff(g, q[j])), j = 1 .. 2) end proc

(1)

These are your functions

f := proc (x, y, u, v) options operator, arrow; x*u+y*v end proc

g := proc (x, y, u, v) options operator, arrow; x*y^2+v^3 end proc

And this is their Poisson bracket

Q := op(q), op(p)

x, y, u, v

(2)

PoissonBracket(f(Q), g(Q))

3*v^3-3*x*y^2

(3)

Detail: in Maple you have two commands to perform addition: add and sum; their differences are explained in the

corresponding help pages but basically add adds terms one at a time while sum uses symbolic methods to perform

for instance infinite sums. Although in PoissonBracket you do not need something like sum, if you use it, for historical

reasons you have a problem known as 'premature evaluation': the derivatives are evaluated before the summation index

has a value, thus returning 0 (which is of course incorrect in this context). In situations like this one you can still use

sum if you use it with the more modern handling of arguments that comes with the Physics package and is free from

premature evaluation problems. You turn that ON entering

Physics:-Setup(redefinesum = true)

[redefinesum = true]

(4)

PoissonBracket := proc (f, g) options operator, arrow; sum((diff(f, q[j]))*(diff(g, p[j]))-(diff(f, p[j]))*(diff(g, q[j])), j = 1 .. 2) end proc

proc (f, g) options operator, arrow; sum((diff(f, q[j]))*(diff(g, p[j]))-(diff(f, p[j]))*(diff(g, q[j])), j = 1 .. 2) end proc

(5)

PoissonBracket(f(Q), g(Q))

3*v^3-3*x*y^2

(6)

NULL


Download PoissonBrackets.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft


Hi

Besides the thorough DifferentialGeometry package mentioned by Torre, you can also use the Physics package, simpler to use in cases like yours.

 

Set the dimension, coordinates and metric as said in your post

with(Physics); Setup(dimension = 2, coordinates = (X = [theta, phi]), metric = Physics:-`^`(dtheta, 2)+Physics:-`*`(Physics:-`^`(sin(theta), 2), Physics:-`^`(dphi, 2)), quiet)

This is the contracted Riemann: you can multiply and simplify in one step using the `.` operator instead of `*`, as in

Riemann[alpha, beta, mu, nu].Riemann[alpha, beta, mu, nu]

4

(1)

To compute the Riemann and Ricci tensor components, just indicate these components giving numerical values to the indices. For example, R_φθφθ is

"'Riemann[~2,1,~2,1]' = Riemann[~2,1,~2,1]"

Physics:-Riemann[`~2`, 1, `~2`, 1] = 1/sin(theta)^2

(2)

"Ricci[~2,~2]"

1/sin(theta)^2

(3)

You can also see all the components at once. For example, this shortcut notation shows you the all-covariant Ricci components:

Ricci[]

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

(4)

Details

 

Sometimes it is preferred to keep the algebraic expression and only simplify at a later moment. For that, in (1) use `*` instead of `.`, or directly use `^` and the contracted product is automatically built

Riemann[alpha, beta, mu, nu]^2

Physics:-Riemann[alpha, beta, mu, nu]*Physics:-Riemann[`~alpha`, `~beta`, `~mu`, `~nu`]

(1.1)

Simplify(Physics[Riemann][alpha, beta, mu, nu]*Physics[Riemann][`~alpha`, `~beta`, `~mu`, `~nu`])

4

(1.2)

You can also always perform the summation over repeated indices via

SumOverRepeatedIndices(Physics[Riemann][alpha, beta, mu, nu]*Physics[Riemann][`~alpha`, `~beta`, `~mu`, `~nu`])

4

(1.3)

To see the all-contravariant, specify your indices as contravariant and add the keyword matrix, as in Ricci[~mu, ~nu, matrix] (this syntax also works with covariant mu, nu indices). For the mixed case use for instance Ricci[mu, ~nu, matrix], and in all cases indexing with numbers works the same way. The same applies to all the general relativity tensors (g_, Christoffel, Ricci, Einstein, Riemann, Weyl), and whenever you have only 2 indices free you will see a matrix on the screen, as in

 

Christoffel[2, alpha, beta, matrix]

Physics:-Christoffel[2, alpha, beta] = Matrix(%id = 18446744078236793182)

(1.4)

"Christoffel[~2,alpha,beta,matrix]"

Physics:-Christoffel[`~2`, alpha, beta] = Matrix(%id = 18446744078236789086)

(1.5)

If there are more than 2 free indices you will receive an Array (cannot be display in 2D, but you can still get all the Array components using ArrayElems )

 

For the general case of the Schwarzschild metric shown by Torre, you can enter the coordinates and metric using the same procedure indicated above. But this metric is well know and already present in the database of metrics, so it is simpler to use it directly from there. For details on how to access the database and set the metric as shown in the next line see the help page for the metric g_

Setup(dimension = 4, quiet); g_[sc]

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

 

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

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = (r-2*m)/r}))

(5)

The contraction of the Riemann tensor mentioned

Riemann[alpha, beta, mu, nu].Riemann[alpha, beta, mu, nu]

48*m^2/r^6

(6)

Details

 

The Ricci components are zero

Ricci[]

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

(2.1)

The components of GAMMA[`~2`, alpha, beta]

"Christoffel[~2,alpha,beta,matrix]"

Physics:-Christoffel[`~2`, alpha, beta] = Matrix(%id = 18446744078247187510)

(2.2)

"Christoffel[~2,3,3]"

-sin(theta)*cos(theta)

(2.3)

NULL


Download RiemannTensor.mw

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

@shingy@Carl Love 

Carl is correct. In addition: your equ has r^beta, which makes difficult the differential elimination process (equivalent to a triangularization towards decoupling the PDE system and simplifying it taking into account integrability conditions). So, I didn't wait to see if it returns in reasonable time without using the option integrabilityconditions= false but it returns right-away with this option.

So here are some more details on your problem, including the actual form of the symmetry (not just of the determining PDE system for it) and actual invariant solutions for equ derived directly from these symmetries (although involving an unsolved 2nd order linear ODE that requires specializing beta to get solved to-the-end)

Use this to simplify in significant ways the display of formulas - note that derivatives will then be displayed indexed.

PDEtools:-declare(V(t, r, S), (_xi, _eta)(t, r, S, V), _Y(r))

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

 

_xi(t, r, S, V)*`will now be displayed as`*_xi

 

_eta(t, r, S, V)*`will now be displayed as`*_eta

 

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

(1)

equ := diff(V(t, r, S), t)+(1/2)*sigma^2*S^2*(diff(V(t, r, S), S, S))+S*(diff(V(t, r, S), S))-r*V(t, r, S)+(1/2)*Sigma^2*(r^beta)^2*(diff(V(t, r, S), r, r))+(a-`κr`-`λΣ`*r^beta)*(diff(V(t, r, S), r)) = 0

diff(V(t, r, S), t)+(1/2)*sigma^2*S^2*(diff(diff(V(t, r, S), S), S))+S*(diff(V(t, r, S), S))-r*V(t, r, S)+(1/2)*Sigma^2*(r^beta)^2*(diff(diff(V(t, r, S), r), r))+(a-`κr`-`λΣ`*r^beta)*(diff(V(t, r, S), r)) = 0

(2)

The Determining PDE, without using integrability conditions to avoid a difficult differential elimination process involving symbolic powers of r

PDEtools:-DeterminingPDE(equ, integrabilityconditions = false)

{(S*(diff(_xi[r](t, r, S, V), r))-S*(diff(_xi[S](t, r, S, V), S))+_xi[S](t, r, S, V))*r^(1+2*beta)-beta*r^(2*beta)*_xi[r](t, r, S, V)*S, (diff(diff(_xi[t](t, r, S, V), S), V))*S^2*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), -2*r^(1+2*beta)*(diff(_xi[S](t, r, S, V), r))*S*Sigma^2-2*(diff(_xi[r](t, r, S, V), S))*r*S^3*sigma^2, diff(diff(_xi[r](t, r, S, V), V), r)-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), V), r))*Sigma^2+(diff(diff(_xi[r](t, r, S, V), S), V))*S^2*r*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[S](t, r, S, V), V)), (diff(diff(_xi[S](t, r, S, V), S), V))*S*sigma^2-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V))*S*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), r^(1+2*beta)*(diff(diff(_eta[V](t, r, S, V), r), r))*S*Sigma^2+S^3*r*(diff(diff(_eta[V](t, r, S, V), S), S))*sigma^2-2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_eta[V](t, r, S, V), r))+2*(S*r*V*(diff(_eta[V](t, r, S, V), V))+S^2*(diff(_eta[V](t, r, S, V), S))+S*(diff(_eta[V](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))*r*V-S*r*_eta[V](t, r, S, V)-V*(S*_xi[r](t, r, S, V)-2*_xi[S](t, r, S, V)*r))*r, -(diff(diff(_xi[t](t, r, S, V), r), r))*r^(1+2*beta)*S*Sigma^2-S^3*r*(diff(diff(_xi[t](t, r, S, V), S), S))*sigma^2+2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[t](t, r, S, V), r))-2*r*(S*(diff(_xi[t](t, r, S, V), V))*V*r+S^2*(diff(_xi[t](t, r, S, V), S))+S*(diff(_xi[t](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))+2*_xi[S](t, r, S, V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), r), r))*Sigma^2-2*(diff(diff(_eta[V](t, r, S, V), S), V))*S^2*r*sigma^2+(diff(diff(_xi[S](t, r, S, V), S), S))*S^2*r*sigma^2+(-2*`λΣ`*r^(1+beta)+2*r*(a-`κr`))*(diff(_xi[S](t, r, S, V), r))-2*r*(-3*(diff(_xi[S](t, r, S, V), V))*V*r+S*(diff(_xi[S](t, r, S, V), S))-_xi[S](t, r, S, V)-(diff(_xi[S](t, r, S, V), t))), -S*Sigma^2*(diff(diff(_xi[r](t, r, S, V), r), r)-2*(diff(diff(_eta[V](t, r, S, V), V), r)))*r^(1+2*beta)-r*(diff(diff(_xi[r](t, r, S, V), S), S))*S^3*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[r](t, r, S, V), r))-4*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[S](t, r, S, V), S))-2*(diff(_xi[r](t, r, S, V), V))*V*r^2*S-2*(diff(_xi[r](t, r, S, V), S))*r*S^2-2*(diff(_xi[r](t, r, S, V), t))*r*S+4*_xi[S](t, r, S, V)*`λΣ`*r^(1+beta)-4*r*(a-`κr`)*_xi[S](t, r, S, V)-2*beta*`λΣ`*r^beta*_xi[r](t, r, S, V)*S, diff(diff(_xi[S](t, r, S, V), V), V), diff(diff(_xi[r](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), r), diff(_xi[S](t, r, S, V), V), diff(_xi[r](t, r, S, V), V), diff(_xi[t](t, r, S, V), S), diff(_xi[t](t, r, S, V), V), diff(_xi[t](t, r, S, V), r)}

(3)

Try now processing this taking beta as an independent variable, that simplifies the problem significantly

PDEtools:-casesplit({(S*(diff(_xi[r](t, r, S, V), r))-S*(diff(_xi[S](t, r, S, V), S))+_xi[S](t, r, S, V))*r^(1+2*beta)-beta*r^(2*beta)*_xi[r](t, r, S, V)*S, (diff(diff(_xi[t](t, r, S, V), S), V))*S^2*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), -2*r^(1+2*beta)*(diff(_xi[S](t, r, S, V), r))*S*Sigma^2-2*(diff(_xi[r](t, r, S, V), S))*r*S^3*sigma^2, diff(diff(_xi[r](t, r, S, V), V), r)-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), V), r))*Sigma^2+(diff(diff(_xi[r](t, r, S, V), S), V))*S^2*r*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[S](t, r, S, V), V)), (diff(diff(_xi[S](t, r, S, V), S), V))*S*sigma^2-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V))*S*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), r^(1+2*beta)*(diff(diff(_eta[V](t, r, S, V), r), r))*S*Sigma^2+S^3*r*(diff(diff(_eta[V](t, r, S, V), S), S))*sigma^2-2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_eta[V](t, r, S, V), r))+2*(S*r*V*(diff(_eta[V](t, r, S, V), V))+S^2*(diff(_eta[V](t, r, S, V), S))+S*(diff(_eta[V](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))*r*V-S*r*_eta[V](t, r, S, V)-V*(S*_xi[r](t, r, S, V)-2*_xi[S](t, r, S, V)*r))*r, -(diff(diff(_xi[t](t, r, S, V), r), r))*r^(1+2*beta)*S*Sigma^2-S^3*r*(diff(diff(_xi[t](t, r, S, V), S), S))*sigma^2+2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[t](t, r, S, V), r))-2*r*(S*(diff(_xi[t](t, r, S, V), V))*V*r+S^2*(diff(_xi[t](t, r, S, V), S))+S*(diff(_xi[t](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))+2*_xi[S](t, r, S, V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), r), r))*Sigma^2-2*(diff(diff(_eta[V](t, r, S, V), S), V))*S^2*r*sigma^2+(diff(diff(_xi[S](t, r, S, V), S), S))*S^2*r*sigma^2+(-2*`λΣ`*r^(1+beta)+2*r*(a-`κr`))*(diff(_xi[S](t, r, S, V), r))-2*r*(-3*(diff(_xi[S](t, r, S, V), V))*V*r+S*(diff(_xi[S](t, r, S, V), S))-_xi[S](t, r, S, V)-(diff(_xi[S](t, r, S, V), t))), -S*Sigma^2*(diff(diff(_xi[r](t, r, S, V), r), r)-2*(diff(diff(_eta[V](t, r, S, V), V), r)))*r^(1+2*beta)-r*(diff(diff(_xi[r](t, r, S, V), S), S))*S^3*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[r](t, r, S, V), r))-4*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[S](t, r, S, V), S))-2*(diff(_xi[r](t, r, S, V), V))*V*r^2*S-2*(diff(_xi[r](t, r, S, V), S))*r*S^2-2*(diff(_xi[r](t, r, S, V), t))*r*S+4*_xi[S](t, r, S, V)*`λΣ`*r^(1+beta)-4*r*(a-`κr`)*_xi[S](t, r, S, V)-2*beta*`λΣ`*r^beta*_xi[r](t, r, S, V)*S, diff(diff(_xi[S](t, r, S, V), V), V), diff(diff(_xi[r](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), r), diff(_xi[S](t, r, S, V), V), diff(_xi[r](t, r, S, V), V), diff(_xi[t](t, r, S, V), S), diff(_xi[t](t, r, S, V), V), diff(_xi[t](t, r, S, V), r)}, ivars = [t, r, S, V, beta])

`casesplit/ans`([diff(_eta[V](t, r, S, V), t) = (1/2)*((diff(_xi[S](t, r, S, V), t))*V*sigma^2-2*(diff(_xi[S](t, r, S, V), t))*V)/(sigma^2*S), diff(_eta[V](t, r, S, V), r) = 0, diff(_eta[V](t, r, S, V), S) = (diff(_xi[S](t, r, S, V), t))*V/(sigma^2*S^2), diff(_eta[V](t, r, S, V), V) = _eta[V](t, r, S, V)/V, diff(diff(_xi[S](t, r, S, V), t), t) = 0, diff(_xi[S](t, r, S, V), r) = 0, diff(_xi[S](t, r, S, V), S) = _xi[S](t, r, S, V)/S, diff(_xi[S](t, r, S, V), V) = 0, _xi[r](t, r, S, V) = 0, diff(_xi[t](t, r, S, V), t) = 0, diff(_xi[t](t, r, S, V), r) = 0, diff(_xi[t](t, r, S, V), S) = 0, diff(_xi[t](t, r, S, V), V) = 0], [])

(4)

Solve it now to compute the infinitesimals symmety generators themselves

pdsolve(`casesplit/ans`([diff(_eta[V](t, r, S, V), t) = (1/2)*((diff(_xi[S](t, r, S, V), t))*V*sigma^2-2*(diff(_xi[S](t, r, S, V), t))*V)/(sigma^2*S), diff(_eta[V](t, r, S, V), r) = 0, diff(_eta[V](t, r, S, V), S) = (diff(_xi[S](t, r, S, V), t))*V/(sigma^2*S^2), diff(_eta[V](t, r, S, V), V) = _eta[V](t, r, S, V)/V, diff(diff(_xi[S](t, r, S, V), t), t) = 0, diff(_xi[S](t, r, S, V), r) = 0, diff(_xi[S](t, r, S, V), S) = _xi[S](t, r, S, V)/S, diff(_xi[S](t, r, S, V), V) = 0, _xi[r](t, r, S, V) = 0, diff(_xi[t](t, r, S, V), t) = 0, diff(_xi[t](t, r, S, V), r) = 0, diff(_xi[t](t, r, S, V), S) = 0, diff(_xi[t](t, r, S, V), V) = 0], []))

{_eta[V](t, r, S, V) = (1/2)*V*(2*_C1*ln(S)+(_C1*t+2*_C4)*sigma^2-2*_C1*t)/sigma^2, _xi[S](t, r, S, V) = (_C1*t+_C2)*S, _xi[r](t, r, S, V) = 0, _xi[t](t, r, S, V) = _C3}

(5)

Verify that this indeed solves the Determining system for the symmetries= (note that I test directly against (3), not the simplified form (4), that is also canceled by (5)):

pdetest({_eta[V](t, r, S, V) = (1/2)*V*(2*_C1*ln(S)+(_C1*t+2*_C4)*sigma^2-2*_C1*t)/sigma^2, _xi[S](t, r, S, V) = (_C1*t+_C2)*S, _xi[r](t, r, S, V) = 0, _xi[t](t, r, S, V) = _C3}, {(S*(diff(_xi[r](t, r, S, V), r))-S*(diff(_xi[S](t, r, S, V), S))+_xi[S](t, r, S, V))*r^(1+2*beta)-beta*r^(2*beta)*_xi[r](t, r, S, V)*S, (diff(diff(_xi[t](t, r, S, V), S), V))*S^2*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), -2*r^(1+2*beta)*(diff(_xi[S](t, r, S, V), r))*S*Sigma^2-2*(diff(_xi[r](t, r, S, V), S))*r*S^3*sigma^2, diff(diff(_xi[r](t, r, S, V), V), r)-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), V), r))*Sigma^2+(diff(diff(_xi[r](t, r, S, V), S), V))*S^2*r*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[S](t, r, S, V), V)), (diff(diff(_xi[S](t, r, S, V), S), V))*S*sigma^2-(1/2)*(diff(diff(_eta[V](t, r, S, V), V), V))*S*sigma^2-2*(diff(_xi[S](t, r, S, V), V)), r^(1+2*beta)*(diff(diff(_eta[V](t, r, S, V), r), r))*S*Sigma^2+S^3*r*(diff(diff(_eta[V](t, r, S, V), S), S))*sigma^2-2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_eta[V](t, r, S, V), r))+2*(S*r*V*(diff(_eta[V](t, r, S, V), V))+S^2*(diff(_eta[V](t, r, S, V), S))+S*(diff(_eta[V](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))*r*V-S*r*_eta[V](t, r, S, V)-V*(S*_xi[r](t, r, S, V)-2*_xi[S](t, r, S, V)*r))*r, -(diff(diff(_xi[t](t, r, S, V), r), r))*r^(1+2*beta)*S*Sigma^2-S^3*r*(diff(diff(_xi[t](t, r, S, V), S), S))*sigma^2+2*S*(`λΣ`*r^(1+beta)-r*(a-`κr`))*(diff(_xi[t](t, r, S, V), r))-2*r*(S*(diff(_xi[t](t, r, S, V), V))*V*r+S^2*(diff(_xi[t](t, r, S, V), S))+S*(diff(_xi[t](t, r, S, V), t))-2*S*(diff(_xi[S](t, r, S, V), S))+2*_xi[S](t, r, S, V)), r^(1+2*beta)*(diff(diff(_xi[S](t, r, S, V), r), r))*Sigma^2-2*(diff(diff(_eta[V](t, r, S, V), S), V))*S^2*r*sigma^2+(diff(diff(_xi[S](t, r, S, V), S), S))*S^2*r*sigma^2+(-2*`λΣ`*r^(1+beta)+2*r*(a-`κr`))*(diff(_xi[S](t, r, S, V), r))-2*r*(-3*(diff(_xi[S](t, r, S, V), V))*V*r+S*(diff(_xi[S](t, r, S, V), S))-_xi[S](t, r, S, V)-(diff(_xi[S](t, r, S, V), t))), -S*Sigma^2*(diff(diff(_xi[r](t, r, S, V), r), r)-2*(diff(diff(_eta[V](t, r, S, V), V), r)))*r^(1+2*beta)-r*(diff(diff(_xi[r](t, r, S, V), S), S))*S^3*sigma^2+2*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[r](t, r, S, V), r))-4*(`λΣ`*r^(1+beta)-r*(a-`κr`))*S*(diff(_xi[S](t, r, S, V), S))-2*(diff(_xi[r](t, r, S, V), V))*V*r^2*S-2*(diff(_xi[r](t, r, S, V), S))*r*S^2-2*(diff(_xi[r](t, r, S, V), t))*r*S+4*_xi[S](t, r, S, V)*`λΣ`*r^(1+beta)-4*r*(a-`κr`)*_xi[S](t, r, S, V)-2*beta*`λΣ`*r^beta*_xi[r](t, r, S, V)*S, diff(diff(_xi[S](t, r, S, V), V), V), diff(diff(_xi[r](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), V), diff(diff(_xi[t](t, r, S, V), V), r), diff(_xi[S](t, r, S, V), V), diff(_xi[r](t, r, S, V), V), diff(_xi[t](t, r, S, V), S), diff(_xi[t](t, r, S, V), V), diff(_xi[t](t, r, S, V), r)})

{0}

(6)

So, for an infinitesimal of this form,

[_xi[t](t, r, S, V), _xi[r](t, r, S, V), _xi[S](t, r, S, V), _eta[V](t, r, S, V)]

[_xi[t](t, r, S, V), _xi[r](t, r, S, V), _xi[S](t, r, S, V), _eta[V](t, r, S, V)]

(7)

This is a symmetry group involving three arbitrary constants

X := eval([_xi[t](t, r, S, V), _xi[r](t, r, S, V), _xi[S](t, r, S, V), _eta[V](t, r, S, V)], {_eta[V](t, r, S, V) = (1/2)*V*(2*_C1*ln(S)+(_C1*t+2*_C4)*sigma^2-2*_C1*t)/sigma^2, _xi[S](t, r, S, V) = (_C1*t+_C2)*S, _xi[r](t, r, S, V) = 0, _xi[t](t, r, S, V) = _C3})

[_C3, 0, (_C1*t+_C2)*S, (1/2)*V*(2*_C1*ln(S)+(_C1*t+2*_C4)*sigma^2-2*_C1*t)/sigma^2]

(8)

Alternatively you can also verify that this is indeed a symmetry directly against the PDE equ

PDEtools:-SymmetryTest(X, equ)

{0}

(9)

Time to compute solutions. You can do that without specializing the symmetry, arriving at a solution involving Airy functions and the solutions of a 2nd order linear ODE that the system fails to solve (you'd need to specialize beta to obtain something more concrete)

PDEtools:-InvariantSolutions(equ, HINT = X)

V(t, r, S) = DESol({(-2*r^(-2*beta+1)*_Y(r)+((2*a-2*`κr`)*(diff(_Y(r), r))-_Y(r)*_c[1])*r^(-2*beta)-2*r^(-beta)*(diff(_Y(r), r))*`λΣ`+(diff(diff(_Y(r), r), r))*Sigma^2)/Sigma^2}, {_Y(r)})*(S*exp(-(1/2)*t*(_C1*t+2*_C2)/_C3))^((1/2)*(_C8*sigma^2+2*_C7-2*_C8)/(sigma^2*_C8))*(AiryAi((1/8)*2^(1/3)*(-8*ln(S*exp(-(1/2)*t*(_C1*t+2*_C2)/_C3))*_C6*_C8+(4+sigma^4+(-4*_c[1]-4)*sigma^2)*_C8^2+((4*_C7-8*_C9)*sigma^2-8*_C7)*_C8+4*_C7^2)*(_C6/(_C8*sigma^4))^(1/3)/(_C6*_C8))*_C10+AiryBi((1/8)*2^(1/3)*(-8*ln(S*exp(-(1/2)*t*(_C1*t+2*_C2)/_C3))*_C6*_C8+(4+sigma^4+(-4*_c[1]-4)*sigma^2)*_C8^2+((4*_C7-8*_C9)*sigma^2-8*_C7)*_C8+4*_C7^2)*(_C6/(_C8*sigma^4))^(1/3)/(_C6*_C8))*_C5)/(exp((1/3)*t*(_C1^2*t^2+(3/2)*_C1*(-(1/2)*sigma^2*_C3+_C2+_C3)*t-3*_C3*_C4*sigma^2)/(_C3^2*sigma^2))*S^(-_C1*t/(_C3*sigma^2)))

(10)

Typically (not in this case), specializing the symmetry helps, and for this purpose you can use the PDEtools:-Library:- Specialize_Cn command  (see ? PDEtools:-Library )

Y := PDEtools:-Library:-Specialize_Cn(X)

[0, 0, t*S, (1/2)*V*(2*ln(S)+t*sigma^2-2*t)/sigma^2], [0, 0, S, 0], [1, 0, 0, 0], [0, 0, 0, V]

(11)

Verify these symmetries

map(PDEtools:-SymmetryTest, [[0, 0, t*S, (1/2)*V*(2*ln(S)+t*sigma^2-2*t)/sigma^2], [0, 0, S, 0], [1, 0, 0, 0], [0, 0, 0, V]], equ)

[{0}, {0}, {0}, {0}]

(12)

You can now use each of these to generate different kinds of invariant solutions, although as said in this example all of them lead to solutions to equ that depend on the solution of a 2nd order linear ODE that the system fails to solve (you'd need to specialize beta to arrive somewhere more concrete). For example:

PDEtools:-InvariantSolutions(equ, HINT = Y[1])

V(t, r, S) = _C1*exp((1/2)*_c[1]*t)*DESol({(1/4)*(-8*r^(-2*beta+1)*_Y(r)*sigma^2+(8*sigma^2*(a-`κr`)*(diff(_Y(r), r))-(4+sigma^4+(-4*_c[1]-4)*sigma^2)*_Y(r))*r^(-2*beta)-8*(diff(_Y(r), r))*r^(-beta)*sigma^2*`λΣ`+4*(diff(diff(_Y(r), r), r))*Sigma^2*sigma^2)/(Sigma^2*sigma^2)}, {_Y(r)})/(t^(1/2)*S^(-(1/2)*(sigma^2-2)/sigma^2)*exp(-(1/2)*ln(S)^2/(t*sigma^2)))

(13)

PDEtools:-InvariantSolutions(equ, HINT = Y[2])

V(t, r, S) = _C1*exp(_c[1]*t)*DESol({(-2*r^(-2*beta+1)*_Y(r)+((2*a-2*`κr`)*(diff(_Y(r), r))+2*_Y(r)*_c[1])*r^(-2*beta)-2*r^(-beta)*(diff(_Y(r), r))*`λΣ`+(diff(diff(_Y(r), r), r))*Sigma^2)/Sigma^2}, {_Y(r)})

(14)

PDEtools:-InvariantSolutions(equ, HINT = Y[3])

V(t, r, S) = S^(1/2)*DESol({(-2*r^(-2*beta+1)*_Y(r)+((2*a-2*`κr`)*(diff(_Y(r), r))-_Y(r)*_c[1])*r^(-2*beta)-2*r^(-beta)*(diff(_Y(r), r))*`λΣ`+(diff(diff(_Y(r), r), r))*Sigma^2)/Sigma^2}, {_Y(r)})*(S^((1/2)*(-2+(4+sigma^4+(-4*_c[1]-4)*sigma^2)^(1/2))/sigma^2)*_C1+S^(-(1/2)*(2+(4+sigma^4+(-4*_c[1]-4)*sigma^2)^(1/2))/sigma^2)*_C2)

(15)

"And no invariant solution is at reach for Y[4]."

 

You can also play around directly with the options of InvariantSolutions. For example,

PDEtools:-InvariantSolutions(equ, degreeofinfinitesimals = 1)

V(t, r, S) = DESol({(-2*r^(-2*beta+1)*_Y(r)+2*(diff(_Y(r), r))*(a-`κr`)*r^(-2*beta)-2*r^(-beta)*(diff(_Y(r), r))*`λΣ`+(diff(diff(_Y(r), r), r))*Sigma^2)/Sigma^2}, {_Y(r)})*_C1

(16)

pdetest(%, equ)

0

(17)

But in this example I think it is improbable that you will obtain an actual solution to equ without specializing the constants.


Download Equ_InvariantSolutions.mw

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

Hi
The conversion network for mathematical functions in Maple is wonderful/powerful. You can take advantage of it for this problem. Besides Carl's solution, you can also try directly a conversion to elementary form, for instance via

> conert(...<you hypergeometric expression here> ... , elementary)

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

The PDEtools package has a complete set of commands for computing symmetries of partial differential equations or systems of them (31 commands). The determinant system for the symmetries are computed using PDEtools:-DeterminantPDE, then you can solve that system using pdsolve. But, simpler, you can compute the symmetries directly, using PDEtools:-Infinitesimals. All this is explained in the help page ?PDEtools.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 

Hi Glowing

 

Interesting example yours. First: given an ODE & ICs, the "mandate" of dsolve is to find one solution that solves the problem, assuming, generally speaking, that this solution is unique, because, generally speaking, an nth order ODE with n initial/boundary conditions has only 1 solution.

 

There are examples, however, where the solution is not unique, there is more than one solution, the additional ones typically associated with the existence of singularities of the ODE, or branches (e.g. sqrt in your example).

 

What you can expect from dsolve in these more tricky cases, where the system of an nth order ODE & n ICS has more than one solution, is one solution only, the one dsolve can find faster. This is so because dsolve counts the initial conditions, checks the differential order, and if these numbers are the same it automatically runs for the simpler solution to the problem, as said, assuming that in these cases the solution is unique...

 

In this framework, the solution returned U(t) = 0 is correct, it cancels the ODE and the ics. Nothing wrong with that.

 

But then: how do you compute the other solutions? Although in general you do not need to use optional arguments, in cases like this one you need: use the 'usesolutions = ...'. This optional argument is explained in the help page ?dsolve,details, the section on Optional Arguments. The possible right-hand sides are explained in the help page and to get the solution you want you can use "general", as in

dsolve({ics, ode}, usesolutions = "general");

U(t) = U__0*((exp(t))^2-2*exp(t)+1)/(exp(t))^2

(1)

This is the same solution you derived step-by-step. To get both solutions use "particular via symmetries and general", as in

dsolve({ics, ode}, usesolutions = "particular via symmetries and general");

U(t) = 0, U(t) = U__0*(exp(t)-1)^2/(exp(t))^2

(2)

So up to here: the solution returned by dsolve without optional arguments is correct, it cancels the ODE and ics, so it is not a hidden bug; the problem passed is special, admits more than one solution, to get the other solution you can use dsolve's optional argument 'usesolutions'.

 

There is still one things: how can you move away from this situation where the set of a nth order ODE & n ICs has more than the one unique solution? Generally speaking, the answer is to avoid constructing the ODE through differentiation of expressions with branches, as for instance sqrt(U(t)) is. In your example you constructed your ODE via

ode := diff(sqrt(U(t)), t) = sqrt(U__0)-sqrt(U(t))

You can verify the existence of branches using FunctionAdvisor(branch_cuts, expression), say as in

FunctionAdvisor(branch_cuts, sqrt(U))

[U^(1/2), U < 0]

(3)

You see that the cut starts at 0, precisely where you gave your initial condition. Not a good a idea. So, in this example you posted an easy manner to move away from this situation is to replace, before constructing the ODE through differentiation, any occurrence of sqrt(U(t)) by - say - V(t), then U(0) = 0 becomes V(0) = 0, then the system ODE + ICS becomes well defined and has a unique solution - corresponding to the one you were expecting. In your example, constructing the initial condition for V is trivial; in non-trivial situations you can use dchange, for instance for your example it gives

PDEtools:-dchange({t = T, U(t) = V(T)}, U(0))

V(0)

(4)

In summary: all OK with the solution by dsolve without using optional arguments and you can use the usesolutions option to get the other solution. You can avoid these situations by not constructing the ODE problem through differentiation of an expression with a branch cut while giving the initial condition at the origin or over the cut.

 

Edgardo S. Cheb-Terrab

Physics, Maplesoft

 

 

Download Option_usesolution.mw

 

Hi Mac
In brief, right after 'with(Physics:-Vectors)' enter 'Setup(geometricdifferentiation = false)', and then the flow will be as you expected (already verified that with the worksheet you posted). For details see ?Physics:-Setup, where geometricdifferentiation is explained, or with more details see ?Physics[Vectors][diff].

Alternatively, you can perform the same computation without canceling geometricdifferentiation: you'd need to indicate to dchange also the change rule for the dependent variable of your problem (convenient in general), that is E1_(x,y,z,t), so your input line for dchange would be:

TR := {x = r*cos(theta), z = r*sin(theta), E1_(x,y,z,t) = R(r)*exp(I*(-k*y+omega*t))};

PDEtools:-dchange(TR, -(diff(E1_(x, y, z, t), x, x))-(diff(E1_(x, y, z, t), y, y))-(diff(E1_(x, y, z, t), z, z)) = -mu*epsilon*(diff(E1_(x, y, z, t), t, t)), [r, theta, R(r)], simplify);

This is a better approach, keeps geometridifferentiation working, and removes the need of that posterior subs that you do in the worksheet.

Regarding updating Physics in Maple 17.02, have no doubt, it is convenient: you will have access to many improvements as well as most of Maple 18 developments, and bug fixes. The place were you get the update is always the same: the Maplesoft R&D page for Physics. There you see a link to the Maple 18 updates that happened so far (the library in this link does not work for Maple 17) and another link for the latest update for Maple 17, dated March/18/2014.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

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

First 47 48 49 50 51 52 53 Last Page 49 of 59