ecterrab

12432 Reputation

24 Badges

17 years, 209 days

MaplePrimes Activity


These are replies submitted by ecterrab

@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.

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

@zenterix 
_i is, indeed, something special after you load the Physics:-Vectors package, e.g. via with(Physics:-Vectors). After that, _i is a unit vector in the x direction, with its mathematical properties all active (see the help page ?Physics:-Vectors)

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

In order to give you feedback it is necessary to reproduce the problem - not possible with your description. Could you please upload a worksheet showing the problem (include text pointing at the problem and what is what you were expecting please). For that purpose, use the Green arrow you see when you write a question or reply to it. Thanks

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

@C_R 
Thanks for your comments. The equation returned is " expression = 0 ", which is mathematically the same as " - expression = 0 ". In particular, I tweaked the design so that if Lagrange's equation is of the form "- A - B = 0", then multiply by -1 to return "A + B = 0". I will give this tweak further thought.

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

@Scot Gould 
Indeed. Count on that.

Meantime, regarding the problem in PackageTools mentioned in this post, I added a fix to PackageTools within the Maplesoft Physics Updates v.1357, so after installing that version of the Physics Updates using the MapleCloud toolbar (that works), you can install subsequent versions as usual by entering Physics:-Version(latest) directly in the GUI (worksheet or document).

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

@Rouben Rostamian  

The problem is still that you don't have the current version of the updated code - Maplesoft Physics Updates. Here are the details:


 

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

Hi @Rouben Rostamian  
I see your version of the Physics Updates is 1342. I have v.1355, and am unable to reproduce the problem. I get

So, could you please update to the current Updates; or otherwise execute tracelast after the error message appears (you may need to repeat the operation twice). That may turn ON the lights. Without reproducing the problem, it cannot be "fixed".

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

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