ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are replies submitted by ecterrab

@prldb 

Could you please also take a look at this other question: "What to take care of when entering a tetrad" - I think it is related to your question now.

Independently, yes the documentation needs to be clear about these things, I will take care of that.

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

@prldb 
I just opened one of your worksheets and clicked !!! - saw the following, which I suppose answers one of your questions. The arguments of P you are entering are not in the correct ordering:

Have a good weekend.

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

Hi
Sorry for the delay in replying. We just finished the forthcoming Maple 2023 and that took all my working cycles. I intend to review Tetrads stuff and the database of solutions to Einstein's equations starting mid-March. We do have the tetrads shown in the book coded, but that is not active (pending a revision); instead, they are computed on the fly, frequently resulting in tetrads not as optimized as the ones shown in the book. I will write here again about that, and if I find time before that will answer the specific questions you pose. Although I am not using Maple 2021 - changes there, it is an older version, are not practically feasible. The answers will concern Maple 2022, either clarifying something if that is the case or fixing if that were the case.

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

@itsme 

It is lprint(Typesetting:-Typeset(%)), not lprint(Typesetting:-Typeset(r)), not Typesetting:-Typeset(%). Yes, Typeset has an uneval restriction on its argument, but using % you workaround that. Your latex/Anticommutator works, but what you are sending to latex is its evaluation, ie. AntiCommutator, not Anticommutator - therefore the output you see. 

Now on the core of your reply: your latex/AntiCommutator does not work because there exists a print/AntiCommutator that takes precedence; probably shouldn't. if you want to make it work, then after you define your latex/AntiCommutator, do these two things unassign(print/AntiCommutator), and if you previously called latex with the same input (as you do in your worksheet), remember to latex(AntiCommutator(b__1, b__2), forget), so that the previous result is erased from latex's remember table.

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

@albivaldmaple 

The answer is further below; see the help page for Physics:-TensorArray.

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

@albivaldmaple 
That is so because the system allows you to compute with the tensors, or with their matrix form according to what you need. What is then missing in your worksheet is as in this image (worksheet attached at the end), just add a call to TensorArray and you get the expected result as (11):

Download Verify_lorentz_transformation_(reviewed).mw

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

@segfault 
If you want coordinates as arbitrary as x1, x2, x3, x4, that is what you get with Setup(coordinates = X), but that are named nu, mu, eta, xi, then input Setup(coordinates = (X = [nu, mu, eta, xi])) as explained in the help pages ?Coordinates and ?Physics,Tensor, also indicated in the first reply

By the way, everybody has the chance to (can) answer, regardless of others having answered.

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

@segfault 

"Input Setup(coordinates = X) and you have a set of arbitrary coordinates"

@segfault 
I pointed out to the help pages where you see how to set an arbitrary system of coordinates - you didn't mention that in your reply - have you seen them? I am not sure you realize: without you showing something, or you pointing out where is that the help pages indicated fail to achieve generality in the coordinate system setting, it is not possible to even guess what you are talking about.  

By the way, the Maple Physics package is geared to both graduate students and research; this is a similar situation: you are making statements, I am trying to understand what you are talking about, you are not showing something supporting your statements - you seem to work in science, then you know how it works: when we make statements, we supported them with something.

Looking forward to seeing what you are seeing but not showing, in order to understand you and give you more concrete feedback.

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

@mmcdara 

e := g(x) = 1/(x^2+1); PDEtools:-dpolyform(e, no_Fn)

`casesplit/ans`([g(x) = 1/(x^2+1)], [])

(1)

Indeed, g(x) = 1/(x^2+1) is already rational in x, so nothing is to be done. Besides the obvious:

diff(e, x)

diff(g(x), x) = -2*x/(x^2+1)^2

(2)

It is also the case, in general, that all rational functions admit hypergeometric form, from where one can always proceed as follows

convert(e, hypergeom, include = powers)

g(x) = hypergeom([1], [], -hypergeom([-2], [], 1-x))

(3)

From where

PDEtools:-dpolyform(g(x) = hypergeom([1], [], -hypergeom([-2], [], 1-x)), no_Fn)

`casesplit/ans`([diff(diff(g(x), x), x) = 2*(diff(g(x), x))^2/g(x)+(diff(g(x), x))/x], [diff(g(x), x) <> 0, (diff(g(x), x))*x+2*g(x) <> 0])

(4)

Now, this is a second order equation, due to the presene of pFq in the last argument in (3), so returning to rational form only that argument

-op(-1, rhs(g(x) = hypergeom([1], [], -hypergeom([-2], [], 1-x))))

hypergeom([-2], [], 1-x)

(5)

subs(hypergeom([-2], [], 1-x) = simplify(hypergeom([-2], [], 1-x)), g(x) = hypergeom([1], [], -hypergeom([-2], [], 1-x)))

g(x) = hypergeom([1], [], -x^2)

(6)

Now the equation is of 1st order

PDEtools:-dpolyform(g(x) = hypergeom([1], [], -x^2), no_Fn)

`casesplit/ans`([diff(g(x), x) = -2*g(x)*x/(x^2+1)], [g(x) <> 0])

(7)

 

Among other commands that - in the case of holonomic functions (e.g. rational in x) - can return the corresponding ODE there is hyperode handling some general forms of hypergeometric pFq functions

