The following seems like odd behavior to me.

Dave

I. No problem:
sage: integral(log(x)/x^(1.002),x)
500*(-log(x)/x^(1/500) - 500/x^(1/500))
sage: s(10)-s(1)
500*(-log(10)/10^(1/500) - 500/10^(1/500)) + 250000
sage: n(_)
2.64282437870861

II. Problem:
sage: integral(log(x)/x^(1.002),x,1,10)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

/home/davidp/<ipython console> in <module>()

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/misc/functional.pyc in integral(x, *args, **kwds)
    435     """
    436     if hasattr(x, 'integral'):
--> 437         return x.integral(*args, **kwds)
    438     else:
    439         from sage.calculus.calculus import SR

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/calculus/calculus.pyc in integral(self, v, a, b)
   3068         else:
   3069             try:
-> 3070                 return self.parent()(self._maxima_().integrate
(v, a, b))
   3071             except TypeError, error:
   3072                 s = str(error)

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/maxima.pyc in integral(self, var, min,
max)
   1994             if max is None:
   1995                 raise ValueError, "neither or both of min/max
must be specified."
-> 1996             return I(var, min, max)
   1997
   1998     integrate = integral

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/expect.pyc in __call__(self, *args,
**kwds)
   1332
   1333     def __call__(self, *args, **kwds):
-> 1334         return self._obj.parent().function_call(self._name,
[self._obj] + list(args), kwds)
   1335
   1336     def help(self):

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/expect.pyc in function_call(self,
function, args, kwds)
   1252         self._check_valid_function_name(function)
   1253         return self.new("%s(%s)"%(function, ",".join([s.name()
for s in args]+
-> 1254                                                      ['%s=%s'%
(key,value.name()) for key, value in kwds.items()])))
   1255
   1256     def call(self, function_name, *args, **kwds):

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/expect.pyc in new(self, code)
   1065
   1066     def new(self, code):
-> 1067         return self(code)
   1068
   1069
###################################################################

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/expect.pyc in __call__(self, x, name)
   1000             return x
   1001         if isinstance(x, basestring):
-> 1002             return cls(self, x, name=name)
   1003         try:
   1004             return self._coerce_from_special_method(x)

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/interfaces/expect.pyc in __init__(self, parent,
value, is_name, name)
   1375             except (TypeError, KeyboardInterrupt,
RuntimeError, ValueError), x:
   1376                 self._session_number = -1
-> 1377                 raise TypeError, x
   1378         self._session_number = parent._session_number
   1379

TypeError: Computation failed since Maxima requested additional
constraints (try the command 'assume(>0)' before integral or limit
evaluation, for example):
 an integer?

III.  Problem:
sage: numerical_integral(log(x)/x^(1.002),x,1,10)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

/home/davidp/<ipython console> in <module>()

/usr/local/sage-3.4-Fedora_release_9-i686-Linux/local/lib/python2.5/
site-packages/sage/gsl/integration.so in
sage.gsl.integration.numerical_integral (sage/gsl/integration.c:2008)
()

TypeError: invalid integration algorithm


Dave



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to