# Verifying that a symbolic expression in two variables is 0.

I want to verify using SAGE that the expression:

${~~n~+1\choose k}~2^{-n~-1} - {~n\choose k}~2^{-n} + {~n\choose ~k~}~2^{-n~-1} + {~n \choose ~k-1}~2^{-n~~-1}$

is identically zero.

The SAGE script for this is:

binomial(n+1,k)2^(-n-1) - binomial(n,k)2^(-n) + binomial(n,k)2^(-n-1) + binomial(n,k-1)2^(-n-1)

I have tried using full_simplify() but it doesn't boil the expression down to zero.

Thanks.

edit retag close merge delete

Sort by ยป oldest newest most voted

The reason is that your expression is not equal to zero !!!

If you multiply your expression by $2^{n+1}$, and simplify the two bionmials in the middle, you get ${n+1\choose k} - {n\choose k} + {n \choose k-1}$

This can not be zero since ${n+1\choose k} + {~n \choose k-1}$ is usually bigger than ${n\choose k}$ (unless $k>n+1$).

more

Ah yes! My bad. The expression I was supposed to wrestle with was: binomial(n+1,k)2^(-n-1) - binomial(n,k)2^(-n) + binomial(n,k)2^(-n-1) - binomial(n,k-1)2^(-n-1) and yes sage is able to bring it down to zero. Thanks so much. I made a sign mistake. Really sorry. And thanks for your kind reply.

( 2013-05-26 01:58:21 +0200 )edit