Re: Help with integral



machen wrote:
Hello,

I'd very much appreciate some help evaluating an integral. The integrand is f(x) = (1/(ax+b))*(x^k)*((1-x)^(n-k))
where a>0, b>0, and where n,k are positive integers with k less than or equal to n. The limits of integration are 0 to 1.


I'm looking for an elegant way to do this without coming up with a messy reduction formula...perhaps a clever substitution or change of variables? Many thanks.


 Hello,

 I'll factor a and set B=b/a then :
 f(x) = (1/a)*[x^k*(1-x)^(n-k)/(x+B)]

 Let's note :
 g(n,k)= int_0^1 x^k*(1-x)^(n-k)/(x+B) dx

 then g(n+1,k+1)+B*g(n,k)= int_0^1 (x+B)*x^k*(1-x)^(n-k)/(x+B) dx
        = int_0^1 x^k*(1-x)^(n-k) dx
 	= (n+2)/(1+(k+1)*n-k^2)

 this allows to get a recursive definition of g(n,k)
 g(n,k)= (n+2)/(k*(n+2-k)) - B*g(n+1,k-1)
       = 1/k + 1/(n+2-k) - B*g(n+1,k-1)

 with g(n,0)= int_0^1 (1-x)^n/(x+B) dx
            = int_B^{B+1} (B+1-y)^n/y dy  (using y=x+B)
 you may use the usual binomial expansion of ((B+1)-y)^n to solve this
 (expanding the numerator in powers of y dividing by y and integrating)

 In fact we may use the same change of variable to express g(n,k) :
 g(n,k)=  int_B^{B+1} (y-B)^k*(B+1-y)^(n-k)/y dy


Hoping it helped, Raymond .