10699 Reputation

16 years, 199 days

MaplePrimes Activity

These are replies submitted by ecterrab

Within the Maplesoft Physics Updates, v.861, you have: Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@nm About the ODE case, since Latex...

About the ODE case, since Latex (not latex) works based on Typesetting, I just noticed the following is already working as expected: So I suppose this does what you want for the ODE case? The use of Suppress is necessary for this to work - is that an issue?

About the PDE case, the notation you show from Haberman's book is not really good for me; for one, in - say - D(u)(0,a) the information on the dependency of u is not present so you cannot translate that to du/dx(0,a). My idea was to use u(0, a) (Jet notation = jetnumbers, see ?PDEtools,ToJet).

This requires further thoughts since, e.g., the notation D[1,1](u)(x,t) actually means the second derivative with respect to x and D[1,2](u)(x,t) means the mixed derivative, w.r.t x and t, and this notation can be seen as non-standard. Still, u[1,1](0, a) (where [1,1] is displayed as a subscript) is for me more clear than D[1,1](u)(0,a).

Alternatively, this other jet notation = jetvariables is good for me but, again, requires information on the dependency of u(x,t): Finally, a comment on your "not commas": you know, when using computer algebra, your variables could be xt, t, then if you remove the comma separating each derivative you receive thingsl like xtt, which are ambiguous. even x0t doesn't look clear, while x0, t does. So no, we cannot ommit the commas, at least not by default. Maybe as a user requested Latex:-Setting ...

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

@nm  I answered that in the origin...

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

You say:

"I expected that the function particularsol gives me the particular solution, but there is the cosine term, which belongs to solution of the corresponding homogeneous ODE."

The particular solution solves the inhomogeneous ODE, not the homogeneous part. The output of particularsol is correct. There is nothing in the definition of particular solution that says that it "cannot include terms that, isolated, may also solve the homogeneous ODE."

In the help page of this command it is explained what it does. For your example, the code that solves the problem is LinearOperators[dAlembertianSolver]) - you may want to take a look at the corresponding help page too. You can see what code solves the problem by entering > infolevel[dsolve] := 3.

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

Oops! v.843...

@nm
Thanks! And sorry; in the midst of other things, one file escaped the update; this is a new option - tests were created only afterwards. It is resolved within the Maplesoft Physics Updates v.843 and newer. Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft.

Either always prefix, or never...

Latex is a replica of Physics:-Latex, with its own variables. It is a full replica. So either you use Physics:- prefixing everything or do not use this prefix anywhere. For example, Physics:-Latex:-Forget will clear the caches of Physics:-Latex, not Latex. At the same time, Latex:-Forget clears the caches of Latex, not of Physics:-Latex. Likewise, Latex:-UseTypesettingCurrentSettings is taken into account by Latex, not Physics:-Latex. Etc.

And yes, I am interested in feedback if something of this user-level Latex replica is not working. This Latex project started as a Physics project, but the result is relevant beyond Physics; the idea is to replace the old latex command with this new Latex.

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

Physics:-Latex:-Forget();...

All Latex subroutines work cached. So in a situation like the one you are suggesting, where you change the settings on the fly, you need to clear the caches.

