2009/6/13 Florian Beutler <florian.beut...@gmx.de>: > > Hay > I am a bit annoyed by sage... I just want to print a function two > times and sage gives me an error... this is the first script > -------------------------------------------------------------------------------------------------------- > #!/usr/bin/env sage -python > import sys > from sage.all import * > > import functions > from functions import * > > grav_const = 4.3e-06 > pi = 3.14159265358979323846 > sat_mass = 200000. > > print "Ok... dann legen wir mal los!\n" > print "step1: definition of the density profile" > > r = 0.08 > > print rho(r),"\n" > > print "step3: definition of the integrated mass" > > print mass(r).n(),"\n" > > print "step3: definition of the integrated mass" > > print mass(r).n(),"\n" > -------------------------------------------------------------------------------------------------------- > the function definition is the following > -------------------------------------------------------------------------------------------------------- > 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') > assume(x>0) > i_term = integral(x**2*rho(x), x, 0, r) > > return i_term*4.*pi; > -------------------------------------------------------------------------------------------------------- > so I just try to plot the mass two times... the error message of sage > is not very helpful (at least to me) > thanks for any help > florian
The error message might be helpful to somebody besides you, so perhaps you could post the error message here? William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---