ecterrab

14837 Reputation

24 Badges

21 years, 88 days

MaplePrimes Activity


These are answers submitted by ecterrab

The default signatures implemented in the Physics package have only one sign different, corresponding to the timelike component of the metric. However, it is possible to work with an arbitrary signature, where by that I mean an arbitrary (symmetric) form of the tetrad metric eta[a, b] of a local flat system of references. In particular, you mentioned the signature "(++--)", so below I derive that case but the procedure shown is the way to go in general.

 

with(Physics); with(Tetrads)

_______________________________________________________

(1)

Not necessary, but to simplify steps, set the signature as close as possible to the one you want

Setup(signature = "+++-")

 

At this point I could do all what follows with a Minkowski metric - the procedure is the same - but it would look artificially easy, so let's complicate only one bit by introducing some curvature, the Schwarzschild

metric, so that the metric (setting it and showing it at the same time via "g_[sc])", tetrad and tetrad metric have for components

g_[sc]

Physics:-g_[mu, nu] = Matrix(%id = 36893488151970552996)

(2)

   

The tetrad

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 36893488153385360668)

(3)

The orthonormal tetrad metric, a.k.a "the signature"

eta_[]

Physics:-Tetrads:-eta_[a, b] = Matrix(%id = 36893488153385350796)

(4)

We want the latter, (4), to be "something else". In particular, you asked for `η__a,b` = (Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -1, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = -1})). This case is easy, everything is diagonal. If not, the form of A that follows needs to be more general. So for this case search for a transformation matrixA of this form

A := Matrix(4, symbol = a, shape = diagonal)

Matrix(%id = 36893488153385343204)

(5)

The "new" `η__a,b` is computed via

A.rhs(eta_[]).LinearAlgebra:-Transpose(A)

Matrix(%id = 36893488153385329836)

(6)

By eye, the solution A you are looking for involves the imaginary unit I and is

A := Matrix(4, {(1, 1) = 1, (2, 2) = 1, (3, 3) = I, (4, 4) = 1})

Matrix(%id = 36893488153385314052)

(7)

Check it out: this is the new eta

Eta[a, b] = A.rhs(eta_[]).LinearAlgebra:-Transpose(A)

Eta[a, b] = Matrix(%id = 36893488153385305380)

(8)

Not necessary, but to facilitate a posterior verification, define this Eta[a, b], as a tensor

"Define(?)"

{Physics:-D_[mu], Physics:-Dgamma[mu], Eta[a, b], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-Tetrads:-e_[a, mu], Physics:-Tetrads:-eta_[a, b], Physics:-g_[mu, nu], Physics:-gamma_[i, j], Physics:-Tetrads:-gamma_[a, b, c], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-lambda_[a, b, c], Physics:-Tetrads:-m_[mu], Physics:-Tetrads:-mb_[mu], Physics:-Tetrads:-n_[mu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(9)

Now, from the relationship that defines the tetrad `𝔢`[a, mu] in terms of the tetrad metric eta[a, b]

e_[definition]

Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b]

(10)

you see that the transformation defining your new tetrad is

E[a, mu] = A.rhs(e_[])

E[a, mu] = Matrix(%id = 36893488151943554100)

(11)

Again, not necessary, but to facilitate manipulations, define it

"Define(?)"

{Physics:-D_[mu], Physics:-Dgamma[mu], E[a, mu], Eta[a, b], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-Tetrads:-e_[a, mu], Physics:-Tetrads:-eta_[a, b], Physics:-g_[mu, nu], Physics:-gamma_[i, j], Physics:-Tetrads:-gamma_[a, b, c], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-lambda_[a, b, c], Physics:-Tetrads:-m_[mu], Physics:-Tetrads:-mb_[mu], Physics:-Tetrads:-n_[mu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(12)

So this is the relationship that must be satisfied by the new tetrad and new tetrad metric

"E[a, mu] * E[b,~mu] = Eta[a,b]"

E[a, mu]*E[b, `~mu`] = Eta[a, b]

(13)

TensorArray(E[a, mu]*E[b, `~mu`] = Eta[a, b])

Matrix(%id = 36893488153401475188)

(14)

Now that everything matches, just set the tetrad and the tetrad metric as these ones derived above, equations (8) and (11)

"Setup(tetradmetric= rhs(?), tetrad = rhs(?))"

[tetrad = {(1, 1) = -I*r^(1/2)/(2*m-r)^(1/2), (2, 2) = r, (3, 3) = I*r*sin(theta), (4, 4) = -I*(2*m-r)^(1/2)/r^(1/2)}, tetradmetric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = -1, (4, 4) = -1}]

(15)

Now your tetrad and tetrad metric are set as you want, you are working with a signature "(++--)". You can check it out as follows

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 36893488153401440124)

(16)

eta_[]

Physics:-Tetrads:-eta_[a, b] = Matrix(%id = 36893488153385358508)

(17)

e_[definition]

Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b]

