ecterrab

14540 Reputation

24 Badges

20 years, 24 days

MaplePrimes Activity


These are replies submitted by ecterrab

@nm 

... it might well be that at this point I have lost perspective to tell what is standard knowledge and what is not. It's been too many years working on steroids (using computer algebra) on different subjects.

a) I won't write a book (enough with the Mini-Course on Computer Algebra for Physicists or the new Maple 2019 guide for Tensor Computations). I enjoy telling stories, but not long stories, and English is not my native language, slowing things down.

b) By all means, there exist textbooks on this, whether I remember their names or not; but more interesting than 'singular solutions' is differential algebra itself, and singular solutions appear naturally as a subproduct. The textbook I studied was for me clear enough (my background is in theoretical physics, not mathematics): Differential Algebra - Joseph Fels Ritt. The book is rather small and straightforward.

c) For me, textbooks are at the end; first, there is Google followed by my own exploration on the subject. Through Google, the first link is Wikipedia, and the third link I see points to "Singular solutions of differential equations." The presentation there is for me clear and understandable, although it misses that singular solutions may also be particular cases of general solutions. 

d) You may prefer to read about singular solutions directly in your Maple help pages - see "Analysis of singular solutions" in the help page ?DifferentialAlgebra,RosenfeldGrobner (don't let these names intimidate you). I wrote DifferentialAlgebra and based the presentation on singular solutions you see in that help page after eq.(27) on the one of the old ?diffalg,deprecated (page written by Evelyne Hubert). There you see a discussion of singular solutions that are not particular cases of the general solution.

e) About reading Maple code that is 'way too advanced', I can't help, and in fact I do not recommend that in this case. PDEtools:-casesplit is growing since 1998, and by now does too many things to be understood just from reading it (a ton of functionality - check its help page and that of PDEtools:-dpoyform; its size is 7500+ lines of code, not including the differential elimination engines, e.g. DifferentialThomas itself adds 3900+ lines of code). I frankly do not recommend trying to 'read' something of that size.

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

@nm, @Rouben Rostamian@vv@acer,

Take each of the ODEs discussed in this thread and try

> PDEtools:-casesplit(ODE);

and you will see "the cases," that is: the general and singular cases. As you noticed, the solutions to the singular cases are one differential order less, so their solution does not contain arbitrary constants. The discussion about general versus singular cases is standard in the literature (most textbook on DEs talk about them, Clairaut's equation is one example).

On a separate however related issue, the interesting question is "when are these singular solutions not particular cases of the general solution?" And there is the sub-question: "For ODEs? For PDEs?".

The answer to that question in the case of an ODE was part of the Ph.D. thesis of Evelyn Hubert, on essential singular solutions. An implementation of her algorithm entered the Maple library in 1998, and I coded it in Maple's dsolve to compute only essential singular solutions.

The answer to that same question in the general case, i.e. nonlinear PDE systems, as for instance Einstein's equations for the function components of the spacetime metric in curved spacetimes, got implemented in the Maple library two releases ago within the DifferentialThomas package (for which, unfortunately, I still haven't finished writing all of its help pages).

Summarizing, use PDEtools:-casesplit to see the cases (try its option caseplot to see a graphical representation of all the special cases you are noticing with the ODEs posted here), and remember that singular cases are sometimes particular cases of the general case, but there is now algorithmic ways, implemented in Maple, to compute only the singular cases that are not particular cases of the general case, and dsolve is expected to only return essentially singular cases (modulo bugs, of course).

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

@Carl Love@Rouben Rostamian@Oliveira

This is, again, all about using differential elimination, something implemented in Maple in 1996 (diffalg), then improved with DEtools[rifsimp], DifferentialAlgebra and DifferentialThomas - all differential elimination packages. Exploring the potentiality of those packages there are the higher level functionality commands PDEtools[dpolyform] and PDEtools[casesplit], finally on top of those there is the triad dsolve, pdsolve and PDEtools:-Solve - the later combining into one all of solve, dsolve, pdsolve, fsolve, and also the options series and numeric of these commands.

Surprisingly, it is the year 2019, and still today Maple is the only Computer Algebra System (CAS) that has differential elimination implemented. The piramid of funcionality just mentioned is at the root of Maple's top performance with differential equations when compared with any other CAS.

