# 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

b


1131  1131  
1132  1132  binomial = Function_binomial() 
1133  1133  
 1134  class Function_beta(GinacFunction): 
 1135  def __init__(self): 
 1136  r""" 
 1137  Return the beta function. This is defined by 
 1138  `\Beta(p,q) = \int_0^1 t^{p1}(1t)^{1q} dt` 
 1139  for complex input `p` and `q`. 
 1140  
 1141  It is computed by various libraries within Sage, depending on 
 1142  the input type. 
 1143  
 1144  INPUT: 
 1145   ``p``, ``q``  numbers or symbolic expressions. 
 1146  OUTPUT: number or symbolic expression (if input is symbolic) 
 1147  EXAMPLES:: 
 1148  sage: beta(3,2) 
 1149  1/12 
 1150  sage: beta(3,1) 
 1151  1/3 
 1152  sage: beta(1/2,1/2) 
 1153  beta(1/2, 1/2) 
 1154  sage: beta(1,1) 
 1155  1 
 1156  sage: beta(1/2,1/2) 
 1157  0 
 1158  sage: beta(x/2,3) 
 1159  beta(1/2*x, 3) 
 1160  """ 
 1161  GinacFunction.__init__(self, "beta", nargs=2, 
 1162  conversions=dict(maxima='beta', mathematica='Beta')) 
 1163  
 1164  beta = Function_beta() 
 1165  
1134  1166  def _do_sqrt(x, prec=None, extend=True, all=False): 
1135  1167  r""" 
1136  1168  Used internally to compute the square root of x. 