sympy/sympy — pull request #2890 by raoulb (2014-02-08 02:08:34+00:00)
Title: Make orthogonal polynomials lazy and evalute only if asked to

In [8]: legendre(4, x)
Out[8]: legendre(4, x)

In [9]: expand_func(_)
Out[9]: 35*x**4/8 - 15*x**2/4 + 3/8

In [10]: hermite(4, x)
Out[10]: hermite(4, x)

In [11]: expand_func(_)
Out[11]: 16*x**4 - 48*x**2 + 12

In [12]: laguerre(4, x)
Out[12]: laguerre(4, x)

In [13]: expand_func(_)
Out[13]: x**4/24 - 2*x**3/3 + 3*x**2 - 4*x + 1

In [14]: laguerre(-n, 2*x)
Out[14]: laguerre(-n, 2*x)

In [15]: expand_func(_)
Out[15]: exp(2*x)*laguerre(-n - 1, -2*x)