dharr

Dr. David Harrington

7720 Reputation

22 Badges

20 years, 234 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

@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

I highlighted an unexpected "and" in your input. implicitplot3d is expecting an equation or expression. Please check the code is exactly as in your source. In general it is helpful if you upload your worksheet. Use the green up-arrow Mapleprimes editor, choose the file to upload, click upload and then click one of "insert link" or "insert contents".

@Carl Love You are right. I passed x to the procedure, not a number.

@C_R Yes, you can just subs into a procedure. 

myproc3 := subs(sin = cos, eval(myproc2));

Edit: evalhf@sin also works, I was mistaken earlier. See @Carl Love's comment.

proc.mw

@Saalehorizontale The answer to your original question is that it is a bug in Maple. In the middle of solving, some routine passed something invalid to SolveTools:-Inequality, so that should not have happened.

In your second approach solve is unable to find solutions. I don't know why that is, but solve may try many different "subsolvers" and didn't make a good choice.

In your third choice, the strange output is the output of the parametric solver - as you get with solve(...,parametric). The first line gives a solution that applies for some complicated conditions, the second line says that there are no other solutions (not that it couldn't find one).

I've found that solving with inequalities other than simple ones like k>0 is difficult - Maple can in principle do it but it takes too long in practice, or sometimes gives errors. To go beyond "solve" you get some control over the method used may help. @John May suggested SolveTools:-Algebraic, but there is also the RegularChains package especially RealTriangularize. (solve is supposed to call these as needed.) All of these are for polynomial systems so the presence of sqrt(x) in your systems could be a problem. You can solve that by replacing sqrt(x) with q and then adding an equation q^2 = x.

@Gabriel Barcellos When T is an input, e.g., when solving {eqTPO, eqm, eqm2}, x and beta are given, so you are solving equations in y, y2 and z that have integer exponents; finding y, y2 and z is finding m, m2 and d. But each of x,y,y2 and z depends on beta, so to solve for beta you have to "break apart" these variables. You could write exp(beta) as E and then have equations involving E, but the exponents are no longer integer, so it is much slower (I tried this). So that is not much different from just replacing y etc with the exp() functions, which is just the original slow equations. I tried solving a larger system where the complicated expression did not have exponentials, and the other equations had one each, but this also didn't work - perhaps because of some internal processing fsolve does.

I tried compiling some of these procedures, but it was taking too long. I'll give it a bit more thought. Is is possible that instead of specifying d and finding T, you could specify T and find d?

fsolve allows an initial guess, so as you change d, in principle you can use solution from the last d as a guess. I tried this but it is actually slower, which can sometimes happen. Could you narrow the search ranges - it is still rather wide for T.

@Carl Love You can count 3-cycles this way, but not larger ones. Consider a length 4 walk that goes 2 steps away and then reverses those two steps. This contributes to a non-zero trace for A^4, but is not a cycle.

@GFY Analytic is for complex roots, which is why I thought you wanted them. There are other tools in RootFinding for real zeroes such as NextZero, but fsolve for the workhorse command for real roots (it can do complex roots especially for polynomials).

@jonrdory The simplification difference is probably a version difference; I'm using Maple 2024.2. Probably someone with Maple 2022 can answer your question.

@Mitchell_H I don't really understand what you are asking. It's outside my area so perhaps you can help me understand it. For example in the attached worksheet it is clear that if I know one of the roots then I can find all of the others, just from the factorization in terms of alpha. But can't I pick any one as as the first? It is well known that Mathematica has a different order; so as long as it is consistent I would have thought it was OK?

Download Galois.mw

First 6 7 8 9 10 11 12 Last Page 8 of 78