ecterrab

13431 Reputation

24 Badges

19 years, 358 days

MaplePrimes Activity


These are replies submitted by ecterrab

@unproductive 

I realize your frustration. Writing in a forum like this one, anyway, is supposed to be more about asking for help, and this is indeed something this forum does well, wonderful people around. Your post, however, may be seen more like a ranting (the frustration at the root, it is part of real life), but only that, without question. People just tried to interpret and help you anyway.

If there is a question or something we could help, I am sure many here would be happy to resolve the issue. No need to wait, or write 100 pages of C++. Perhaps this situation also serves the purpose of understanding more about computer algebra systems: they all have little things here and there that do not flow exactly as it happens in our human brains. Typically it is a small number of things. My experience, without having studied A.I., is that as soon as you get these few things, intuition develops fast and all CAS are easy to use.

In case it is of use for you, my area is theoretical physics, time ago I wrote "Mini-Course: Computer Algebra for Physicists", divided into 10 sections, a course I frequently give in 5 days, and the first five sections are Maple 101, including all the "little things" that (in my view) you need to get familiar with in order to launch. These first five sections certainly cover the question you had about a maple function / procedure, or the like, won't take you more than one afternoon of time and doesn't require writing any program in any language. Maybe looking at those five sections is worth the time for you too - say - before giving up computer algebra systems in general, specially if you work with AI and engineering.

Best

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

@awass@Preben Alsholm@tomleslie,

As Preben noted, a project like Maple, mathematical software, is always work in progress, and by several people. I think we all agree that uniformity is desired, it makes the use of software intuitive. And Maplesoft people developing this Maple strives for uniformity - as humans do, with imperfections here and there. The amount of things to be done is always enormous, prioritizing becomes an art, and the project moves forward as some of you have seen along the years. I see all this as rather normal, not wrong or horrifying.

On this particular issue: some years ago someone asked for Matrix input in dsolve (was it you Preben? I can't remember now). It was easy to implement, so I implemented it - then never remember to update the documentation. Changing the output, however, is not a good idea: lots of programs call dsolve and the output is expected to be of a certain form. Introducing a new form can be a problem unless we introduce a keyword to exceptionally ask for that ... maybe, but then how important is that in this moment if compared with the other things being developed? 

Anyway, the fact is that dsolve/numeric and dsolve/series are nowadays handled by other people, who are involved with other things, and found other projects more relevant than accepting Matrix input.

And then, regarding uniformity, you need to have in mind that not all the sectors of the software advance at the same time, and to hold on developments because of that - to me - doesn't sound like a good idea. I prefer to co-exist with this lack of uniformity regarding advanced features. 

By the way that is also the case of PDEtools, the FunctionAdvisor and Physics: all these packages have advanced features that are still not present all around. To mention but one, consider the automatic matching of portions of keywords and making that matching case-insensitive.

So yes, we want uniformity, but in various situations, it won't be there, and all OK with that. I will update dsolve's page to make it clear that it accepts Matrix input, not by accident, but to fulfill a request made here in Mapleprimes time ago, and this feature won't change in future releases.

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

@utcyp 

As mentioned, this solution involves a symbolic composition of a differential operator (with derivatives with respect to x and y), making its use not straightforward. In practice, unless you find a closed form for this symbolic composition (I couldn't), the only way to use this solution is to truncate the series (from infinite to - say - 10, or whatever number of terms you want). Try for instance simplify(value(subs(infinity = 10, (3)))), then you can evaluate the solution at an arbitrary point (t, x, y).​

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

@Carl Love 

Hi Carl, it seems to me you are reading wrong? Replace, in (8), _F1(x,y) by 1, the rhs of the boundary condition, then M by the explicit procedure (7) and you have the solution returned by pdsolve (3). So you do have something of the form M@@n where M is a procedure, not something where M is algebraic and n a procedure. You may prefer to lprint (3)  to read it properly.

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

@John Fredsted 

I see. It is because the priority of the Physics updates for Maple 2017 is higher than the one I set for this patch to the normalizer of PDEtools. I adjusted the priority now, downloaded the Physics updates for 2017, installed both in the same lib directory, and it works fine, as you see below. The download link for the normalizer of PDEtools is updated too. Could you please try again and let me know if it now works for you? 

with(Physics); Coordinates(X); g_[sc]; with(Tetrads); omegaDef := omega[mu, c, d] = Physics:-`*`(Physics:-`^`(2, -1), Physics:-`*`(e_[`~rho`, c], d_[mu](e_[rho, d])-d_[rho](e_[mu, d]))-Physics:-`*`(e_[`~rho`, d], d_[mu](e_[rho, c])-d_[rho](e_[mu, c])))-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`^`(2, -1), e_[`~a`, mu]), e_[`~rho`, c]), e_[`~sigma`, d]), d_[rho](e_[sigma, a])-d_[sigma](e_[rho, a]))

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (x1, x2, x3, x4)}

 

