CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2017-11-07-091923-integral.ipynbOpen in CoCalc

Examples for support purposes...

integral(525.87*(x)^(-2.35),x,.1,1, algorithm='sympy')
8331.03174176987
integral(525.87*(x)^(-2.35),x,.1,1)
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-1-bc3e672f2088> in <module>() ----> 1 integral(RealNumber('525.87')*(x)**(-RealNumber('2.35')),x,RealNumber('.1'),Integer(1)) /ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/misc/functional.pyc in integral(x, *args, **kwds) 719 """ 720 if hasattr(x, 'integral'): --> 721 return x.integral(*args, **kwds) 722 else: 723 from sage.symbolic.ring import SR /ext/sage/sage-8.0/src/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.integral (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:69945)() 12273 R = ring.SR 12274 return R(integral(f, v, a, b, **kwds)) > 12275 return integral(self, *args, **kwds) 12276 12277 integrate = integral /ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.pyc in integrate(expression, v, a, b, algorithm, hold) 797 return indefinite_integral(expression, v, hold=hold) 798 else: --> 799 return definite_integral(expression, v, a, b, hold=hold) 800 801 integral = integrate /ext/sage/sage-8.0/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:11397)() 994 res = self._evalf_try_(*args) 995 if res is None: --> 996 res = super(BuiltinFunction, self).__call__( 997 *args, coerce=coerce, hold=hold) 998 /ext/sage/sage-8.0/src/sage/symbolic/function.pyx in sage.symbolic.function.Function.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:6440)() 484 for i from 0 <= i < len(args): 485 vec.push_back((<Expression>args[i])._gobj) --> 486 res = g_function_evalv(self._serial, vec, hold) 487 elif self._nargs == 1: 488 res = g_function_eval1(self._serial, /ext/sage/sage-8.0/src/sage/symbolic/function.pyx in sage.symbolic.function.BuiltinFunction._evalf_or_eval_ (/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:12757)() 1083 res = self._evalf_try_(*args) 1084 if res is None: -> 1085 return self._eval0_(*args) 1086 else: 1087 return res /ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.pyc in _eval_(self, f, x, a, b) 179 for integrator in self.integrators: 180 try: --> 181 return integrator(*args) 182 except NotImplementedError: 183 pass /ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/external.pyc in maxima_integrator(expression, v, a, b) 32 result = maxima.sr_integral(expression,v) 33 else: ---> 34 result = maxima.sr_integral(expression, v, a, b) 35 return result._sage_() 36 /ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.pyc in sr_integral(self, *args) 803 """ 804 try: --> 805 return max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in args]))) 806 except RuntimeError as error: 807 s = str(error) /ext/sage/sage-8.0/src/sage/libs/ecl.pyx in sage.libs.ecl.EclObject.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/libs/ecl.c:8284)() 794 """ 795 lispargs = EclObject(list(args)) --> 796 return ecl_wrap(ecl_safe_apply(self.obj,(<EclObject>lispargs).obj)) 797 798 def __richcmp__(left, right, int op): /ext/sage/sage-8.0/src/sage/libs/ecl.pyx in sage.libs.ecl.ecl_safe_apply (/ext/sage/sage-8.0/src/build/cythonized/sage/libs/ecl.c:5908)() 367 if ecl_nvalues > 1: 368 s = si_coerce_to_base_string(ecl_values(1)) --> 369 raise RuntimeError("ECL says: "+ecl_base_string_pointer_safe(s)) 370 else: 371 return ecl_values(0) RuntimeError: ECL says: CEXPT only defined for non-negative integral exponents.