Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

In addition to being new to Maple 2019, most of its new syntax features only work in 1-D input (aka Maple Input).

@Stretto What happens in your session if you use 

restart:

that is, the output of the restart is suppressed with a colon? (This is just an info-gathering experiment; I'm not claiming that this will or won't solve your blank-line problem!)

 

@Stretto You wrote:

  •  I did look in to memoization but I felt it wouldn't work well since I imagine it would try to remember everything....

It's only used for the specific procedures to which it's applied, not everything.
 

There are two procedure options for limiting the memory used by memoization. The first is 

option remember, system;

With this option, the procedure's remember table is cleared whenever there's a garbage collection. (Whenever you see the memory or time numbers on the status bar change, there's been a garbage collection.)

The second is 

option cache;

A cache is a remember table with a limited number of entries. Once the limit is reached, each new entry causes the removal of the least recently used entry. The default number of entries is 512. That can be changed to some other value, for example, 1024, by

option cache(1024);​​​​​​

Once a procedure has option cache or remember (with or without system), it automatically remembers previously computed values; no explicit assignments are needed, although they are allowed (and often useful).

The command forget can be used to dump remember tables.

Procedures which are local to other procedures can also have remember tables. These will get garbage collected just like any other local.

The statements 'x' = x: and the following with cannot possibly do anything useful, not even display any useful information. I'm wondering what your intention was with those. 

@Carl Love Here are some example solutions under the second pedagogical model that I gave above.
 

Question 1

restart:

v:= t-> t^3-t^2-4*t+4:
maximize(v(t), t= 0..2);

4

Question 2: (ambiguous question)
Answer 1: Net distance:

int(v(t), t= 0..4);

80/3

Answer 2: Total distance:

int(abs(v(t)), t= 0..4);

167/6

Question 3:

restart:

y1:= 5:  y2:= 2*x^2:
int(abs(y1-y2), x= `..`(solve(y1=y2, x)));

(10/3)*10^(1/2)

Question 4:

restart:

y:= 4:
int(Pi*y^2, x= 0..3);

48*Pi

 


 

Download Answers1.mw

If your main interest is the number of partitions of a number rather than the partitions themselves, then this Wikipedia page is more relevant: https://en.wikipedia.org/wiki/Partition_function_(number_theory) It's where I got the recursive formula in my Answer below.

@rwjewett Thank you for the problems, but to understand the scope of the project, we need to see the solutions. In particular, we need to know the extent to which you want Maple's computational abilities to be used. Here are pedagogical models at two extremes:

  1. Minimal computational use of Maple: Maple is only being used as a mathematical typesetting system for a full-English-text exposition of a "by hand" solution as would be found in a textbook's companion solutions manual. If this is the case, it would be easier to do the project with actual mathematical typesetting software.
  2. Minimal textual use of Maple: Maple's computational abilities are used to whatever extent possible with minimal exposition. This would be fairly easy for someone familiar with Maple, especially the Student packages.

There are many levels of gradation between these extremes.

@minhthien2016 As I said in a Reply to the main Question, that's not a solution to the original problem. Regarding my dimensionality argument, allowing a 7th parameter with 6 equations means that the solution space likely has topological dimension 7 - 6 = 1 in C^7, so the probability of an integer solution is no longer infinitesimal.

The solution that you found in your addendum is not a solution to the original equation! The coefficient of x^2 is not a parameter in the original. Allowing that coefficient to be negative changes VV's convexity argument. Allowing it to be a 7th parameter changes my dimensionality argument.

@Carl Love The header has changed, and no longer says Maple 2016.

@Earl I just noticed that the Question header says Maple 2016. I don't know why that is, because the OP has said previously that they have Maple 2019. The code I gave works in 2019. My 3rd example also doesn't work in 2016.

Can you give a meaningful example of legend entries that you would want on an inequal plot? (I wouldn't consider a one-entry legend meaningful; there must be at least two entries.)

We've been telling you for years now: Stop using evalm! Stop using linalg! But you never learn. You ask essentially the same handful of Questions over and over, year after year. 

@Carl Love Three addenda to my Answer:

1. As Acer pointed out, the tabs bar that I speak of doesn't appear if only one worksheet is open. Since the chance that I have only one open at the time of a kernel crash is near nil, this isn't an issue for me.

2. I think that the stop button on the tool bar will only interrupt Maple-level code, not compiled code (I'm not absolutely sure about this). If you press it while compiled code is running, the interruption doesn't occur until control comes back to Maple-level. But you can always kill a kernel the from the OS, such as with WIndows Task Manager.

3. If there's a long queue of screen output to display after the kernel has finished with your code, the stop button unfortunately does nothing. In that case, you're out of luck and need to kill the GUI (from, say, Windows Task Manager).

I remember old user interfaces / OSs (pre-Windows, pre-Maple) for which there was a control key (such as Ctrl-O) to discard the rest of the output queue. Something like that is needed.

@acer You wrote:

  • I ... save the worksheet by closing the GUI using the top corner icon (window decoration button from the OS, which often looks like an X as Carl points out). 

I was referring to closing the worksheet alone---not the whole GUI---by clicking the X that appears to the right of the worksheet's name on the tabs bar, which is the bar below the main toolbar and above the context toolbar in the Standard GUI (in Windows, at least). Not closing the GUI is a major timesaver, especially if you have several worksheets open.

  • When I do this the GUI still offers me the choice to save the worksheet, even though the kernel has crashed.

And the same things happens for me when I click my X. 

First 225 226 227 228 229 230 231 Last Page 227 of 708