Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Simple question on displaying summation


I'm defining a few summation functions for displaying and evaluating later, but I don't understand how to do it.

So, I'm looking at the basic Sage Quick Reference and I see under Arithmetic: sum(f(i) for i in (k..n))

But when I try to make it symbolic to show, like something simple like this:

f(n)=sum(i for i in (0..n))

But then I get

TypeError: unable to simplify to float approximation

Which makes me think its trying to evaluate the sum rather than make it a symbolic expression. Then I ran across "symbolic_sum" somewhere, but I can't find any documentation about it now...

Any suggestions?