Carl Love

Carl Love

27626 Reputation

25 Badges

12 years, 101 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Khair Muhammad Saraz What are the sizes in bytes of some of the worksheet files that you can't edit?

@acer The only reason I can see to use an alias is that it gets back-substitued on output. So, the common usage of an alias for a lengthy algebraic number (such as for use with mod or evala) makes sense to me; without the back-substitution, the output can become too lengthy to be easily readable. Of course, the same would be true for a long transcendental constant, though that's not something as commonly used.

@Ronan @acer I didn't mean to imply that FAIL would be a problem in this particular case, although I see how my writing could be interpreted that way. So, sorry for any confusion I caused. I just meant that it's always something to consider when using is. In this case, it has been checked that it won't cause a problem, so it's fine.

This issue has nothing to do with efficiency.

My experience using is for equalities (identities) is that the vast, vast majority of FAILs occur for true cases (rather than false cases as you suggest). I guess that this is naturally the case because it's far easier to find counterexamples for a false identity than it is to find an iron-clad proof for a true one.

Here's a surprisingly simple case of FAILure of is for a simple trig identity that I recently encountered; yet combine will easily verify it.

Id:= arctan(a) + arctan(b) = arctan((a+b)/(1-a*b)):  assum:= 0 < a, a < 1, 0 < b, b < 1:
is(Id) assuming assum;
                              FAIL

combine((lhs-rhs)(Id)) assuming assum;
                               0

@mmcdara Maple has an automatic worksheet backup feature that you can turn on. Go to Tools ==> Options ==> General ==> Auto-save. By "save", it means it saves a backup copy; your original worksheet isn't overwritten until you explicitly save it.

I have never been unable to kill an individual mserver with Windows Task Manager, and it's something that I've done thousands of times. Killing all of Maple is a big waste of time, and you lose the un-backed-up portion of your worksheet, (Default auto-save interval is 3 minutes.) However, if the mserver has finished its computation already, but there's a huge amount of output still to display (which could take hours for some debugging type outputs), then you need to kill all of Maple unfortunately.

The data given in the original Question has 782 values for both X and Y. I think that the 781 was just a typo, and, indeed, the Vector constructor doesn't need a count when an explcit initializing list is given.

@nm Your final equation has y on both sides, so y isn't isolated.

@Joseph Poveromo You wrote:

  • from which an explicit solution can be obtained

What makes you think that an explicit solution can be obtained? I think that the implicit solution given by dsolve is the best possible.

@dharr You wrote:

  • The help for read says "If the file is in Maple language format, the statements in the file are read and executed as if they were being entered into Maple interactively",

"Maple language format" versus "Maple internal formal" is a dichotomy. The former refers to plaintext files, and the latter refers to ".m" files. The dichotomy is stated clearly on the help page ?save, but stated sloppily on ?read.

@janhardo

Here are two expressions that are obviously mathematically equal. However, they are entered in forms that are sufficiently different that Maple doesn't automatically recognize them as equal, so they are stored separately. I'll call them syntactically distinct.

e1:= (x+1)^2; e2:= expand(e1);

(x+1)^2

x^2+2*x+1

The is command verifies that they are mathematically equal:

is(e1 = e2);

true

Sometimes more-elaborate techniques are required for that verification:

is(simplify(e1 - e2) = 0);

true

But keep in mind that it has been proven (Richardson's theorem) that there are mathematically equal expressions for which the equality can never be verifed.

 

Using evalb just verifies whether they are syntactically identical:

evalb(e1 = e2);

false

Using a relation (=, <, <=, etc.) as the condition of an if statement implicitly invokes evalb:

if e1=e2 then "identical" else "not identical" fi;

"not identical"

 

Download IdenticalVsEqual.mw

@ Brendan McKay: You wrote:

  • I was concerned that the format of the output is not documented, so it might change.

On the off chance that the format changes such that your code cannot interpret it, then you would know that that code is being run in a Maple version newer than the version that you used to write the code. Thus, your stated purpose would be fulfilled anyway.

@mmcdara That's quite impressive work! Can we confirm that the maxima are global (NLPSolve tends to return local optima)?

@dharr Many of the basic functions of number theory distribute over the multiplication of relatively prime factors. These are called multiplicative functions (Wikipedia link). The sum-of-divisors function sigma is one such function. From a few quick read-throughs of the OP's worksheet, I think that he is applying it correctly to products of powers of distinct primes.

@mmcdara You wrote:

  • ...the Statistics:-NonlinearFit solver uses Optimization:-NLPSolve's and this latter supports constraints (for instance p3 > p2, p1 > 0, ...)....

That's not quite true for your example constraints. Strict inequality constraints are not allowed and will be flagged by the syntax checker. So, the examples should be p3 >= p2p1 >= 0.

@C_R Correct, the output of make_nice is not a mathematical expression. Being an expression intended for pretty-printed display, it is essentially a MathML expression constructed via Maple's Typesetting package. You can see this with lprint:

k:= 3/8*ln(x/y):
pp:= make_nice(k):
lprint(pp);

Typesetting:-mcomplete(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mn("3"
),Typesetting:-mn("8")),Typesetting:-mo("&InvisibleTimes;",mathcolor = 
"#909090"),Typesetting:-mrow(Typesetting:-mi("ln",fontstyle = "normal"),
Typesetting:-mo("&ApplyFunction;"),Typesetting:-mfenced(Typesetting:-mfrac(
Typesetting:-mi("x"),Typesetting:-mi("y"))))),Typesetting:-_Hold([(3/8) %* ln(x
/y)]))

I don't understand why you'd want to perform "further mathematical manipulations" on the output of make_nice. Since the output is mathematically equivalent to the input k, why not just perform them on k? However, if you look at the last part of that lprint output, you'll see that it essentially retains a copy of the original expression. So you could do

value(op([-1$3], pp)) * 8

So, in this sense the output of pp is not an endpoint, although I see no good reason not to use simply k*8.

First 10 11 12 13 14 15 16 Last Page 12 of 704