Skip to content

Provide symbolic sum function with evalf #9424

@burcin

Description

@burcin

Symbolics sums returned from maxima cannot be numerically evaluated, since they don't define an _evalf_() method.

This was reported by dirkd on sage-support:

Why is evaluating this expression problematical?

y1(x)=x^2;y2(x)=5-x;
a0=1;an=3;Delta=(an-a0)/n;p(k)=a0+(k-1/2)*Delta;
I(n)=sum(abs(y2(p(k))-y1(p(k)))*Delta,k,1,n);
N(I(10))

SAGE respons:
<snipped traceback>
  File "expression.pyx", line 3797, in
sage.symbolic.expression.Expression.n (sage/symbolic/expression.cpp:
17022)
TypeError: cannot evaluate symbolic expression numerically

Here is the thread:

http://groups.google.com/group/sage-support/t/615b15ca638c9652

See also #15346

Depends on #17759

CC: @sagetrac-whuss @kcrisman @eviatarbach

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 4f7b161

Reviewer: Daniel Krenn

Issue created by migration from https://trac.sagemath.org/ticket/9424

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions