hay sorry for posting all my problems here I still have no good tutorial and the error messages are not very helpful...
The whole error message I get is below. The program I am using is not very complicated. It is a python script which calls different functions -------------------------------------------------------------- #!/usr/bin/env sage -python import sys from sage.all import * import functions from functions import * print "Ok... dann legen wir mal los!\n" print "step1: definition of the density profile" r = 1. print rho(1.),"\n" print "step3: definition of the integrated mass" print mass(0.6).n(),"\n" print "step4: definition of the velocity dispersion" print sig2(0.6) -------------------------------------------------------------------- The functions are defined in another file called functions.py -------------------------------------------------------------------------------- import sys from sage.all import * def rho(r): return 1.32419e+08/(1.+(r/0.81))**3 def mass(r): pi = 3.14159265358979323846 x=var('x') i_term = integral(x**2*rho(x), x, 0, r) return i_term*4.*pi; def sig2(r): x=var('x') assume(x>0) i_term = integral(rho(x)*mass(x)/x**2, x, r, 10) return i_term/rho(r) -------------------------------------------------------------------------- I got some error messages therefore I included assume(x>0). The integral is not infinity. thanks for any help florian and thats the error message Traceback (most recent call last): File "friction.py", line 25, in <module> print sig2(0.6) File "/home/florian/sage/sage-3.4/functions.py", line 28, in sig2 i_term = integral(rho(x)*mass(x)/x**2, x, r, 10)#integral(mass(x) *rho(x)/x**2, x, r, 10) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/misc/functional.py", line 437, in integral return x.integral(*args, **kwds) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/calculus/calculus.py", line 3070, in integral return self.parent()(self._maxima_().integrate(v, a, b)) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/maxima.py", line 1996, in integral return I(var, min, max) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/expect.py", line 1334, in __call__ return self._obj.parent().function_call(self._name, [self._obj] + list(args), kwds) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/expect.py", line 1254, in function_call ['%s=%s'%(key,value.name()) for key, value in kwds.items()]))) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/expect.py", line 1067, in new return self(code) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/expect.py", line 1002, in __call__ return cls(self, x, name=name) File "/home/florian/sage/sage-3.4/local/lib/python2.5/site-packages/ sage/interfaces/expect.py", line 1377, in __init__ raise TypeError, x TypeError: Error executing code in Maxima CODE: sage19 : integrate(sage16,sage3,sage17,sage18)$ Maxima ERROR: `rat' replaced 1000000.0 by 1000000/1 = 1000000.0 `rat' replaced 3703703.703703704 by 11111111/3 = 3703703.666666667 `rat' replaced 4572473.708276177 by 13717421/3 = 4572473.666666667 `rat' replaced 1881676.42315892 by 9408382/5 = 1881676.4 `rat' replaced 1000000.0 by 1000000/1 = 1000000.0 `rat' replaced 3703703.703703704 by 11111111/3 = 3703703.666666667 `rat' replaced 4572473.708276177 by 13717421/3 = 4572473.666666667 `rat' replaced 1881676.42315892 by 9408382/5 = 1881676.4 `rat' replaced 2000000.0 by 2000000/1 = 2000000.0 `rat' replaced 7407407.407407408 by 14814815/2 = 7407407.5 `rat' replaced 9144947.416552354 by 18289895/2 = 9144947.5 `rat' replaced 3763352.84631784 by 22580117/6 = 3763352.833333333 `rat' replaced 1.3122E+10 by 13122000000/1 = 1.3122E+10 `rat' replaced 8.1E+10 by 81000000000/1 = 8.1E+10 `rat' replaced 2.0E+11 by 200000000000/1 = 2.0E+11 `rat' replaced 2.469135802469136E+11 by 246913580246/1 = 2.46913580246E +11 `rat' replaced 1.524157902758726E+11 by 152415790275/1 = 1.52415790275E +11 `rat' replaced 3.763352846317841E+10 by 37633528463/1 = 3.7633528463E +10 `rat' replaced 1.3122E+10 by 13122000000/1 = 1.3122E+10 `rat' replaced 8.1E+10 by 81000000000/1 = 8.1E+10 `rat' replaced 2.0E+11 by 200000000000/1 = 2.0E+11 `rat' replaced 2.469135802469136E+11 by 246913580246/1 = 2.46913580246E +11 `rat' replaced 1.524157902758726E+11 by 152415790275/1 = 1.52415790275E +11 `rat' replaced 3.763352846317841E+10 by 37633528463/1 = 3.7633528463E +10 `rat' replaced 1.3122E+10 by 13122000000/1 = 1.3122E+10 `rat' replaced 8.1E+10 by 81000000000/1 = 8.1E+10 `rat' replaced 2.0E+11 by 200000000000/1 = 2.0E+11 `rat' replaced 2.469135802469136E+11 by 246913580246/1 = 2.46913580246E +11 `rat' replaced 1.524157902758726E+11 by 152415790275/1 = 1.52415790275E +11 `rat' replaced 3.763352846317841E+10 by 37633528463/1 = 3.7633528463E +10 `rat' replaced 1.3122E+10 by 13122000000/1 = 1.3122E+10 `rat' replaced 8.1E+10 by 81000000000/1 = 8.1E+10 `rat' replaced 2.0E+11 by 200000000000/1 = 2.0E+11 `rat' replaced 2.469135802469136E+11 by 246913580246/1 = 2.46913580246E +11 `rat' replaced 1.524157902758726E+11 by 152415790275/1 = 1.52415790275E +11 `rat' replaced 3.763352846317841E+10 by 37633528463/1 = 3.7633528463E +10 `rat' replaced 1.3122E+10 by 13122000000/1 = 1.3122E+10 `rat' replaced 8.1E+10 by 81000000000/1 = 8.1E+10 `rat' replaced 2.0E+11 by 200000000000/1 = 2.0E+11 `rat' replaced 2.469135802469136E+11 by 246913580246/1 = 2.46913580246E +11 `rat' replaced 1.524157902758726E+11 by 152415790275/1 = 1.52415790275E +11 `rat' replaced 3.763352846317841E+10 by 37633528463/1 = 3.7633528463E +10 Maxima encountered a Lisp error: *: floating point overflow Automatically continuing. To reenable the Lisp debugger set *debugger-hook* to nil. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---