ecterrab

13431 Reputation

24 Badges

20 years, 84 days

MaplePrimes Activity


These are answers submitted by ecterrab

First, use Physics; for computations with tensors is simpler. You cannot assign the Maple command Christoffel, it has a unique definition. What you can do, however, is to define another tensor, say you call it Gamma, and use that tensor in your computations; likewise, you can define everything: another Riemman and Ricci tensors, even another covariant derivative, etc. See the ?Physics,Tensors help page, the sections on how to define tensors.

It is useful if you post the problem, or an example that illustrates what you need.

Now, isn't it you who earlier today posted on how to computer the Ricci tensor in 2-D spacetime, saying you were new using Maple? I was on my way to answer that question when the question disappeared. If that is your case, bring the question back and I'll finish the answer and post it here.

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

Hi

Copy as LaTeX translates considering the expression given "as input". If you pass the option thisisinput, or File > Export > LaTeX, you see that input is translated with (), not \left( \right), while output is translated with \left( \right). That has to do with reproducing the differences you see in the Maple sheet and the different automatic line-breaking approaches used for input and output. 

That said, I see your point, Copy As LaTeX translating as input is ok, but most of the time, we prefer to copy translating as output, with \left( \right), as we get when latex(expression). I added now a new option in latex:-Settings (see the help page ?latex), copyaslatexinput with default value = false, so that we get those \left and \right by default when you Copy As LaTeX, the same way it was/is when you latex(expression). When that new option is set to true we have the previous behaviour.

The new behaviour is in the version of latex within the Maplesoft Physics Updates for Maple 2021, v.931 and newer.

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

What you show is not the way to achieve your input/output (4) as you want. Instead, please see the help page ?Physics,Tensor, Section I, subsection 2.b and 2.c. If you find something unclear in anyway please post here again and I will help with that.

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

So the error interruption happens within int. This is not my area but it is tracked now, to be fixed.

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

So the error interruption happens within int. This is not my area but it istracked now, to be fixed.

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

Not sure this could help you; take a look at ?Physics:-ExteriorDerivative. 

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

In the context of the Maple Physics package, the dimension is always set to a positive integer, from 2 to any such number. To be clear, the metric yes can be set to arbitrary, but not its dimension.

Now, I'm curious about the context of your computation requiring not having the dimension set - what is it? I'm familiar with arbitrary dimension mainly in the context of computing Feynman Integrals, where to regularize the integrals they are computed not in dimension = 4 but in dimension 'd' (a continuous variable, not even integer). So maybe if you post the formulation of your problem we can see whether the problem is or not tractable on a Maple sheet?

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

Yes, using the Physics package, there is more than one way. The most natural is perhaps defining the Action and taking the functional derivative with respect to the field. To define the Action, you use the Lagrangian L you show as the density in a 4D integral (Physics:-Intc command), then take the functional derivative (command Physics:-Fundiff). You can see that and related examples, including how to input the Lagrangian density, on the help page ?Physics,Fundiff, and in ?Physics,Tensors, Section I subsection 8. Or open the help page ?Physics,Examples, and check the section on Classical Field Theory.

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

I looked. In Maple 2021, there are changes in int, assume/is/coulditbe, the simplifiers, ... and in Physics. Although these changes are, in principle, all good, the way they were composing with your example was not. I adjusted the code, and thanks for reporting the problem; with that the programs work better and better.


The adjustment is distributed for everybody using Maple 2021 within the Maplesoft Physics Updates v.928 or newer.

 

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

Hi nm

Physics is part of the Maple system (not an addition). Enter with(Physics) in Maple 2021 and you see it is there. Now more advanced than ever. But there is not yet a Maplesoft Physics Updates for Maple 2021. Maple 2021 just got released today. While there is some new material already, the Maplesoft R&D Physics webpage still needs to sync to the new release.

Yes, the (uppercase) Latex command distributed within the Maplesoft Physics Updates during Maple 2020 appears in Maple 2021 as the (lowercase) latex command, check What is new in LaTeX in Maple 2021. So you just need to change Latex by latex in your scripts; it is, bit by bit, one and the same program. Note also the maple.sty file distributed with Maple 2021 in the /etc/ directory of your Maple installation: it has the definitions for several LaTeX macros that you asked here in Mapleprimes, missing form the 2020 version of the sty files. And yes, the then upcoming renaming Latex -> latex for Maple 2021 was mentioned in advance here in Mapleprimes a month or two ago.

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

