6.74 assume, multiple assumptions (16.3.98)

6.74.1 Lucy Schloesser
6.74.2 Douglas B. Meade (17.3.98)

6.74.1 Lucy Schloesser

The function p(k,n) with k,n Integer and n>=k>=0 is defined as follows.

> assume(n, posint); 
> assume(k, posint); 
> assume(n>=k); 
> assume(k>=0); 
> p:=x^k*(1-x)^(n-k)*binomial(n, k);
 

I want maple to solve int(x^k*(1-x)^(n-k)*binomial(n,k), x=0..1); . It is = 1/(n+1); (with integration by parts)

> int(p, x=0..1);
 

Definite integration: Can’t determine if the integral is convergent. Need to know the sign of --> -n+k

Will now try indefinite integration and then take limits. Has someone written a program to solve this problem?

6.74.2 Douglas B. Meade (17.3.98)

To obtain the expected result of this calculation it is necessary to use a little caution in the way assumptions are declared. In particular, the assume command overrides previous assumptions; to add assumptions the additionally command should be used. To illustrate the difference, use the about command to query the current assumptions about a specific Maple name. All of this, together with the simplifications necessary to obtain the simplified form for your integral are contained in the Maple session attached to the end of this message.

> restart; 
> p:=x^k*(1-x)^(n-k)*binomial(n, k): 
> about( n ); about( k ); 
n: 
  nothing known about this object 
 
k: 
  nothing known about this object 
 
> 
> assume(n, posint); 
> assume(k, posint); 
> assume(n>=k);            # overrides both previous assumptions! 
> assume(k>=0); 
> about( n ); about( k ); 
Originally n, renamed n~: 
  nothing known about this object 
 
Originally k, renamed k~: 
  is assumed to be: RealRange(0,infinity) 
 
> 
> assume(n, posint); 
> assume(k, posint); 
> additionally(n>=k);    # adds this condition for both  n  and  k 
> #assume(k>=0);         # unneeded since k is already positive 
> about( n ); about( k ); 
Originally n, renamed n~: 
  Involved in the following expressions with properties 
    -n+k assumed RealRange(-infinity,0) 
  is assumed to be: AndProp(RealRange(1,infinity),integer) 
  also used in the following assumed objects 
  [-n+k] assumed RealRange(-infinity,0) 
 
Originally k, renamed k~: 
  Involved in the following expressions with properties 
    -n+k assumed RealRange(-infinity,0) 
  is assumed to be: AndProp(RealRange(1,infinity),integer) 
  also used in the following assumed objects 
  [-n+k] assumed RealRange(-infinity,0) 
 
> A := int( p, x=0..1 ); 
 
              A := binomial(n, k) Beta(k + 1, 1 + n - k) 
 
> 
> convert( A, GAMMA ); 
 
                             GAMMA(n + 1) 
                             ------------ 
                             GAMMA(2 + n) 
 
>  simplify( % ); 
 
                                  1 
                                ----- 
                                n + 1