4 #include "base/cl_sysdep.h"
7 #include "cln/univpoly_integer.h"
12 #include "cln/integer.h"
16 const cl_UP_I hermite (sintL n)
18 // The Hermite polynomials H_n(x) are defined as
21 // H_n(x) = (-1)^n exp(x^2) (----) exp(- x^2)
24 // They satisfy the recurrence relation
27 // H_{n+1}(x) = 2x H_n(x) - 2n H_{n-1}(x) for n >= 0.
30 // H_n(x) satisfies the differential equation
31 // H_n''(x) - 2x*H_n'(x) + 2n*H_n(x) = 0.
33 // Proof: See elsewhere.
36 // The coefficients c_{n,k} of H_n(x) = sum(k=0..n, c_{n,k} x^k)
40 // c_{n,k} = (k+1)(k+2)/2(k-n)*c_{n,k+2}
42 // It follows that for n>=0
44 // H_n(x) = sum(j=0..floor(n/2), (-1)^j n!/j!(n-2j)! 2^(n-2j) x^(n-2j))
46 var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring);
47 var cl_UP_I h = R->create(n);
49 var cl_I c_k = ash(1,n);
55 c_k = exquo((cl_I)(k+1) * (cl_I)(k+2) * c_k,