ecterrab

14605 Reputation

24 Badges

20 years, 98 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi
The question, however, is not about what system is better in general, but about what would be “the Maple strengths compared to Matlab and Mathematica”, and as such it looks to me properly presented.

I cannot present a complete list answering your question but here are some Maple strengths compared to Mathematica or Matlab that in my opinion are indisputable, relevant functionality that, somehow surprisingly, basically only exists in Maple.

  • The Maple Differential Equation programs. Give a look at the commands listed in DEtools and PDEtools, then search for similar functionality in Mathematica: mostly none of it exists. These Maple commands are at the root of the much better performance of Maple for the exact solving of ODEs and PDEs. The results of the comparison Maple versus Mathematica in solving Kamkes ODEs are hard to believe, and yet all reproducible. An equivalent comparison for PDEs does not exist yet, but if produced it would show even more disparity between what Maple and Mathematica can do: Mathematica can handle only a very tiny fraction of the PDE problems that Maple can handle. Not less important: in Maple you have commands for performing mostly all the solving steps of rather varied different DE approaches. That allows one to tackle a problem that is beyond the computer abilities by using a human-guided approach. These Maple commands, that do not exist in Mathematica, are also key when teaching DE courses.

  • The Maple Physics package. Give a look at Physics. Now open Mathematica and search for anything that would look similar. There is basically nothing. From Vector Analysis using coordinate free algebraic vectors, to noncommutative quantum operators, from 3D Euclidean tensors to tensors in curved 3+1 spacetimes, or Dirac’s notation for quantum mechanics, functional differentiation, the list is immense. Mathematica only started with tensors, and recently, and in a way that, frankly speaking, resembles more FORTRAN syntax than standard textbook or paper and pencil notation, not to mention that the functionality is fragmentary, for instance nothing for general relativity. Physics is an area where Maple’s strengths compared to Mathematica contrast even more than in DEs. You may also want to give a look at the Virtual User Summit webinar on Physics, a 24 minutes presentation showing the use of the package in mechanics, quantum mechanics and relativity.

  • The Maple conversion network for mathematical functions. Check convert/to_special_function, as well as the whole FunctionAdvisor project. Now open Mathematica and search for this functionality. Again, you won't find it. In Maple things are also not restricted to this network of conversions or the FunctionAdvisor. Maple also has the ability to represent as PDE systems with rational coefficients almost any linear and nonlinear algebraic expression involving almost any mathematical function. The same regarding Maple’s ability to perform symbolic differentiation, e.g. d^n/dz^n cos(z) (n is ‘a symbol’, not a number), or to compute branch cuts of algebraic expressions, all of this only exists in Maple.

  • The Maple DifferentialGeometry package. This is by all means the most resourceful mathematical software available for the area, with over 250 commands covering a wide range of topics, from basic jet calculus to the realm of the mathematics behind general relativity, thorough documentation for all of its commands, 19 differential geometry Lessons from beginner to advanced level and 5 Tutorials illustrating the use of the package in applications. I am repeating, but again: search for something resembling this in Mathematica. This functionality is inexistent in that system.

  • The Maple ability to perform differential algebra. I am talking both about the standard differential algebra, and the completely non-standard ability to perform differential algebra in the presence of non-rational objects that include the whole set of mathematical functions. Search for something resembling that in Mathematica and again you will find that there is none. This by itself already puts Maple’s potential for algebraic computations beyond what Mathematica could do. Differential elimination can be used as a key tool in most non-trivial algebraic problems one could imagine. By the way this differential algebra capabilites are at the root of the advantages Maple has in differential equations and differential geometry.

  • The Maple readability and traceability of Maple programs. You can give a look - literally read - basically any Maple program. Only a tiny bit of kernel commands, typically of little interest, are not readable. Everything else is readable. Wow! In fact I *never* studied a single page of Maple. Instead I learned tons just giving a look at the existing Maple programs and their help pages - and tracing them while running: try trace(command), then execute command(whatever) and you actually see how things are computed, all the steps, you can even use stopat to perform one step at a time, think, do your experiments, execute the next step. Maple is an incredibly open language. Now open Mathematica and search for any of this. In brief: none.

In summary, for physics (all kinds of problems), differential equations (all kinds of problems), mathematical function relations (their inter-connections or their representation with differential equations), differential geometry (all kinds of problems), differential algebra (all kinds of problems) or reading and tracing the actual programs that perform your computations, Maple has dramatic advantages regarding Mathematica or Matlab.

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

Hi

Note first that r[0]_ is not correct input: in 2D input mode it results in the product of r[0] with `_` while in 1D input mode it interrupts with an error. You can correct that input using either r_[0] or better: r__0_.

Besides that there is an issue regarding a Taylor expansion of the Norm of a vector: you know, the Taylor expansion of f(x-a) around x=a involves the derivatives of f at 0, but d/dr_ Norm(r_) = r_/Norm(r_), so this derivative at 0 would result in division by 0, so you cannot expand the Norm in Taylor series around a 0 of its argument.

Regarding this other question on a generic expansion of a vector function around a vectorial argument, I agree with you, this would be a nice and relevant feature that is not implemented in this moment. I'm adding this to the list of things being developed.

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

Hi Fred

Thanks for pointing to the problem. There was a typo introduced in a previous change such that the computation was performed but the result not returned - resulting in what you noticed: the computation returned unperformed. It is fixed now, the fix is available to everybody in the usual place, the Maplesoft R&D Physics webpage. The PhysicsUpdates18.mw worksheet that comes within the zip with the update illustrates the fix.

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

Hi USPAS2014

(what a name! :) PlotExpression is a procedure I use frequently, here it is:

> PlotExpression := f -> plots[plotcompare](f, 0, _rest, 'expression_plot', 5);

Now: other people mentioned this approx 1 month and a half ago - at that time I updated the mini-course in Mapleprimes including the definition of PlotExpression above directly in the worksheet, so perhaps you have the previous version of the mini-course?

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

PS: I don't always monitor Mapleprimes; in cases like this one please feel free to write to physics@maplesoft.com and I will receive your email directly in my mailbox.

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

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