Scot Gould

Scot Gould

637 Reputation

14 Badges

12 years, 65 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 questions asked by Scot Gould

How do I write plot ceil(x) mod 2 properly?

If I write: 

plot(ceil(x) mod 2, x = 0 .. 4)

it produces a step pattern and not a square wave. (Only 0 and 1 should be plotted.) 

Has there been a option included in the plots:-setoptions3d that is equivalent to the size option found in plots:-setoptions? I can't seem to find one.  I would really like to be able to set all my 3d plots to the same size. Or am I missing something?

I want to solve for the roots of a polynomial, such as a x^2+b x + c = 0, for which the output is only the positive root. All coefficients/variables in the polynomial are positive. 

Recently, someone posted an answer to a question where at some point they performed this task and their solution was really slick. But I can't find it. The answer used either solve, or eval or something like that. (Yes, I did perform a search via the MaplePrimes search before asking this question.) 

 

Here is one that the students generated which caused confusion. 

a := 0.76;
eq1 := 2*cot(a*sqrt(2*E)) = (2*E-5.4)/(sqrt(E*(5.4-E));
solve(eq1, E)

And the results are: 0., 4.411954070, 2.423743792

The problem is with the second answer because it does not exist. If we plot the LHS and the RHS of eq1 vs E where E=0..5.4

plot([2*cot(0.76*sqrt(2*E)), (2*E-5.4)/sqrt(E*(5.4-E))], E=0..5.4, -3..3)

And it gets more interesting, if we calculate:

solve(evalf(eq1), E)

The answers are: 0., 2.423743793, 14.33807304+27.39159712*I

where the 3rd answer is again incorrect.

Finally, if a = 0.8 or larger, the incorrect answers disappear. 

Note - fsolve does handle this problem correctly. And despite my attempts to remind them to use fsolve, they see the solve command as the universal truth. Apparently this will be another teaching moment for next year.

So any thoughts about why this happens and why there is a difference in the outcomes between 0.76 and 0.8 for the value of a?

 

Simple issue. I think it is a bug, but if not, it tends to cause logic problems with new users of Maple.

with(plots):
z := A*x*y:
A:=1.0:
plot3d(z, x=0..1, y=0..1); # works as expected
contourplot(z, x=0..1, y=0..1); # works
fieldplot(z, x=0..1, y=0..1); 
    --> Error, (in plots/fieldplo) invaled 1st argument (the function) 1.0*x*y

Is there something special about what the fieldplot expects for the function? I don't see it in the help. Or is this a bug?  

Yes, there is a work around, define all constants first

A:=1.0:   z := A*x*y: fieldplot(z, x=0..1, y=0..1); 

But I fail to understand why my example should fail. (Note, I have seen this situation for every version, so it is not new.)

1 2 3 4 5 6 Page 5 of 6