ecterrab

13633 Reputation

24 Badges

18 years, 326 days

MaplePrimes Activity


These are replies submitted by ecterrab

@segfault 
Writing in this self-righteous manner is not useful. In Mapleprimes, we have a non-written rule: present a worksheet = you get help. What you are asking now in your reply after I indicated the help page that answers your question, as if it were some entitlement, simply put, is, "Could you please read the help pages for me?". I doubt anyone will do that, but since you discarded the orientation to multiply by the metric and to take a look at ?Physics,Tensors, here is an additional hand for you. How to contract a tensor in a Maple worksheet is shown, in details, in

  • ?Physics,Tensors, section 2.(b, g, several others)
  • ?Physics:-g_
  • ?Physics,Simplify
  • ?Physics,Christoffel
  • ...

Honestly, in Etc. help pages. It is indeed "Easy as that", and indeed you don't have to argue. Just take a look at the documentation - you could take any of the help pages mentioned above, scan for multiplication by the metric followed by a call to the Simplify command. In addition, by opening one Physics help page, anyone, in all of them you will see a link to ?Physics,Examples, a page that contains a section on Special and General Relativity, showing not just how you contract a tensor.

I'm closing replying in this thread, but if you really want to have a constructive exchange, I'd suggest first you tone down, do your minimal part, which is to open a help page, and if you want more specific help or have more claims to do (bug here, bug there ...), post a worksheet

 

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

@Josecherukara 

 

There are several ways of setting a perturbation of the metric that depends on the coordinates, and with that linearized Einstein's equations. Here I follow what is shown in Wikipedia for Linearized gravity

 

restart; with(Physics)

 

Set cartesian coordinates (you could use spherical, cylindrical, or define your own ) and automatic simplification

Setup(coordinates = cartesian, simplification = true)

`* Partial match of '`*simplification*`' against keyword '`*automaticsimplification*`' `

 

`Systems of spacetime coordinates are:`*{X = (x, y, z, t)}

 

_______________________________________________________

 

[automaticsimplification = true, coordinatesystems = {X}]

(1)

Suppose you want to define a perturbation around the Minkowski metric (the steps are the same for any other metric)

g_[]

Physics:-g_[mu, nu] = Matrix(%id = 36893488153080533708)

(2)

Define a perturbation h[mu, nu], that in the general case depends on the coordinates and is not diagonal; the only requirement is that it is symmetric (to have it diagonal, change symmetric by diagonal)

h[mu, nu] = Matrix(4, proc (i, j) options operator, arrow; delta[i, j](X) end proc, shape = symmetric)

h[mu, nu] = Matrix(%id = 36893488153080520324)

(3)

