ecterrab

13431 Reputation

24 Badges

19 years, 362 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Alejandro Jakubi 

Regarding the post in this tread, you ask for an explicit form of the function call using PDEtools:-Solve or PDEtools:-casesplit: just replace solve by PDEtools:-Solve or PDEtools:-casesplit.

Now if you give a look at the corresponding help pages you will also see that you can do more than with solve: you can indicate, precisely the solving ordering, which is the most relevant thing when solving nonlinear systems of equations. Moreover: you can split your solving variables into subsets (with 1 or more variables each) and specify not only the ordering of the subsets, and the ordering of the variables within a subset, but, more important, specify to use an elimination or an orderly ranking (for the terminology explained in simple terms see the help page for PDEtools:-casesplit).

For example, PDEtools:-Solve({…system…}, [m, {x1, x2, x3, x4, x5}]); will first triangularize the system in order to obtain one subsystem that expresses m in terms of {x1, x2, x3, x4, x5}, then another subsystem that only involves {x1, x2, x3, x4, x5}; solve the latter for {x1, x2, x3, x4, x5}, then substitute into the former for m. If the solving variables are passed as [{x1, x2, x3, x4, x5}, m], the solving process will run the other way around. In this example the equations however are simple and so switching the order between m and {x1, x2, x3, x4, x5} makes no difference, but try passing the xn as a list and change the order in different ways and you will see the effect in the output. And this is all I have to say about this post.

About other issues like help pages, unified commands, your opinion that this unified command shall be solve, etc. I think these are other matters, you may want to post about them. And indeed I think there is always room for improvements, wether in the documentation or the commands themselves, and I agree that the visibility of the actual solving power could be bigger. For example, PDEtools:-Solve is in fact a unified solving command (it combines solve, dsolve, pdsolve, fsolve, incluing the options series and numeric of dsolve and pdsolve), that can also do more things than some of these solving commands it combines, but few people know about PDEtools:-Solve.

For DEtools[rifsimp] and DifferentialAlgebra I think the issue is different: these packages are rather powerful, but a bit more technical in what they do and so their presentation in help pages is complicated for the average Maple user. The presentation of their techniques in the help page for PDEtools:-casesplit aimed at facilitating their use, also through a simpler interface. Anyway all these are different topics.

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

@toaskfrommaple 

Say the maximum differential order with regard to a function within your equations is N, for example: in your single equation, for R, N = 2. Then, generally speaking, the conserved currents J can depend at most on derivatives of R of order N-1. In your example that is: 1. This is so because the conserved currents satisfy Nabla J = 0 "modulo the equations themselves", and Nabla is a differentiation operator of order 1. For more details see the help page for ConservedCurrents. This is the same as with Lie symmetry generators, and in fact these two problems are interrelated. Another way of viewing this is to recall that conserved currents are the PDE equivalent of 'first integrals" in the ODE case, also of order N-1.

Now, regarding "distinguishing the independent variables from the dependent ones", it is natural that the dependency of the conserved currents includes the dependent variables, and that can be up to derivatives of order N-1, as said. So what is exactly your question?

Note anyway that you can set the dependency (Q in the previous reply) to be what you want, and so, for example, compute conserved currents that depend only on the independent variables of the PDE system - this is in general a simpler problem.

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

@Markiyan Hirnyk 

... I'm not sure I understand your question. The interpretation of the output of

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

i.e. the output you show, is what I already wrote: it contains all the solution cases that bluehotel was expecting, not receiving, and asking what could be wrong, the answer is: missing m in the set containing the solving variables. This output also contains the same solution cases shown below as 'the better output obtained in Mathematica', which is not better or worse but just the same.

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

The conversion of this function call FromMma is fixed. The fix, together with other developments in the DE and Mathematical Functions area, can be downloaded on the Maplesoft R&D Differential Equations and Mathematical Functions webpage.

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

@Markiyan Hirnyk 
It seems we still have this problem with posting images of formulas. I corrected this typing the input, without using an image. All this development about Wirtinger calculus 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

