Beta function¶
Beta function.
- boring_math.special_functions.gamma_family.beta.beta(u: complex, v: complex) complex¶
Beta function valid for all complex values of z.
Note
For all u, v ∈ ℂ and m, n ∈ ℕ, we have
B(u, v) = B(v, u)
B(0, v) = Γ(0) = ∞
B(m, -n) = ∞ when m > n > 0
B(m, -n) = Γ(m) * (Res[Γ, -n]/Res[Γ, m-n]) when m <= n
where ∀(n>=0) Res[Γ(z), z = -n] = (-1)ⁿ/(n!)
Note
Using natural logs in calculation for more numerical stability.
- Parameters:
u – First argument to analytically continued beta function.
v – Second argument to analytically continued beta function.
- Returns:
Value of
beta(u,v)whereinf+infjis returned to represent a single complex infinity.
- boring_math.special_functions.gamma_family.beta.beta_real(x: float, y: float) float¶
Beta function valid for all real values of x, y > 1.
Note
Not valid for extended value reals.
Note
Using natural logs for more numerical stability.
- Parameters:
x – First argument to analytically continued beta function.
y – Second argument to analytically continued beta function.
- Returns:
Value of
beta(x, y)whereinfis returned. to denote singular points.- Raises:
ValueError – If x <= 0 or y <= 0.