ecterrab

14702 Reputation

24 Badges

20 years, 274 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

What I see is that where you wrote x'(z) using 2D input, it got interpreted as D(x)(z), as in this image produced copying from your 2D input and pasting into a new line:

So I suggest if you check your 2D input. One way is to right click and convert to 1D, adjust things, then right click and convert to 2D input mode. When I convert to 1D what I read is:

Setup(dimension = 3, coordinates = (X = [z, x[2], x[3]]), metric = L^2*((D(x))(z)^2)*(1/z^2)*(dz^2)-L^2*f(z)*((D(v))(z)^2)*(1/z^2)*(1/f[0])*(dz^2)-2*L^2*(D(v))(z)*(1/z^2)*(1/sqrt(f[0]))*(dz^2)+L^2*(1/z^2)*(dx[2]^2)+L^2*(1/z^2)*(dx[3]^2), quiet);


which, from your question in the worksheet: "why did maple writes derivation in this format D(f)( z) ? ", I believe is not what you wanted to input. And if it is, just not in the desired format, where you read 'metric = ...', replace by 'metric = convert(..., diff)' , to have all the D notation rewritten in terms of diff.

Important: when entering the metric as a line element, to avoid a wrong start due to an input problem here or there, it is convenient to check that the metric is indeed what you want, by entering 'g_[]' (you will see the metric matrix) right after the Setup input line.

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

 

Hi

You asked: "1.) Could there possibly be some erroneous 'reuse' of integration constants going on?"

No.

"2.) Is there some (global) variable that determines what letter is assigned for the integration constants?"

No.

You say: "PS: I think, it makes little sense to upload any code/worksheet here."

To help you, however, it is absolutely necessary a way (worksheet?) to reproduce your problem.

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

in order to have the merge as an infix operator, you can overload, but you can also use the Maple infix operators, i.e. start the name of the procedure with `&`. That allows you to use it as infix. For example (note you enclose with `` when definining the procedure, but not when using it, and you can use &+, or &m, or basically everything else after &)

`&+` := () -> map(op, [args]):

This is how it works

[a, b] &+ [c, d, e] &+ [f]

                            [a, b, c, d, e, f]

If you need to also test the type of the arguments you can use this

`&+` := proc(A::seq(list), $) map(op, [A]) end:

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

 


 

Set any curved spacetime, e.g.

with(Physics)

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

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

(1)

Consider

KroneckerDelta[mu, nu]

Physics:-KroneckerDelta[mu, nu]

(2)

You say: " I think that such an object of type (0,2) is, in fact, the metric itself"

 

Indeed that is what is implemented

TensorArray(Physics[KroneckerDelta][mu, nu])

Matrix(%id = 18446744078355830414)

(3)

g_[mu, nu]-KroneckerDelta[mu, nu]

Physics:-g_[mu, nu]-Physics:-KroneckerDelta[mu, nu]

(4)

Simplify(%)

0

(5)

You also say: "g_[mu,~nu] and g_[~mu,nu] are actually both Kronecker deltas.

 

Yes, that is what it is implemented

"g_[mu,~nu]"

Physics:-g_[mu, `~nu`]

(6)

TensorArray(%)

Matrix(%id = 18446744078355881246)

(7)

"g_[mu,~nu] - KroneckerDelta[mu,~nu]"

Physics:-g_[mu, `~nu`]-Physics:-KroneckerDelta[mu, `~nu`]

(8)

TensorArray(%)

Matrix(%id = 18446744078320768054)

(9)

You also suggested that "SumOverRepeatedIndices(g_[mu,nu]*g_[~nu,~sigma]);" returns a KroneckerDelta. About this, no. Of course it is a matter of design, debatable as everything else, but I prefer as in apples = apples, and oranges = oranges, ie distinguish between the two operations Sum-Over-Repeated-Indices and Simplify.

 

For the implementation details, see http://www.physicspages.com/2012/12/31/kronecker-delta-as-a-tensor/ The Maple help page however needs an overhaul to avoid missunderstandings, I will put this on my working table.

 

