Skip to contents

Functions to compute Hermite polynomials.

Usage

hermite(n, x)

hermite_next(n, x, Hn, Hnm1)

Arguments

n

Degree of the polynomial

x

Argument of the polynomial

Hn

Value of the Hermite polynomial \((H_n(x))\)

Hnm1

Value of the Hermite polynomial \((H_{n-1}(x))\)

Value

A single numeric value with the computed Hermite polynomial or its next value.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Hermite polynomial H_2(0.5)
hermite(2, 0.5)
#> [1] -1
# Next Hermite polynomial H_3(0.5) using H_2(0.5) and H_1(0.5)
hermite_next(2, 0.5, hermite(2, 0.5), hermite(1, 0.5))
#> [1] -5