On 24/03/2023 15:38, Chris Smith wrote:
>>> sum(f(i) for i in range(3)) == Sum(f(i), (i,0,2)).doit() == f(0) + f(1) + f(2)
True

On Friday, March 24, 2023 at 3:31:32 AM UTC-5 da...@dbailey.co.uk wrote:

    On 24/03/2023 02:25, Chris Smith wrote:
    > David, please start a new thread (and try IndexedBase instead of
    > Function and use [] instead of ()).
    >
    Thanks, I did consider that, but I thought that undefined
    functions can
    simply participate in algebraic expressions in exactly the same
    way as
    they would in manual algebra.

    Is this a bug or a feature of SymPy?

    David

Thanks Chris,

What I had meant to write was Sum(f(k), (k, 0, 10)).doit() ! My main issue was to use sum instead of Sum!

David

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/8024d9c7-4842-7a5c-cde6-95014c634cd1%40dbailey.co.uk.

Reply via email to