#8752: Can't evaluate numerically symbolic expression resulting from integral().
------------------------+---------------------------------------------------
   Reporter:  lfousse   |       Owner:  burcin                        
       Type:  defect    |      Status:  new                           
   Priority:  major     |   Milestone:                                
  Component:  calculus  |    Keywords:  integral, numerical conversion
     Author:            |    Upstream:  N/A                           
   Reviewer:            |      Merged:                                
Work_issues:            |  
------------------------+---------------------------------------------------
 Consider the following (in sage 4.3.5):

 {{{
 sage: integral(exp(-x^2), x, 17, 42)
 -1/2*sqrt(pi)*erf(17) + 1/2*sqrt(pi)*erf(42)
 sage: N(-1/2*sqrt(pi)*erf(17) + 1/2*sqrt(pi)*erf(42))
 0.000000000000000
 }}}
 But:
 {{{
 sage: N(integral(exp(-x^2), x, 17, 42))
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /opt/sage-4.3.5/<ipython console> in <module>()

 /opt/sage-4.3.5/local/lib/python2.6/site-packages/sage/misc/functional.pyc
 in numerical_approx(x, prec, digits)
    1161             prec = int((digits+1) * 3.32192) + 1
    1162     try:
 -> 1163         return x.numerical_approx(prec)
    1164     except AttributeError:
    1165         from sage.rings.complex_double import
 is_ComplexDoubleElement

 /opt/sage-4.3.5/local/lib/python2.6/site-
 packages/sage/symbolic/expression.so in
 sage.symbolic.expression.Expression.n
 (sage/symbolic/expression.cpp:17043)()

 TypeError: cannot evaluate symbolic expression numerically
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8752>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to