Scot Gould

Scot Gould

517 Reputation

14 Badges

10 years, 152 days
Upland, California, United States
Dr. Scot Gould is a professor of physics in the W.M. Keck Science Department of Claremont McKenna, Pitzer, 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 making us of scanning probe microscopes, particularly those which involved natural fibers such as spider silk. More recently, he was involved in developing and sustaining AISS, a full-year multi-unit non-traditional interdisciplinary undergraduate science education course which 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 the computer algebraic and numerical system Maple to assist students in modeling and visualizing physical, and biological, systems. His Dirac-notation based quantum mechanics course is taught solely through Maple. An avid baseball fan, during his spare time, Dr. Gould is traveling, particularly to locations where he can bicycle on smooth, traffic-free roads, visit beaches and/or mountains, and enjoy good food and drink.

MaplePrimes Activity

These are replies submitted by Scot Gould

@mmcdara With a smile on my face, I'll say that from a physicist's stand point, the normal distrbution is the most natural. It allows me to control the width of the distribution curve as well as where it peaks. However, I admit I'm not as familiar with the binomial distribution much beyond counting coin flips or win-losses in sports. Would you be willing to recommend code that would substitute for win_prob as a function of the three variables?

@graleo Mathematica?

@graleo  Are you sure about the equations? If one define qeq as 1.001*P and not 1.001*P^(1/8.758), the solutions can be plotted. 

@Carl Love If the row labels are positive integers, but are clearly not the index numbers, sorting by RowLabels works perfectly.  I wanted to post this "caution" to complete this discussion. 

@Carl Love , @Joe Riel .  Thanks again for your help with the sort within a sort of DataFrames problems I possed. Back in August. In writing up an example, I came across an unexpected outcome, which caused me to question. The 'key' that Carl suggested works, however, if the row labels don't quite match the row number, Maple will get confused in the sort.  Consequenty, sorting by RowLabels does work most of the time, but not aways, but it appears sorting the row numbers always works. 

restart; interface(rtablesize = [5, 6]); poll_data := Import("")



First line is a the headers, so it is removed. poll_data is redefined starting at line 2.

poll_data := poll_data[2 .. (), () .. ()]



Sort by row labels fails. In this example, the primary value is the negative of value in the first column (a type of descending sort), and the secondary value is from column 3 (by state names).

poll_data[sort(RowLabels(poll_data), 'key' = (proc (n) options operator, arrow; [-poll_data[n, 1], poll_data[n, 3]] end proc)), () .. ()]



Sort by row numbers works.

poll_data[sort([seq(1 .. upperbound(poll_data, 1))], 'key' = (proc (n) options operator, arrow; [-poll_data[n, 1], poll_data[n, 3]] end proc)), () .. ()]



poll_data rows are re-labeled starting from 1. Now sorting by row labels works.

poll_data := DataFrame(poll_data, 'rows' = [seq(1 .. upperbound(poll_data, 1))]); poll_data[sort(RowLabels(poll_data), 'key' = (proc (n) options operator, arrow; [-poll_data[n, 1], poll_data[n, 3]] end proc)), () .. ()]






@graleo   It appears this is the first time you have posted to MaplePrimes.  There are folks here who are happy to help.

Use the green "up arrow" to upload your worksheet. It is likely the problem is found in the definition of the "sys2" variable. 

@acer An unexpected discovery. I am pleased to report that so far, in working with new Maple users, this unexpected behavior has not arisen. I suspect that is because the use of the arrow definition is not taught. However, it is important for the more experienced user to know when teaching Maple.

@Lenny Here is an example of using the prime notation within the 2D Maple input.  I used the variable y instead of f to make it more readable, but it works with f

ode := diff(y(x), x, x, x)+a*(diff(y(x), x, x)) = b

diff(diff(diff(y(x), x), x), x)+a*(diff(diff(y(x), x), x)) = b



cond_eqns := ((D@@2)(y))(w) = 0, (D(y))(w) = 0, y(w) = c

((D@@2)(y))(w) = 0, (D(y))(w) = 0, y(w) = c



sols := dsolve({ode, cond_eqns}, y(x))

y(x) = (1/2)*b*x^2/a-b*exp(-a*x)/(a^3*exp(-a*w))-b*(a*w+1)*x/a^2+(1/2)*(a^2*b*w^2+2*a^3*c+2*a*b*w+2*b)/a^3




@Carl Love 

I concur, there is added complexity and nuances when working with a symbolic language vs. a numeric-based language like C++.  Hence my point - be ready for a paradigm shift. Embrace it. The shift should provide computational and problem-solving gifts one probably has never imagined. (I nolonger see it is as a bug.) 

