ecterrab

14630 Reputation

24 Badges

20 years, 146 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

For a couple of days, there are Maple 2021 and Maple 2022. The corresponding Maplesoft Physics Updates are not the same

  • If you try to install the Updates for Maple 2022 in Maple 2021, it won't work as expected: the Updates for Maple 2022 do not contain the fixes for Maple 2021 because they are already in the Maple library 2022. More critical: the Physics Updates for Maple 2022 rely on things that only exist in Maple 2022.

So, each Maple release has its window of versions of the Physics Updates. How do you know about these windows?

  • By visiting the official Maplesoft Physics Updates webpage. There you read that the latest version for Maple 2021 is v.1181. And that for Maple 2022, we are already in v.1183.
  • By opening the distributed file Physics Updates.mla itself, where you read the same information, going back to the window of Updates for Maple 2018.

With the above in mind, now on your post, @michalkvasnicka. What @tomleslie says is correct:

  • In Maple 2022, Physics:-Version(latest) installs the latest version for Maple 2022. Good.
  • In a previous Maple release, the Physics Updates.mla says that to install the latest for that release you need to enter Physics:-Version(n), where n for each Maple release is shown there on the webpage.

So everything is working as expected. The MapleCloud installer refuses to install the Physics Updates of Maple 2022 in Maple 2021. Your expectation of installing the Updates for Maple 2022 in Maple 2021 - although natural to some point - is not correct.

From this conversation, what can be improved? 

It would be better if, in a previous Maple release (e.g., 2021), when you input Physics:-Version(latest) it installs the latest for that previous Maple release instead of attempting to install "the absolute latest", which is always programmed for the current - not a previous - Maple release. I am coding this improvement now, but it won't work retroactively, only from here on to the subsequent releases.

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

Solving an ODE involves a myriad of different computational steps. Think of them as bricks of a wall. You immediately realize that many of those bricks are useful to solve other ODEs, or even the same one again.

There is a significant amount of code in dsolve that aims at "remembering" those bricks of computations, so that they can be reused without wasting time. That approach is a mimicry of what you do with paper and pencil and is a fantastic thing within dsolve. That also explains the obvious: the second time you tackle the same ODE, dsolve is much faster.

Now how about you want to "not save computational time". Instead, you prefer to recompute again every single thing. As the author of dsolve, I can tell you I definitely not recommend that. Why waste time recomputing again every step if you can remember the result you got the first time? Your answer seems to be "to see again user information about the steps performed to tackle the ODE".

If that is what you want, here is a solution: input PDEtools:-Library:-Forget( ) before "calling dsolve or pdsolve again" and the results for the most relevant previously computed steps are discarded; you will see again the previous user level information.

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

Hi @nm

A fix for this "lack of 'c' in the case of an empty matrix" in Maple 2021 is distributed within the Maplesoft Physics Updates v.1168; to install, input Physics:-Version(latest) and follow instructions.

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

Hi
The error interruption is unexpected, and a fix to that for Maple 2021 is distributed within the Maplesoft Physics Updates v.1167; to install it suffices to input Physics:-Version(latest) and follow instructions.

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

See the Physics package, the spacetime metric help page ?g_, and more general ?Physics,Tensors. The answers to your questions are all there.

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

restart

with(Physics)

Setup(spacetime)

[spacetimeindices = greek]