Reviewing this answer, sometimes the metric, or any other tensor, is defined through a tensorial equation that involves other tensors, that in turn where defined in terms of other tensorial equations and so on (an example of this is found in General Relativity using Computer Algebra), and using indets(T[], symbol) to resolve the dependency of the tensor T may be not efficient since T[] computes all of the components of T. For instance this can be visibly time consuming with an arbitrary spacetime metric (set using Setup(metric = arbitrary)). In these cases a less expensive way of unveiling the dependency of T, is to use the Physics:-Library:-GetTensorDependency command as in Library:-GetTensorDependency(T) (note T, not T[]). There is a section explaining GetTensorDependency in the help page for the Physics/Library) .

Edgardo S. Cheb-Terrab 
Physics, Maplesoft

@escorpsy 

Unfortunately I cannot read the image you attached. But even if I were able I would need to retype everything on a worksheet to formulate your problem. There is no need for that: you already typed it. So, please, attach a Maple worksheet to your reply or post where you include text and formulas showing your question better. Recalling, to attach a Maple worksheet: save it first in your computer, then click the green arrow that you see in the toolbar when you produce a reply here in Mapleprimes (I see one now while I am writing this reply to you), then follow instructions on the screen. Then I will be able to either show you how you could do what you want to do using Physics or, depending on what it is, we can also implement it right away and put the new functionality available for you and everyone else in the Maplesoft R&D Physics page - note that the Physics package gets updated every week based on user's feedback.

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

@escorpsy 

Yes, and again you can use `.`, or `*` followed by Simplify or by SumOverRepeatedIndices, and you do not need to worry about which repeated indices are covariant and which other ones are contravariant: just enter all of them as covariant and the system will reformat each pair of repeated indices as "one covariant the other contravariant". In particular, for Ricci you also have the keyword 'scalar', where Ricci[scalar] = Ricci[alpha, ~alpha]  = the trace of the Ricci tensor, this is explained in the help page for Ricci.

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

@escorpsy 

In Maple, as in other computer algebra systems, and more than in any other kind of software I know, it is key to consult the help pages. I find myself doing that every day I use Maple. For an overview of the Physics package see the Physics help page.

Related to your question, g_ is the metric, Ricci is the Ricci tensor, d_[mu] is the d/dx^mu operator and D_[mu] is the covariant derivative operator. To set the metric you can use Setup, or, if the metric is already in the database of metrics, you can also set it directly with the metric command g_ itself, that you can use as well to search the database. Besides the commands's help pages there is also a page with the conventions used in the Physics package and another one with Physics Examples.

More specifically to your question, a Minkowski metric is automatically loaded when you load Physics, you do not need to set it. You can query about "who is the metric?" at any moment entering g_[] at the Maple prompt.

Then to have a coordinate system using x,y,z,t, as you say, enter: Coordinates(X=cartesian), or Setup(coordinates = cartesian); you can use cylindrical or spherical as well, and also indicate the coordinates yourself as in Coordinates(X = [x,y,z,t]) or in any other ordering. You compute covariant derivatives as everything else in Maple. For example, if you define A as a tensor (see the help page for Define), then: D_[mu](A[nu](X)) is the covariant derivative of A[nu](X). You can represent this covariant derivative in terms of d_ and Christoffel symbols using convert(D_[mu](A[nu](X)), d_).

You compute with tensors using symbolic indices instead of components, and simplify tensorial expressions with regards to their repeated indices and symmetry properties of the tensors involved using the simplifier of the Physics package, Simplify (not simplify). To simplify only a subexpression use `.` instead of `*` in the corresponding product. When computing with general relativity tensors, you can re-express tensors in expressions in terms of other tensors using any of convert/d_, convert/g_, convert/Christoffel and convert/Ricci. To substitute tensors in tensorial expressions use Library:-SubstituteTensor.

