dharr

Dr. David Harrington

8355 Reputation

22 Badges

21 years, 9 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

I don't have MapleFlow, but frequently have the same problem in Maple. The only solution I know of is to attempt to exit the program via the window's X button. Then you are given the option to save (yes/no/cancel). Sometimes cancel will get you back to a working state, but saving and then restarting from the OS will work.

This actually finds the solution.

Download solution.mw

@vv I was careful to say "that the elimination process does not lead to any valid solutions", not that there are no solutions. Is there another way to get such a solution or did I (or Maple) make a mistake in the step-by-step elimination? 

Edit: I see it is among the solutions to 

SolveTools:-PolynomialSystem(expr2)

 

@selaf @Preben Alsholm's answer works also for this case:

f ≔ x -> local j; seq(x, j=1..5);

As Preben said, this only works for 1-D input. If you try this with 2D input, you get an "invalid arrow procedure" error.

@Saalehorizontale So in terms of your concerns, I guess the conclusion is RegularChains (and Groebner) are reliable in terms of finding all solutions. RegularChains is the modern way to do it, but is hard to understand. Notice that engine = triade in PolynomialSysyems uses RegularChains but then does the work of outputting the solutions in nice form. @John May suggested earlier SolveTools:-SemiAlgebraic but it was too slow. It also uses RegularChains, but returns an easier-to-understand format. The secret may be to find a good variable ordering.

So using RegularChains to find the variable order, and then SolveTools:-SemiAlgebraic to express the solution in a nice form is a possibilty. Trying this worked and gave one solution. (I reversed the variable order in case an elimination order was required.) So I'm worried that it missed some solutions. I would suggest trying some much smaller systems where you know the exact number of solutions to make sure it is working the way you expect.

RegularChains.mw

@philroe Yes, sort should work on anything; try it on your examples or upload your worksheet if it doesn't seem to be working.

@C_R Nice.

The large y values that don't give reality seem to correspond to the same values of m and m2, but these are supposed to be in different ranges, so something not quite right there. I'm not sure about how those ranges were chosen; I do not fully understand the physics.

I agree with your approach with x as a parameter (or we could try z). The exponents are no longer integers, which makes it a much harder problem than before. It think we are close to a phase transition (at d=3?), in which by definition (in an infinite system) the solution is non-analytic/has a singularity. So we expect it to be numerically very difficult. Perhap your sequence of x values found the phase transition, Perhaps it can be approached from the other side and goes crazy at the same point.

@C_R @Gabriel Barcellos @one man I made some progress in analyzing the expressions and squeezed another 50% efficiency out of the some of the earlier parts of the worksheet. I still intend to tackle the more difficult case of solving the three equations for T. Some observations that are speculative at the moment:

1. I think my efficiencies largely arise from efficient evaluation of multivariate polynomials in Maple, and once you go to another form you lose efficiency.

2. Perhaps related to the previous point, making a function with unapply or makeproc leads to much, much slower evaluations.

3. The efficiency of fsolve depends significantly on how the equations are presented - expression or functions. This is more than just efficiency of evaluations, because in all 3 cases I tried, fsolve uses the same method and the same internal initial guess, but the estimated errors and the number of iterations changes a lot. 

@C_R asked about the physics. There are 8 spins on the vertices of a cube, each of which can take on 8 spin states (those in S0). Z0 is the partition function, the sum of the exp() expressions, one for each of the 8^8 states (possible arrangements). m is the resulting magnetization. I'm not clear on the meaning of the requirements at the end, where T is solved for for close values of d.

Campo_Médio_spin_7_2_new5MP.mw

@mmcdara This capability still exists; try

interface(prettyprint = 2, typesetting = standard, labelling = true, labelwidth = 10)

on eq3, but in this case there are not enough large subexpressions, and the main expression is one line long. I recall it being more flexible, but maybe not.

@MDD I updated it slightly. TestOrder is supposed to see monomials

You didn't say what to do with 2*x^2 as a leading term vs x^2, or other possibilities. sort already has a default "lex" order for monomials:

[x, x^2, y^2, y^3, x^2*y, y^2*x, 2*x, 2*x^2]

Is that OK?

I'm assuming you don't care about the order within the sublists?

There are some similar pictures (not the motorcycle available here for download https://www.mapleprimes.com/posts/220466-Plots-Using-Only-Single-Implicit-Functions

It is interesting that :-solve(eq, x) assuming x>0 gives a RootOf and not just nothing, even though they are supposed to be equivalent.

As transcendental equations are unlikely to have exact solutions, I can see why Maple doesn't try too hard on this, which seems to be a special case,

@salim-barzani OK, I see what you did. The problem is actually with the last line, which needs to substitute the case 1 variables.

problem2.mw

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