(1)

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1142 and is the same as the version installed in this computer, created 2022, February 12, 11:16 hours Pacific Time.`

(2)

Define(t[mu])

{Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], t[mu], Physics:-LeviCivita[alpha, beta, mu, nu]}

(3)

NULL

SumOverRepeatedIndices(t[mu]*t[`~mu`])

t[1]*t[`~1`]+t[2]*t[`~2`]+t[3]*t[`~3`]+t[4]*t[`~4`]

(4)

NULL

SumOverRepeatedIndices(t[mu]*t[`~mu`])

t[1]*t[`~1`]+t[2]*t[`~2`]+t[3]*t[`~3`]+t[4]*t[`~4`]

(5)

NULL

SumOverRepeatedIndices(t[mu]*t[`~μ`])

t[mu]*t[`~μ`]

(6)

When you see things like this, try lprint

lprint(%)

t[mu]*t[`~μ`]

 

The following works, because, if the covariant index is A, the contravariant index is ~A (here, A = `μ`)

t[`μ`]*t[`~μ`]

t[`μ`]*t[`~μ`]

(7)

SumOverRepeatedIndices(%)

t[1]*t[`~1`]+t[2]*t[`~2`]+t[3]*t[`~3`]+t[4]*t[`~4`]

(8)

For the same reason, this works

t[`mu`]*t[`~mu`]

t[mu]*t[`~mu`]

(9)

SumOverRepeatedIndices(%)

t[1]*t[`~1`]+t[2]*t[`~2`]+t[3]*t[`~3`]+t[4]*t[`~4`]

(10)

And yet for the same reason this does not work

t[`μ`]*t[`~mu`]

t[`μ`]*t[`~mu`]

(11)

SumOverRepeatedIndices(%)

t[`μ`]*t[`~mu`]

(12)

Likewise neither t[mu] * t[`~μ`], your example, could work. You need to be aware: that shortcut to enter indices that you are using, depending on how you use it for contravariant indices, it results in a different thing, displayed the same way (~mu and `~μ`)

NULL

 

Download greek-index_(reviewed).mw

Edgardo S. Cheb-Terrab

 

Physics, Differential Equations and Mathematical Functions, Maplesoft

I think FunctionAdvisor(plot, Zeta) is the simplest and most comprehensive way of plotting the Zeta function. The plots you will see are not random but follow the NIST (Digital Library of Mathematical Functions), a somehow modern version of the Abramowitz and Stegun book.

Another very convenient way to visualize specific cases of the Zeta function is using plots:-plotcompare with the expression_plot optional argument, e.g. plotcompare(Zeta(z^2/3), expression_plot).

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

Hi
The command that works in general to compute equations of motion (or field equations in the case of field theory, quantum or not) is Physics:-Fundiff, to perform functional differentiation. Take a look, please, at its help page (?Fundiff).

Beyond Fundiff's help page, more examples of computing motion/field equations using Fundiff are found in the help page ?Physics,Examples.

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

with(PDEtools) 

PDEtools:-declare(y(x), prime = x)

`derivatives with respect to`*x*`of functions of one variable will now be displayed with '`

(1)

Now set a label, Y, to represent y(x) and its derivatives using indexed notation, using PDEtools:-diff_table

Y := diff_table(y(x))


Example:

Y[x, x]+Y[] = f(x)

diff(diff(y(x), x), x)+y(x) = f(x)

(2)

show

diff(diff(y(x), x), x)+y(x) = f(x)

(3)

NULL

To also input using prime notation, there is the Typesetting package, as indicated by acer. If, in addition, you have installed the lasted Maplesoft Physics Updates for Maple 2021.2, you can in addition use dot notation for time derivatives together with all the above.

Download Input_using_indexed_notation_for_derivatives.mw

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

 

This problem has a rather simple solution using PDEtools:-Solve , which has a whole set of routines to handle things like this.

r := x*(diff(theta(t), t))^2+y*(diff(`ϕ`(t), t))^2

g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(`ϕ`(t), t))^2

All you need to do is to ask for a solution independent of certain variables, in you example: t

PDEtools:-Solve(r = g, {x, y}, independentof = t)

{x = 4*f+4*T, y = u}

(1)

This is the example you called more complicated. PDEtools:-Solve works fine as well, whether you load Physics or not

with(Physics)

r := x*(diff(theta(t), t))^2+y*(diff(`ϕ`(t), t))^2+z*(diff(theta(t), t, t))+w*(diff(`ϕ`(t), t, t))

