hermite {EQL} R Documentation

## Hermite Polynomials

### Description

Computes the Hermite polynomial H_n(x).

### Usage

hermite(x, n, prob = TRUE)

### Arguments

 x a numeric vector or array giving the values at which the Hermite polynomial should be evaluated. n an integer vector or array giving the degrees of the Hermite polynomials. If length(x) != 1, n must be either of the same length as x or a single value. prob logical. If TRUE (the default) the probabilistic version of the Hermite polynomial is evaluated, otherwise the physicists' Hermite polynomials are used. See the ‘Details’ section below for further information.

### Details

The Hermite polynomials are given by:

• H_{n+1}(x)=xH_n(x)-nH_{n-1}(x), with H_0(x)=1 and H_1(x)=x, (Probabilists' version H_n^{Pr}(x))

• H_{n+1}(x)=2xH_n(x)-2nH_{n-1}(x), with H_0(x)=1 and H_1(x)=2x. (Physicists' version H_n^{Ph}(x))

and the relationship between the two versions is given by

H_n^{Ph}(x)=2^{n/2}H_n^{Pr}(\sqrt{2}x). 

The term ‘probabilistic’ is motivated by the fact that in this case the Hermite polynomial H_n(x) can be as well defined by

H_n(x)=(-1)^{n}\frac{1}{\varphi(x)} \varphi^{(n)}(x),

where \varphi(x) denotes the density function of the standard normal distribution and \varphi^{(k)}(x) denotes the kth derivative of \varphi(x) with respect to x.

If the argument n is a vector it must be of the same length as the argument x or the length of the argument x must be equal to one. The Hermite polynomials are then evaluated either at x_i with degree n_i or at x with degree n_i, respectively.

### Value

the Hermite polynomial (either the probabilists' or the physicists' version) evaluated at x.

Thorn Thaler

### References

Fedoryuk, M.V. (2001). Hermite polynomials. Encyclopaedia of Mathematics, Kluwer Academic Publishers.

### Examples

2^(3/2)*hermite(sqrt(2)*5, 3)    # = 940
hermite(5, 3, FALSE)             # = 940
hermite(2:4, 1:3)                # H_1(2), H_2(3), H_3(4)
hermite(2:4, 2)                  # H_2(2), H_2(3), H_2(4)
hermite(2, 1:3)                  # H_1(2), H_2(2), H_3(2)
## Not run:
hermite(1:3, 1:4)                # Error!

## End(Not run)


[Package EQL version 1.0-1 Index]