Revision history [back]

How to make special functions/orthogonal polynomials as callable symbolic expression.

Hello,

I'd like to make some special functions/orthogonal polynomials as callable symbolic expression. However, those functions always remind me the argument is not an integer.

var('n a x')
f(x) = gen_laguerre(n,a,x)

TypeError: unable to convert x (=n) to an integer


, and

var('n x')
g(x) = spherical_bessel_J(n, x)

TypeError: unable to convert x (=n) to an integer


Even if I tried the "domain" keyword, there's still the same problem:

var('n', domain=ZZ)
var('a x')
f(x) = gen_laguerre(n,a,x)

TypeError: unable to convert x (=n) to an integer


How do I reassure those functions that I will give integers to n later in each calculation?