The two paragraphs above turn on the light on what is going on, that experienced mathematicians and computer algebra users get surprised with this reply by Rouben today. The explanation may look abstract but tell the story; the corresponding help pages the details.

The other two things I wanted to mention: your comment, Rouben, in a previous Mapleprimes reply, about rewriting the help page for PDEtools:-casesplit (regarding usage, this command is the most important one of all those mentioned) is for me, not a clear guideline, I suppose because I wrote these command (but for the original diffalg and rifsimp). It would help if any of you would like to rewrite part or all of that help page according to what you think would be best and post it so that I could see these commands "through your eyes," then see how to integrate your suggestions in these pages.

Finally, Carl, the idea is a simple one: what you call "a scalar" is a function with zero derivative; i.e. replace omega by omega(x) and add the equation diff(omega(x), x) = 0 to the system being solved. All these commands mentioned also handle inequations, not just equations, and accept all the optional arguments you can pass to PDEtools:-casesplit; take a look at its help page you will realize you can compute very tricky things with simple instructions - one of my favorite ones: the option 'independentof' of the PDEtools:-Solve command.

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

@Oliveira 

... That when assummingusesAssume = true dsolve returns only one branch is a bug. I will give a look at this today.

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

@Carl Love @nm

Another way of rewriting a differential equation in differential polynomial form, that is polynomial in the unknown and its derivatives and with rational coefficients is using PDEtools:-dpolyform with the option no_Fn.

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

Could you please (always) attach the worksheet with the contents you show? For that purpose you can use the Green arrow. Besides that, to give values to the _Fn see ?eval, and if you open the help page for Infinitesimals (always check the help pages before using commands) right at the top you see the option specialize_Fn. You may also want to take a look at the help page of CharacteristicQInvariants.

@nm 
I can't help you with that. Anyway, for the example you indcate, in my opinion the degree is 1, not 2, since it is linear in the highest derivative, the rest of the terms are not relevant regarding the degree (see the examples in the literature referenced in the wiki page you posted).

Provided the DE you pass is of integer degree in the highest order derivatives (could be an ODE or a PDE), the following procedure gives you the degree:

de_degree := proc(de, f::expects(unknown) := NULL)
local de_in_diff_notation, derivatives, diff_ord;

de_in_diff_notation := convert(`if`(de::`=`, (lhs-rhs)(de), de), diff);
derivatives := indets(de_in_diff_notation, specfunc(diff));
if f <> NULL then
    derivatives := select(has, derivatives, f);
fi;
if derivatives = {} then return(0) fi;
diff_ord := PDEtools:-difforder(derivatives);
derivatives := select(u -> PDEtools:-difforder(u) = diff_ord, derivatives);
max(map2(degree, de_in_diff_notation, derivatives));
end;

Example:

> DE := (1 + diff(y(x, t), x)^2)^(3/2) = diff(y(x, t), x $ 2)*diff(y(x, t), t, t)^3*diff(f(x, t), x $ 3, t $ 3)^2;
> de_degree(DE);

                                                              2

> de_degree(DE, y(x,t));

                                                              3

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

Hi

In the previous reply by Rouben he gave a beautiful/skilled presentation showing that: given the two PDEs for Q(x, z, t) and W(x, z, t) and the relationships for the auxiliary functions phi(x, z, t) and psi(x, z, t) as the laplacians of Q and W:

"phi(x,z,t)=((&PartialD;)^(2 )W)/((&PartialD;)^( )x^2)+((&PartialD;)^(2 )W)/((&PartialD;)^( )z^2)",
"psi(x,z,t)=((&PartialD;)^(2 )Q)/((&PartialD;)^( )x^2)+((&PartialD;)^(2 )Q)/((&PartialD;)^( )z^2)".

then these two auxiliary functions phi and psi satisfy wave equations with different velocities

"((&PartialD;)^2phi)/((&PartialD;)^( )t^2)=mu/(rho)(((&PartialD;)^2phi)/((&PartialD;)^( )x^2)+((&PartialD;)^2phi)/((&PartialD;)^( )z^2)),"
"((&PartialD;)^2psi)/((&PartialD;)^( )t^2)=(lambda+2 mu)/(rho)(((&PartialD;)^2psi)/((&PartialD;)^( )x^2)+((&PartialD;)^2psi)/((&PartialD;)^( )z^2)),"