I adjusted the previous reply / foo procedure to include that call to Physics:-Latex:-Forget. You get this: Note also that, in foo, I added return (to avoid noise in addition to the Latex translation, and removed your call to print that only added some white space after the returned result.

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

 • I commented the lines that seem to me not necessary - left them in place so that you can see them
 • I intercalated input lines, using 2D math display, that I imagine do what you wanted to do.
 • Intercalated comments, all in italics.
 > restart
 > with(Physics):

NOTE: I am using Maple 2020, not sure what version you are using, and I am also using the latest Maplesoft Physics Updates,

 >  (1)
 >    (2)
 > Setup(g_=-(c(t,r)^2 - v(t,r)^2)*dt^2 + 2*v(t,r)*dt*dr + dr^2 + r^2*dtheta^2 + r^2*sin(theta)^2*dphi^2)       (3)
 > CompactDisplay(c(t, r), v(t, r))  (4)
 > # Define(beta(t,r));
 > # PDETools:-declare(beta(t,r))
 > # clear(V[~mu])
 > > # Define(redo,S[~mu]=[-beta/(c*sqrt(1-beta^2)),(c+v*beta)/(c*sqrt(1-beta^2)),0,0]);

For readability, I prefer to define the 4 vectors you want to use, then enter the formulas for their components, then define the vector's components using those formulas in one go

 >   (5)

Regarding your question about common factors, take that common factor out, and - these are lists - use the dot `.` instead of the star `*` operator to perform multiplication

 >  (6)
 > > # Define(redo,V[~mu]=[1/(c*sqrt(1-beta^2)),-(v+c*beta)/(c*sqrt(1-beta^2)),0,0]);

 >  (7)
 > > # Define(redo,Theta[~mu]=[0,0,1,0]);

 >  (8)
 > # Define(redo,Phi[~mu]=[0,0,0,1]);

 >  (9)

Define the components of all these vectors in one go

 >   (10)

This is how you check their contravariant components

 >     (11)
 > # with(LinearAlgebra):
 > # Define()
 > >      (12)
 > # Define(E[a,~mu])

Define the matrix E as a mixed (tetrad and spacetime) tensor

 >   (13)

I understand this is the ordering you want to use:

 >  (14)

This is how you construct a matrix with that ordering

 >  (15)
 >   (16)

Note, however, that E is not a tetrad:

 >  (17)

Besides the command IsTetrad, you can always check "manually". Take the definition of a tetrad

 >  (18)

Introduce the matrix you think is a tetrad

 >  (19)

Compute the components of this tensorial equation

 >  (20)

In order for E be a tetrad, all these equations above need to be identities, you see they are not.

Compare with the default orthonormal tetrad the system computes automatically

 >  (21)
 >   (22)
 >  (23)

From your question, however, you say you want to use a tetrad metric that is orthonormal in spherical coordinates.

So start by defining or setting that Minkowski tetrad metric in spherical coordiantes

 >  (24)
 >  (25)

After you set the tetrad metric, a new tetrad is automatically computed on background; this is it:

 >  (26)

 >  (27)
 >  (28)
 >   (29)

Finally, regarding your last question: the tensors in the Physics package are of type "algebraic", that means you can do all type of algebraic computations, including using the whole Maple library with them, while the matrices used in the LinearAlgebra package are not of type "algebraic" - only matrix operations are possible and require using the commands of LinearAlgebra. So, no, you do not define tensors as in the example you ask, V := <1/(c*sqrt(1-beta^2)),-(v+c*beta)/(c*sqrt(1-beta^2)),0,0>.

Incidentally, there was another question in Mapleprimes about tetrads that you may want to take a look, it is a situation / question similar to yours.

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

@Preben Alsholm Sigh ... I'm so...

Sigh ... I'm sorry for that Preben. Your emails didn't arrive to me and are not in my spam folder either. I'll ask IT at Maplesoft, what could have happened. I'll send you the mla library by email.

PS afterwards: IT responded, and indeed there was a problem with email that got fixed only now, so physics @ maplesoft.com should be working fine now.

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

Help pages....

Check the help pages. In ?PDEtools, you will see a command PDEtools:-SimilaritySolutions, and another one called PDEtools:-InvariantSolutions - all related to the Lie symmetry method. Click the corresponding links to see how those commands work.

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

Hi @vv  That is a different t...

Hi @vv

That is a different topic - the one of this thread was about simplification of a generic %inert construction.

About the topics you mention, originally there was Int or Diff, then Sum, Limit and Product. At some point (around the year 2000) I introduced inert everything. You realize it was not possible to capitalize everything as the notational convention for inert - what about BesselJ, for instance, the active form is already capitalized. So it was decided to go with %whatever. But by the year 2000, there were too many uses of the old forms, so it was decided to keep them. That explains why there are two forms for only a very few commands.

That said, it is also true that not all the library adapted to this change. In some places, e.g. the one you are mentioning; I'm not sure how relevant that example about %gcd is, but it is true.

In part, the real problem is that the introduction of inert everything is indeed a radical change in a computer algebra system. Some people prefer the paradigm of all or nothing. I don't debate that, but mine is move in steps. At every release, more library commands understand inert everything. Incidentally, in the context of this thread, simplification of %whatever, to mention but one example, in the Physics Updates v.832 I updated `combine/range` to recognize %sum, %int  %product.

Something similar happened after the introduction of assuming - at each release more mathematical functions handle assumptions on their parameters.

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

Finished in v.832 of the Physics Updates...

The adjustment to the Maple 2020 simplification of inert %int, %sum, %diff, %limit and %product  is now finished. Among the several possibilities, basically, and related to the comments above, I preferred to

• Do no value.
• Use more of the old routines simplify/<Int, Sum, Diff, Limit, Product
• Although the computational flow for - say %int and Int - is actually different,  do as much as possible to get the same simplification.

I think the result is good, as usual available within the Maplesoft Physics Updates. (I recall that a fix for the problems in installing MapleCloud packages in Windows is available.) If someone feels there is more to be done please post the example as a reply here.

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

@Preben Alsholm By constant, I mean...

By constant, I meant "of Maple type constant." Zero is a special case. So what about simplify(%diff(x, x) - 1)? For several years that returns 0. We can echo the input instead, return %diff(x, x) - 1, and I wouldn't be so uncomfortable with that. There is a choice to do. You know, any choice has its + and its -.

Since the first reply, I think we are all on the same page about: simplify/inert should not desinertize Int, Limit, Sum, Product or Diff, but we see some situations where we could tell the simplified result (e.g. 0), and one can always say that telling that result is equivalent to desinertize the input.

The first case we seem to all agree is when the properties of the input integral tell the result. Either regardless of the integrand, or because the integrand is 0. What about the slightly more general case where the integrand is a constant that does not depend on the integration variable? Since ages, for Int, not %int, simplify does this:

> simplify(Int(a, x));

a Int(1, x)

What about the case of simplify( Int(1, x) - x ) ? Recall that we are talking about the result returned by simplify, not by a call to the inert function itself.

Also, till today the simplification of Int and %int returns different results - you @Preben Alsholm called the attention to that. Fixing that will naturally imply a slight change in the way we work with Int or %int or both. There is nothing intrinsically wrong with that.

It is great that several people presented opinions. I still feel that there is no clear prescription on the table. I will do one more tweak to this, taking into account what is already clear.

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

I uploaded a new version of the Updates with the changes mentioned in the comments above, but for making the simplification of %int and Int work exactly the same way. The change I am still in doubt is to return value'd when the result is a constant, e.g.

simplify( %int(sqrt(x^2), x = 0..1) );
1/2

It worked this way since years but not with Int, only with %int, so keeping this result would slightly change the simplification of Int. On the other hand, things like %int(x, x), that were returning x^2/2 now return unevaluated, the same way with Int,

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

@acer I'm sorry if I misinterpr...

@acer
I'm sorry if I misinterpreted you. No, I was not talking about constant factors going from out the integral to the integrand. For integrals there are two simplification routines: `simplify/int` and `simplify/Int`. I don't intend to change any of them. Related to this exchange of ideas, what I intend is slightly change the simplification of expressions containing inert integrals to use one or the other simplify routine depending on the example (details in the thread above), and with no difference between Int and %int.

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

﻿