g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(`ϕ`(t), t))^2+(f+9)*(diff(theta(t), t, t))+4*s*(diff(`ϕ`(t), t, t))

PDEtools:-Solve(r = g, {w, x, y, z}, independentof = t)

{w = 4*s, x = 4*f+4*T, y = u, z = f+9}

(2)

NULL


Download PDEtools_Solve_independentof.mw

Edgardo S. Cheb-Terrab

Physics, Differential Equations and Mathematical Functions, Maplesoft

Thanks @nm for reporting the problem; the fix is available to everybody by installing the Maplesoft Physics Updates v.1128 or newer.

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

This is fixed, and the fix is available for everybody using Maple 2021.2 by installing the Maplesoft Physics Updates v.1125.

Details: the solution proposed by @mmcdara is correct, but will convert to the commutative :-`*` operator, not to the generalized product operator of the Physics package, that also handles anticommutative and noncommutative variables. The fix introduced converts to the generalized `*` instead of  :-`*`. And if what you wanted when entering [a, b] is their commutator, the solution by @Pascal4QM is the way to go.

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

There is no way you can 'change' the display of these differential operators. Being able to change the display would be equivalent to being able to change the display of - basically - everything else too. Although that is possible, it requires internal programing of the Typesetting routines. Not something for everyone.

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

The following, attempted to transform the implicit solution in explicit, hangs:

> solve(1/tan(1/2*ln(y(x)/x))-ln(x)-_C1, y(x));

I am tracking this in the bugs' database.

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


restartode := diff(w(z), z, z)+f(z)*(diff(w(z), z))+g(z)*w(z) = 0

diff(diff(w(z), z), z)+f(z)*(diff(w(z), z))+g(z)*w(z) = 0

(1)

transformation := eta = int(exp(-(int(f(z), z))), z)

eta = int(exp(-(int(f(z), z))), z)

(2)

If the above is the new independent variable eta, then in the terminology used in the help page PDEtools:-dchange your inverse transformation is of the form

ITR := {transformation, v(eta) = w(z)}

{eta = int(exp(-(int(f(z), z))), z), v(eta) = w(z)}

(3)

The problem with tthe above is that you do not have a simple representation for the direct transformation; that is: you don't know how to express z = F(eta). The best algebraic representation you have for F(eta)is using RootOf, so that the complete transformation you need to use is

TR__complicated := PDEtools:-Solve(ITR, {z, w(z)})

{z = RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z)), w(z) = v(eta)}

(4)

You can us this one, but don't expect something simple right away

PDEtools:-dchange(TR__complicated, ode, [eta, v(eta)], known = all, simplify)

g(RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z)))*v(eta)+(diff(diff(v(eta), eta), eta))*exp(-2*Intat(f(_b), _b = RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z)))) = 0

(5)

In your post, however, you mix variables by expressing g as a function of z, not eta, and ditto for the exponential. To do that, select the first transformation equation in TR__complicated

TR__complicated[1]

z = RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z))

(6)

subs((rhs = lhs)(z = RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z))), g(RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z)))*v(eta)+(diff(diff(v(eta), eta), eta))*exp(-2*Intat(f(_b), _b = RootOf(eta-Intat(exp(-(Int(f(_b), _b))), _b = _Z)))) = 0)

v(eta)*g(z)+(diff(diff(v(eta), eta), eta))*exp(-2*Intat(f(_b), _b = z)) = 0

(7)

And this is the result you show. You can still remove the intat

convert(v(eta)*g(z)+(diff(diff(v(eta), eta), eta))*exp(-2*Intat(f(_b), _b = z)) = 0, Int)

v(eta)*g(z)+(diff(diff(v(eta), eta), eta))*exp(-2*(Int(f(z), z))) = 0

(8)

 

NULL


 

Download given_inverse_transformation_of_the_independent_variable.mw

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

First 12 13 14 15 16 17 18 Last Page 14 of 60