rcorless

680 Reputation

12 Badges

4 years, 133 days

Social Networks and Content at Maplesoft.com

Editor-in-Chief of Maple Transactions (www.mapletransactions.org), longtime Maple user (1st use 1981, before Maple was even released). Most obscure piece of the library that I wrote? Probably `convert/MatrixPolynomialObject` which is called by LinearAlgebra[CompanionMatrix] to compute linearizations of matrix polynomials in several different bases. Do not look at the code. Seriously. Do not look. You have been warned.

MaplePrimes Activity


These are replies submitted by rcorless

@C_R The main criteria for publication in Maple Transactions are (1) is this of interest or potential interest to the Maple community (answer: Oh, yes!) and (2) is this well-written.

 

Again we have the answer "Oh yes" as indicated by the first comment.

 

That said, transferring this to Maple Transactions format won't be as easy as I want, I think.  Can MapleSim documents be shared on Maple Cloud?  I don't know!  Doing animations without the cloud would require, I think, making movies and having separate links for each movie.  So there will be some technical difficulties.

 

But I would really, really like it if you submitted this to Maple Transactions (even if it causes me difficulties!)


Very cool stuff.

A link in the original post would have been helpful, yes!

@Saalehorizontale I've known about Regular Chains for a while, but in order to answer your question I am going to have to learn more.  I am starting with a paper that I found here:

https://www.csd.uwo.ca/~mmorenom/Publications/cdlmpxxx.pdf

That paper is relatively clear.  It says, near the beginning, "As a byproduct, the notion of a regular chain supports most end-user needs for solving algebraic and semi-algebraic systems. By "solving", we mean here describing
the locus of the zeros of the input system."

So I think this really will answer your question of how to use RegularChains to solve your systems of equations and inequations.  It will not be a simple journey, though.

As to your other question, "solve" is very clever but uses heuristics, not necessarily algorithms.  So it can miss solutions sometimes.  That's annoying, but it's a very hard (read: actually undecideable) problem that it tackles.  In the restricted case of multivariate polynomial equations, progress can be made.

And has been, with various approaches.   There are all the tools in the Groebner package.  There are the pieces of solve, broken out into user-callable pieces in SolveTools.  There are numerical tools.  There's optimization methods.  You can turn your equations into differential equations and use path-tracking tools (eg dsolve with the numeric option).  You can convert your problem into polynomial eigenvalue problems (this is my go-to technique).

But watching how fast RegularChains solved your problem, and how fast it solved another recent post here on Maple Primes, I think it's time I learned how to use it properly.  I know it's not perfect, and I know there will be a learning curve, but it's time, I think.

-r

I was reading the output wrong.There seem to be five possible values of y, but only 3 positive.  For each of those three, there is one value of x, one value of t, one value of m, one value of p, one value of n, one value of k, and one value of s (computed in that order).  Then the inequalities for each variable can be checked: y>0, x>0, s >0, k between 0 and 1, m between 0 and 1, and some polynomials in y that must be positive.

For instance, this looks like a solution:

And that seems to be the only one that satisfies all the constraints.

The idea is a good one, and is called "Lazy Evaluation" in the community.  Many routines in Maple use it already, internally.  It's a special feature of some parts of the Regular Chains package, for instance.

For your specific example, I believe that the "series" and "asympt" commands have what is called "option remember" so that they don't recompute previously-computed results.  The intention when these features were implemented (forty years ago!) was exactly your request, that one wouldn't spend time recomputing things that you already knew.

If you give us a concrete example, we can explore and see if lazy evaluation is already being used in your case.

Solving without the initial conditions "works" instantly, but returns an Int for y(t) instead of solving together.

soln := dsolve({p__ode, y__ode}, {y(t),p(t)});

# Yields

[{p(t) = tanh((m*g*C__2)^(1/2)*(c__2+t))*(m*g*C__2)^(1/2)/C__2}, {y(t) = Int(p(t)/m,t)+c__1}]

I've not seen this behaviour before. 

Sometimes the issue is "solve" though, so as a general rule when dsolve has an issue with solving something with initial or boundary conditions I try without them, and see what happens.  Sometimes it's quite informative.