"Define(?)"

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], h[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(4)

If you are interested in working the details, you can define now the "new metric" as a perturbation over the existing metric uncommenting these two lines, but to follow the Wikipedia page do not redefine the metric

NULL

NULL


Define a tensor representing the Ricci tensor according to the Wikipedia page (it is possible to derive this formula starting from the definition of Ricci in terms of the metric)

R[mu, nu] = 1/2*(d_[sigma](d_[mu](h[`~sigma`, nu]))+d_[sigma](d_[nu](h[`~sigma`, mu]))-d_[mu](d_[nu](h[`~sigma`, sigma]))-dAlembertian(h[mu, nu]))

R[mu, nu] = (1/2)*Physics:-d_[mu](Physics:-d_[sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics:-d_[nu](Physics:-d_[sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics:-d_[mu](Physics:-d_[nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics:-dAlembertian(h[mu, nu], [X])

(5)

Not necessary in this case (would be relevant if you had redefined the metric) it is faster using the option computetensordependency=false

Define(R[mu, nu] = (1/2)*Physics[d_][mu](Physics[d_][sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics[d_][nu](Physics[d_][sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics[d_][mu](Physics[d_][nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics[dAlembertian](h[mu, nu], [X]), computetensordependency = false)

`Defined objects with tensor properties`; "_noterminate"

 

{Physics:-Dgamma[mu], Physics:-Psigma[mu], R[mu, nu], Physics:-d_[mu], Physics:-g_[mu, nu], h[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(6)

Next, Einstein's equations are expressed in terms of the Ricci tensor as

Einstein[definition]

Physics:-Einstein[mu, nu] = Physics:-Ricci[mu, nu]-(1/2)*Physics:-g_[mu, nu]*Physics:-Ricci[alpha, `~alpha`]

(7)

Compute the trace R[alpha, `~alpha`] directly from the definition (5),

g_[mu, nu]*(R[mu, nu] = (1/2)*Physics[d_][mu](Physics[d_][sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics[d_][nu](Physics[d_][sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics[d_][mu](Physics[d_][nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics[dAlembertian](h[mu, nu], [X]))

R[mu, nu]*Physics:-g_[`~mu`, `~nu`] = -(1/2)*(-Physics:-d_[mu](Physics:-d_[sigma](h[`~sigma`, nu], [X]), [X])-Physics:-d_[nu](Physics:-d_[sigma](h[`~sigma`, mu], [X]), [X])+Physics:-d_[mu](Physics:-d_[nu](h[`~sigma`, sigma], [X]), [X])+Physics:-dAlembertian(h[mu, nu], [X]))*Physics:-g_[`~mu`, `~nu`]

(8)

Simplify(R[mu, nu]*Physics[g_][`~mu`, `~nu`] = -(1/2)*(-Physics[d_][mu](Physics[d_][sigma](h[`~sigma`, nu], [X]), [X])-Physics[d_][nu](Physics[d_][sigma](h[`~sigma`, mu], [X]), [X])+Physics[d_][mu](Physics[d_][nu](h[`~sigma`, sigma], [X]), [X])+Physics[dAlembertian](h[mu, nu], [X]))*Physics[g_][`~mu`, `~nu`])

R[nu, `~nu`] = -Physics:-dAlembertian(h[alpha, `~alpha`], [X])+Physics:-d_[alpha](Physics:-d_[sigma](h[`~alpha`, `~sigma`], [X]), [X])

(9)

Not necessary, but to match exactly the letters used in the Wikipedia page, substitute alpha = mu, sigma = nu

Substitute(alpha = mu, sigma = nu, R[nu, `~nu`] = -Physics[dAlembertian](h[alpha, `~alpha`], [X])+Physics[d_][alpha](Physics[d_][sigma](h[`~alpha`, `~sigma`], [X]), [X]))

R[nu, `~nu`] = -Physics:-dAlembertian(h[mu, `~mu`], [X])+Physics:-d_[mu](Physics:-d_[nu](h[`~mu`, `~nu`], [X]), [X])

(10)

Then, the linearized Einstein equations are given by the definition (7) above:

(R[mu, nu] = (1/2)*Physics[d_][mu](Physics[d_][sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics[d_][nu](Physics[d_][sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics[d_][mu](Physics[d_][nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics[dAlembertian](h[mu, nu], [X]))-(1/2)*g_[mu, nu]*(R[nu, `~nu`] = -Physics[dAlembertian](h[mu, `~mu`], [X])+Physics[d_][mu](Physics[d_][nu](h[`~mu`, `~nu`], [X]), [X]))

R[mu, nu]-(1/2)*Physics:-g_[mu, nu]*R[alpha, `~alpha`] = (1/2)*Physics:-d_[mu](Physics:-d_[sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics:-d_[nu](Physics:-d_[sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics:-d_[mu](Physics:-d_[nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics:-dAlembertian(h[mu, nu], [X])-(1/2)*Physics:-g_[mu, nu]*(-Physics:-dAlembertian(h[alpha, `~alpha`], [X])+Physics:-d_[alpha](Physics:-d_[beta](h[`~alpha`, `~beta`], [X]), [X]))

(11)

You can now redefine the general h[mu, nu] in (3) according to the different gauges (explained in the Wikipedia page), or, depending on the case, just substitute your preferred gauge in this formula (11) for the general case. For example, the condition for the Harmonic gauge also known as Lorentz gauge is as shown in the Wikipedia page and reduces the linearized field equations to their simplest form

d_[mu](h[`~mu`, nu]) = (1/2)*d_[nu](h[alpha, alpha])

Physics:-d_[mu](h[`~mu`, nu], [X]) = (1/2)*Physics:-d_[nu](h[alpha, `~alpha`], [X])

(12)

Substitute(Physics[d_][mu](h[`~mu`, nu], [X]) = (1/2)*Physics[d_][nu](h[alpha, `~alpha`], [X]), R[mu, nu]-(1/2)*Physics[g_][mu, nu]*R[alpha, `~alpha`] = (1/2)*Physics[d_][mu](Physics[d_][sigma](h[`~sigma`, nu], [X]), [X])+(1/2)*Physics[d_][nu](Physics[d_][sigma](h[`~sigma`, mu], [X]), [X])-(1/2)*Physics[d_][mu](Physics[d_][nu](h[`~sigma`, sigma], [X]), [X])-(1/2)*Physics[dAlembertian](h[mu, nu], [X])-(1/2)*Physics[g_][mu, nu]*(-Physics[dAlembertian](h[alpha, `~alpha`], [X])+Physics[d_][alpha](Physics[d_][beta](h[`~alpha`, `~beta`], [X]), [X])))

R[mu, nu]-(1/2)*Physics:-g_[mu, nu]*R[alpha, `~alpha`] = (1/2)*Physics:-d_[mu]((1/2)*Physics:-d_[nu](h[lambda, `~lambda`], [X]), [X])+(1/2)*Physics:-d_[nu]((1/2)*Physics:-d_[mu](h[tau, `~tau`], [X]), [X])-(1/2)*Physics:-d_[mu](Physics:-d_[nu](h[sigma, `~sigma`], [X]), [X])-(1/2)*Physics:-dAlembertian(h[mu, nu], [X])-(1/2)*Physics:-g_[mu, nu]*(-Physics:-dAlembertian(h[alpha, `~alpha`], [X])+Physics:-d_[alpha]((1/2)*Physics:-d_[`~alpha`](h[kappa, `~kappa`], [X]), [X]))

(13)

Simplify(R[mu, nu]-(1/2)*Physics[g_][mu, nu]*R[alpha, `~alpha`] = (1/2)*Physics[d_][mu]((1/2)*Physics[d_][nu](h[lambda, `~lambda`], [X]), [X])+(1/2)*Physics[d_][nu]((1/2)*Physics[d_][mu](h[tau, `~tau`], [X]), [X])-(1/2)*Physics[d_][mu](Physics[d_][nu](h[sigma, `~sigma`], [X]), [X])-(1/2)*Physics[dAlembertian](h[mu, nu], [X])-(1/2)*Physics[g_][mu, nu]*(-Physics[dAlembertian](h[alpha, `~alpha`], [X])+Physics[d_][alpha]((1/2)*Physics[d_][`~alpha`](h[kappa, `~kappa`], [X]), [X])))

R[mu, nu]-(1/2)*Physics:-g_[mu, nu]*R[alpha, `~alpha`] = -(1/2)*Physics:-dAlembertian(h[mu, nu], [X])+(1/4)*Physics:-g_[mu, nu]*Physics:-dAlembertian(h[alpha, `~alpha`], [X])

(14)

NULL


 

Download perturbed_metric_(general_case).mw

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

@nm 
Check ?PDEtools:-casesplit and the glossary to understand what is Maple doing to compute singular solutions. In brief, as in the title, and I suggest the DifferentialThomas engine, if you see more than the general case then expect a solution by dsolve for that extra case, whenever that extra solution is computable in practice.

The documentation for dsolve, also, explains clearly that by default it returns all essential singular solutions. If you don't want them, then use singsol = false. If you want also the non-essential ones, provided they exist (they appear as additional cases when passing the ODE (possibly system) to PDEtools:-casesplit), singsol = all will make them be returned as well. All this is explained in ?dsolve,details if I remember right.

Regarding your several "let's think that this implies that, which perhaps implies something else, and why not this other thing," I cannot keep responding to every single conjecture that you imagine might be the case. Lie methods are what they are - explained in the documentation. When in action, singular cases that are not essential may pop up. However, if you let dsolve do its job without trying to guide it, only the essential singular cases are considered. That is all.

For your ode := diff(y(x), x) = (2*x)*sqrt(1 - y(x)^2), the limit when _C1=infinity mentioned in the previous reply already answers that one too. Regarding your "I have dozens of examples of this and that and perhaps something else", I cannot answer that. Regarding your solutions y = r and y = -r for some ODE that you do not show, I also cannot answer that.

I realize you want answers to so many questions that pass through your mind, but I don't think this is the forum for all and every single conjecture that you could imagine. Anyway ...

Best

Update Re-reading the title of your question, what is your point with asking in negatives? Clearly, dsolve can find, and indeed finds singular solutions, with the luxury of all, essential or none. If however I were a bit sleepy when reading the title of your question, or would skim quickly over the contents, I'd think otherwise. It would help for answering your questions if the title is not just your conjecture of negatives.

@Hullzie16 
I don't agree with your statement that computing f(r) from one single component - instead of from simultaneously solving the 9 ODEs encoded in R[a, b] = 0 -  is sufficient. Even if that were the case, solving for f(r) the single equation R[1, 1] = 0 says nothing about what you would get from solving for f(r) the single, different, equation R[~1, 1] = g_[~1, a] * R[a, 1] = 0. 

The only thing you can really be sure is that the solution f(r) simultaneously solving the whole system of 9 ODEs encoded in R[a, b] = 0 is the same you would get from simultaneously solving the 9 ODEs encoded in R[~a, b] = 0.

Regarding the other result that you are not reproducing, note that many things got better in Maple 2024, including adjustments all around, and Maple 2024 is what I used. Attached is your MOD worksheet, showing the Physics version I am using (v.1717) and showing I get as in this image that you say you are not reproducing

Download IndexQuestionMOD_(reviewed).mw

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

@Hullzie16 
You say:

So what I am interested in doing is solving for the metric function f(r) which is a solution to the modified graviational field equations which are R[a,b] = 0

In that case, you need to equate to 0 all the components of R[a,b], with that construct a system of 9 differential equations involving f(r) and solve all the system at once, not just R[1,1] as you did in the original worksheet you posted IndexQuestion.mw, also in the second worksheet you posted, IndexQuestionMOD.mw.

You also say:

Secondly if we use the definition R[~1,1] = g_[~1,~a]R[a,1] You can see that this does not match what we get from the tensor I define.

That is not what I see. I see equality:

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

@srmaple 
The system is nonlinear, so the ordering you choose to decouple it frequently results in different forms of the solution. If you do not indicate any ordering of the solving variables, dsolve will choose for you. You indicate that ordering by passing the unknowns as a list, as @nm has done above. Answering your question, I'd suggest you try the two orderings and see which one results in a solution closer to what you expect. I'd also suggest you to take a look at the help page ?dsolve,system

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

@nm 
Unlike Mathematica, in Maple, when you enter simplify(A), you simplify everything, including a last pass of the result through simplify/size, while a call of the form simplify(A, size) only attempts the simple size manipulations explained in its help page, and simplify/size is pretty good at that.

So, no, your comparison is fallacious and does not have the meaning you imagine it has, because simplify(A) does call simplify(..., size) after simplifying everything else. That said, I agree with @acer. Recent developments in simplify make the result by simplify that you posted originally look more like a bogus thing. It is tracked. I will probably include a fix in one of the following Physics Updates.

Besides the above, where did you get the idea that Mma:-LeafCount is the oracle? Check this more meaningful comparison, including the output of Mma:-LeafCount:


Download simplify_size.mw

 

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

@Kevin Dragnet 
There is a large number of adjustments (~700) in the Physics package of Maple 2024, and several new developments (e.g. DiracConjugate). But the most impactful developments, related to the ability to compute Equations of Movement (actually Field Equations) directly from a Lagrangian, and for computing with spinors without having to represent them with all the spinor indices explicit, were both unfinished. We decided not to present them until then. 

Among other things already visible in the released version (albeit not advertised), concerning General Relativity (GR), the LagrangeEquations command can now compute Einstein's equations from a Lagrangian (density) that depends on first and second order non-covariant derivatives of the metric (the typical situation, e.g. through the Ricci trace); Fundiff has its functionality extended to handle the tensors of GR without having to rewrite them in different ways; diffSubstitute and SortProducts received extensive reviews and enhancements; there is a new concept: D-tensorial derivatives, that allows for representing derivatives of abstract functions of tensorial arguments, as we see in standard textbooks. And perhaps the most important improvements happened in the Physics:-Simplify command regarding tensorial expressions, for example involving non-covariant derivatives in curved spacetimes, a difficult problem that is key in GR. The Physics:-Vectors package also received improvements.

Overall, the case is that we attempted a big jump in functionality in Physics, a breakthrough but it was impossible to do it in one single development cycle. We are targeting completing them for Maple 2024.1.

Meanwhile, these new developments in Physics are entering the Maplesoft Physics Updates (together with posts to appear here in Mapleprimes) as soon as they are ready, from where anyone with Maple 2024.0 will be able to start working with them. I will prepare the first version of these Updates for Maple 2024 tomorrow, including some of these new developments, and intend to do a post regarding the automatic computation of Einstein's equations from a Lagrangian density next week.

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

 

@Hullzie16 
Nice response. Note also that Physics includes an option, cosmologicalconstant that you can set using Setup. This is a copy and paste from the help page for Physics:-Setup:

  • cosmologicalconstant = 
      "0 or any algebraic expression."
    The default value for the cosmological constant is 0, so the Einstein and EnergyMomentum tensors are proportional. You can set the value of this constant to any valid algebraic expression, in which case the relationship defining those two tensors includes an additional term with this constant as usual - try for instance entering Einstein[definition] or EnergyMomentum[definition].
    ​​​​​​​

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

I don't understand yout question. Could you clarify what you mean by "a complex conjugate such as z" which is not conjugate(z)? 

Note also that when loading the Physics package, you can compute with z and conjugate(z) on equal footing, see this MaplePrimes post about Wirtinger derivatives.

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

The function-parameter k is referred as ".. the modulus k entering the definition of the Elliptic, JacobiPQ and InverseJacobiPQ .. " after formula (6) of help(EllipticF). That said, I agree it is clearer to call k 'the modulus' right away to avoid a potential superficial reading confusing it with '.. a parameter m = k^2 ..'. I adjusted the help page accordingly, following your suggestion.

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

@Thomas Richard 

It is not a correction of the latex of previous Maple versions but a completely new, from-scratch, latex, that includes File > Export > LaTeX, and Copy > as LaTeX.

This new latex command is free of all those problems like the one mentioned in this question.

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

@acer@Carl Love@rlopez@C_R

This is now implemented and the change distributed within the Maplesoft Physics Updates v.1482 or newer, for everybody using Maple 2023. As usual, to install, open the GUI and input Physics:-Version(latest).

The solution implemented is at library level, therefore you need to install the Updates. The problem, however, is actually a GUI issue, and is being investigated as such, probably to appear fixed in the GUI directly in the next Maple release or so.

By the way: I noticed approx 100 differences in our test suite, all of them showing a better display now, the improvement hits across the board. Good catch Robert!

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

@Carl Love 
Instead of subs("&uminus0;" = "–", ...) input subs("&uminus0;" = ("–", "fontweight" = "bold"), ...) and you see the difference. Regarding the other two things you mentioned, vertical position and extra very thing space, none is addressable in a simple way, but anyway, I think those are not the main issues.

If we are all on the same page, I will take a look at what happen with the existing typesetting tests and implement the change. Then distribute it within the Maplesoft Physics Updates as usual so that anybody using Maple 2023 can have this improvement.

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

@rlopez 
ndash or uminus0 are just typesetting tokens, about "how it looks". What is behind, so "what it is", is always the same thing, -1, or -x, etc.

So, is ndash preferred to the current (which is uminus0)? In both a number and a letter?

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

1 2 3 4 5 6 7 Last Page 1 of 60