Hello,
1- show (integrate(sin(x)^2,x,0,pi)) -> ok =pi/2
2-show (integrate(sqrt(sin(x)^2),x,0,pi))
Error:
Exception (click to the left for traceback):
...
TypeError: Unable to convert x (='x') to real number.
Traceback (most recent call last):
File "", line 1, in
File "/home/notebook/sage_notebook/worksheets/_scratch_/code/57.py",
line 4, in
show (integrate(sqrt(sin(x)**Integer(2)),x,Integer(0),pi))
File "/home/notebook/sage_notebook/worksheets/_scratch_/", line 1,
in
File "/usr/local/sage/local/lib/python2.5/site-packages/sage/misc/
functional.py", line 827, in sqrt
except (AttributeError, ValueError): return CDF(x).sqrt()
File "complex_double.pyx", line 227, in
complex_double.ComplexDoubleField_class.__call__
File "complex_double.pyx", line 336, in
complex_double.ComplexDoubleElement.__init__
File "/usr/local/sage/local/lib/python2.5/site-packages/sage/
functions/functions.py", line 237, in __float__
return float(self._mpfr_(RR))
File "/usr/local/sage/local/lib/python2.5/site-packages/sage/
functions/functions.py", line 481, in _mpfr_
return self.__op(self.__x._mpfr_(R), self.__y._mpfr_(R))
File "/usr/local/sage/local/lib/python2.5/site-packages/sage/
functions/functions.py", line 308, in _mpfr_
return self.__f(self.__g._mpfr_(R))
File "/usr/local/sage/local/lib/python2.5/site-packages/sage/
functions/functions.py", line 520, in _mpfr_
return R(self.__x)
File "real_mpfr.pyx", line 225, in real_mpfr.RealField.__call__
File "real_mpfr.pyx", line 580, in real_mpfr.RealNumber._set
TypeError: Unable to convert x (='x') to real number.
What is wrong?
Félix
Ps : sorry for this trivial question but I ’ am a beginner
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---