acer

32313 Reputation

29 Badges

19 years, 315 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@rcorless There have been a few prior reports of the Animation toolbar not appearing in some people's Maple 2021.1 GUI.

@mmcdara In my opinion this is not a very good solution. It only happens to work because on the order in which the product is being stored (after uniquification) in memory.

It is fragile, because it can be broken by any intermediate creation of the (new) product with the undesired lexical ordering.

restart;

phi := (1+sqrt(5))/2;

1/2+(1/2)*5^(1/2)

_phi := `#mi("φ")`;

`#mi("φ")`

n*_phi:

plots:-pointplot([seq([n, sin(n*phi)], n = 1000 .. 2000)],
                 symbol = point, axes = boxed, size=[250,250],
                 labels = [n, sin(_phi*n)],
                 labeldirections = [horizontal, vertical]);

 

Download fragile_1.mw

It can also be broken by any subsequent reordering of the product (DAG). This matters because (rather horribly) the typeset facility only stores the expression and does not prevent further evaluation.

restart;

phi := (1+sqrt(5))/2;

1/2+(1/2)*5^(1/2)

_phi := `#mi("φ");`;

`#mi("φ");`

P := plots:-pointplot([seq([n, sin(n*phi)], n = 1000 .. 2000)],
                 symbol = point, axes = boxed, size=[250,250],
                 labels = [n, sin(_phi*n)],
                 labeldirections = [horizontal, vertical]);

sort(n*_phi,order=plex(n,_phi)):

P;

Download fragile_1a.mw

In a similar vein, the OP's original can be (magically) made to work by a fortuitous interjection. But this even more weak and fragile because the typeset syntax does not prevent subsequent evaluation -- here stripping off the uneval quotes and wrecking the label.

restart;

phi := (1+sqrt(5))/2:

phi*n:

plots:-pointplot([seq([n, sin(n*phi)], n = 1000 .. 2000)],
                 symbol = point, axes = boxed, size=[250,250],
                 labels = [n, typeset('sin(n*phi)')],
                 labeldirections = [horizontal, vertical]);

%;

Download fragile_2.mw

I don't think that either of these should be particulalrly recommended, since neither are generally robust.

Since you are obviously having trouble with provided answers because your version is quite old, why don't you bother to tell us explicitly which version you are using?!

Please explain what you mean by providing your example explicitly.

If you mean that you want to compute the area between the envelope curve and the x-axis then please state that.

You wrote that your example is too complicated to solve. That might mean that it is too complicated to be handled purely symbolically, but it's difficult to tell what you mean without seeing it.

You can upload and attach a worksheet using the green up-arrow in the Mapleprimes editor.

Upload a worksheet that contains the definition of f.

That may show us whether f is evalhf'able or compilable. It might even be that performance of individual computations of f(x,y) could be improved.

@jalal If I've correctly understood your followup query then here is one way:

TESTQCMal_ac.mw

@opus64 The phrase "does not contain" is a structural reference. It means that c[n]*(e+f[n]) is not structurally present as a subexpression. Yes, it may be mathematically present, but that's not the same.

That is why I used simplify with side-relations to do a temporary substitution. (There are other ways to get temprary substitutions of compound terms, eg. using freeze & thaw.)

Some notes, which you may (or may not) find useful: Download struct_note.mw

For your farther goal of automatic handling in cases where you don't specify the subexpression (but it gets handled automagically), it might be much better if you could provide one or more much more involved examples. Your first example is so simple that several simplistic coding attempts could find that target subexpression but still fail on some or most or all or your later examples. It's best to provide a hard example for stuff like this, not an easy one.

Show an example of what you are trying to accomplish.

@mmead Thanks for the worksheet. (Providing detailed requirements almost always helps more.)

It might be possible to do something cleaner (for you to use) with objects. If I get something I'll show it. Alas, my time is limited these days.

@mmcdara Using the single command implicitdiff is more direct than your use of five different commands (alias, diff, isolate, map, and factor). 

It's also easier to remember, to type in. Being simpler also makes its use less error-prone and more straightforward to reuse.

These advantages are the central reason why many single commands exist in Maple and other programming languages.

@The function What do you think about the denominator 2*y^3+6*x*y , compared with 2*y^3+6*x as shown in the textbook?

@The function Actually, I meant that you should compare against the solution provided by the textbook, term by term.

Seriously, do that.

How do each compare with your solution done by hand, say?

@The function I suggest that you check the answer.

You could also study the Help page for the implicitdiff command.

Also, you would benefit from browsing the "See Also" cross-reference links when you are looking through the Help system. For example, a link to the Help page for implicitdiff shows in the "See Also" when you look at the Help page for diff (differentiation).

Upload and attach your example.

@alex_b That looks good for the textplot. Actually, the wrapping call to typeset is not necessary, in at least most recent versions.

I forgot to mention in my Answer that wrapping in Typesetting:-mn makes it prettyprint nicely even in regular output, apart from any plotting. Otherwise (as you have it, quoted) the quotation marks show up in regularly typeset 2D Output.

First 121 122 123 124 125 126 127 Last Page 123 of 591