Integrating a B-Spline basis function with respect to the standard normal PDF I am looking for ways to evaluate exactly (i.e. analytically or semi-analytically) integrals of the type:
$$
\int_{-\infty}^{+\infty}B_{i}^k(u)e^{-\frac{(u-\mu)^2}{2\sigma^2}}du,
$$
where $B_i^k$ is a spline of order $k$, an element of the B-Spline basis for the linear space of splines of order $k$ on knots $\{t_i\}$, defined as usual recursively by:
$$
B_i^k(x)=\frac{x-t_i}{t_{i+k}-t_i}B_i^{k-1}(x)+\frac{t_{i+k+1}-x}{t_{i+k+1}-t_{i+1}}B_{i+1}^{k-1}(x),
$$
with
$$
B_i^0(x)=\begin{cases} 
      1 & x\in [t_i;t_{i+1}) \\
      0 & \text{otherwise  }
   \end{cases}
$$
Of particular interest would be the case of $\mu=0, \sigma=1$.
I am aware of the Gauss-Hermite quadrature :
$$
\int_{-\infty}^{+\infty}f(x)e^{-\frac{x^2}{2}}\approx \sum_{i=1}^n w_i f(x_i),
$$
where $x_i$ are the roots of a Hermite polynomial of order $n$ and $w_i$ are the associated weights. Importantly, the approximation sign can be replaced by an exact equality when $f$ is a polynomial of degree $\leq 2n-1$. (There are versions where the integral is with respect to $e^{-x^2}$ instead of $e^{-\frac{x^2}{2}}$, by changing the type of Hermite polynomial employed).
My question is : is there such an exact equality formula for B-spline basis functions?
I am looking to express the integral at the beginning of this question as a sum analogously to the Gauss-Hermite quadrature.
The problem seems to be that even though $B_i^k$ is known to have finite support, it is not itself a polynomial: each of the restrictions $B_i^k|_{(t_j;t_{j+1})}$ is a polynomial, without the full function being a polynomial. Otherwise, the answer would have been a trivial application of the Gauss-Hermite quadrature. Is is possible that there is a Gauss-Hermite-type quadrature for integration domains that are compact intervals (as opposed to integration domains that are $\mathbb{R}$) ?
 A: Since a B-spline is a piecewise polynomial function, the question is whether there exists an exact equality formula for the integral $\int_{-a}^{b}u^pe^{-u^2/2}du$. This integral equals an elementary function of $a$ and $b$ for $p$ an odd integer, while for $p$ an even integer it contains error functions. In general the B-spline will contain both even and odd powers, so no "exact equality formula" in terms of elementary functions will be forthcoming.

For example, the uniform B-spline of order 3 with knots at 0,1,2,3 is given by
$$B(u)=\begin{cases}
0&\text{if}\;\; u<0,\\
u^2/2&\text{if}\;\;  0 \le u < 1,\\
(-2u^2+6u-3)/2&\text{if}\;\;  1 \le u < 2,\\
(3-u)^2/2&\text{if}\;\;  2 \le u < 3,\\
0&\text{if}\;\;  u\ge 3,
\end{cases}$$
and the integral $\int_{-\infty}^\infty B(u)e^{-u^2/2}\,du$ equals
$$\frac{1}{2} \sqrt{\frac{\pi }{2}} \left(6 \,\text{erf}\left(\frac{1}{\sqrt{2}}\right)+10 \,\text{erf}\left(\frac{3}{\sqrt{2}}\right)-15\, \text{erf}\left(\sqrt{2}\right)\right)+\frac{3 \left(1-2 e^{5/2}+e^4\right)}{2e^{9/2}}.$$
No further simplification in terms of elementary functions is possible.

