emendes

530 Reputation

6 Badges

9 years, 329 days

MaplePrimes Activity


These are replies submitted by emendes

 @dharr I was surprised that solve and SolveTools:-PolynomialSystem returned a different number of solutions, so I ran a small experiment. I took all combinations of six unknowns and used both solve and SolveTools:-PolynomialSystem to compute the solutions: solve returned 2,170 solutions, while SolveTools:-PolynomialSystem returned only 21 (after doing my best to eliminate duplicates and common solutions). The difference is significant.

Update: I have to check the solutions further.

@dharr I can't use solve or SolveTools:-PolynomialSystem as you did.   They are always divided into two sets: one containing \alpha_{9,*,*} and the other containing \alpha_{14,*,*}. When a solution is found using one of these sets, it always depends on the other set or includes a free parameter. I found only one solution when using all the unknowns \alpha_{9,*,*}.

The answer to your question is yes, they are different solutions.

@dharr Many thanks for pointing this out. The only issue is that, unfortunately, I am trying to find all solutions without any prior knowledge of what they are. So it seems that I will have to check a certain number of combinations of unknowns.

@Carl Love Many thanks.   I don't have a large list right now but I will in a near future.   The last two procedures will be of a great help once I have large lists to analyze. 

@Carl Love Many thanks.   Your explanation was very clear.   

@Carl Love Many thanks.  Sorry but I still have some questions on how the procedures work. 

1) Nterms – it should return the number of terms (monomials) in a polynomial regardless of how the polynomial is presented, correct?

evalb(Nterms(F1)=Nterms(simplify(F1)))

returns false. 

2) How can I include (x4, x3, x2, x1) as an argument to be passed to Key? I work with all kinds of polynomial variables, as you probably remember.

@ecterrab Thanks.  I maybe completely mistaken but DifferentialAlgebra tools needs the definition of a differential ring using derivations and blocks which is not the case in my example.  Even using R:=DifferentialRing(derivations=[t],blocks=[x1,x2,x3,x4]) or R:=DifferentialRing(derivations=[t],blocks=[x]) (and x1=x[t],x2=x[t,t],...) does not result in the order in my example.  

@Carl Love Many thanks.  Yes, simply "degree in x4 (regardless of the presence of other variables)".  I knew it that you would come up a single line to solve the problem while I would spend several lines to do the same. 

One thing is missing: the number of terms in the polynomial. The polynomials in x3​ (F4, F5) have the same degree (2), but the number of terms is 6 and 5, respectively, in your answer. There are also two polynomials in x4 with degree 1, but fortunately, they are in the correct order. This means a check for the number of terms should be performed whenever two or more polynomials belong to the same class (like x3​, for example).

The final order is: [F2,F3,F1,F5,F4,F6]

Obs.: Could you explain why subs is necessary and how key selects the correct degree to consider?

@Carl Love It does once I removed all the aliases from the author's source code.  If I don't remove them, SaveMyProcs saves the procedure without the "d_" (Example: it saves dmcs and not d_cms).  No follow-up question and sorry for the confusion. 

@Carl Love Many thanks. I tried using "suffixed" (not together with "And") before asking the question to see which procedures would be saved. I noticed that procedures such as "dmcs" and "depend" (that do not start with "d_") were also listed. Is there a way to save only the procedures that start with "d_" (including the underscore)?

I found out what was going on.   The author used the command alias (dmcs = d_cms).

@Carl Love Many thanks.   How to add a condition?  I need to save all procedures that start with "d_". 

@dharr It seems that I'll go through all of them one by one.  

Command completion om mac - Settings - interface.   

Many thanks.  

@dharr Thank you very much. There are at least twenty such procedures, and I need to save them all to a single file. Is there a way to find all the user-created procedures and save them to one file?

I have checked the result of issuing the command save.  The output is:

d_remset := proc (ps, as, ord) local ind, i; if _npassed <> 3 then ERROR(
`wrong number of arguments`); elif nops(ps) < 1 or nops(as) < 1 then ERROR(
`no polynomials specified`); elif nops(ord) < 1 then ERROR(
`no indeterminates specified`); elif not type(ord,list) then ERROR(ord,
`must be a list`); end if; if member(false,map(type,ord,name)) then ERROR(
`bad variable list`); end if; ind := 0; for i to nops(as) do if d_class(as[i],
ord) <= ind then ERROR(`second argument must be a non-contradictory (weak-, qua\
si-) ascend            ing set`); else ind := d_class(as[i],ord); end if; end 
do; if type(ps,{list, set}) then if member(false,map(type,ps,polynom(polynom(
rational),ord))) or member(false,map(type,as,polynom(polynom(rational),ord))) 
then ERROR(`input must be polynomials over Q in`,ord); end if; d_remseta(ps,as,
ord); else if member(false,map(type,as,polynom(polynom(rational),ord))) then 
ERROR(`input must be polynomials over Q in`,ord); end if; d_premas(ps,as,ord);
end if; end proc;

Is there any way to get a properly indented output?

On a side note, is there a way to permanently turn off the Maple suggestions that appear when issuing a command (the small window with an example)?

@mmcdara Many thanks. Both options work for me. The second option will also be helpful for another problem.

@mmcdara Thanks a lot! That approach does mimic the original code, but it ends up breaking the other procedures. I really appreciate your help so far, and I’d be grateful if you could stick with me to sort this out too.

Here is an example

PS1 := {df(z,n=1)*df(y,n=1)*df(y,n=2)+3*df(x,n=2), df(z,n=1)*df(y,n=2)+6*x*y,x*df(y,n=1)-2*df(x,n=2)*y};

I need to extract only the base variables. When I use indets(PS1), I get {x, y, y', z', x", y"}, but I need only {x, y, z}. Is there an easy way to do that?

1 2 3 4 5 6 7 Last Page 3 of 23