Scot Gould

Scot Gould

697 Reputation

14 Badges

11 years, 81 days
Claremont McKenna, Pitzer, Scripps College
Professor of Physics
Upland, California, United States
Dr. Scot Gould is a professor of physics in the W.M. Keck Science Department of Claremont McKenna, Pitzer, and Scripps Colleges - members of The Claremont Colleges in California. He was involved in the early development of the atomic force microscope. His research has included numerous studies and experiments using scanning probe microscopes, particularly those involving natural fibers such as spider silk. More recently, he was involved in developing and sustaining AISS. This full-year multi-unit, non-traditional, interdisciplinary undergraduate science education course integrated topics from biology, chemistry, physics, mathematics, and computer science. His current interest is integrating computational topics into the physics curriculum. He teaches the use of Maple's computer algebraic and numerical systems to assist students in modeling and visualizing physical and biological systems. His Dirac-notation-based quantum mechanics course is taught solely through Maple.

MaplePrimes Activity

These are replies submitted by Scot Gould

@PerKirkegaard64 . You are not alone in this question.  See this very recent question to MaplePrimes.

I have given up on allowing the use of any electronic device (no phones, no calculators, etc.) on half of my exams. I ask the students questions about concepts and approaches. For the other exams, I leave it as open book, open note, and open internet. I select problems that they cannot find a solution for on the internet, or if they ask an AI generative system, it returns the wrong result.  This leads to a different set of educational experiences.  This approach may not work for you, but it may for others. 

@jrive, one of the major typos I see with folks using Maple is a result of their zoom factor being too small. I write at a zoom factor of at least 150% (ctrl-5 or command-5). Hence, I've made the same typo as you have, but when the input is larger, it is easier to catch.  Just a suggestion. 

@Ronan, I was referring more to the spacing and potentially missing sentences in this post. It read like a poem. Was that intentional? 

In your last question, letters for words and even entire words were missing.  Well, as long as others understand what you are asking, I'll not interfere. But if they don't answer properly, that may be part of the issue. 

@Ronan, your posting is virtually unreadable. I assumed it was a one-off, but your latest question about returning only a select number of terms showed similar problems. Characters, or entire words, are missing. Since I suspect you can speak the King's English far more goodly than I, it has to be some odd connection problem. Yes? Is it something within MaplePrimes? See the image of what you wrote on this question.

@Ali Hassani  ,  

While I cannot help you with the derivatives question, if you are interested in packages that are related to the Fourier series transformation, you might look at the most recent video by Robert Lopez when he investigates what is out there.

He notes that at the beginning, he had hoped some of the procedures would be built into Maple, but they have not. 

@Ronan Thank you. However, the process is the same one proposed by @nm . All I did was upload a document that I provide to the students. For them, it has to be readable. That is why I listed it as a reply and not an answer. 

While there may be good coding reasons for using evalf[n] over evalf(...,n), it is my experience in showing new users the two options, the first option is more confusing. At no other time in learning Maple can I think of a situation where we commonly use "indexed" procedure options.  New users are used to the format of Maple procedure calls being: procedure_name(main_entity, option_1, option_2, etc.). 

While folks may be confused by your last example, I cannot think of a time when it has come up. However, what usually comes up is using simplify, as in the example:

   L := equation_1, equation_2;


New users, and I've done this, assumed that each equation in the sequence is simplified independently of the other, which is not how simplify works. (Nor should it.)

Finally, I can assure you my biggest beef with evalf is that it does not work if one has changed the display precision value. I find 10 sig. figs. too many, so I limit the display to 5. But when I want 20 sig. figs for a value, I expect evalf to list all 20. 

Off soap box.

@Aung Plotting the integrand and calculating numerically each integral may be your only choice.

@paolam, I have uploaded a document, which is shown here. I suggest you download the document to see everything in the document. 

While you say you are a beginner, your code suggests you have far more experience

in coding than one would expect. Hence, I assume you were just being modest.