You can always also compute with components of tensors by indexing the tensors with numbers from 0 to D, or from 1 to D+1, where D is the space dimension and D+1 is the spacetime dimension, and 0 works the same as D+1; for example Ricci[0,1] = Ricci[4,1]. You can define tensors themselves, or in terms of tensorial expressions, with no restrictions, and you can change the dimension of spacetime using Setup(dimension = N) where N is a positive number. To perform the sum over repeated indices use SumOverRepeatedIndices. To get, in one go, all the tensorial components of a tensor expression using Library:-TensorComponents.

Finally, in general: repeated indices can be entered both as covariant and they are automatically reformatted by the system as one covariant one contravariant. This saves a significant amount of time as well as input mistakes - for details about this see the page for the conventions used in the Physics package.

Anyway, any question is welcome, Mapleprimes is a wonderful resource with many Maple-skilled users.

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

@escorpsy 

I posted the worksheet with the computation shown, there is a download link at the end of the answer. Have you downloaded and executed it? Also, the computation shown was performed using Maple 18 and the latest update for Physics available on the Maplesoft R&D Physics webpage. What version of Maple are you using? To help you further it would as well be useful if you post the worksheet with the input/output and corresponding error interruption that you are referring to. To post a worksheet, you can click the green arrow you see when you produce a post or answer, and then follow the instructions.

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

@shingy 

Unfortunately this problem with the formulas that suddenly appear or dissapiear keeps biting. The post also has a link at the end for you to download the worksheet, but somehow that link also stopped working. To upload everything again and again will not solve the problem. I will send you the worksheet by email.

Edgardo

@acer 

Indeed, radnormal handles this one perfectly. I forgot completely about this command. Perhaps the simplify code for radicals could take advantage of this too.

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

@Markiyan Hirnyk 

Expressing sum's output in elementary form is one thing. I understand that is the topic of this thread. It can be accomplished in more than one way, and one that is direct is to enter conver(..., elementary).

Being able to simplify expressions with radicals is another thing. I understand not the main topic of this thread.

It is apparent from your reply that in your opinion the conversion to elementary form would be a good thing if the simplifier were able to simplify further the result of the conversion. In my view these are just two different things.

So switching to this other topic, the simplification of radicals, I think it can be improved, here is a sequence of steps that takes the output of convert/elementary into the simplified form. The starting point is the output by sum

> sum(sum(binomial(n-1, i)*x^(n-i-alpha)*(-a*n)^i*c[n]*GAMMA(n-i+1)/GAMMA(n-i-alpha+1), i = 0 .. n-1), n = ceil(alpha) .. M)

Then you convert to elementary (I understand this is basically what Usman asked):

> convert(%, elementary);

The following sequence of steps simplifies this output (what you mentioned as being relevant now):

> convert(%, RootOf); # the simplification of RootOf is more powerful
> simplify(%);           
> convert(%, radical); # bring back to the more usual form with radicals
> simplify(%);

(PS after posting: the above is the same image shown by Carl, but somehow the Mapleprimes website presents a broken link for it, this is the lprint(%) output: (2/3)*(4*x*c[2]+3*c[1]-6*c[2])*x^(1/2)/Pi^(1/2) ).

From this I would not conclude that the conversion to elementary is inconvenient but that the simplification of radicals can be improved.

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

@shingy 

Hi Shingy. I guess you are more-or-less new to this thing; in computer algebra, for someone to help you with some input/output problem, you need to show the input because, we know, the output depends on the input. For example: I showed what is the input that produces the output you asked, that is: to obtain the determining system for the symmetries of your PDE equ you enter PDEtools:-DeterminingPDE(equ, integrabilityconditions = false). 

Could you please then show the input you are entering that produces no output? Indicating the version of Maple you are using (current is Maple 18) is also helpful.

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

@shingy 
You seem to have missed my answer? The liesymm package is definitely not the right tool nowadays - use the PDEtools commands for symmetries. For your example, use

> PDEtools:-DeterminingPDE(equ, integrabilityconditions = false);

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

First 44 45 46 47 48 49 50 Last Page 46 of 60