Rouben's presentation used two commands, not very well known by most people, that are really powerful - gems of the Maple library: PDEtools:-casesplit  and simplify/siderels  (with respect to side relations)

 

From those two commands, the least known one is PDEtools:-casesplit. In this presentation I want to show that this command is so powerful and versatile that once you mastered it you can do surprising things. For instance, achieve Rouben's result with a single call to PDEtools:-casesplit, not using any particularly obscure syntax or knowledge, and at the same time decoupling of the systems of equations for Q(x, z, t) and W(x, z, t) requested by madany when he started this thread.

For readability use a compact display for all these functions

PDEtools:-declare((Q, W, phi, psi)(x, z, t))

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

 

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

 

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

 

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

(1)

Start entering the equations pde1 and pde2 posted by madany and the relationship, all written on a Maple worksheet by Rouben

pde1 := rho*(diff(Q(x, z, t), t, t, x))+rho*(diff(W(x, z, t), t, t, z))-(lambda+2*mu)*(diff(Q(x, z, t), x, x, x)+diff(Q(x, z, t), x, z, z))-mu*(diff(W(x, z, t), x, x, z)+diff(W(x, z, t), z, z, z)) = 0

pde2 := rho*(diff(Q(x, z, t), t, t, z))-rho*(diff(W(x, z, t), t, t, x))-(lambda+2*mu)*(diff(Q(x, z, t), x, x, z)+diff(Q(x, z, t), z, z, z))+mu*(diff(W(x, z, t), x, x, x)+diff(W(x, z, t), x, z, z)) = 0

relationship := phi(x, z, t) = diff(W(x, z, t), x, x)+diff(W(x, z, t), z, z), psi(x, z, t) = diff(Q(x, z, t), x, x)+diff(Q(x, z, t), z, z)

Construct now a system with the four equations, not just pde1 and pde2

sys := [pde1, pde2, relationship]


Now think: we want Q and W expressed as functions of psi and phi, plus equations for them not involving Q or W. According to the help page of casesplit, that can be achieved with a ranking of the form [{Q, W}, {phi, psi}]. In addition, we want Q and W decoupled, so according to the help page, for that purpose, your ranking should be of elimination type with respect to Q and W, explained in the page it should then be written as "[Q, W, {psi, phi}]."

That is all.

PDEtools:-casesplit(sys, [Q, W, {phi, psi}])

`casesplit/ans`([diff(diff(diff(Q(x, z, t), t), t), x) = (mu*(diff(phi(x, z, t), z))+lambda*(diff(psi(x, z, t), x))+2*mu*(diff(psi(x, z, t), x))-rho*(diff(diff(diff(W(x, z, t), t), t), z)))/rho, diff(diff(diff(Q(x, z, t), t), t), z) = (lambda*(diff(psi(x, z, t), z))+2*mu*(diff(psi(x, z, t), z))-mu*(diff(phi(x, z, t), x))+rho*(diff(diff(diff(W(x, z, t), t), t), x)))/rho, diff(diff(Q(x, z, t), x), x) = psi(x, z, t)-(diff(diff(Q(x, z, t), z), z)), diff(diff(W(x, z, t), x), x) = phi(x, z, t)-(diff(diff(W(x, z, t), z), z)), diff(diff(psi(x, z, t), x), x) = (-lambda*(diff(diff(psi(x, z, t), z), z))-2*mu*(diff(diff(psi(x, z, t), z), z))+rho*(diff(diff(psi(x, z, t), t), t)))/(lambda+2*mu), diff(diff(phi(x, z, t), x), x) = (-mu*(diff(diff(phi(x, z, t), z), z))+rho*(diff(diff(phi(x, z, t), t), t)))/mu], [])

(2)

Note the derivatives displayed compactly, indexed, due to using PDEtools:-declare in (1). The last two equations of (2) above are, precisely, the wave equations for phi and psi, shown by Rouben, and the first four equations are the decoupled version of the system presented by madany, where W satisfies an equation not involving Q, that is, W[x, x] = phi-W[z, z], and the other equations express Q as a function of the rest, all of which have been decoupled (that is the meaning of sequential decoupling, at the root of how dsolve and pdsolve work).

``


 

Download mw_(reviewed).mw

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

