ecterrab

13431 Reputation

24 Badges

19 years, 362 days

MaplePrimes Activity


These are answers submitted by ecterrab

This adjustment/fix is available to everybody within the updated library for Physics, Differential Equations and Mathematical Functions, distributed in the Maplesoft R&D Physics, and etc. webpage. BTW the previous adjustment in singular, as well as this one, are both already in place for the next dot release, Maple 2017.3.

Details: indeed, @Preben Alsholm, singular is ancient code (1989, plus posterior modifications), and you are correct: the assumption for _Z1 should be 'integer', not 'posint' for all of [tan, sec, cot, csc], then: for GAMMA(z), Psi(z) and Psi(a, z), singularities occur when z is 'nonposint', regardless of the value of 'a'; for Zeta(a, b, c) there are as well singularities when c::nonposint, that were not being reported. All these singularities are visible through the FunctionAdvisor, which is the most modern code.

I didn't revise further but this already suggests that there may be another set of cases where the information is there (FunctionAdvisor) but the old singular is not aware; a revamp of this singular routine is in order.

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

Hi

There is an oversight in one internal routine. Easy to correct. The adjustment/fix is now available to everyone within the updated library distributed in the Maplesoft R&D Physics, Differential Equations and Mathematical Functions. If there is time (I am not sure about that ..) this fix will also be in the next dot-release, Maple 2017.3.

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

Hi

This problem is already fixed and the fix uploaded so that it is available to everyone. The fix will appear in the next dot Maple release. Meantime, this fix, plus others and several improvements, in the PDE & BC code as well as in dsolve, pdsolve and Physics, can be gotten today by updating the library with the one distributed in the  Maplesoft R&D Physics, Differential Equations and Mathematical Functions webpage.
 

Regarding this fix: some other equations not previously solved are now solved. For example, 

 

This is the problem posted in this thread

PDE2 := diff(g(t, x), t) = diff(g(t, x), x, x)+a*g(t, x); pdsolve([PDE2, g(0, x) = 1])

diff(g(t, x), t) = diff(diff(g(t, x), x), x)+a*g(t, x)

 

g(t, x) = exp(t*a)

(1)

pdetest(%, [PDE2, g(0, x) = 1])

[0, 0]

(2)

With the latest updates these other ones are also solvable

pde[7] := diff(w(x1, x2, x3, t), t, t) = diff(w(x1, x2, x3, t), x1, x2)+diff(w(x1, x2, x3, t), x1, x3)+diff(w(x1, x2, x3, t), x3, x3)-(diff(w(x1, x2, x3, t), x2, x3))

diff(diff(w(x1, x2, x3, t), t), t) = diff(diff(w(x1, x2, x3, t), x1), x2)+diff(diff(w(x1, x2, x3, t), x1), x3)+diff(diff(w(x1, x2, x3, t), x3), x3)-(diff(diff(w(x1, x2, x3, t), x2), x3))

(3)

iv[7.2] := w(x1, x2, x3, 0) = x1^3*x3^2+x2^8*sin(x1), (D[4](w))(x1, x2, x3, 0) = cos(x1)-x2^6*x3

w(x1, x2, x3, 0) = x1^3*x3^2+x2^8*sin(x1), (D[4](w))(x1, x2, x3, 0) = cos(x1)-x2^6*x3

(4)

pdsolve([pde[7], iv[7.2]])

w(x1, x2, x3, t) = -(1/2162160)*t*(t^13*x2-4004*t^9*x2^3+1009008*t^5*x2^5-8648640*t*x2^7-2162160)*cos(x1)+(1/518918400)*(t^16-21840*t^12*x2^2+21621600*t^8*x2^4-1210809600*t^4*x2^6+518918400*x2^8)*sin(x1)+(1/2)*t^4*x1+t^3*x2^5+x1^2*(x1+3*x3)*t^2-t*x2^6*x3+x1^3*x3^2

(5)

pdetest(%, [pde[7], iv[7.2]])

[0, 0, 0]

(6)

 

A few other examples of these improvements are

pde[50] := diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = -x; iv[50] := u(x, 0) = x; `assuming`([pdsolve([pde[50], iv[50]], u(x, t), HINT = strip)], [t > 0, x > 0])

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = -x

 

u(x, 0) = x

 

u(x, t) = x/tan(t+(1/4)*Pi)

(7)

pdetest(%, [pde[50], iv[50]])

[0, 0]

(8)

pde[31] := (diff(r*(diff(u(r, theta), r)), r))/r+(diff(u(r, theta), theta, theta))/r^2 = 0; iv[31] := u(a, theta) = f(theta), u(r, -Pi) = u(r, Pi), (D[2](u))(r, -Pi) = (D[2](u))(r, Pi); `assuming`([pdsolve([pde[31], iv[31]], u(r, theta), HINT = boundedseries)], [a > 0])

u(r, theta) = (1/2)*(2*(Sum(r^n*(sin(n*theta)*(Int(f(theta)*sin(n*theta), theta = -Pi .. Pi))+(Int(f(theta)*cos(n*theta), theta = -Pi .. Pi))*cos(n*theta))*a^(-n)/Pi, n = 1 .. infinity))*Pi+Int(f(theta), theta = -Pi .. Pi))/Pi

(9)

This solution is also out of reach for pdetest.

NULL


 

Download pdsolve_adjustment.mw

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

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

First 30 31 32 33 34 35 36 Last Page 32 of 55