Dave H

98 Reputation

2 Badges

22 years, 133 days
After completing a PhD in Pure Mathematics (Functional Analysis) from the University of British Columbia, I joined the Symbolic Computation Group at the University of Waterloo in 1990, and for the next 6 or 7 years I developed much of the code for Maple’s arbitrary precision evaluation of special functions. In the late 1990’s I joined Maplesoft, where I continued my work on special functions, but also worked on Maple’s base numerics systems and the LinearAlgebra and Student packages. I have been the manager of the Mathematical Software Development Group since 2004. In my not-very-copious spare time, I am one of the principals behind RegiStar, the world’s only fully automatic image registration (alignment) program for astrophotography.

MaplePrimes Activity

These are replies submitted by Dave H

Perhaps you might consider comparing the problem of obtaining a reasonable plot for tan(x) from Maple 15 with the problem of obtaining the plot you want for exp(x) on -3..3 in Maple 16.  For the latter, you need only explicitly state the view, using information available ahead of time, e.g., view=[-3..3, 0..exp(3)], or just turn off the smartview algorithm, via smartview=false.  For the former, you will need generate the plot, see that it conveys essentially no information at all, make a guess about what the view should be, lather, rinse, repeat.

Dave Hare
Manager, Mathematical Software Development Group

The new smartview feature for plots in Maple 16 distinguishes between the plot data and the view of that data.  When the user provides a domain for the independent variable, for example, x=-3..3, then the plot data is computed over that domain.  (If the user does not provide a domain, then the default domain - typically -10..10 or -2*Pi..2*Pi - is used.)  Once the plot data has been collected, if the user has not provided a view, then the smartview algorithm is applied to try to determine a window on that data which is informative and representative.

The first step is to determine a vertical range.  For this, various heuristics are applied to reduce the vertical range where the plot data grows so rapidly that details for smaller values are obscured.  (In Maple 15, for example, if a plotted function has a vertical asymptote in the plot domain, then the graph not near the singularity will often just be a horizontal line, with essentially no visible information content.)  There are controls in place to ensure that the vertical range is not reduced too much.

Once the vertical view has been determined, the horizontal view is reduced so that empty space at the left and right ends of the graphs are eliminated.  This results in additional visual enhancement of the details of the graph which are in view.

There are several ways to modify this behaviour.

First, the user can explicitly provide a view:

    plot( exp(x), x=-3..3, view=[-3..3, default ] )

will keep the horizontal view as -3..3 while applying the smartview algorithm to the vertical view.

    plot( exp(x), x=-3..3, view=0..exp(3) )

will produce essentially the same plot as in Maple 15.

Second, the user can locally turn off the smartview algorithm:

    plot( exp(x), x=-3..3, smartview=false )

Third, the user can globally turn off the smartview algorithm:

    _Env_Plot_SmartView := false

The only real backwards incompatibility introduced with the smartview algorithm is that the linkage between the plot variable domain and the horizontal view has been severed.  The plot data itself has not changed, which means that you can zoom in and out and pan around the plot using mouse controls to see everything that was present in the plots from earlier versions of Maple.  The main difference is that the (default) initially presented view is now a lot more visually informative and useful.

Dave Hare
Manager Mathematical Software Development Group

(who may or may not be smarter than he thinks he is...)

The full paper is available at http://www.orcca.on.ca/TechReports/TechReports/2000/TR-00-15.pdf.  I will see if I can find the Maple package itself somewhere.

Dave Hare
Manager Mathematical Software Development Group

You need to declare the index variable k local to procedure rec.

Dave Hare
Manager Mathematical Software Development Group

The only difference I see in the two sessions you've posted is in the 4th computation, where in the Maple 10 worksheet you've used z=2.8 and in the Maple 11 worksheet you've used z=2.8+0.0*I. As this function is closed from below (when a decision must be made, i.e., when the user does not specify the "side" of the branch via +0.0*I or -0.0*I), the value at z=2.8 will be the same as the value at z=2.8-0.0*I. The value at z=2.8+0.0*I should therefore be very close to the value at z=2.8+1e-300*I, as it is in both worksheets. Dave Hare Manager Mathematical Software Development Group Maplesoft
The initial problem you've described is a bug which we will fix. Thanks for pointing it out. For the other issue, note that as a general rule, in the floating point domain, Maple closes branch cuts from *both* sides, using the sign of the zero imaginary part to associate "sides". For your example, we thus have: > tstData:=[a=1.2+.4*I, b=-2.6+.85*I, c=-1.0+.7*I, z= 2.8 - 0.0*I]; tstData := [a = 1.2 + 0.4 I, b = -2.6 + 0.85 I, c = -1.0 + 0.7 I, z = 2.8 - 0. I] > TstData:= op(eval([a,b,c,z], (tstData))): > MPL_2F1(TstData); -720.102249494927486 + 440.743419599155560 I > tstData:=[a=1.2+.4*I, b=-2.6+.85*I, c=-1.0+.7*I, z= 2.8 + 0.0*I]; tstData := [a = 1.2 + 0.4 I, b = -2.6 + 0.85 I, c = -1.0 + 0.7 I, z = 2.8 + 0. I] > TstData:= op(eval([a,b,c,z], (tstData))): > MPL_2F1(TstData); 1.49139640953106626 - 3.74804421753558801 I showing the limiting values from below (the first) and above (the second). The question then becomes: If the user is not explicit in specifying the side of the branch cut they want, which side should be assumed? That is, do we associate z=2.8 with z=2.8+0.0*I or z=2.8-0.0*I? There is no "right" answer to this, and the best we can hope to achieve is consistency. To make this decision, Maple uses the convention of "counter-clockwise continuity" around a (finite) branch point, meaning that the closure rule is determined by taking a limit along a path around the branch point in a counter-clockwise direction. For branches extending to positive infinity, this implies the closure is from below, so for a 2F1 such as yours, the association is z=2.8 => z=2.8-0.0*I. Note that this convention determines other things, such as the logarithmic form of inverse trig functions and the identities relating them. As a final note, I am confused by your remarks concerning an apparent difference in this behaviour for 2F1 between Maple 10 and Maple 11. My tests indicate that the same results obtain in both versions. Can you provide an explicit example, with results, showing the discrepancy? Thx. Dave Hare Manager Mathematical Software Development Group Maplesoft
Page 1 of 1