Ma · Mathematics

How to Integrate the Incomplete Beta Function

Published By the 9to5Science editorial team

At a glance

  1. 1. Fix the convention

    Use B_x(a,b) for the lower incomplete beta function, integrated from 0 to x.

  2. 2. Differentiate B_x

    Its derivative with respect to x is x^(a−1)(1−x)^(b−1).

  3. 3. Apply integration by parts

    The antiderivative is x B_x(a,b) minus B_x(a+1,b), plus a constant.

  4. 4. Use limits if needed

    For an integral from 0 to 1, the result is the complete beta function B(a,b+1).

The phrase “integral of the incomplete beta function” can mean an indefinite integral with respect to its argument, or a definite integral over a range. For the usual lower incomplete beta function, both have concise formulas. The key is to keep track of the parameter shift: integrating with respect to xx changes aa to a+1a+1 in one term.

Definition and convention

The lower incomplete beta function is

Bx(a,b)=∫0xta−1(1−t)b−1 dt.B_x(a,b)=\int_0^x t^{a-1}(1-t)^{b-1}\,dt.

For real parameters, this integral is directly defined when a,b>0a,b>0 and 0≤x≤10\leq x\leq1. The formulas below also apply more broadly by analytic continuation where the functions are defined. Differentiating with respect to the upper limit gives

ddxBx(a,b)=xa−1(1−x)b−1.\frac{d}{dx}B_x(a,b)=x^{a-1}(1-x)^{b-1}.

There is also an upper incomplete beta function, often written ∫x1ta−1(1−t)b−1 dt\int_x^1 t^{a-1}(1-t)^{b-1}\,dt. Its antiderivative has a different sign; see the section on conventions below.

Indefinite integral of the lower function

Use integration by parts with u=Bx(a,b)u=B_x(a,b) and dv=dxdv=dx. Then du=xa−1(1−x)b−1dxdu=x^{a-1}(1-x)^{b-1}dx and v=xv=x, so

∫Bx(a,b) dx=xBx(a,b)−∫x xa−1(1−x)b−1 dx=xBx(a,b)−∫xa(1−x)b−1 dx=xBx(a,b)−Bx(a+1,b)+C.\begin{aligned} \int B_x(a,b)\,dx &=xB_x(a,b)-\int x\,x^{a-1}(1-x)^{b-1}\,dx\\ &=xB_x(a,b)-\int x^a(1-x)^{b-1}\,dx\\ &=xB_x(a,b)-B_x(a+1,b)+C. \end{aligned}

Thus,

∫Bx(a,b) dx=xBx(a,b)−Bx(a+1,b)+C.\boxed{\int B_x(a,b)\,dx=xB_x(a,b)-B_x(a+1,b)+C.}

To check the result, differentiate the right-hand side. The product rule gives Bx(a,b)+xBx′(a,b)B_x(a,b)+xB_x'(a,b), and the derivative of Bx(a+1,b)B_x(a+1,b) is xa(1−x)b−1x^a(1-x)^{b-1}. Since xBx′(a,b)=xa(1−x)b−1xB_x'(a,b)=x^a(1-x)^{b-1}, those terms cancel, leaving Bx(a,b)B_x(a,b).

Worked example

Take a=2a=2 and b=3b=3. Directly expanding the integrand gives

Bx(2,3)=∫0xt(1−t)2 dt=x22−2x33+x44.B_x(2,3)=\int_0^x t(1-t)^2\,dt=\frac{x^2}{2}-\frac{2x^3}{3}+\frac{x^4}{4}.

The general formula says

∫Bx(2,3) dx=xBx(2,3)−Bx(3,3)+C.\int B_x(2,3)\,dx=xB_x(2,3)-B_x(3,3)+C.

Here,

Bx(3,3)=∫0xt2(1−t)2 dt=x33−x42+x55.B_x(3,3)=\int_0^x t^2(1-t)^2\,dt=\frac{x^3}{3}-\frac{x^4}{2}+\frac{x^5}{5}.

Substituting and collecting terms gives

∫Bx(2,3) dx=x36−x46+x520+C.\int B_x(2,3)\,dx=\frac{x^3}{6}-\frac{x^4}{6}+\frac{x^5}{20}+C.

Differentiating this polynomial recovers Bx(2,3)B_x(2,3), as required.

Definite integral from 0 to 1

Integrating the lower incomplete beta function over its full argument range gives

∫01Bx(a,b) dx=B(a,b+1),\int_0^1 B_x(a,b)\,dx=B(a,b+1),

where B(a,b+1)B(a,b+1) is the complete beta function. One way to see this is to reverse the order of integration:

∫01Bx(a,b) dx=∫01∫0xta−1(1−t)b−1 dt dx=∫01(1−t)ta−1(1−t)b−1 dt=∫01ta−1(1−t)b dt=B(a,b+1).\begin{aligned} \int_0^1 B_x(a,b)\,dx &=\int_0^1\int_0^x t^{a-1}(1-t)^{b-1}\,dt\,dx\\ &=\int_0^1 (1-t)t^{a-1}(1-t)^{b-1}\,dt\\ &=\int_0^1 t^{a-1}(1-t)^b\,dt\\ &=B(a,b+1). \end{aligned}

The region of integration is 0≤t≤x≤10\leq t\leq x\leq1, so for each fixed tt, the remaining range for xx has length 1−t1-t. For example, the worked example yields ∫01Bx(2,3) dx=B(2,4)=1/20\int_0^1 B_x(2,3)\,dx=B(2,4)=1/20.

More generally, for 0≤c≤d≤10\leq c\leq d\leq1,

∫cdBx(a,b) dx=[xBx(a,b)−Bx(a+1,b)]cd.\int_c^d B_x(a,b)\,dx= \left[xB_x(a,b)-B_x(a+1,b)\right]_c^d.

Upper incomplete beta and common mistakes

If your convention is the upper tail

Ux(a,b)=∫x1ta−1(1−t)b−1 dt,U_x(a,b)=\int_x^1 t^{a-1}(1-t)^{b-1}\,dt,

then Ux′(a,b)=−xa−1(1−x)b−1U_x'(a,b)=-x^{a-1}(1-x)^{b-1}. Integration by parts therefore gives

∫Ux(a,b) dx=xUx(a,b)+Bx(a+1,b)+C.\int U_x(a,b)\,dx=xU_x(a,b)+B_x(a+1,b)+C.

The sign is positive in the second term, unlike the lower-function formula. Check the definition before applying either result: authors do not always use the same notation for lower and upper incomplete beta functions.

Another common error is shifting the wrong parameter. Multiplication of the defining integrand by xx changes xa−1x^{a-1} into xax^a, so the shift is a↦a+1a\mapsto a+1, not b↦b+1b\mapsto b+1. The definite integral over [0,1][0,1] does involve b+1b+1, because reversing the order of integration contributes a factor of 1−t1-t.

References

  1. NIST Digital Library of Mathematical Functions, §8.17: Incomplete Beta Functions

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.