ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are answers submitted by ecterrab

The dsolve command uses many strategies, it would be too long to explain them here. But one thing is easy: instead of using y(0) = 0, you can use y(0) = U, solve for _C1 (solve will now return something - I call it remain), take _C1 = limit(remain, U=0) and you get the value _C1 = infinity you were looking for. This is equivalent to extend solve to, somehow, return infinity. Then take the limit(sol, _C1 = infinity) and you get the solution y(x) = 0.

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

 

Download ugly_ode.mw

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

@nm 

I just saw a question you posted, that seems to have been deleted (?); so I am answering here, it looks like a different but perhaps close to the deleted question.

First, I feel the same way as Carl, both about subsindets (great command) and the set applyrule, match, patmatch, typematch (not really working fine). Although subsindets requires types that sometimes are kinda cumbersome. For Physics I wrote an internal subroutine that replaces to some point those match commands ... It's been some years I'm considering making it complete and transforming that into a full replacement for patmatch.

Anyway, In your deleted question you asked about matching exp(anything)*anything*sqrt(anything) and in the context of subsindets you need a type for that; this is one possibility

> `type/F` := u -> u::`&*`(anything $ 3) and andmap(membertype, [exp(anything), anything, radical], [op(u)])

 So suppose you want to apply some procedure G to expressions of this type, then this works

> subsindets(expression, F, G);

Naturally, in [exp(anything), anything, radical] you can exclude the second operand, which I put it there to illustrate the general case only, where it is can be something more specific. 

Also, instead of creating a type by assigning `type/F`, you may prefer to use a nested type structure built with satisfies; it works the same way, e.g.:

> And(`&*`(anything $ 3), satisfies(u -> andmap(membertype, [exp(anything), radical], [op(u)])))

And use it as in

> subsindets(expression, %, G);


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

SumOverRepeatedIndices.mw

 

 

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

Hi

I'm unable to reproduce this problem, but from the message "unable to log into Maplesoft account," I'd imagine it was some temporary glitch connecting to the MapleCloud server. Either way, have you tried opening Maple and just entering Physics:-Version(latest); that also installs the latest version.

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

I realize your issue is timelimit. But these problems should return in a reasonable time in the first place. The first one hangs in solve and the second one hangs in int; so for the latter, the option 'useInt' (i.e. skip the integration step) makes dsolve return with uncomputed integrals right away. The integral must be something; it hangs both in Maple and Mathematica:

int(-(4*a*y - x^2)^3/(64*a^3*y^3 - 48*a^2*x^2*y^2 + 12*a*x^4*y - x^6 - 8*a^2*y + 2*a*x^2 + 2*a), y = z .. x); # Maple syntax 

Integrate[-(4*y*a - x^2)^3*(64*y^3*a^3 - 48*y^2*a^2*x^2 + 12*y*a*x^4 - x^6 - 8*y*a^2 + 2*a*x^2 + 2*a)^(-1), {y, z, x}] # Mathematica syntax

For the first ode, the option 'implicit' does not help: the call to solve that hangs is intermediate and unavoidable.

Both problems are tracked now in the database of issues to receive a closer look.

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

Hi

A solution to this issue is distributed for everybody within the Maplesoft Physics Updates v.982 and higher - requires Maple 2021.

Details.

Doing elimination first, as Thomas noticed it happens, is not wrong, but depending on the example, there are cases when, instead of helping it makes the problem more difficult. Your eq system today is not precisely one of those examples, but it becomes one after you apply normal to it. So firstly, replacing that call to normal by a call to the internal DE normalizer (normalizes but without complicating the algebraic structure) resolves the problem. Secondly, indirectly, Thomas has a point: depending on the case, one can infer that a first pass performing elimination is unnecessary; I will implement that in v.983 later today or tomorrow.

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

The latex functionality, as well as File > Export > LaTeX got rewritten for Maple 2021. The full translation of a worksheet (yours in this case) looks pretty good to me, as you can see in this image; see pdf and .tex attached. That said, in the context of the new latex of Maple 2021, that Preferences pane is just obsolete. This is what I get for your worksheet, note the automatic linebreaking:

 

z.pdf     z.zip

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

Your 'ave' behaves with regards to Sx, Sy and Sz quite the same as a differential operator. So here is one way to accomplish what you say:

cumulant_(reviewed).mw

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

See the help page ?DifferentialAlgebra,Tools, the command LeadingDerivative; maybe that helps you.

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

Hi

Gradient is correctly (as designed) telling you it expects a scalar. You do not compute the Gradient of a vector, because that would be the Divergence; that command also exists. Then Nabla can compute either the gradient or the divergence, or also the curl. I think you are missing that.

While the documentation of the Physics package is huge (the package itself is huge), the documentation for Physics:-Vectors is small. Try ?Physics:-Vectors, and ?Physics,Vectors,Nabla, it is all explained there. So now my question to you: is the documentation you see insufficient, unclear, or not to the point? (If so it needs a revision and your feedback can be of use/trigger for that).

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

I think there is no "deceiving" action going on. But some comments apply: there are kernel and library ready-made procedures. E.g. 'normal' is kernel, 'simplify' is library, and the type symbol is kernel but the type suffixed is library. Kernel procedures run between 100 x to 1000 x faster. The second comment: both kernel and library procedures are written by people, like you or me. As such there can always be (I'd say there always is) someone who can write a procedure doing the same thing but faster, whether it is kernel or library. In this context, I wouldn't call the slower procedure a deceptive approach to the user; even if it can be easily outperformed (sometimes it depends on the example being tackled by the program), in which case I'd present it as a bogus procedure. Those qualify for tracking in the bug's database and end up reviewed.

To the side, while a software company, like Maplesoft, will do its best to present well-programmed procedures, not even that can be guaranteed 100%. Moreover, beyond performance, I think that there is no software free of bugs. Perhaps free of known bugs, or with a minuscule likelihood of having bugs. Still, sometimes people found naive bugs and that doesn't mean the programmer was deceiving the users. Anyway, in computer algebra, in part because of these things is that alternative ways to verify a computation are relevant, e.g. we have DifferentialAlgebra, DEtools[rifsimp] and DifferentialThomas - three different packages to do the same thing- or justify the existence of verifying command like, e.g., odetest and pdetest.

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

This is curious, it is the first time I see hbar is typeset as `ℏ`. I suspect that points to a mistake in the Typesetting code. By convention, hbar, or anything not of the form `& ... ;` is displayed literally. So latex(hbar) should be latext'd as you see, not as  latex(`ℏ`) (which is what you where expecting). I will try to discover if this display you noticed is not just a Typesetting mistake, or else if there is a good reason (unknown to me) for having such an exception in the display, will adjust latex accordingly.

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

That was a problem in the print routines for the inverse Laplace transform. It is fixed, and the fix available to everybody using Maple 2021 in the latest Maplesoft Physics Updates v.973

By the way, I've been overloaded with a string of Physics activity, code for particle physics and related presentations. I will try to clear up the backlog for Latex this week. There are two fixes pending.

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

The file you refer to as "my latex file" misses basically all the LaTeX CTAN-official packages that the maple.sty expects in place, in the latex file, to translate (say) everything you could see in a Maple sheet.

To see the packages missing in your latex file, go File > Export > LaTeX and look at the preamble, the usepackage{xxx} statements Maple put there. In the specific example that you posted, you cannot remove \usepackage{hyperref} before \usepackage{maple}. Put it there, and you won't see the interruption you show.

That said, there are one natural workaround and one issue, both not mentioned in your post.

The natural workaround: you know, when the latex compiler interrupts asking you as you show, just press 'r' to see what happens, and you see the compilation running to its end even if you do not put any of the usepackage{xxx} that are expected to be there, however, are missing in your latex file.

The issue: in the output by latex or File > Export > LaTeX for this example you posted, there is a non-ASCII and non UTF-8 character in the translation, appearing as \textrm{◦}, that needs to be translated properly. It is a minor thing but also generates a latex compilation interruption, that you also go over it pressing r. It is also easy to adjust; to appear resolved in an upcoming Maplesoft Physics Updates during the week.

Note added May/13: the issues mentioned above are fixed, the worksheet translates with no interruptions and correctly; the adjustments are within the Maplesoft Physics Updates v.977 or newer.

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

 

First 14 15 16 17 18 19 20 Last Page 16 of 59