My only suggestion was that the eval, vs. rtable_eval or eval~ would be a intuitive function call for generating a fully evaluated rtable.  

(That said, even though I like “simplicity” of simplify(), I have followed the recommendation of @acer  by using eval~(). )


@opus64 is littered with questions related to the rules within Maple of when a variable is evaluated. I asked the same question less than a year ago;  (Understanding the conditions for when an evaluation occurs required a significant paradigm shift.)

With regards to your question, my favorite answer has been: simplify, as in simplify(V). Who the heck remembers “rtable_eval”? While “eval~(V)” works, I feel “eval(V)” would be more intuitive. 

Aside: I would like to see all appropriate functions in Maple accept vector inputs. The function dsolve does, but solve does not.  (Being able to use vectors with dsolve is awesome - highly intuitive and readable.) 

If you plan to use Maple extensively, then I agree with the other contributors here that understanding the difference between an expression and a function is useful. An inexpensive textbook on using Maple functions is  "Getting Started With Maple" 4th edition, by Doug Meade, 

However, if you plan to use Maple only on occassion and wish to solve your math problems through icons and menu options (you did not indicate which version of Maple you are using), I suggest the Clickable Calculus video instructional series which are free (YouTube.) Go to 


I'm afraid I can't answer Maple 18, but I can tell you @Jean-Baptiste R , this is an option I would like them to provide / fix in 2020.1 

If one is in the text region, say the header, a right-click (alt-click) does bring up the menu to: 
* execute the selection, which it will not perform
* execute the entire worksheet: which it WILL perform

However, if one places the cursor with an execution group, the menu shows no options to execute the worksheet. (But one can hit the execute icon, "!" in the menu bar.) An option in the alt-click menu would be useful.

If one selects a section, or an execution group, there is no option in the alt-click menu to execute either the section or the worksheet. However, the menu bar "!" icon does work. Again, an option here would be useful. 

At a minumum, if one is in the text group, or header of a section, and the alt-click menu provides the option to execute the section, it should do it just like it does for the entire worksheet. (Or remove the option unless the section or set of execution groups are selected. 

Now that you have pointed out this ability to execute solely an section, I can see how it would be very useful - particularly in presentations. 


@Angela6884 I agree, the precision of the cursor on this particular plot is too broad for one to identify the value of f(x) the value at x = 2 with much accuracy.  Hence I suggest you plot a more narrow region.

In addition, if you are not aware, if you use the selection tool at the bottom of the drop-down menu (I have circled the button to show the menu) , then the cursor will follow the line. )  In the plot shown, at the location 2.00004, the value was 80.003 . That shoudl be close enough, yes?

@nm @Carl Love  I don't know next to nothing about the Gamma function, but I thought the integral would be a useful example in class. However, the first thing I noticed about the solution by Mathematica is that it is inversely proportional to beta. So what happens if beta = 0?  This is certainly a solvable integral if beta = 0. 

Next, I compared the integration of the integral for some sample values with the Mathematica solotion. Somewhere, there is a problem because unless beta = 1, the two don't appear to match. (And it is more than a constant.)  



"Int0(alpha, beta) := ∫(e)^(alpha*t^(beta)) ⅆt  :"

"MMsol(alpha, beta) := -(t*(-alpha*t^(beta))^(-1/(beta))*GAMMA(1/(beta), -alpha*t^(beta)))/(beta)  :"

TestMMsol := proc (alpha, beta) print(Int0(alpha, beta), MMsol(alpha, beta), is(Int0(alpha, beta) = MMsol(alpha, beta))); plot([Int0(alpha, beta), MMsol(alpha, beta)], t = -1 .. 1, legend = ["Integration", "Solution"], linestyle = [solid, dot], thickness = [5, 3], color = ["Salmon", "DarkBlue"]) end proc

TestMMsol(1, 1)

exp(t), exp(t), true



TestMMsol(-2, 1)

-(1/2)*exp(-2*t), -(1/2)*exp(-2*t), true



TestMMsol(1, 2)

(1/2)*Pi^(1/2)*erfi(t), -(1/2)*t*Pi^(1/2)*erfc((-t^2)^(1/2))/(-t^2)^(1/2), false


Warning, unable to evaluate 1 of the 2 functions to numeric values in the region; complex values were detected



TestMMsol(1.0, 2.0)

.8862269255*erfi(t), -.5000000000*t*GAMMA(.5000000000, -1.0*t^2.0)/(-1.0*t^2.0)^.5000000000, false


Warning, unable to evaluate 1 of the 2 functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct







@krobe8 The "Export As=" directory is deep in a maple.ini file that is hidden in Windows. See my answer in the question that I possed 4 years ago. 

O happy day!

3 4 5 6 7 8 9 Last Page 5 of 15