`Systems of spacetime Coordinates are: `*{X = (x1, x2, x3, x4)}

 

{X}

 

`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 = 18446744078354014686)

 

`Setting lowercaselatin_ah letters to represent tetrad indices `

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

0, "%1 is not a command in the %2 package", Tetrads, Physics

 

omega[mu, c, d] = (1/2)*Physics:-Tetrads:-e_[c, `~rho`]*(Physics:-d_[mu](Physics:-Tetrads:-e_[d, rho], [X])-Physics:-d_[rho](Physics:-Tetrads:-e_[d, mu], [X]))-(1/2)*Physics:-Tetrads:-e_[d, `~rho`]*(Physics:-d_[mu](Physics:-Tetrads:-e_[c, rho], [X])-Physics:-d_[rho](Physics:-Tetrads:-e_[c, mu], [X]))-(1/2)*Physics:-Tetrads:-e_[`~a`, mu]*Physics:-Tetrads:-e_[c, `~rho`]*Physics:-Tetrads:-e_[d, `~sigma`]*(Physics:-d_[rho](Physics:-Tetrads:-e_[a, sigma], [X])-Physics:-d_[sigma](Physics:-Tetrads:-e_[a, rho], [X]))

(1)

Define(omegaDef)

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], 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:-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], omega[mu, c, d], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(2)

And this is what you expect to see with the patch to the PDEtools normalizer installed:

showstat(`PDEtools/Normal`, 33 .. 35)


`PDEtools/Normal` := proc(ee)
local EE, Num, Den, G, `1/den`, `1/num`, LD, LD2, LN, LN2;
       ...
  33       try
  34           `PDEtools/Normal/division`(G,Den,`1/den`)/`PDEtools/Normal/division`(G,Num,`1/num`)
           catch :
  35           `1/den`/`1/num`
           end
       ...
end

 

For next time, any similar situation, this is how you check the priorities of the libraries in use: launch the Browse libraries applet and, in Library, scroll to choose the library you want to inspect.

LibraryTools:-Browse()


 

Download With_the_normalizer_adjusted.mw

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

@acer 

Excellent, and thanks, I edited now that reply and linked there a zip with the mla instead, and indeed it works.

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

 

@John Fredsted 

I see now that in Mapleprimes you cannot attach a mla file. I'll try sending it to you via email - for that purpose could you please write me at physics@maplesoft.com.

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

@tomleslie 

The intended result with this change was indeed to "not hang". Roughly speaking:  1) a bug (as in a wrong result or unexpected crash), 2) a hang (doubly relevant if it was not hanging recently), 3) no result for a problem we know a result exists and how to obtain it, is the order in which I prioritize tackling issues. This was of kind "2)", in a case where pdsolve was not returning a result before, but it was not hanging. I didn't investigate the solvability of the problem itself, mainly due to time constraints. These days too many things are falling on my table. But if you have an approach in mind just post it and that by itself opens a new issue of kind "3)".

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

@John Fredsted 

This is not an official Maplesoft patch but attached is PDEtoolsNormal.mla, a library file that you can place in the lib directory of your Maple 2017 (check kernelopts(mapledir) / lib). That fixes the problem, it is a rather small touch in one routine.

PDEtoolsNormal.mla.zip

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

@leostork 

The potentialities are enormous, DifferentialGeometry is a really powerful package. Could you please post a worksheet with your problem (use the green arrow) and I will try to give it a look soon.

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

@nm 

Before version 73, Physics:-Version() told you only the (latest) version found in the MapleCloud. After you install version 73, the command Physics:-Version itself is updated, so that it tells you both the version in the MapleCloud and the version installed in your computer. By the way Physics:-Version()does nothing but checking versions, it does not install or change anything.

Regarding the Warning message: it is the same you see if you install clicking the Cloud icon then packages then install. It is a bit of an extreme message ... Anyway: the update you install includes the fixes and developments (Physics, DEs and Mathematical functions related) found in the (advanced, to be the next) version of Maple we have at Maplesoft.

If you re-install version 72, you also re-install the previous Physics:-Version command, that only tells you the latest version found in the MapleCloud, and that is 73 regardless of you having reinstalled a previous version. To avoid these confusions is that I updated the command Physics:-Version itself.

How do you know which version you have installed when it is a version before version 73 ? Enter PackageTools:-IsPackageInstalled("Physics Updates").

What is this number "5137472255164416"? It is the MapleCloud ID of the package Physics Updates. The team developing the MapleCloud is considering a way to just pass the package's name, not a number. Until that is implemented, we pass the number, but I never remember this number and you do not need to remember it: just click the cloud icon (top right of a worksheet/document), then click packages, select Physics and click the icon to install it.

Now on your question: if Physics:-Version() told you: "/opt/maple2018/lib/update.mla  MapleCloud version: 72" what that means is that the active version of Physics at that point was the one found in the update.mla library of Maple 2018.1, and that the latest version found in the MapleCloud was version 72. My understanding of this output is that at that point you had no Physics Updates installed whatsoever, or that you installed the update but you forgot to enter 'restart'. For example: enter PackageTools:-Uninstall("Physics Updates"), then restart; then Physics:-Version() and you will see the same "/opt/maple2018/lib/update.mla  MapleCloud version: 73" message (now with 73).

Summarizing: after installing version 73 the potential for misunderstanding is gone since both the version in the cloud and the one in the computer are reported.

Now on the other thing, you say that you noticed a problem in version 73? What is this problem? Let me know please so that we can give it a look? Thanks.

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

@Markiyan Hirnyk 


 

Thanks for the 'nice'.

 

Let's see the rationale of your 'useless'  I am only changing value by %value; that provides understanding of what you are doing, what is going on with your input, not evident with compact blocks of nested commands.

 

So,

restart; %value(eval(1+cos(2*Pi*x)*exp(-4*Pi^2*t)+Int(-(1/2)*cos(tau1)+1-Heaviside(-1+tau1)+tau1*Heaviside(-1+tau1)-tau1*Heaviside(tau1)+Sum(2*cos(n*Pi*x)*exp(-Pi^2*n^2*(t-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0 .. t)+x*sin(t), [x = .5, t = .5]))

%value(1.239712767+Int(-(1/2)*cos(tau1)+1-Heaviside(-1+tau1)+tau1*Heaviside(-1+tau1)-tau1*Heaviside(tau1)+Sum(2*cos(1.570796327*n)*exp(-Pi^2*n^2*(.5-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0 .. .5))

(1)

First thing: this is just not a PDE with Boundary conditions problem but the evaluation of an algebraic expression at some values of x and t. This thus does not speak about the ability to solve PDEs, but about the ability of the Maple system to evaluate this expression.

 

Now, you need to know the system you are using. In Maple, the introduction of floating point numbers is used to indicate you want a numerical result. To perform these numerical computations in the presence of inert functions you use evalf, not value. Indeed value and evalf are two two different commands, used for different purposes.

 

So you want to to perform these numerical computations, let's correct your input by replacing %value by evalf, then evaluating evalf:

eval(%value(1.239712767+Int(-(1/2)*cos(tau1)+1-Heaviside(-1+tau1)+tau1*Heaviside(-1+tau1)-tau1*Heaviside(tau1)+Sum(2*cos(1.570796327*n)*exp(-Pi^2*n^2*(.5-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0 .. .5)), %value = evalf)

1.239712767+Int(-.5000000000*cos(tau1)+1.-1.*Heaviside(-1.+tau1)+tau1*Heaviside(-1.+tau1)-1.*tau1*Heaviside(tau1)+Sum(2*cos(1.570796327*n)*exp(-Pi^2*n^2*(.5-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0. .. .5)

(2)

When using the correct syntax according to the documentation, the result comes almost instantly. And what you see is, simply, that Maple's numerical evaluation of integrals and sums both fail to evaluate numerically this particular integral and this particular sum.

 

Now my question to you: what is your rationale in saying that the difficulty in the numerical evaluation of this integral and this sum is a sign that the progress shown in concretely computing symbolic solutions to PDEs with boundary conditions is useless?

 

I frankly cannot even start following you.

 

Having said what is relevant, two comments to the side.

 

1. If you want to compute this integral and sum symbolically, yes you use value, but then you do not use floating point numbers - that is how the Maple system works. You want to use it - right - you need to learn how to.

 

Let's see restoring value and replacing the evaluation of x and t at 0.5 by 1/2, to use the system according to its documentation, properly.

value(eval(1+cos(2*Pi*x)*exp(-4*Pi^2*t)+Int(-(1/2)*cos(tau1)+1-Heaviside(-1+tau1)+tau1*Heaviside(-1+tau1)-tau1*Heaviside(tau1)+Sum(2*cos(n*Pi*x)*exp(-Pi^2*n^2*(t-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0 .. t)+x*sin(t), [x = 1/2, t = 1/2]))

1-exp(-2*Pi^2)+int(-(1/2)*cos(tau1)+1-Heaviside(-1+tau1)+tau1*Heaviside(-1+tau1)-tau1*Heaviside(tau1)+sum(2*cos((1/2)*n*Pi)*exp(-Pi^2*n^2*(1/2-tau1))*(Pi*sin(n*Pi*tau1)*(Heaviside(-1+tau1)-Heaviside(tau1))*n-cos(tau1)*((-1)^n-1))/(n^2*Pi^2), n = 1 .. infinity), tau1 = 0 .. 1/2)+(1/2)*sin(1/2)

(3)

This result also comes sufficiently fast and with almost no consumption of memory. The integral and the sum both return symbolically uncomputed.

 

Again, if this were an indication that a computer algebra system is useless in computing symbolic solutions to PDEs and boundary conditions, or every other thing for the case, I imagine all computer algebra systems should be abandoned, because all of them fail with some integral and some sum. I really see no point in your statement.

 

2. Just for comparison, try using Mathematica to first numerically, then symbolically compute the integral & sum that Maple doesn't compute.

 

Here is Mathematica input for the numerical integration:

 

1.239713+Integrate[-0.500000*Cos[tau1]+1.000000-1.000000*UnitStep[-1.000000+tau1]+tau1

*UnitStep[-1.000000+tau1]-1.000000*tau1*UnitStep[tau1]+Sum[2*Cos[1.570796*n]

*Exp[-Pi^2*n^2*(0.500000-tau1)]*(Pi*Sin[n*Pi*tau1]*(UnitStep[-1+tau1]-UnitStep[tau1])*n

-Cos[tau1]*((-1)^n-1))*n^(-2)*Pi^(-2), {n, 1, Infinity}], {tau1, 0.000000, 0.500000}]

 

Trying this computation almost swallowed my 32 GB Memory + 8 cores machine, and it returned nothing: I interrupted after 4 minutes and before the collapse of the operative system.

 

And this is the Mathematica input for the symbolic computation of this integral and sum, also interrupted after 4 minutes of nothing coming out and the computer resources disappearing:

 

1-Exp[-2*Pi^2]+Integrate[-1/2*Cos[tau1]+1-UnitStep[-1+tau1]+tau1*UnitStep[-1+tau1]-tau1

*UnitStep[tau1]+Sum[2*Cos[1/2*n*Pi]*Exp[-Pi^2*n^2*(1/2-tau1)]*(Pi*Sin[n*Pi*tau1]

*(UnitStep[-1+tau1]-UnitStep[tau1])*n-Cos[tau1]*((-1)^n-1))*n^(-2)*Pi^(-2), {n, 1,

Infinity}], {tau1, 0, 1/2}]+1/2*Sin[1/2]

 

So for this particular integral and this particular sum: a) neither Maple nor Mathematica can compute them, numerically or symbolically, and b) Maple results pretty fast without exhausting resources while Mathematica seems to go on and on with no result - I prefer Maple's performance.

 

Now: does this mean that Mathematica and/or Maple are not suitable to perform symbolic computation of solutions for PDE problems with boundary conditions (as in useless)? Well, in my opinion, not at all. Both systems are great and excellent platforms to implement the symbolic computation of solutions to PDE & BC problems.

 

Summarizing: the results shown in this post are not just 'nice', much less 'useless', nor there is any rationale, I think, in saying that the numerical or symbolic computation of an integral and sum is an indication of useless in anything, much less in computing symbolic solutions to PDEs.

NULL


 

Download NiceAndUsefull.mw

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

@Mbert 

This is a bug, in `combine/power` with respect to noncommutative objects. I'm working on a fix to be available in the next "Physics Updates" for Maple 2018.

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

@Bland3 

I didn't forget about this one - just working on several other things at the same time, hopefully, will have time to work on this one by the end of tomorrow, or first thing in the list next week.

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

@Mariusz Iwaniuk 

DifferentialThomas and some other Physics sub-projects didn't have the documentation ready for 2018.0. We are aware of that. Working on filling these gaps. One way of doing that is again the "Physics Updates" MapleCloud package, but the mechanism within workbooks to update help pages still needs a revision.

In the particular case of DifferentialThomas, to see the package working you can check ?DifferentialThomas,Examples.

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

First 25 26 27 28 29 30 31 Last Page 27 of 60