I suspect you are using the default type of input of Maple. This is 2d input.

It is the input that allows one to write math equations as one sees them in

a document. For example:


sum(exp(-n)/n, n = 1 .. infinity)



If this is the case, then the code that Carl recommended cannot be read by



" interface(rtablesize= [81,24]):  M:= Matrix(      (81,24),       (i,j)-> local k; [seq](indice(C[i][1][k], rorder(orders[j], Sets[k])), k= 1..4)  ):"

Error, invalid arrow procedure

" interface(rtablesize= [81,24]):  M:= Matrix(      (81,24), (i,j)-> local k; [seq](indice(C[i][1][k], rorder(orders[j], Sets[k])), k= 1..4)  ):"



Because of the word "local" without the proc command, the 2d input fails to work


Hence, he proposed a different technique, which included the proc command. He also suggested

sequence making procedure, seq over a for/do loop. I too prefer the seq procedure. It is clean

and incredibly useful.

M := Matrix(81, 24, proc (i, j) local k; ([seq])(indice(C[i][1][k], rorder(orders[j], Sets[k])), k = 1 .. 4) end proc)


Personally, I prefer to write the procedure separately and the square brackets that make the list at the beginning
and the end of the sequence expression.

Mindex := proc (i, j) local k; return [seq(indice(C[i][1][k], rorder(orders[j], Sets[k])), k = 1 .. 4)] end proc; M := Matrix(81, 24, proc (i, j) options operator, arrow; Mindex(i, j) end proc)


However, one can use his original code if one clicks on the Text button at the top when entering

information in the execution group (the group with the > character.)



In "text mode" in the execution group, the code is entered as 1D input, which Maple can use the latest

modifications to the language.


M:= Matrix(
    (i,j)-> local k;
            rorder(orders[j], Sets[k])), k= 1..4)


An alternative to using lots of 1d input, is to insert a Code Edit Region. (From the menu

at the top: Insert "->" Code Edit Region )

interface(rtablesize= [81,24]):



The advantage of a code edit region is that it can find errors and give you warnings before you hit Enter

to execute it.


My last comment is that if you want to see some videos on the basics of Maple, using the 2d input,

may I suggest the website The videos are not entertaining, but they

cover the key concepts within 12 minutes. I go over how to enter input line-by-line. There are also

documents that accompany the video that include info on troubleshooting.



@paolam Carl assumed that you are using 1D input. The code works if you switch to "text" as the input at the execution line. Better yet, embed the code into a Code Edit Region. 

Just an FYI, if you see yourself writing a fair amount of Maple code, not just math commands, may I suggest a nice presentation that occurred during the Maple 2023 Conference by Jürgen Gerhard, Senior Director of Research at Maplesoft.

Dr. Gerhard covers exactly the type of list construction inefficiency that @Carl Love noted in his reply to you. This issue can be found in his discussion of an inefficiently written quicksort procedure. 5:20 into the video. 

Even though I've written code for years in Maple, I continue to go back and rewatch parts of the video. 

Note that the conference has been virtual and free for the past several years. 



1) Why do your uploaded files contain the number 35788?

2) Did you set the conditions in Mathematica such that it returns only results that apply to variables in the real domain, or is the solution that Mathematica returned the only solution that it provided?

@C_R Your analytic solution makes the most sense and has the highest accuracy. What counts here is SA_1 and not the derivative of SA_1. 

@SwissMapleBeginner I've decided that my answer is both correct and wrong simultaneously. The piecewise procedure does play the role of the if-then-else. However, notice my solution does not produce the same results as the others.

IMO, C_R provides the best solution. You don't want the derivative of SA_1 to suddenly become the dosage value; rather, you want the actual value of SA_1 to become the dosage value.

The other solution that is superior is dharr's solution, which includes the event option.  Notice the event option states explicitly what is going to happen at t = 1. 

I apologize for misleading you. I do like my solution because it is readable, but readability does not make it correct.

1 2 3 4 5 6 7 Last Page 3 of 21