William Fish

719 Reputation

6 Badges

14 years, 13 days

MaplePrimes Activity


These are answers submitted by William Fish

The following is a stripped down version of Dr. Dermot Hogan's "Real Life Test" from his comparison of Mathematica and Maple:

"The question was whether a particular telescope’s obstruction was 35% or 42%.

"With a telescope, the diffraction pattern produced by the wave nature of light when the telescope eyepiece is at focus is simple ‘Fraunhofer’ diffraction. A long way off, and you see the aperture of the telescope with the shadow of the secondary clearly obstructing it – you might call this the ‘geometric’ case. And in between is ‘Fresnel’ diffraction.

"The trouble with Fresnel diffraction is that it is tricky to compute. Indeed, before the advent of fast computers and packages like Maple and Mathematica, it just wasn’t computed. For a circular aperture, the computation involves a complex oscillatory integral with Bessel functions which can only be evaluated by numerical methods.

"with the eyepiece at maximum distance from the focus, the measured size of the central obstruction’s shadow was indeed 42% for a 35% physical obstruction.

... This is a Fresnel diffraction pattern (in Mathematica) which gave the answer to the problem…"

As you can see, the plot abscissa runs from 0 to 0.002.  35% of 0.002 is 0.00070 and 42% of 0.002 is 0.00082. I'm having a lot of difficulty trying to decide if that pulse is 0.00070 wide or 0.00082 wide.  Can anybody help me?

 

Why is it that I can not replace p0 with p_0 in the following Maple?

View 4937_Airy disc.mw on MapleNet or Download 4937_Airy disc.mw
View file details

I can not get p[0] to work either.  p0 works fine.

I think that part of the problem with trying to plot that thing is that it may not be real.

I tried this

plot(Re(Int(BesselJ(0, 50001*x)*x*exp(I*(355*x^2*1/2)), x = 35*1/100 .. 1)))

and still something went wrong.

 

I read the Bitwise Maple 10 vs Mathematica 5.2 review that you referenced in your "A few comments".  I was surprised when I got to the end and the reviewer picked Mathematica over Maple.  I did gloss over "A Real Life Test" on my first pass.  I think he said that he liked the GUI, graphical output and programming language better in Maple than in Mathematica.  He also said that the Maple debugger was better than no debugger in Mathematica.  In addition, he said that there was probably some other "Real Life Test" that would not run in Mathematica and would run in Maple.

Now this is something that I tried.  It's not what the reviewer tried but what is there about this:

plot(Int(BesselJ(0, 50001*x)*x*exp(I*(355*x^2*1/2)), x = .35 .. 1))

that caused it to run for such a very long time?

Jacques,

Thank you, Robert Israel and Jakubi.  I can have it my way or at least almost my way.  And, I was wrong again.  I thought that I had found out why it had to be Maple's way but no, I was wrong.

I read all 84 pages of the Gaston Gonnet Interview and I am a slow reader.  I found it very interesting.  I also read all of the blog comments so far and I noticed that I am not the only one that says nice things about you:

"Your answers are deep, sharp, well documented and very useful to gain a wider and wiser knowledge of Maple and of what is related to computer algebra."

I agree.

I know nothing of Mathematica.  Is there an unbiased comparison of Maple and Mathematica or two, one from each side?  I don't think that I'll ever be able to experience Mathematica.  I can't afford it.

Would Maple be better off if it had had an iron fisted leader as Mathematica does?  What about open source?  What is Maple's future?

I'm sorry if these questions are in the wrong place again but I concluded that my words are too close to noise to be in your Gaston Gonnet blog.  It's better for me to listen than speak.

I think that I've found the reason why I can't have it my way.  It has to be Maple's way.  The answer is on page 23 of history.siam.org/pdfs2/Gonnet_final.pdf

I found this from the same page, exercise 3(d), more difficult than I expected: "determine all subsets of the set {1,2,3,4,5}." > restart; > s := {`$`(1 .. 5)}; > with(combinat); > S := subsets(s); > while `not`(S[finished]) do S[nextvalue]() end do;
Thank you both. I'll try to do a better job reading the help pages next time. Thanks again.
Something went wrong with my last post. A solution is in the following file: View 4937_Chapter6Exercise2.mw on MapleNet or Download 4937_Chapter6Exercise2.mw
View file details There must be a better way that works in all cases not just this special case. When is it time to start a new thread?
Is there a way to make this plot continuous? plot(180*argument(F(x))/Pi, x = -.1 .. 2);
I just didn't expect straight lines in the complex plane and I saw only the vertical line. I like this: plot([(Re, Im)(F(t)), t = 0 .. 2], axes = boxed); better than this: plot([Re(F(t)), Im(F(t)), t = 0 .. 2], axes = boxed); I didn't know that you could do that. "comment on the different results" -- There are two exact answers that are a little different and the floating point answers are off in the tenth significant digit. Is there any more that could be said?
The following worksheet contains a solution to exercise 2 on page 255 of the 2007 edition of the Maple 11 Introductory Programming Guide. The exercise is to implement the given function first as a procedure and then by the mapping notation, evaluate each at 1/2 and 0.5 and comment on the different results. I did this: View 4937_Chapter6Exercise2.mw on MapleNet or Download 4937_Chapter6Exercise2.mw
View file details I know that I have much to learn and I know that you can teach me things that I will find wondrous. I tried a polar plot and I think it's not working.
I did this: interface(verboseproc = 2); print(max) and got this: proc () option builtin = max; end proc others (Joe Riel) seem to have seen more. How can I see more? View 4937_Exercises10.mw on MapleNet or Download 4937_Exercises10.mw
View file details
Robert Israel, I like it:
Max:=proc()
   local symargs,numargs,m,t;                                            
   numargs,symargs:=selectremove(type,[args],realcons);
   if nops(numargs)>0 then
      m:=-infinity;
      for t in numargs do
         if is(t>m) then m:=t fi
      od;
   if nops(symargs)=0 then m
   else 'procname'(m,op(symargs))
   fi;
end proc;
Joe Riel mentioned realcons but I didn't get how to use it. Now I see I think. I think that this is the first time I've seen a sequence on the lhs of ":=". This is the first time I've seen "fi" and "od". Help says almost nothing about them. I still don't understand why "is(t>m)" differs from "t>m" but I tried "t>m" and there were errors with Pi and e. What does "Raw use of 'is' is not recommended..." mean? Finally, it works in all cases and it's impressively short. View 4937_Exercises10.mw on MapleNet or
1 2 3 4 Page 1 of 4