[sage-support] Re: Why so slow?

2008-06-17 Thread fwc
I think the main problem is the use of a recursively defined Hermite polynomial rather than the SAGE function hermite defined in functions/orthogonal_polys.py (which uses maxima). Writing h(n,y) for your hermite(n,y), then phi1 for the function which uses h, and phi for the function which uses

[sage-support] Re: Why so slow?

2008-06-16 Thread Robert Bradshaw
I am sure this is the issue. Your phi here is probably going through maxima (and probably trying to simplify symbolically) because of the sqrt() and pi). If you do something like sage: p(n,y) = 1/(pi*sqrt(2*n-y^2)) sage: plot(p(5, x)^2, (x,-5,5)) it should be acceptable. On Jun 15, 2008,

[sage-support] Re: Why so slow?

2008-06-15 Thread Marshall Hampton
One reason this is really slow is that you are probably using a symbolic variable like x, or var('y'). Currently working in the symbolic ring is pretty slow. One way to work around this is use an explicitly defined polynomial ring. As an example, to do: sage: var('y') sage: hermite(10,y)