Independent of what you say, KroneckerDelta is also used as the KD symbol in Quantum Mechanics in Euclidean spaces. This second meaning - not related to spacetime - was a sort of an implementation problem and from times to times I am tempted to split this command into two ... but till today I haven't found people getting distracted by this ambiguity. In the code, however, this required some gymnastics, and for this reason is that the code avoids as much as possible to return using KroneckerDelta. For example,

"g_[mu,nu] g_[~nu,~sigma]"

Physics:-g_[mu, nu]*Physics:-g_[`~nu`, `~sigma`]

(10)

Simplify(%)

Physics:-g_[mu, `~sigma`]

(11)

In this way people can input KroneckerDelta, it will work as expected, but when possible the code will avoid return it and return using the metric instead.

``


 

Download KroneckerDeltaConsiderations.mw

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

> dsolve(diff(y(x), x) = 3*x^2*(y(x)^2+1), y(x), useInt);
> value(%);
> solve(%, {y(x)});

                                      {y(x) = tan(x^3+3*_C1)}

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

In Maple 2017, infolevel[pdsolve] := 3 will tell you, in the last line of userinfos, whether or not the solution returned is a general solution or a particular one. Additionally, if what you want is a general solution or nothing, then adding the optional argument 'generalsolution' will make pdsolve either return a general solution, or nothing. All this is explained in what's new in DEs in Maple 2017 and pdsolve's help page.

Now on what I think is relevant here: in pdsolve's help page, it tells that the code tries to compute a general solution, and if it fails in computing that kind of solution then it will try to compute a particular solution - several methods are implemented for this purpose too. So, generally speaking, if pdsolve is not returning a general solution it is because the algorithms implemented are not finding it. In cases like this, what is of help is showing how you obtain such a general solution.

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

Hi

See dsolve,details, search for fractional, as in fractional powers, and you see it explained. The problem being that solving for y(x) expressions with fractional powers of y(x) results in 'explicit' solutions that are not valid all around. So: a) dsolve avoids making the solution 'explicit' in those cases - this is what is documented in ?dsolve,details (and I wrote it), and b) you can still force dsolve to return an 'explicit solution' but adding the keyword 'explicit', as in dsolve(ode, explicit).

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

'Hi
In your worksheet you mention a triple integral of the product of the extrinsic curvature (trace of it?) and the determinant of the metric induced on the boundary. But you do not show the 4D spacetime metric you are using, only say it is a Schwarzschild spacetime, for which, generally speaking, the coordinates are spherical and so all the components of the extrinsic curvature are equal to zero (see http://grwiki.physics.ncsu.edu/wiki/Schwarzschild_Black_Hole, K[a,b] = 0). So I suppose there is a piece of information missing: K could have some components different from zero If you use different coordinates (not spherical, for example: Kruskal or Kerr-Schild) or perform a transformation (equivalent to changing the Lapse and/or the Shift), not otherwise. But you do not indicate the coordinates nor any transformation.

In any case: to perform the computation you are mentioning in Maple 2017, for a generic (any) metric, proceed as follows: 1) load Physics, then load its subpackage ThreePlusOne, and you see that two of its commands are 'gamma3_'and 'ExtrinsicCurvature'. 2) Set the 4D spacetime metric (for that, see ?g_). And that is all. The determinant of the 3D induced metric is given by 'gamma3_[determinant]', while the trace of the ExtrinsicCurvature is given by 'ExtrinsicCurvature[trace]'. So your integrand is entered as : "sqrt(gamma3_[determinant}) * ExtrinsicCurvature[trace]". Set the integration limits and press enter to attempt computing the triple integral.

EDITED : I could give this a further look during the weekend, but you need to post a worksheet with the exact form of the metric and coordinates you are using, explicitly. You can check the help page of the Physics:-g_ command (spacetime metric) or the Physics:-Setup command to see how you set the metric, it is easy. Note as well that In the physics.stackexchange.com link you mention there is a Wick rotation.

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

See ?PDEtools,Library, the command you are looking for is called PDEtools:-Library:-GetDepVars. For example:


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

Hi
Your question sounds to me a bit subject to interpretation. A variable, say 'x', is "in memory" in that it is either assigned something, or it is in the remember tables.

If it is assigned, you 'clear' x by entering x := 'x', you know, just unuassigning. it