DEtools:-hyperode(rhs(g(x) = hypergeom([1], [], -x^2)), g(x))

2*g(x)*x+(x^2+1)*(diff(g(x), x))

(8)

Also FindODE handling mathematical functions (special cases of hypergeom or linear combinations of them)

DEtools:-FindODE(rhs(e), g(x))

2*g(x)*x+(x^2+1)*(diff(g(x), x))

(9)

A more interesting example

arctan(x^(3/2))

arctan(x^(3/2))

(10)

DEtools:-FindODE(arctan(x^(3/2)), g(x))

(5*x^3-1)*(diff(g(x), x))+2*x*(1+x)*(x^2-x+1)*(diff(diff(g(x), x), x))

(11)

It is again a special case of hypergeom (pFq)

convert(arctan(x^(3/2)), hypergeom, include = arctan)

x^(3/2)*hypergeom([1/2, 1], [3/2], -x^3)

(12)

and so it can be handled by hyperode, and also by dpolyform regardless of being a special pFq case

DEtools:-hyperode(x^(3/2)*hypergeom([1/2, 1], [3/2], -x^3), g(x))

x^(5/2)*(5*x^3-1)*(diff(g(x), x))+x^(5/2)*(2*x^4+2*x)*(diff(diff(g(x), x), x))

(13)

DEtools:-dpolyform(g(x) = x^(3/2)*hypergeom([1/2, 1], [3/2], -x^3), no_Fn)

`casesplit/ans`([diff(diff(g(x), x), x) = (-5*x^3+1)*(diff(g(x), x))/(2*x^4+2*x)], [g(x) <> 0])

(14)

And of course there is the older gfun:-algeqtodiffeq , which in this case it requires first to rewrite the expression as a polynomial

numer((lhs-rhs)(e)) = 0

g(x)*x^2+g(x)-1 = 0

(15)

and then it also returns "a differential equation of order zero" (this expression posted is trivial)

gfun:-algeqtodiffeq(g(x)*x^2+g(x)-1 = 0, g(x))

-1+(x^2+1)*g(x)

(16)

NULL

The large jump in generality in dpolyform is that it handles systems of equations, where the equations can be non-holonomic, depend on several independent variables (the output is a PDE system, not just an ODE) and handles abstract powers as well as mathematical functions in general, and arbitrary compostions of all that, this is the first example of its help page

g(x, y) = tan(2*x-y^(1/2))

g(x, y) = tan(2*x-y^(1/2))

(17)

PDEtools:-dpolyform(g(x, y) = tan(2*x-y^(1/2)), no_Fn)

`casesplit/ans`([diff(g(x, y), x) = 2*g(x, y)^2+2, (diff(g(x, y), y))^2 = (1/4)*g(x, y)^4/y+(1/2)*g(x, y)^2/y+(1/4)/y], [diff(g(x, y), y) <> 0, -g(x, y)^2-1 <> 0])

(18)

In this (simpler) example, FindODE can still handle one independent variable at a time, but the output is not a rational function of the unknown, its derivatives, and the independent variable (and takes time to compute ..)

DEtools:-FindODE(rhs(g(x, y) = tan(2*x-y^(1/2))), g(x))

-2*g(x)+cos(2*x-y^(1/2))*sin(2*x-y^(1/2))*(diff(g(x), x))

(19)

DEtools:-FindODE(rhs(g(x, y) = tan(2*x-y^(1/2))), g(y))

g(y)+2*y^(1/2)*cos(2*x-y^(1/2))*sin(2*x-y^(1/2))*(diff(g(y), y))

(20)

Download dpolyform.mw

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

@Kitonum 

Indeed, the integral can be computed. I updated the answer taking that into account, and added comments regarding why the explicit solution with y(x) isolated is valid only in some region.

It would be useful is you:
a) explicitly show the solution you are expecting, as in "A = B" where A is each of the unknowns of your system and B is their form such that the PDE system cancels out.
b) perhaps more importantly, this system you show looks like the system for the infinitesimals of a PDE problem. If so, it would be useful if you could include in your worksheet the PDE problem and how you are computing the linear PDE system for its infinitesimals.

With a) and if it is also the case b) all explicit, it is possible to provide the feedback you are asking for.

Best wishes for 2023!

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

@C_R 
What went wrong is that you input those lines in 2D-Math notation, and then "&DifferentialD;" became "d", which is not what we want. 

Download Differential_format_in_integrals_with_tweak_(reviewed).mw

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

@C_R 
Indeed, as @acer says, I saved the mw using a version of Maple not yet released. It is fixed now, the mw attached to the post is saved with Maple 2022.2 and can be executed without interruptions.

Best and the best wishes for 2023!

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

Hi @Jamie128 
End of the year, slowing down; I'd suggest you to post a worksheet with the modified gravity Lagrangian and what you'd expect as field equations; if possible, show the steps - as a clear sequence, within the text, or point somewhere where we can see the steps you have in mind, and so, what you expect - and from there we see: either that is possible right away, or it might require an adjustment (evolution) of the code.

UPDATE Nov/6/2024: A rather large rewriting of LagrangeEquations happened during 2024, and nowadays yes, it can compute Einstein's equations directly from the Lagrangian and in different ways. See below my reply today about this, that includes a worksheet showing how, at the end of the Examples section.

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

First 6 7 8 9 10 11 12 Last Page 8 of 64