pce_ode_hermite, a MATLAB code which defines and solves a time-dependent scalar exponential decay ODE with uncertain decay coefficient, using a polynomial chaos expansion, in terms of Hermite polynomials.

The deterministic equation is

        du/dt = - alpha * u,
        u(0) = u0
In the stochastic version, it is assumed that the decay coefficient ALPHA is a Gaussian random variable with mean value ALPHA_MU and variance ALPHA_SIGMA^2.

The exact expected value of the stochastic equation is known to be

        u(t) = u0 * exp ( t^2/2)
This should be matched by the first component of the polynomial chaos expansion.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


pce_ode_hermite is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

black_scholes, a MATLAB code which implements some simple approaches to the black-scholes option valuation theory, by desmond higham.

hermite_polynomial, a MATLAB code which evaluates the physicist's hermite polynomial, the probabilist's hermite polynomial, the hermite function, and related functions.


sde, a MATLAB code which illustrates the properties of stochastic differential equations, and common algorithms for their analysis, by desmond higham;

stochastic_diffusion, MATLAB functions which implement several versions of a stochastic diffusivity coefficient.

stochastic_rk, a MATLAB code which applies a runge kutta (rk) scheme to a stochastic differential equation.


  1. Roger Ghanem, Pol Spanos,
    Stochastic Finite Elements: A Spectral Approach,
    Revised Edition,
    Dover, 2003,
    ISBN: 0486428184,
    LC: TA347.F5.G56.
  2. Dongbin Xiu,
    Numerical Methods for Stochastic Computations: A Spectral Method Approach,
    Princeton, 2010,
    ISBN13: 978-0-691-14212-8,
    LC: QA274.23.X58.

Source Code:

Last modified on 12 January 2021.