On Fri, May 25, 2007 at 04:23:54PM -0500, Doug Stewart wrote:
> No! no no Why do you think that a user must understand quadpack just to
> do numerical integration?
> Are you making software only for specialist to use?
> If you name it qp_integration then the general user would never guess
> what that name means.
> I have no idea what quad pack is and I don't think I want to but I might
> ask my students do do numerical integration using a first order
> approximation method or etc.
> Just my 2c worth but I am only a user so...
They need not be experts in quadpack, but they must be alert and
aware. Here is why:
(%i8) quad_qag(sin(x),x,0,2*%pi,3);
***MESSAGE FROM ROUTINE DQAG IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 2
*
***END OF MESSAGE
(%o8) [2.9412623282838565E-17, 4.4242537723638441E-14, 31, 2]
(%i9) quad_qag(1/(x),x,0,2*%pi,3);
***MESSAGE FROM ROUTINE DQAG IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 1
*
***END OF MESSAGE
(%o9) [146.4248119800781, 10.70526637351894, 12369, 1]
(%i10)
What are they supposed to make of this? In the first case, they have
an error, but the answer given is reasonable (very close to zero).
The second case they have an error, but the answer given is totally
unreasonable (the integral doesn't exist and is certainly not 146.4).
The answer is that although you need not be an expert, you must at
least ask the question "does this method work?" when you get a result.
My argument is that IF we have a routine called nintegrate, it must be
the KIND of routine that will be conservative enough that the users
need not be experts... wrapping quadpack and calling it nintegrate
doesn't meet that requirement in my opinion.
--
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan