Orthogonal Polynomials

The stochastic discretization of random variables involves global polynomials that are orthogonal with respect to the involved random distribution of the y_m. These polynomials can be generated by some recurrence relation with coefficients that depend on the distribution.

Recurrence relations

Orthogonal polynomials $H_n$ with respect to some weight function $\omega$, i.e.,

\[\int_\Gamma \omega(y) H_{n}(y) H_m(y) dy = N^2_{nm}\delta_{nm}\]

where

\[ N_{nn} := \| H_n \|_{\omega}^2 := \int_\Gamma \omega(y) H_{n}(y) H_n(y) dy\]

satisfy the three-term recurrence relation

\[\begin{aligned} H_{n+2}(y) & = (a_n y-b_n) H_{n+1}(y) - c_n H_{n}(y) \end{aligned}\]

initialized by $H_0 = 0$ and $H_1 = 1$.

ExtendableASGFEM.evaluate!Method
evaluate!(
    y,
    basis::Type{<:OrthogonalPolynomialType},
    n::Integer,
    x::Real
)

Evaluates the first n+1 orthogonal polynomials at a single x and write result into y

source
ExtendableASGFEM.evaluateMethod
evaluate(
    basis::Type{<:OrthogonalPolynomialType},
    n::Integer,
    x::Real
) -> Any

Evaluates the first n+1 orthogonal polynomials at a single x

source
ExtendableASGFEM.evaluateMethod
evaluate(
    basis::Type{<:OrthogonalPolynomialType},
    n::Integer,
    x::AbstractArray{T, 1}
) -> Any

Evaluates the first n+1 orthogonal polynomials at a vector of x

source
LinearAlgebra.normMethod
norm(basis::Type{<:OrthogonalPolynomialType}, n; gr) -> Any

computes the norms of the first n+1 polynomials by Gauss quadrature

source

Legendre Polynomials (uniform distribution)

For the weight function $\omega(y) = 1/2$ in the interval $[-1,1]$ (uniform distribution), take $a_n = (2n+1)/(n+1)$, $b_n = 0$ and $c_n = n/(n+1)$. The norms of the resulting Legendre polynomials are given by

\[ \| H_n \|^2_\omega = \frac{2}{2n+1}\]

ExtendableASGFEM.distributionMethod
distribution(
    _::Type{LegendrePolynomials}
) -> Distributions.Uniform{Float64}

Returns the distribution associated to the Legendre polynomial

source

Hermite Polynomials (normal distribution)

For the weight function $\omega(y) = \exp(-y^2/2)/(2\pi)$ (normal distribution), take $a_n = 1$, $b_n = 0$ and $c_n = n$. Then, the first six polynomials read

\[\begin{aligned} H_0 & = 0\\ H_1 & = 1\\ H_2 & = y\\ H_3 & = y^2 - 1\\ H_4 & = y^3 - 3y\\ H_5 & = y^4 - 6y^2 +3\\ \end{aligned}\]

and their norms are given by

\[ \| H_n \|^2_\omega = n!\]

ExtendableASGFEM.distributionMethod
distribution(
    _::Type{HermitePolynomials}
) -> Distributions.Normal{Float64}

Returns the distribution associated to the Hermite polynomial

source