# How to find border wavelets with the same number of vanishing moments?

How to find border wavelets with the same number of vanishing moments? For example, I want to perform DWT on a sampled signal which has 8 samples.

I use (3,1) biorthogonal wavelet with following analysis and synthesis low-pass filters:

$$h_1(z) = -1/4 z^{-1} + 3/4 + 3/4 z -1/4 z^{2}$$

$$h_2(z) = 1/8 z^{-1} + 3/8 + 3/8 z + 1/8 z^{2}$$

So forward transform matrix is following (I rescale $$h_1$$ to have sum of coefficients 2):

$$A = \begin{pmatrix} 1 & 3/2 & -1/2 & 0 & 0 & 0 & 0 & 0 \\ 1/4 & -3/8 & 1/8 & 0 & 0 & 0 & 0 & 0 \\ 0 & -1/2 & 3/2 & 3/2 & -1/2 & 0 & 0 & 0 \\ 0 & -1/8 & 3/8 & -3/8 & 1/8 & 0 & 0 & 0 \\ 0 & 0 & 0 & -1/2 & 3/2 & 3/2 & -1/2 & 0 \\ 0 & 0 & 0 & -1/8 & 3/8 & -3/8 & 1/8 & 0 \\ 0 & 0 & 0 & 0 & 0 & -1/2 & 3/2 & 1 \\ 0 & 0 & 0 & 0 & 0 & -1/8 & 3/8 & -1/4 \\ \end{pmatrix}$$

Here I used "reflection" of a wavelet from an interval on which the signal is defined. Next I apply transform matrix to the signal.

$$x = \begin{pmatrix} 100 \\ 400 \\ 900 \\ 1600 \\ 2500 \\ 3600 \\ 4900 \\ 6400 \\ \end{pmatrix}$$

This signal is a quadratic polynomial $$f(n) = 100 n^2$$, where $$n$$ is a number of sample.

The result of $$Ax$$ is

$$Ax = \begin{pmatrix} 250 \\ -25/2 \\ 2300 \\ 0 \\ 5900 \\ 0 \\ 11950 \\ -425/2 \\ \end{pmatrix}$$

As you can see, inner wavelet coefficients are zero, but at borders they are $$-25/2$$ and $$-425/2$$, because border wavelets have only one vanishing moment. Is it possible to choose border wavelets so that wavelet coefficients are zero at borders too?

UPD: The problem is not only to find such a mother wavelet which has three (as in the example) vanishing moments at borders, but a proper scaling functions which generate multiresolution analysis.