Second-difference analyzing function (source code)

= Second-difference analyzing function
{title2=$\eta=(\mathbf1_{[0,1)}-2\mathbf1_{[1,2)}+\mathbf1_{[2,3)})/\sqrt6$}

The <Haar wavelet> provides an explicit one-<vanishing moment> comparison:
$$
h(u)=\begin{cases}1&0\leq u<1/2,\\-1&1/2\leq u<1,\\0&\text{otherwise},\end{cases}\qquad \int h=0,\quad \int uh(u)\,du=-\frac14,\quad\|h\|_2=1.
$$
It cancels a constant <polynomial>, but not a nonconstant <affine function>. To obtain two <vanishing moments> by an equally transparent construction, take three adjacent unit <intervals> with heights proportional to $1,-2,1$:
$$
\eta(u)=\frac1{\sqrt6}\begin{cases}1&0\leq u<1,\\-2&1\leq u<2,\\1&2\leq u<3,\\0&\text{otherwise}.\end{cases}
$$
The <L2 norm> normalization follows from $1^2+(-2)^2+1^2=6$. Direct <integration> gives
$$
\int\eta=\frac{1-2+1}{\sqrt6}=0,\qquad \int u\eta(u)\,du=\frac{1/2-2(3/2)+5/2}{\sqrt6}=0,\qquad \int u^2\eta(u)\,du=\frac2{\sqrt6}\ne0.
$$
Thus $η$ has exactly two <vanishing moments>. In fact its coefficient is a <finite difference> of adjacent local <integrals>:
$$
c_\eta(f;a,b)=\frac{\sqrt a}{\sqrt6}(A_0-2A_1+A_2),\qquad A_j=\int_j^{j+1}f(b+au)\,du.
$$
The weights are those of the <second-order central difference>. The first moment balances the centres of the three <intervals>; it is not enough merely to balance their signed areas.

\Image[/wavelet-polynomial-overlap-cancellation.png]
{title=Signed overlaps of the Haar and second-difference analyzing functions with constant, linear, and quadratic test polynomials}

This $η$ is a normalized analyzing <function>, with no <orthonormal basis> assertion. Indeed, its unit translate has nonzero <L2 inner product>:
$$
\int_{\mathbb R}\eta(u)\eta(u-1)\,du=\frac{(-2)(1)+(1)(-2)}6=-\frac23.
$$
Hence these translates already fail <orthogonality>. The <Daubechies wavelet> construction imposes additional refinement and <orthogonality> requirements; two <vanishing moments> and unit <L2 norm> by themselves do not supply those requirements.