One of my students tried to solve a very simple equation with Maple(release 4).
binomial(8,2)=binomial(x,6)
Maple gave the solution \(x=-3\) but by heart you can see it must be \(x=6\).
Can anybody explain me the structure of the binomialfunction in case of negative integers?
> binomial(8,2); 28 > binomial(8,6); 28 > GAMMA(9)/GAMMA(7)/GAMMA(3); 28 > binomial(-3,6); 28 > GAMMA(-2)/GAMMA(7)/GAMMA(-8); Error, (in GAMMA) singularity encountered > eq:=binomial(8,2)=binomial(x,6); eq := 28 = binomial(x, 6) > solve(eq,x); RootOf(28 - binomial(_Z, 6)) > allvalues(%); -3.000000000 > fsolve(eq,x); -3.000000000 > fsolve(eq,x,1..10); 8.000000000 > plot(binomial(x,6),x=-10..10);
By the very definition of binomial coefficients, this is a polynomial equation and you must bring it to that form first.
> eq:=binomial(8,2)=binomial(x,6); eq := 28 = binomial(x, 6) > eq:=expand(eq); eq := 28 = 1/720 (x - 5) (x - 4) (x - 3) (x - 2) (x - 1) x > solve(eq,x); 1/2 1/2 1/2 1/2 8, -3, 5/2 + 1/2 (- 43 + 4 I 551 ) , 5/2 - 1/2 (- 43 + 4 I 551 ) , 1/2 1/2 1/2 1/2 5/2 + 1/2 (- 43 - 4 I 551 ) , 5/2 - 1/2 (- 43 - 4 I 551 )
To find out the definition of the binomial-function in Maple type this
> interface(verboseproc=2); > print(binomial);
and you will see that
binomial(n,k):=(-1)**k*binomial(k-n-1,k) for n<0, k>0
This is simply the formular
binomial(n,k)=n*(n-1)*...*(n-k+1) / k*(k-1)*...*1 for n<0.
The help-function ?binomial
does not tell the whole truth in this case.
A workaround would be to let fsolve only search for positive solutions:
> fsolve( binomial(x,6)=28, x=0..infinity ); 8.000000
The general definition (which works for any complex n, and nonnegative integer m) is
binomial(n,m) = n (n-1) ... (n-m+1)/m!
Thus binomial(-n,m) = (-1)^m binomial(n+m,m)
.
You might look at Graham, Knuth and Patashnik, "Concrete Mathematics", for more discussion and applications of this.