Scot Gould

Scot Gould

637 Reputation

14 Badges

12 years, 66 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

@Kitonum at the moment, that is. 

@Kitonum  This doesn't address the main question, but I was quite pleased to see that manually breaking the vector up into separate equations is no longer required. 
 

"restart;  x(t):=<x1(t), x2(t)>: A:=<1,-2; 4,-5>:  b:=<3,7>:  eq:=diff(x(t),t)=A*x(t)+b :  icseq:= x(0)=<x10, x20>;  dsolve({eq, icseq});"

Vector[column](%id = 18446746075614301590) = Vector[column](%id = 18446746075614301710)

 

{x1(t) = exp(-t)*(1-x20+2*x10)+exp(-3*t)*(-4/3+x20-x10)+1/3, x2(t) = exp(-t)*(1-x20+2*x10)+2*exp(-3*t)*(-4/3+x20-x10)+5/3}

(1)

``


 

Download dsolve_vector.mw

@Carl Love Sure I can read and code using OOP, but that isn't my first inclination. Your comments are helpful.  (My overarching objective is to massage the Maple experience is to make it as intuitive as possible to the new user. I'll leave the tough work of implementation to the professionals.)

@Glowing And thanks for the link for suggestions. 

@acer How did you discover fmod? I can't find a description in the help. (2019.2.1)

@Glowing I concur if that is one’s intent. However, when I do use evalf with n, the precision of the calculation, it is never for small number of digits in the precision. Rather it for those occasions I require far more Digits in that calculation than is required for the rest of the worksheet. And there is no point in running the entire worksheet with such a high number of digits.

In concusion, I'm in agreement with Carl Love. The function was designed as intented and that if any modification of the function is highly likely to break previous code. The hope is that a new function is created.

As an addendum, here is my low budget version of "sigfig". I'm hoping that those with far more Maple experience than I will shame me properly by writing a more robust version. (I tend to write code in Maple only for personal use.)  This also allows me to highjack the discussion to complain about some commands in Maple. The command "whattype" returns "float" or "integer" or others. But the command "convert" does not accept "interger". Rather, it must be "int".  Hence the clumsy type checking to make sure the proper type is returned. 


 

restart

p1 := 1007; p2 := 1014; p3 := 1014.1

"sigfig(x, n):=convert((trunc(x*10^(n)))/(10^(n)), if(whattype(x)=float, float, int)):"

sigfig(p2-p1, 2)

7

(1)

sigfig(p3-p1, 2)

7.100000000

(2)

``


 

Download sigfig_example.mw

 

@Stretto Check out this thread: https://www.mapleprimes.com/questions/227789-Plotting-With-Mod

Also, with your function is a floating point evaluation. Hence:

 f(n):=evalf(n*fmod(n,4))

 

@Glowing I understand your views. The Maple function "evalf" is a function with a task of "performing a calculation, i.e., an evaluation, as a floating point using the following precision". What you are asking for that is found in Mathematica's 'N' function is a type of "sigfig" function that "reports the answer to a calculation using the number of significant figures that one desires".

There are a number of Maple commands which I do find non-intuitive, but this one I do not. Maybe there is already a "report" type function in Maple already. Maybe the Maplesoft folks can add one. 

@Carl Love Learn something new everyday,and it seems consistent to me. Not a bug.

Maybe Glowing's request is for a different command, something like "sigfig". This function returns the number with the number of significant figures so that sigfig(p3-p1,2) returns the 7.1 .

The term evalf actually makes sense.  It evaluates the calculation using the precision required. 

@Carl Love 

p1:=1007.0:
p2:=1014.0:
evalf(p2-p1,2); evalf(p3-p1,2);  

both return 0. which is consistent with your statement.

And yet his first "assumed to be correct answer" solution works only with whole numbers. They appear to be substituted in first before the operation occurs. 

I have not had this experience, but what I have experienced is Maple freezing while typing text in a document. And it is always text, not a mathematical equation. I don’t know if the system is trying to connect to a server and it can’t.  Fortunately, I have been able to end the task, re-open Maple and Restore Backup without losing much text.

Windows 10, Maple 2019.2.1 on several computers. It started with Maple 2019.1

@Rouben Rostamian  Thanks for the first suggestion.  I actually find the "simplify(v)" more intuitative than adding some other character in the eval expression. eval, or something like that, would be the most intuitive. 

Not sure what people are experiencing, but I'm a big fan of 2019.2 as upgrade of 2019 and 2019.1. I write much of my work in Maple. The logic of text and non-executable math input found in 2018 has returned. 

In working with new users, Maple on a Mac generates far more problems. 

@nm You might find 2D input unsatisfactory for your work, but based on my experience with students who are just starting, it is 2D that sells.  New users see Maple 2d math as real math.  Students I work with say they return to Maple because 2D is more readable - regardless of their experience with C++, Python, Mathematica, etc.

As for your examples, I wonder what is going on since I don't see any periods or multiplication symbols in a derivative expression. 

It is my view that 2D has really come around so that the problems we experenced in the past are virtually gone. As someone who is constantly correcting the Maple code of others, 2D misrepresentating a command has essentially disappeared. This is good because it means that most of my time consists of looking for typos, e.g., misspelling a variable name, changing the case of a variable, misspelling a command, etc.

I dislike all of them, but don't see any way around them. As Rouben says, "This doesn't make much sense." 

First 12 13 14 15 16 17 18 Page 14 of 18