(18)

TensorArray(Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[b, `~mu`] = Physics:-Tetrads:-eta_[a, b])

Matrix(%id = 36893488153377682244)

(19)

Likewise,

e_[a, mu]*e_[a, nu] = g_[mu, nu]

Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[`~a`, nu] = Physics:-g_[mu, nu]

(20)

TensorArray(Physics:-Tetrads:-e_[a, mu]*Physics:-Tetrads:-e_[`~a`, nu] = Physics[g_][mu, nu])

Matrix(%id = 36893488153356963580)

(21)

NULL


 

Download arbitrary_signature.mw

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

dsolve(ode, useInt);  # tests OK, the output involves uncomputed Int(1/(y^2 - 1)^(2/3), y)
value(%);                     # the solution you show, it is problematic

Summarizing, the issue is with the value of Int(1/(y^2 - 1)^(2/3), y).

By the way, dsolve's options useInt and implicit are the ones that help disentangling an issue in dsolve from issues in int or solve.

The latex command got entirely rewritten, from scratch, everything, in Maple 2021. Unfortunately, as a side effect, the latex performance in previous Maples is now out of target. If you post the worksheet you are "Exporting to LaTeX," one could try exporting it using a more modern Maple and post the result here.

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

See FunctionAdvisor(WeierstrassP) and the Digital Library of Mathematical Funtions - Chapter 23, Weirstrass Elliptic and Modular Functions. By clicking the plot section that you see when calling the FunctionAdvisor and comparing it with the plots shown by clicking Graphics in the DLMF you see it is the same function. Comparing 23.2.4 of the DLMF with the first formula shown on the Wikipedia page you posted, you see the Wikipedia one is the same. You can also compare with the definitions shown in the Maple help page for WeierstrassP.

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

Hi Rouben
This is about a new error message in convert/piecewise not caught in time within the internal routines after having computed a solution (for the piecewise form, not the Heaviside form, which requires an optional argument with a method). It is fixed, and the fix is distributed to everybody using Maple 2022 within the Maplesoft Physics Updates v.1257.

PS1: there are other methods that solve the same equation, it is an easy equation; try for instance dsolve(de, [exact]).

PS2: if you find something unclear on the page ?dsolve,parametric, please post the issue, thanks; I will then give it a look.

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

Your code above executes to the end on my computer. You receive, as you ask, the form of the determining PDE system whose solutions are the symmetries of the ODE system. According to the help page for DeterminingPDE, to search for a special form of the generator you can use its third argument, S described as an "(optional) list with the functional form of the infinitesimals of a symmetry generator". Examples (17) and (18), then (20) and (21) illustrate that.

So what is the special form of the generator you are saying in your question, that you can't figure out how to express it on the computer?

PS: this is your worksheet: Executes_fine.mw

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

I do not reproduce your problem. This is what I see:

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1254 and is the same as the version installed in this computer, created 2022, June 21, 12:46 hours Pacific Time.`

(1)

with(Physics); with(Vectors)

Your first input is `#mover(mi("u"),mo("→"))`(t, x, y, z).%Nablatimes `#mover(mi("u"),mo("→"))`(t, x, y, z)

Typesetting[delayDotProduct](u_(t, x, y, z).%Nabla, u_(t, x, y, z), true)

Physics:-`*`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(2)

lprint(%);

Physics:-`*`(u_(t,x,y,z) . %Nabla,u_(t,x,y,z))

 

