So, for anyone interested, I was able to *sort-of* solve the Gegenbauer 
polynomial problem. 

Using a lambda-function:

C = lambda (n, Lambda, x): sum( 
[(2*x)^(n-2*m)*(-1)^(m)*rising_factorial(Lambda,n-m)/(factorial(m)*factorial(n-2*m))
 
for m in [0..floor(n/2)]] )

(the definition is taken from Higher Transcendental Functions, volume 2, 
page 175) You get that C([n,a,x]) yields polynomials which are equivalent to 
GegenbauerC[n,a,x] in Mathematica (see 
here<http://mathworld.wolfram.com/GegenbauerPolynomial.html>) 
or GegenbauerC(n,a,x) in Maple (see 
here<http://www.maplesoft.com/support/help/Maple/view.aspx?path=GegenbauerC>
).

The important thing to note about C([n,a,x]) is that C([2,-1/2,x]) doesn't 
throw up an error, where as ultraspherical(2,-1/2,x) does. Specifically, you 
get the error:

TypeError: error evaluating "ultraspherical(2,-1/2,x)":

Error executing code in Maxima

CODE:

ultraspherical(2,-1/2,x);

Maxima ERROR:

Division by 0

 -- an error. To debug this try: debugmode(true);

Since I know, personally, that there exists a Gegenbauer polynomial 
associated to n=2 and a=-1/2, this is extremely fishy (and annoying). 

I hope this code helps anyone trying to do any work in Sage with the 
ultraspherical(n,a,x) function.

-Steven

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to