Scot Gould

Prof. Scot Gould

162 Reputation

11 Badges

6 years, 145 days
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 applications of scanning problem microscopes, particularly those which involved natural and synthetic fibers such as spider silk. He has more than 60 papers and his publications have been sited more than four thousand times. He has more recently been involved in developing and sustaining non-traditional interdisciplinary undergraduate science educational programs that involve biology, chemistry, physics, mathematical and computer science. He teaches the use of Maple to assist students to model and visual biochemical systems from a physical approach.

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.

z := A*x*y:
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 Page 1 of 2