Your second input means something different: the application of `#mover(mi("u"),mo("→"))`(t, x, y, z).%Nabla to `#mover(mi("u"),mo("→"))`(t, x, y, z), which in the context of Physics:-Vectors is handled by the dot operator, so you get this output

(u_(t, x, y, z).%Nabla)(u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(3)

lprint(%);

(u_(t,x,y,z) . %Nabla) . u_(t,x,y,z)

 

It works fine using 1D input too

> 

(u_(t, x, y, z) . %Nabla) * (u_(t, x, y, z))

Physics:-`*`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(4)
> 

(u_(t, x, y, z) . %Nabla) . (u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(5)
> 

(u_(t, x, y, z) . %Nabla)(u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(6)

NULL

 

Download It_works_fine.mw

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


 

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1236 and is the same as the version installed in this computer, created 2022, May 24, 16:31 hours Pacific Time.`

(1)

f := proc (x, y) options operator, arrow; 1/(2+x*y^2) end proc

(D[`$`(1, j), `$`(2, k)](f))(x, y)

pochhammer(-j, j)*(Sum(binomial(k, _k1)*(Sum(pochhammer(2*k-_k1+1, 2*_k1-2*k)*pochhammer(j-k+1, k)*(y^2)^(j-k)/(factorial(_k1-k)*(2*y)^(_k1-2*k)), k = 0 .. _k1))*(Sum(pochhammer(2*k__1-k+_k1+1, 2*k-2*_k1-2*k__1)*pochhammer(-j-k__1, k__1)*x^k__1*(x*y^2+2)^(-1-j-k__1)/(factorial(k-_k1-k__1)*(2*y)^(k-_k1-2*k__1)), k__1 = 0 .. k-_k1)), _k1 = 0 .. k))

(2)

eval(eval(eval(pochhammer(-j, j)*(Sum(binomial(k, _k1)*(Sum(pochhammer(2*k-_k1+1, 2*_k1-2*k)*pochhammer(j-k+1, k)*(y^2)^(j-k)/(factorial(_k1-k)*(2*y)^(_k1-2*k)), k = 0 .. _k1))*(Sum(pochhammer(2*k__1-k+_k1+1, 2*k-2*_k1-2*k__1)*pochhammer(-j-k__1, k__1)*x^k__1*(x*y^2+2)^(-1-j-k__1)/(factorial(k-_k1-k__1)*(2*y)^(k-_k1-2*k__1)), k__1 = 0 .. k-_k1)), _k1 = 0 .. k)), [j = 2, k = 4]), Sum = add), y = 0)

6

(3)

NULL


 

Download DoubleDerivativeComputed.mw

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

Hi
Note there is a green arrow in the toolbar of the window you use to post. Clicking it you can upload a worksheet with the problem. That helps others help you.

Independent of that, take a look at the help page for "?Physics:-ExteriorDerivative"; from what you show, the Physics command is a simpler approach.
 

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

Hi
This is an issue of the integrator, apparently in the piecewise handler. I added a workaround to it directly in the subroutine for integrating Dirac functions which is part of the Physics package. That resolves the isue and the change is included in the latest Maplesoft Physics Updates (v.1234) for Maple 2022.

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

To enter the metric use Setup(metric = line_element), check the help page, there is a brief subsection/paragraph for 'metric', scanning and reading only that suffices. The covariant derivative operator is D_; again, see the help page. Then just write those derivatives you mention, as you speak. Depending on the level of details you want, see also ?TensorArray and/or SumOverRepeatedIndices.

By the way In ?Physics (scroll) there is a section called "Brief description of each command" where you can get a quick glance at all the existing Physics functionality and links to the corresponding commands.

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

Check it out, it does precisely what you are asking for. The command admits several options; the help page (enter ?SortProducts) contains good examples.

By the way In ?Physics (scroll) there is a section called "Brief description of each command" where you can get a quick glance at the existing functionality and links to the corresponding commands.

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

The command to use is Library:-SubstituteOperator.

> 

with(Physics); Setup(quantumoperators = {A, B, C})

[quantumoperators = {A, B, C}]

(1)
> 

Setup(algebrarules = {%Commutator(A[m], B[n]) = C[m+n]})

[algebrarules = {%Commutator(A[m], B[n]) = C[m+n]}]

(2)
> 

Library:-SubstituteOperator(A[1]*B[2] = 5, A[1]*B[2]*C[4]+C[3])

5*C[4]+C[3]

(3)

Regarding your use of subs or algsubs, they will work only when the expression being substituted is an operand of the target expression. In your first example, this works

> 

subs(A[1]*B[2] = 5, A[1]*B[2]+C[3])

5+C[3]

(4)

because A[1]*B[2] is an operand of A[1]*B[2]+C[3]. You see that using the op command

> 

A[1]*B[2]+C[3]

Physics:-`*`(A[1], B[2])+C[3]

(5)
> 

op(Physics[`*`](A[1], B[2])+C[3])

Physics:-`*`(A[1], B[2]), C[3]

(6)

You see A[1]*B[2] is the first operand,

> 

op(1, Physics[`*`](A[1], B[2])+C[3])

Physics:-`*`(A[1], B[2])

(7)
> 

NULL


PS: For next questions or posts: note there is a green arrow in the window you write the question, clicking that arrow allows for uploading the worksheet itself, as I am doing now. That helps others reproducing your input without having to retype anything.

Download SubstituteOperator.mw

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

Note first that your equation was and is solved by dsolve in terms of Heun functions :

> 

mplinput := (x^4+4*x^3+10*x^2+4*x+1)*(diff(y(x), []))/(4*x^2*(1+x)^2*(x^2+6*x+1))+(2*(x^2+5*x+2))*(diff(y(x), x))/((1+x)*(x^2+6*x+1))+diff(y(x), x, x) = 0

> 

dsolve(mplinput)

y(x) = _C1*x^(1/2)*HeunG(4*2^(1/2)/(3+2*2^(1/2)), (1+2^(1/2))/((3+2*2^(1/2))^3*(-3+2*2^(1/2))^2), 1, 1, 1/2, 1, (x+3+2*2^(1/2))/(3+2*2^(1/2)))*(x+3-2*2^(1/2))^(1/2)/(1+x)^(1/2)+_C2*x^(1/2)*(x^2+6*x+1)^(1/2)*HeunG(4*2^(1/2)/(3+2*2^(1/2)), (1/4)*(18*2^(1/2)+13)/((3+2*2^(1/2))^3*(-3+2*2^(1/2))^2), 3/2, 3/2, 3/2, 1, (x+3+2*2^(1/2))/(3+2*2^(1/2)))/(1+x)^(1/2)

(1)

That said, when indicating the method hypergeometricsols, it was not working as in previous releases; the problem was not related to find_2F1 but related to a mechanism for choosing between Heun and pFq solutions that prioritizes Heun when pFq is expected to be too complicated. I refined that mechanism now, basically: if you ask for pFq then the algorithm will give you pFq regardless of complexity - that is a more proper design, I think. So now we get

> 

dsolve(mplinput, [hypergeometricsols])

y(x) = _C1*x^(1/2)*hypergeom([1/8, 5/8], [1], -16*x^2/((x^2+6*x+1)*(x-1)^2))/((1+x)^(1/2)*(x-1)^(1/4)*(x^2+6*x+1)^(1/8))+_C2*x^(1/2)*hypergeom([1/8, 5/8], [3/4], (1+x)^4/((x^2+6*x+1)*(x-1)^2))/((1+x)^(1/2)*(x-1)^(1/4)*(x^2+6*x+1)^(1/8))

(2)

So thanks for posting this one. The fix is distributed for everybody within the Maplesoft Physics Updates v.1220 and higher.

NULL


 

Download HeunHypergeometric.mw

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

In ?latex, section on tips, you read: "Also, a copy of the maple.sty file, found in the etc directory of your Maple installation (kernelopts(mapledir)), should be in the same directory where you placed the .tex file". That resolves the issue of the commands you do not recognize, and by opening maple.sty in a text editor you can also see what these commands do.

As for "does not display well": Is that the case with or without the maple.sty file? It would help if you could please upload a picture of what looks wrong (after including maple.sty in the right directory, as said above).

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

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