ecterrab

14085 Reputation

24 Badges

19 years, 100 days

MaplePrimes Activity


These are replies submitted by ecterrab

Hi @Josecherukara 
Could you please upload a worksheet (use the Green arrow) with your attempt and where is that you don't know how to move forward?

Best!

I will take a look at this today.

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

It means that your ODE, of third order, got reduced in order by one, and the resulting 2nd order linear ODE is not solvable with the current algorithms, but its solution can be represented with DESol, (equivalent to RootOf but for differential equations). So, since the order got reduced by one, you see an integration constant around, that appeared in the reduction process. @C_R 's explanation below is equivalent to this one.

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

Great everything. I will look at this one right away.

@acer 
Interesting observation, and indeed I goofed: if elision was working with standard typesetting in previous releases, there is a problem to fix; also related to the described "hangs when running wrapped by timelimit". I suppose I didn't notice either because of never using standard typesetting. Also because this was first reported as a bug in dsolve, it is not. Then as "the result of the computation is different depending on typesetting = standard or extended - it is not. All long descriptions. I only noticed the elision issue (worked in previous releases) after reading your succinct reply, @acer .

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

@nm 
You say "So it looks also like the Length of output calculation is affected by typesetting level." That conclusion is wrong, as per what you see messaged on the screen: with typesetting = extended, the GUI just refrains from displaying such a large output (that is so large that it would steel valuable time just to be processed), while when you set typesetting = standard (which is not Maple's default), that intercept mechanism is not present. Note the output is always the same. This is about its display, not about the output.

Regarding the mechanism itself, it is a valuable one. There is no value in displaying a brutally huge expression of who-knows-how-many pages of length, so avoid that and save the time it takes to transform that in superb mathematical typesetting.

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

@vv, @nm, thank you both for alerting-about/investigating this. These bugs need to be fixed. Coding anything advanced requires looking at these issues as highly relevant. OK. In the meantime, use `ODEtools/radnormal`; I coded it 25+ years ago to workaround issues in radnormal when the computational flow goes into differential equation Maple territory.

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

It has never happened before that someone would send to dsolve a problem with initial or boundary conditions AND, in addition, indicated to dsolve the use of this or that method. The problem is of course correctly solved without you indicating the method dsolve should use. On the other hand, I can see (your post now) that it could happen, and the code is not testing for that, going out of the round when tackling the problem. I will fix that unusual situation and upload a fix in one of the next Maplesoft Physics Updates.

NOTE Jul/5: The use of methods when tackling ODE + IC/BC is now implemented and the problem resolved, as mentioned here.

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

Hi @hendriksdf5
Yes and No. Yes: that is one of the help pages; the help page for Physics:-Define is more detailed. No: I meant for you to open the Maple help pages themselves, not a website help page. So:

  • Open Maple
  • Input, literally: ?Physics,Tensors

where the ? makes the help page open. Likewise, input, literally: ?Physics:-Define and the help page for Define will open, directly in your computer, even if you don't have wifi.

Also, while computer algebra is great in general, taking advantage of it requires a quick look at the help page of every new command you use. The impression that we save time by skipping that step is false.

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

I am unable to reproduce this 'hang', regardless of passing or not the argument arbitraryconstants=subscripted, and no matter the value indicated as timelimit. Also, arbitraryconstants=subscripted is already Maple's default, why are you passing that argument? 

I'd suggest you remove your maple.ini and try again to see if you still have a problem. 

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

@vv@acer
All valid points are yours, I think. Still @mmcdara also has a valid point, that I prefer: respect the choice of whoever posted, answer or comment, don't transform it, don't go with "I know better, my intention is good", or think it, but please do not act it, your good intention does not legitimate the action. If you feel there is imperfection (subjective), then let the imperfection be part. I've also seen some of my comments/answers transformed, with good intentions. Still, I'd have preferred to let me manage my own posts.

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

@nm
The isssue is order of precedence. In
map(((X -> odetest(X, ode)) assuming (0 < x, [sol])))
the left-hand side of assuming is (X -> odetest(X, ode)), while what you want is as @C_R indicated:
map(X -> (odetest(X, ode) assuming x > 0), [sol])
In short: the precedence of assuming is higher than that of the arrow operator ->. In situations like this, it is practical to input 
trace(`assuming`, statements = false) so that you see - for example - the order of precedence, and in general what is assuming receiving to its left.

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

@vv 
Although your observation was correct, odetesting lhs-rhs = 0 was succeeding, note that odetest does not expect any particular form of an implicit solution (the other statement of your answer). In this context of ODE solutions, implicit solution means that y(x) is not isolated on the left-hand side, only that. The problem was that in a nested sequence of conditionals, one branch was missing, handicapping the code - not the form of the solution.

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

@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

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