hermite function

Hermite Polynomials

Hermite Polynomials

Computes univariate and multivariate Hermite polynomials.

hermite(order, sigma = 1, var = "x", transform = NULL)

Arguments

  • order: the order of the Hermite polynomial.
  • sigma: the covariance matrix of the Gaussian kernel.
  • var: character vector giving the variables of the polynomial.
  • transform: character vector representing a change of variables. See details.

Returns

list of Hermite polynomials with components:

  • f: the Hermite polynomial.
  • order: the order of the Hermite polynomial.
  • terms: data.frame containing the variables, coefficients and degrees of each term in the Hermite polynomial.

Details

Hermite polynomials are obtained by differentiation of the Gaussian kernel:

Hν(x,Σ)=exp(12xiΣijxj)(x)νexp(12xiΣijxj) H_{\nu}(x,\Sigma) = exp \Bigl( \frac{1}{2} x_i \Sigma_{ij} x_j \Bigl) (- \partial_x )^\nu exp \Bigl( -\frac{1}{2} x_i \Sigma_{ij} x_j \Bigl)

where Σ\Sigma is a dd-dimensional square matrix and ν=(ν1νd)\nu=(\nu_1 \dots \nu_d) is the vector representing the order of differentiation for each variable x=(x1xd)x = (x_1\dots x_d). In the case where Σ=1\Sigma=1 and x=x1x=x_1 the formula reduces to the standard univariate Hermite polynomials:

Hν(x)=ex22(1)νdνdxνex22 H_{\nu}(x) = e^{\frac{x^2}{2}}(-1)^\nu \frac{d^\nu}{dx^\nu}e^{-\frac{x^2}{2}}

If transform is not NULL, the variables var xx are replaced with transform f(x)f(x) to compute the polynomials Hν(f(x),Σ)H_{\nu}(f(x),\Sigma)

Examples

### univariate Hermite polynomials up to order 3 hermite(3) ### multivariate Hermite polynomials up to order 2 hermite(order = 2, sigma = matrix(c(1,0,0,1), nrow = 2), var = c('z1', 'z2')) ### multivariate Hermite polynomials with transformation of variables hermite(order = 2, sigma = matrix(c(1,0,0,1), nrow = 2), var = c('z1', 'z2'), transform = c('z1+z2','z1-z2'))

References

Guidotti E (2022). "calculus: High-Dimensional Numerical and Symbolic Calculus in R." Journal of Statistical Software, 104(5), 1-37. tools:::Rd_expr_doi("10.18637/jss.v104.i05")

See Also

Other polynomials: taylor()

  • Maintainer: Emanuele Guidotti
  • License: GPL-3
  • Last published: 2023-03-09