@madany 
Before using any command, always give a look to the help page. The second argument you are passing is not according to the help page. By the way this example doesn't need second argument, and the decoupling is sequential, as explained in the help page; ie you will get a subsystem that only involves Q, and assuming you can solve it, there is another subsystem involving W and Q: put there the value you obtain for Q by solving the first subsystem. In this example, the subsystem for Q consists of a single 4th order PDE.

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

Could you please edit your post showing the expected simplified form, either in Maple notation or in Mathematica notation (copy an paste suffices, but not in LaTex (forces a manual conversion to Maple or Mathematica which is prone to mistakes). Thanks.

Also, why are you doing this with DifferentialGeometry? It is really much simpler using Physics.

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

@umbli 

Regarding 2.: only the tensors that are "single letter" have an underscore at the end so that these single letters can be used for other purposes. These include g_, d_, D_, l_, n_, m_, gamma_, and then for consistency also D3_ gamma3_ from the ThreePlusOne package.

Regarding 1., the D_ operator is displayed with Nabla. Try D_[mu](A[nu](X)) to see that in the output. And how do you make it look that way in the input? Type it literally, as D_[mu](A[nu](X)), then right-click that input, and choose 2D - Math -> Convert To -> 2D Math input, and there you are. In the case of a procedure like the one you see after (23), I do it in two steps: first as said, and after I have the right math look of the formula I placed the cursor at the beginning and typed T ->.

I'm glad to hear you are having a pleasant experience with the Physics package. This project aimed at partly transforming the arduous sensation of some physics algebraic computations into smooth gliding. It takes some time for your brain to get convinced, but as soon as that happens, it is fantastic how the imagination unleashes (computations become a pleasure). We are not all there yet, but each year getting closer, and for me listening to questions and providing feedback is key in the development process.

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

@umbli 

Your question is not clear to me. There are four coordinates, could be any symbols, say X = (x1, x2, x3, x4).

IMPORTANT: note that, in Maple, `[]` is the selection operator. Given a list X := [a, b, c, d], there is no meaning for X[0]. So to make the notation X[0] work in the computer as we do with paper and pencil we need to map X[0] into X[n] for some n that is a positive integer. This is relevant for tensors, say the metric g_[mu,nu], because the order of lines and columns in the matrix representation is according to the ordering of the coordinates, and here again, in the context of a computer, there is no meaning to "the 0th column" of a matrix. Lines and columns are associated to positive integer numbers.

So suppose that the signature is `+ + + -`. The different sign is the last one, in position 4, and that is the timelike position . Thus the mapping we use (as in textbooks or paper and pencil) is that the value 0 for the index always points to the  timelike position, and so for this signature X[0] = X[4], and X[1..3] are the spacelike coordinates, and in the case of the metric g_[0, 0] = g_[4, 4], meaning you get the component in line 4 and column 4 of the matrix representation for g_.

If the signature is  `- + + +` then X[0] = X[1] (the timelike coordinate for this signature) and X[2..4] are the three spacelike coordinates and g_[0, 0] = g_[1, 1], you see this in the matrix representation of the metric (enter g_[]).

To see this mapping at work for the coordinates, use SpacetimeVector[0](X) with the two different settings of the signature.

If you prefer to avoid having to select the coordinate with a number and forget about this subtlety of what is the timelike position in the signature, you can always Setup(usecoordinatesastensorindices = true). Suppose your coordinates are [t, x, y, z], or [x, y, z, t] it doesn't matter: you can now index directly with the coordinates themselves, as in Christoffel[t,t,t] to get its value.

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

Hi, when posting a question, always try to see your question through the eyes of the people you are directing the question, for instance, whether you are providing enough information for someone to reproduce your problem in order to give you some useful feedback. Reading your question, for me, there is not enough information. I don't know what you are doing, but if you repost with details then try to give all that is necessary to reproduce your problem entirely and without ambiguity.

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

Hi,

Could you please post a worksheet with the formulation of the problem up to what you can do it? (You can create the worksheet, then upload it using the green arrow).

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

@Mariusz Iwaniuk 

The error you show in Run_code_2 is fixed by installing the Physics Updates v.353. The PDE problem itself is not solved in this moment, but it is solvable - we will work on this one and a couple of other ones as soon as there is a window of time.

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

First 25 26 27 28 29 30 31 Last Page 27 of 64