Ask Your Question

# sage doesn't evaluate

asked 2015-10-14 15:49:11 +0200 This post is a wiki. Anyone with karma >750 is welcome to improve it.

If I say f(x) = sum(k,k,0,x) and then f(2), I get 3, of course, but if I say g(x) = (binomial(10,k),k, 0,x) and then g(2), sage doesn't evaluate, just returns the definition with x replaced by 2. Why? Thanks

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted

Use simplify_full:

sage: f(x) = sum(k,k,0,x)
sage: f
x |--> 1/2*x^2 + 1/2*x
sage: f(x) = sum(binomial(10,k),k, 0,x)
sage: f
x |--> sum(binomial(10, k), k, 0, x)
sage: f(2)
sum(binomial(10, k), k, 0, 2)
sage: f(2).simplify_full()
56

more

## Comments

Maybe I'm using an older version. The answer I get for f(2).simplify_full() is 3628800 * sum(1/(factorial(k) * factorial(-k + 10)), k,0,2)

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2015-10-14 15:49:11 +0200

Seen: 366 times

Last updated: Oct 15 '15