@mmcdara a quick work around might be to download the PDF and read it using your existing facilities. The website by default allows reading the PDF online using some sort of container and that's probably what your browser is objecting to. So try to download it by right clicking and choosing download.

They are

  NonresonantForcedRayleighOscillator.ipynb

  SubharmonicForcedRayleighOscillator.ipynb

  SuperharmonicForcedRayleighOscillator.ipynb

  ResonantWeaklyForcedRayleighOscillator.ipynb

  ResonantStronglyForcedRayleighOscillator.ipynb

I added .html versions of those, as well.

Note that this is the first real use I have had of the `diff/f` feature of Maple in a very long time, but boy is it useful here.

We have a refereed section, so not only would your work be proofread, it would be read critically (with the concomitant possiblity of rejection, although in my opinion that would be unlikely; your work looks very good to me).

We have an unrefereed section, so for that one it would be proofread by our copy editor (and such editors who are interested, such as me) with the purpose of improving its readability if necessary.  We also do a light code review, which would take care of that "student" package issue, although I am not aware of anything that would cause problems there. 

Dear C_R,

Please submit this as a paper for Maple Transactions!  We accept Maple documents as "publications" (they wind up in the Cloud, and readable that way) but they count as refereed publications---if you want.

I'd like to see this one in the journal.  I published a paper some years ago myself on a related topic (Jeffery-Hamel flow) https://doi.org/10.1145/1277548.1277564 and the issues you raise are related.

@C_R Maple 2023, build 1689885.  No updates available, so this must be the latest...

@pallav I rather suspect that you didn't actually define A.  I noticed in your original that you just had A = ... and not A := ... but I didn't comment on it because that is an obvious typo (although to be fair it's a common error).

But if you say that something is not working, you have to show everything, in order to let us help you find where the error is!

At the very least, you should give us the error message!

In this case, the error arises because the third argument to "resultant" must be a variable name, not an expression.  But you have put the expression (the value of B) in to the place where the code is expecting a variable name.

@ogunmiloro This forum is run by and for volunteers, and normally one asks for help with something and people freely give it.  It's a good place.

Your request " Please correct type t versus T and do the remaining computation. Thanks" made me smile a bit.  To answer that kind of question would require a bill: I do some consulting, and I normally charge $1000USD per day.  To do your computation for you would require me to ask you several more questions, to make sure that I was solving the problem you really wanted solved.  I'm fairly sure that I could get an answer for you within a day or two, once all the questions were answered.  I'd actually charge only if the answer was satisfactory to you.

It might be worth it for you.  I don't know why you are working on this particular problem, but I do know that many people are interested in similar models, and many of them (perhaps you, also) are well-funded.  

But then it might not be worth it for you, or you might not be well-funded.  In that case, there would have to be some other benefit offered (I don't know, maybe a coauthorship on a paper, but that would need some discussion), for me to do your work for you.  Send me an email if you want to pursue that further.

Or, you could solve the problem yourself, given the answers you've received here.  That's the usual model of interactions here, I believe.  As I said, it's a good place.

If you do manage to solve the problem without me, and write it up in a nice way for publication, please consider Maple Transactions as a place to publish it.  This is an open access journal with no page charges.  See mapletransactions.org . I think that people may well be interested in that, and I would be happy to help you publish it (this time, free of charge---that's my one-day-a-week job :)

-r

I think what you want is the RealTriangularize command in the RegularChains package.  I am trying it now; it's taking a while because it's using exact arithmetic.  In the end, if it succeeds, it will give exactly all the solutions (and a proof that there are no more).  If it doesn't succeed, I will ask the designer (Marc Moreno Maza) if he can make it work with some extra polishing of the input somehow.

@justauser We rewrote the modified equations code at least twice since 1997.  The most recent version is, however, ten years old (it's in my 2013 book with Nic Fillion). 

Here are two implementations from 2015

 modifiedequationTorricelliEuler.mw

modifiedequationTorricelliEulermidpoint.mw

 

These are from the paper "Variations on a Theme of Euler" which is available for free at

 

https://epubs.siam.org/doi/pdf/10.1137/15M1032351

You will see that the code is not at all general: it is applied to a single first order equation.  It is, however, extremely simple.

I should work up some general code, but most of my work nowadays is "ad hoc".

-r

 

1 2 3 Page 1 of 3