Hi

In Maple, when you just substitute something, the evaluation of the result does not happen. Try for instance subs(x = 0, exp(x)). To substitute and evaluate you need to use the eval command instead of subs. Or, subs followed by something else that performs the evaluation, for example %. So for the second block of commands you show, you can:

> Z := X + Y + (1/2)*Commutator(X,Y);
                          Z := X + Y + 1/2 [X, Y][-]

> subs(X=Y,Z);
                              2 Y + 1/2 [Y, Y][-]

> %;   # This makes "the above" get fully evaluated

                                  2 Y

Alternatively,

> Z := X + Y + (1/2)*Commutator(X,Y);
                          Z := X + Y + 1/2 [X, Y][-]

> eval(Z, X = Y);
                                     2 Y


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

Good catch DarkMath; it is fixed and the fix distributed to everybody using Maple 2020 as usual, within the latest Maplesoft Physics Updates.

Two additional comments:

  1. The syntax simplify(expr, assume = [some_assumptions_here]) gets internally transformed into simplify(expr) assuming some_assumptions_here. So what counts is assuming, not assume
  2. All of Physics, DifferentialGeometry, VectorCalculus, and some others, all packages more modern than the old assume command, require Physics:-Assume to work properly.

Why? Because the old assume redefines the assumed variables. Say A is that variable, then before calling assume it is one object, and after calling assume it is another one (you can check the addressof of the variable before and after calling assume to see this problem). Hence, for example, it suffices for you to assume on a Cartesian coordinate for it stop being that Cartesian coordinate.

So, while Carl is correct in "workaround: make assuming use the old assume", if you are working with these more modern packages like Physics or DifferentialGeometry, Carl's workaround is not recommended in general. (Reporting the problem, on the other hand, like you have done now, is excellent: we notice and it gets fixed.)

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

Check the help page. ?Physics:-Setup, option realobjects. Alternatively you can use Physics:-Assume. Both indicate to the system that something is real. Still, while simplify and other commands use that information more and more, some parts of the library or their subroutines were originally written for the complex domain and may not take the 'real' value of the objects into account.

In this case and in general It would help if you post the specific example you have in mind.

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

 

In your PDE: replace occurrences of u  by u(x, t). Then do not assign x and t to algebraic expressions as you do, because that makes things like diff(u(x,t),x) becomes wrong Maple syntax. Next input

ii := PDEtools:-Infinitesimals(PDE)

to get a sequence of infinitesimals. Then

PDEtools:-InvariantTransformation([ii], u(x,t))

That will give you the transformations that leave your PDE invariant; you will find that the one two times previous to the last one is closer to the form of the transformation you are looking for.

Finally, try

map(PDEtools:-SimilarityTransformation, [ii], u(x, t))

and you will see the more traditional similarity transformations for the given infintesimals.

In general, take a look at the help pages listed a Symmetry Commands under ?PDEtools. You realize there are more direct ways to achieve the results you mentioned, but if you prefer to go a more manual approach, produce your HINT for the infinitesimals, and send it to the PDEtools:-Infinitesimals command (see its hint option), or likewise send your hint to SymmetryTest and of course the symmetry will not cancel the symmetry PDE equations, but the command will show you what remains, and you can solve that for the variables you want (k alpha and beta in your worksheet)/

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

In the upcoming version of Maple, all maple.sty LaTeX macros that resemble an existing non-Maple LaTeX macro are, conventionally, written using the LaTeX macro name preceded by 'm'. So \moverset, \muderset, etc.

Maintaining a single copy of the code that works in both Maple 2020 as Latex, with e.g. \Mapleoverset, and the upcoming Maple 2021 as latex with \moverset, is prone to these situations you noticed; the code mapping things between releases missed \munderset -> Mapleunderset. Some people prefer to not advance this code in the Physics Updates. I think otherwise, put it there, everybody benefits from it, and we all move forward together getting feedback right away. And when you find these issues just report them so that they get fixed.

To summarize, this issue is fixed for everybody using Maple 2020 by installing the Maplesoft Physics Updates v.913 or higher.

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

First 11 12 13 14 15 16 17 Last Page 13 of 55