Clearing 'x' from all remember tables is trickier but implemented in recent Maples: From the help page of forget: "forget(..,x), which will clear all remembered entries in the system that reference x."

So in both cases you do not need to restart. If however you restart you clear the memory that the Maple system as as whole is taking, and for that, as people already said in this thread, using the gc (garbage collector) also allows you to do some of this "free the memory that the system is not using" without restarting; note that the memory freed via gc is mostly that from remember tables.

 

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

This design is intentional, aiming and not making everything psi be anticommutative. For the same reason psi1, psi2 but not psia, are anticommutative. So if you need to work with an unlimited number of anticommutative variables, the prefix approach is the way to go, with numbers. If you prefer to use everything letters, you can state the letters you prefer, for example using Setup(anticommutativeprefix = {psi, psi__a, psi__b, psi__c}). That will allow you to use psi__1, ... psi__n (with n integer) as well as psi__a, psi__b and psi__c.

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

 

 

Hi

Strictly speaking "differential geometry", the DifferentialGeometry package you see in Maple is the only one distributed with the system, and I agree that it is a bit difficult to use. For that reason is that we provided the Lessons and Tutorials, plus the solved examples you see in the help pages; all this material is provided to diminish the learning curve.

Having said that, depending on what you want to do, if you work is related to Lie symmetry methods for differential equations then the PDEtools symmetry routines - that beyond the standard things they also work with anticommutative variables and fucntions -are more thorough and much more intuitive / simpler to use. Or if your work has to do with the geometry of curved spaces and related things, or else it is a problem that can be formulated with tensors, possibly including noncommutative, anticommutative or your-defined algebra rules for them (Commutator and Anticommutatores), even differential operators (new option 'differentialoperators'), in all these cases the Physics package surpasses the functionality found in the DifferentialGeometry package and also are really simpler to use.

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

Hi,

One way is to compute the integral under assumptions specifying the problem more precisely. For example,

 

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

@ThU@John Fredsted 

Interesting observation ... that this is a Typesetting problem, not at all a "Dagger trouble". I just uploaded (check the Maplesoft R&D Physics webpage) a fix to Typesetting so that this hang problem you mentioned with typesetting = standard (which by the way is not Maple's default) doesn't happen anymore.

Now on typesetting = extended: first of all, it is not the case that the problem you pointed out in Error for the Vector constructor is there when you have the Physics update installed. This is so because the Physics update also fixes other issues, especially typesetting ones that interfere with the use of the package.

More important: all the Physics typesetting is based on typesetting = extended. Using the Physics package with typesetting = standard defeats one of the main design points of Physics, which is to have the output as readable as a textbook, instead of like a FORTRAN program - say.

I mentioned this in several other posts but would like to emphasize it: provided that, in a 2D input line, you can input everything in the same way you input it when you type in 1D Maple input mode, and provided that copy from the displayed output to paste in an input line works flawlessly, and nowadays both are true, I definitely prefer to have mathematical display, ie read the displayed output as when I read a textbook - and that only happens with typesetting = extended. If something doesn't work with typesetting = extended, then we just fix it.

Summaryzing: updating your Physics package with the one distributed by Maplesoft from the Maplesoft R&D Physics webpage fixes both typesetting problems: the one you reported today (hangs with the non-default typesetting = standard, that I do not recommend anyway) and the one you reported June 5 in Error for the Vector constructor, and I suggest you to give it a try to typesetting = extended. The advantages of extended typesetting are so many that using it is worth even a the cost of reporting a problem if any, that then is fixed basically right away.

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

Hi John
I noticed this post of yours only now, in connection with another one by you on Dagger. So about this post: If you have installed the Maplesoft Physics update distributed from the Maplesoft R&D Physics webpage, this problem you posted, regarding the typesetting of 'Vector' dissapears completely.

The fact is that the Physics update contains fixes and further developments not just in Physics.To mention but a couple of other things, fixes to: all of Differential Equations, Mathematical Functions, and Typesetting when that is possible and necessary for Physics functionality (as it is in this case), are also included.

I do have the Physics update installed and this is what I see:

So one way to resolve this issue, entirely, is to simply update your Physics package.

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

First 35 36 37 38 39 40 41 Last Page 37 of 60