## 13633 Reputation

18 years, 320 days

## MaplePrimes post and TransformCoordinate...

Hi
For a succinct approach to check that these transformations leave the metric invariant, see the help page for Physics:-TransformCoordinates on how to apply it to the metric. Then, for a more general discussion see this MaplePrimes post about Lorentz transformations, though I am not sure that presentation is reproducible in the old Maple 2016 - you may need a newer one.

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

## Fixed within the Maplesoft Physics Updat...

I don't recall seeing this one before; a fix is distributed within the Maplesoft Physics Updates v.1383 or newer.

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

A fix for this that works in Maple 2022 is distributed in the Maplesoft Physics Updates v.1379 or newer. Regarding the issue itself, historically, there were some open/close () surrounding y' within powers, as in this image:

Those unnecessary parentheses got removed from the typesetting of expressions (you see this in recent Physics Updates). That is correct, but a correlated change in latex to enclose y' within {} (because latex represents that as y^') to avoid power of power was missed; it is now in place.

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

A fix for this is distributed for everybody using Maple 2022 within the Maplesoft Physics Updates v.1377. The dsolve command now returns no answer for this ODE; though I still want to revise this further, it might be solvable; for next week.

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

## Setup(coordinates = X)...

Hi

Input Setup(coordinates = X) and you have a set of arbitrary coordinates, with the only assumption that they are real. You can see that for instance entering about(x1). If that assumption is an issue for you (regarding generality), you can always map(u -> Assume(u = u), [X]) and those assumptions disappear.

You can read more about this in the help page ?Physics,Tensors, section 1.a where all this is explained, or in the help page ?Physics:-Coordinates.

If this level of generality is not general enough for your computation, could you please post a worksheet showing where the problem is (where you feel there is a lack of generality), and we continue the conversation from there.

By the way, the special cases Cartesian, cylindrical and spherical when you input Setup(coordinate = <one of those three>) just places additional corresponding assumptions, e.g. phi is between 0 and 2*Pi.

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

## The Physics package...

Hi,
There are two packages with which you can compute mostly everything related to General Relativity: Physics and DifferentialGeometry. For this task, generally speaking, Physics is the way to go in that the package is more modern, its use is more straightforward, it works with standard algebraic Maple expressions, the notation is as in textbooks, and the package is more versatile. All this is documented in the help system.

The pages you may want to look are ?g_ for the metric, ?D_ for the covariant derivative, ?Riemann, ?Ricci and ?Weyl for the corresponding tensors and, generally speaking, part II "Curved spacetimes" of the help page ?Physics,Tensors, That page has a reasonably complete presentation with examples.

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

## PDEtools:-dpolyform...

See the help page with examples for PDEtools:-dpolyform; it does exactly what you are asking for. Although algeqtodiffeq, also mentioned in the answers, achieves the same in some particular cases (the expression must be holonomic, the resulting differential equation can only be linear or the problem is out of the scope of algeqtodiffeq), the dpolyform command is general, can perform the task also when the result involves nonlinear differential equations and handles holonomic and non-holonomic expressions in equal footing.

By the way, both dsolve and pdsolve use dpolyform to rewrite differential equations with mathematical functions and non-integer powers as systems of differential equations rational in the unknowns an its derivatives, in that way making it possible to perform differential elimination in the presence of mathematical functions and non-integer powers.

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

## Exact solution and region of validity...

NOTE Jan/11: answer updated following comment by @Kitonum - the integral can be computed exactly.

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

## latex:-Settings(usedefaultlatexmacros = ...

Hi @nmacsai, you need to change your icon: I mentioned this when you copied mine time ago.

Try latex:-Settings(usedefaultlatexmacros = true). These settings are explained in the ?latex help page, although usedfaultlatexmacros is not yet documented. It is however visible when inputting latex:-Settings(). With usedefaultlatexmacros = true, Maple will use the closer default LaTeX macro instead of the macros found in maple.sty, at the cost of sometimes not achieving a final-pdf-look closer to what you see in the worksheet.

By the way, in the computer algebra world, everything beyond arithmetics has a help page, and it is recommended to take a quick look at it before using a command or answering a question in our minds (in ?latex it is mentioned the maple.sty file)

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

## Second order ODEs...

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

## Tweak...

Hi @C_R,
Yes, it is possible, actually, something that may be worth implementing in general ... Here is the trick.

First, save the original print/xxx routines to be used in the redefined ones:

`print/int_original` := eval(`print/int`):
`print/Int_original` := eval(`print/Int`):

Next, redefine both print/xxx enforcing italicized "d":

print/int` := () -> subsindets(`print/int_original`(args), specfunc(Typesetting:-mo), u -> if op(1, u) = "&DifferentialD;" then subsop(0 = Typesetting:-mi, u); else u; fi):

`print/Int` := () -> subsindets(`print/Int_original`(args), specfunc(Typesetting:-mo), u -> if op(1, u) = "&DifferentialD;" then subsop(0 = Typesetting:-mi, u); else u; fi):

Now you have the italicized d you asked for:

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

## See the recent post on integral vector c...

See the recent post on integral vector calculus; it may be the answer to your question.

Happy new year!

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

## Use matrix instead of Matrix...

Happy new 2023!

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

## How to use it in this example (using Map...

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

## To compute KillingVectors using the dist...

To compute KillingVectors using the distributed Maple, see the help page ?Physics:-KillingVectors. The Examples section contains examples showing how to use the command.

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

 4 5 6 7 8 9 10 Last Page 6 of 56
﻿