# Ticket #9130: trac_9130_beta_function.patch

File trac_9130_beta_function.patch, 1.5 KB (added by ktkohl, 9 years ago)
• ## sage/functions/other.py

# HG changeset patch
# User Karen T. Kohl <ktkohl96@gmail.com>
# Date 1291961449 21600
# Node ID 13b21cbffe7992041447ca3f7e7cd6e23d34f32f
# Parent  120c07be6358d93bcff503363d379c26b8342f2b
Trac 9130: symbolic beta function

diff --git a/sage/functions/other.py b/sage/functions/other.py
 a binomial = Function_binomial() class Function_beta(GinacFunction): def __init__(self): r""" Return the beta function.  This is defined by \Beta(p,q) = \int_0^1 t^{p-1}(1-t)^{1-q} dt for complex input p and q. It is computed by various libraries within Sage, depending on the input type. INPUT: -  p, q - numbers or symbolic expressions. OUTPUT: number or symbolic expression (if input is symbolic) EXAMPLES:: sage: beta(3,2) 1/12 sage: beta(3,1) 1/3 sage: beta(1/2,1/2) beta(1/2, 1/2) sage: beta(-1,1) -1 sage: beta(-1/2,-1/2) 0 sage: beta(x/2,3) beta(1/2*x, 3) """ GinacFunction.__init__(self, "beta", nargs=2, conversions=dict(maxima='beta', mathematica='Beta')) beta = Function_beta() def _do_sqrt(x, prec=None, extend=True, all=False): r""" Used internally to compute the square root of x.