Scot Gould

Scot Gould

872 Reputation

14 Badges

11 years, 233 days
Claremont McKenna, Pitzer, Scripps College
Professor of Physics
Upland, California, United States
Dr. Scot Gould is a professor of physics at 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

@Carl Love In a zillion years, I would never have generated your answer. However, when playing with your answer, I wonder if the code

[ seq( p[], p = Iterator:-TopologicalSorts(4, {2 < 3}) ) ]

is sufficient? (I used square brackets to mimic the MMA solution.)

@Gabriel Barcellos , you may find some ideas in this video or in the associated document

@Alfred_F The reason your value for the determinant is incorrect is because you add an extra 0 to the value 30625 returned by the Hessian procedure for d

See the output of line 10 and compare with the expression that generates line 11. 

Your error is common in new users. It is an example of why I recommend neither retyping a line, nor using copy and paste. In my document, the output of procedures are assigned to a variable.

Good luck.  

@nm It was the infolevel command that I couldn't remember to help me to see the steps Maple uses to solve an equation. 

(Hopefully the AI systems are now trained.) 

This is an outcome that frequently comes up in both maximize and minimize when calculating numerical extrema. But I believe neither is designed for numerical solutions. Rather, they are for symbolically deriving the extrema.  See help on the procedure. ?minimize. 

I have found that the Optimization package procedures Minimize and Maximize are more accurate and much faster in such a calculation. But be warned. They return a local extremum. Upvote to @Preben Alsholm for recommending the freely available package for locating a global extremum. 

@C_R ... and it is so much faster. 

@Alfred_F Regarding your document:

1) I've never had a situation where I've needed to use the Hessian matrix. Hence, I don't know what you are asking about it besides how to use Maple to calculate it, given the information you have provided. Consult a true mathematician. 

2) I don't speak German. And the Google Translate app probably does not accurately represent your statements. I am envious of your ability to speak multiple languages. Not being able to speak anything but English is one of the few great regrets I have about my life. 

3) I'm not sure where you are going with this. However, I have made some recommendations and put them in a Maple Worksheet (not a Document. Change the default under Options or Preferences.)  See attached. Note, the value for the determinant is different than the one you obtained. MaplePrimes_Hessian_problem.mw

 

 

@FDS Sorry, but I tried everything, including creating my own XLSX file, but I can't get Import to fail unless the first row is empty. 

@FDS Odd. Works for me.  (Using 2023 so everything uploads and displays.)

restart; currentdir(MyDesktop)

R := Array([["A", "B", "C"], [1, 2, 3], [4, 5, 6]])

fname := "Sample File.xlsx"; ExcelTools:-Export(R, fname)

M := ExcelTools:-Import(fname, output = DataFrame)

module DataFrame () description "two-dimensional rich data container"; local columns, rows, data, binder; option object(BaseDataObject); end module

(1)

M[A .. B]

module DataFrame () description "two-dimensional rich data container"; local columns, rows, data, binder; option object(BaseDataObject); end module

(2)

``


 

Download MaplePrimes_-_DataFrame_with_header.mw

@FDS I'm glad somebody is using the website. I put way more time into writing the documents than I put into the videos. And yet, the traffic on YouTube is more than an order of magnitude greater than the traffic on the website. LOL!

@FDS I use basically the same method as you do. Since I prefer to keep the top line in a text-based format, I don't change it to 'name'. 

 

----------------

 

Addendum. I just looked at Richard's solution. For Maple 2023 and 2024, it produces the results that you want. I did not know that. Hence, no need for the request. 

 

@FDS I also perform the multistep process. I'll send Maplesoft a request for this option.

@Alfred_F 

The reason I suggested the videos is because you described yourself as a beginner and because you asked beginner questions. For example, you said you do not understand why the need to include the command "restart".  This is a command that one should include before starting any problem to make sure all variables are unassigned.

Regarding the semicolons, if you use the Worksheet format (not Document format), which I strongly recommend for new users, then as long as you write one line of code/math expression per execution group, you don't need one at the end of the code/math expression. However, if you put multiple lines of code/expressions within the same execution group, you need a semicolon to separate each line of code. It is NOT like Python. 

The videos cover these types of questions, specifically 3: Writing Symbolic Equations.

Your question about "a structural overview of Maple" isn't very specific. So, allow me to say the following: Maple is an interpretive language program. Most folks interact with it in the form of a call-and-respond format. However, more than 80% of the Maple program is written in the Maple computing language. 

Finally, you need to load a package, or what other systems call a library, because your desired procedure to perform the mathematics is quite specific. It is beyond the fundamentals. Hopefully, this information will help you answer questions beyond the one you are asking. 

YouTube.com/@mapleprof if you prefer short videos on how to use Maple. Start with the playlist Fundamentals. The videos are designed to be watched sequentially.

As @Carl Love points out, in the first case, there is no pre-mature evaluation in the first plot because it is a seq procedure, while there is a pre-mature evaluation in the 2nd plot. However, a new issue arises in the second plot if you try to get around the pre-mature evaluation problem. The points selected by the plot procedure are not integers, as they are in the sequence generated for the first plot. Hence, the following call fails to generate a plot.

plot('t mod 10', t = 1..100)

If one wants to plot t mod 10, one must make sure t is an integer. Even though the following won't produce the first plot, at least it will work. 

plot( ' round(t) mod 10 ', t = 1..100 );

I'm mentioning this other issue since it came up with a colleague of mine just a day ago. 

2 3 4 5 6 7 8 Last Page 4 of 26