Ask Your Question
0

TypeError: Computation failed since Maxima requested additional constraints

asked 2011-09-22 07:56:11 -0500

ck gravatar image

updated 2011-09-22 07:58:10 -0500

I have the following code:

 N, n, f  = var('N, n, f')
 assume(N>0)
 sum(binomial(N, n)*f^n*(1-f)^(N-n), n, (N+1)/2, N)

It gives me the following error message:

 TypeError: Computation failed since Maxima requested additional constraints (try the command  'assume(N+1>0)' before integral or limit evaluation, for example): Is  N+1  positive, negative, or zero?
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2011-09-22 09:21:29 -0500

kcrisman gravatar image

This is a typical error message from Sage via Maxima.

But maybe I need an update from you. I get

sage: N, n, f  = var('N, n, f')
sage:  assume(N>0)
sage:  sum(binomial(N, n)*f^n*(1-f)^(N-n), n, (N+1)/2, N)
sum((-f + 1)^(N - n)*f^n*binomial(N, n), n, 1/2*N + 1/2, N)
edit flag offensive delete link more

Comments

For some reason, it works now for me as well. (Maybe I had some inconsistent variable definitions I did not flush out or something). Thanks for checking.

ck gravatar imageck ( 2011-09-23 01:24:51 -0500 )edit

Likely. Glad you're set now!

kcrisman gravatar imagekcrisman ( 2011-09-23 04:47:36 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-09-22 07:56:11 -0500

Seen: 497 times

Last updated: Sep 22 '11